Tango Core Classes Reference
9.3.4
|
Base class for Tango device access. More...
#include "tango.h"
Public Member Functions | |
Miscellaneous methods | |
virtual void | set_timeout_millis (int timeout) |
Set device timeout. More... | |
virtual int | get_timeout_millis () |
Get device timeout. More... | |
int | get_idl_version () |
Get device IDL version. More... | |
virtual Tango::DevSource | get_source () |
Get device source. More... | |
virtual void | set_source (Tango::DevSource sou) |
Set device source. More... | |
virtual void | set_transparency_reconnection (bool val) |
Set device transparency (reconnection) mode. More... | |
virtual bool | get_transparency_reconnection () |
Get device transparency (reconnection) mode. More... | |
Synchronous command oriented methods | |
virtual DeviceData | command_inout (string &cmd_name) |
Execute a command (without input data) More... | |
virtual DeviceData | command_inout (const char *cmd_name) |
Execute a command (without input data) More... | |
virtual DeviceData | command_inout (string &cmd_name, DeviceData &d_in) |
Execute a command (with input data) More... | |
virtual DeviceData | command_inout (const char *cmd_name, DeviceData &d_in) |
Execute a command (with input data) More... | |
Aynchronous command oriented methods | |
virtual long | command_inout_asynch (const char *cmd_name, DeviceData &argin, bool forget=false) |
Execute a command asynchronously (with input argument) More... | |
virtual long | command_inout_asynch (string &cmd_name, DeviceData &argin, bool forget=false) |
Execute a command asynchronously (with input argument) More... | |
virtual long | command_inout_asynch (const char *cmd_name, bool forget=false) |
Execute a command asynchronously. More... | |
virtual long | command_inout_asynch (string &cmd_name, bool forget=false) |
Execute a command asynchronously. More... | |
virtual DeviceData | command_inout_reply (long id) |
Check an asynchronous command_inout answer is arrived. More... | |
virtual DeviceData | command_inout_reply (long id, long timeout) |
Check an asynchronous command_inout answer is arrived with timeout. More... | |
virtual void | command_inout_asynch (string &cmd_name, CallBack &cb) |
Execute a command asynchronously with callback. More... | |
virtual void | command_inout_asynch (const char *cmd_name, CallBack &cb) |
Execute a command asynchronously with callback. More... | |
virtual void | command_inout_asynch (string &cmd_name, DeviceData &argin, CallBack &cb) |
Execute a command asynchronously with input value and callback. More... | |
virtual void | command_inout_asynch (const char *cmd_name, DeviceData &argin, CallBack &cb) |
Execute a command asynchronously with input value and callback. More... | |
Asynchronous attribute related methods | |
virtual void | get_asynch_replies () |
Fire callback methods. More... | |
virtual void | get_asynch_replies (long timeout) |
Fire callback methds with timeout. More... | |
virtual void | cancel_asynch_request (long id) |
Cancel a pending asynchronous request. More... | |
virtual void | cancel_all_polling_asynch_request () |
Cancel all pending asynchronous request. More... | |
Base class for Tango device access.
Base class for Tango device access. This class is pure virtual and can be instantiated as is.
|
virtual |
Cancel all pending asynchronous request.
Cancel all pending polling asynchronous requests. This is a call local to the client. It simply allows the caller not to get the answers of the asynchronous requests. It does not interrupt the call execution on the remote devices.
|
virtual |
Cancel a pending asynchronous request.
Cancel a pending asynchronous request. id is the asynchronous call identifier. This is a call local to the client. It simply allows the caller not to get the answer of the asynchronous request. It does not interrupt the call execution on the remote device.
[in] | id | The call identifier |
AsynCall |
|
inlinevirtual |
Execute a command (without input data)
Execute a command on a device which takes no input arguments (void). The result is returned in a DeviceData object
[in] | cmd_name | The command name |
ConnectionFailed,CommunicationFailed,DeviceUnlocked,DevFailed | from device |
|
inlinevirtual |
Execute a command (with input data)
Execute a command on a device. Input arguments are passed in a DeviceData object, output is returned as a DeviceData object.
[in] | cmd_name | The command name |
[in] | d_in | Command input data |
ConnectionFailed,CommunicationFailed,DeviceUnlocked,DevFailed | from device |
|
virtual |
Execute a command (without input data)
Execute a command on a device which takes no input arguments (void). The result is returned in a DeviceData object
[in] | cmd_name | The command name |
ConnectionFailed,CommunicationFailed,DeviceUnlocked,DevFailed | from device |
|
virtual |
Execute a command (with input data)
Execute a command on a device. Input arguments are passed in a DeviceData object, output is returned as a DeviceData object.
[in] | cmd_name | The command name |
[in] | d_in | Command input data |
ConnectionFailed,CommunicationFailed,DeviceUnlocked,DevFailed | from device |
|
virtual |
Execute a command asynchronously.
Execute asynchronously (polling model) a command on a device which takes no input argument. The last argument is a fire and forget flag. If this flag is set to true, this means that the client does not care at all about the server answer and will even not try to get it. A false default value is provided. Please, note that device re-connection will not take place (in case it is needed) if the fire and forget mode is used. Therefore, an application using only fire and forget requests is not able to automatically re-connnect to device. This call returns an asynchronous call identifier which is needed to get the command result.
[in] | cmd_name | The command name |
[in] | forget | Fire and forget flag |
ConnectionFailed |
|
virtual |
Execute a command asynchronously with callback.
Execute asynchronously (callback model) a command on a device which takes no input argument. The last argument is a reference to a callback object. This callback object should be an instance of a user class inheriting from the Tango::CallBack class with the cmd_ended() method overloaded.
[in] | cmd_name | The command name |
[in] | cb | The call-back object |
ConnectionFailed |
|
virtual |
Execute a command asynchronously (with input argument)
Execute asynchronously (polling model) a command on a device. Input arguments are passed in a DeviceData object (see following chapters on how to insert data into DeviceData object). The last argument is a fire and forget flag. If this flag is set to true, this means that the client does not care at all about the server answer and will even not try to get it. A false default value is provided. Please, note that device re-connection will not take place (in case it is needed) if the fire and forget mode is used. Therefore, an application using only fire and forget requests is not able to automatically re-connnect to device. This call returns an asynchronous call identifier which is needed to get the command result.
[in] | cmd_name | The command name |
[in] | argin | Command input data |
[in] | forget | Fire and forget flag |
ConnectionFailed |
|
virtual |
Execute a command asynchronously with input value and callback.
Execute asynchronously (callback model) a command on a device. Input arguments are passed in a DeviceData object (see following chapters on how to insert data into DeviceData object). The last argument is a reference to a callback object. This callback object should be an instance of a user class inheriting from the Tango::CallBack class with the cmd_ended() method overloaded.
[in] | cmd_name | The command name |
[in] | argin | The command input data |
[in] | cb | The call-back object |
ConnectionFailed |
|
virtual |
Execute a command asynchronously.
Execute asynchronously (polling model) a command on a device which takes no input argument. The last argument is a fire and forget flag. If this flag is set to true, this means that the client does not care at all about the server answer and will even not try to get it. A false default value is provided. Please, note that device re-connection will not take place (in case it is needed) if the fire and forget mode is used. Therefore, an application using only fire and forget requests is not able to automatically re-connnect to device. This call returns an asynchronous call identifier which is needed to get the command result.
[in] | cmd_name | The command name |
[in] | forget | Fire and forget flag |
ConnectionFailed |
|
virtual |
Execute a command asynchronously with callback.
Execute asynchronously (callback model) a command on a device which takes no input argument. The last argument is a reference to a callback object. This callback object should be an instance of a user class inheriting from the Tango::CallBack class with the cmd_ended() method overloaded.
[in] | cmd_name | The command name |
[in] | cb | The call-back object |
ConnectionFailed |
|
virtual |
Execute a command asynchronously (with input argument)
Execute asynchronously (polling model) a command on a device. Input arguments are passed in a DeviceData object (see following chapters on how to insert data into DeviceData object). The last argument is a fire and forget flag. If this flag is set to true, this means that the client does not care at all about the server answer and will even not try to get it. A false default value is provided. Please, note that device re-connection will not take place (in case it is needed) if the fire and forget mode is used. Therefore, an application using only fire and forget requests is not able to automatically re-connnect to device. This call returns an asynchronous call identifier which is needed to get the command result.
[in] | cmd_name | The command name |
[in] | argin | Command input data |
[in] | forget | Fire and forget flag |
ConnectionFailed |
|
virtual |
Execute a command asynchronously with input value and callback.
Execute asynchronously (callback model) a command on a device. Input arguments are passed in a DeviceData object (see following chapters on how to insert data into DeviceData object). The last argument is a reference to a callback object. This callback object should be an instance of a user class inheriting from the Tango::CallBack class with the cmd_ended() method overloaded.
[in] | cmd_name | The command name |
[in] | argin | The command input data |
[in] | cb | The call-back object |
ConnectionFailed |
|
virtual |
Check an asynchronous command_inout answer is arrived.
Check if the answer of an asynchronous command_inout is arrived (polling model). id is the asynchronous call identifier. If the reply is arrived and if it is a valid reply, it is returned to the caller in a DeviceData object. If the reply is an exception, it is re-thrown by this call. An exception is also thrown in case of the reply is not yet arrived. Example :
[in] | id | The call identifier |
AsynCall,AsynReplyNotArrived,CommunicationFailed,DevFailed | from device |
|
virtual |
Check an asynchronous command_inout answer is arrived with timeout.
Check if the answer of an asynchronous command_inout is arrived (polling model). id is the asynchronous call identifier. If the reply is arrived and if it is a valid reply, it is returned to the caller in a DeviceData object. If the reply is an exception, it is re-thrown by this call. If the reply is not yet arrived, the call will wait (blocking the process) for the time specified in timeout. If after timeout milliseconds, the reply is still not there, an exception is thrown. If timeout is set to 0, the call waits until the reply arrived.
[in] | id | The call identifier 8 |
[in] | timeout | The timeout value |
AsynCall,AsynReplyNotArrived,CommunicationFailed,DevFailed | from device |
|
virtual |
Fire callback methods.
Fire callback methods for device asynchronous requests with already arrived replied. Returns immediately if there is no replies already arrived or if there is no asynchronous request for the device. Example :
|
virtual |
Fire callback methds with timeout.
Fire callback methods for device asynchronous requests (command and attributes) with already arrived replied. Wait and block the caller for timeout milliseconds if they are some device asynchronous requests which are not yet arrived. Returns immediately if there is no asynchronous request for the device. If timeout is set to 0, the call waits until all the asynchronous requests sent to the device has received a reply.
[in] | timeout | The timeout value |
|
inline |
Get device IDL version.
Get the version of the Tango Device IDL interface implemented by the device
|
virtual |
Get device source.
Get the device data source used by command_inout or read_attribute methods. The DevSource is an enumerated type which can be one of {DEV, CACHE, CACHE_DEV}. See chapter on Advanced Feature in Tango book for all details regarding polling.
|
virtual |
Get device timeout.
Get the client side timeout in milliseconds.
|
inlinevirtual |
Get device transparency (reconnection) mode.
Returns the transparency reconnection flag. See Reconnection and exception for more details on reconnection and exception
|
virtual |
Set device source.
Set the data source (device, polling buffer, polling buffer than device) for command_inout and read_attribute methods. The DevSource is an enumerated type which can be one of {DEV, CACHE, CACHE_DEV}. The default value is CACHE_DEV. See chapter on Advanced Feature for all details regarding polling
[in] | sou | The device source |
|
virtual |
Set device timeout.
Set client side timeout for device in milliseconds. Any method which takes longer than this time to execute will throw an exception.
[in] | timeout | The timeout value in mS |
|
inlinevirtual |
Set device transparency (reconnection) mode.
If flag is true, no exception will be thrown in case of network communication error between client and server. The API will try to re-build the network connection between client and server as soon as an error is detected. See Reconnection and exception for more details on reconnection and exception
[in] | val | The device transparency flag |