Tango Core Classes Reference  9.3.3
Tango::Command Class Referenceabstract

This class is a class representing a command in the TANGO device server pattern. More...

#include "tango.h"

Inheritance diagram for Tango::Command:

Public Member Functions

Constructors

Miscellaneous constructors

 Command ()
 Constructs a newly allocated Command object. More...
 
 Command (const char *s, Tango::CmdArgType in, Tango::CmdArgType out)
 Constructs a newly allocated Command object for a command from its name and its input and output parameter types. More...
 
 Command (string &s, Tango::CmdArgType in, Tango::CmdArgType out)
 Constructs a newly allocated Command object for a command from its name and its input and output parameter types. More...
 
 Command (const char *s, Tango::CmdArgType in, Tango::CmdArgType out, const char *in_desc, const char *out_desc)
 Constructs a newly allocated Command object for a command from its name, its input and output parameter types plus parameters description The command display level is set to OPERATOR. More...
 
 Command (string &s, Tango::CmdArgType in, Tango::CmdArgType out, string &in_desc, string &out_desc)
 Constructs a newly allocated Command object for a command from its name, its input and output parameter types plus parameters description The command display level is set to OPERATOR. More...
 
 Command (const char *s, Tango::CmdArgType in, Tango::CmdArgType out, Tango::DispLevel level)
 Constructs a newly allocated Command object for a command from its name and its input and output parameter types. More...
 
 Command (string &s, Tango::CmdArgType in, Tango::CmdArgType out, Tango::DispLevel level)
 Constructs a newly allocated Command object for a command from its name and its input and output parameter types. More...
 
 Command (const char *s, Tango::CmdArgType in, Tango::CmdArgType out, const char *in_desc, const char *out_desc, Tango::DispLevel level)
 Constructs a newly allocated Command object for a command from its name, its input and output parameter types plus parameters description. More...
 
 Command (string &s, Tango::CmdArgType in, Tango::CmdArgType out, string &in_desc, string &out_desc, Tango::DispLevel level)
 Constructs a newly allocated Command object for a command from its name, its input and output parameter types plus parameters description. More...
 
Destructor

Only one desctructor is defined for this class

virtual ~Command ()
 The object desctructor.
 
Miscellaneous methods
virtual CORBA::Any * execute (DeviceImpl *dev, const CORBA::Any &in_any)=0
 Execute the command. More...
 
virtual bool is_allowed (DeviceImpl *dev, const CORBA::Any &in_any)
 Check if the command is allowed in the actual device state. More...
 
virtual void init_types ()
 Init command parameters type. More...
 
Get/Set object members.

These methods allows the external world to get/set DeviceImpl instance data members

string & get_name ()
 Return the command name. More...
 
void set_name (string &new_name)
 Set the command name. More...
 
string & get_lower_name ()
 Return the command name in lower case letters. More...
 
Tango::CmdArgType get_in_type ()
 Return the input parameter type. More...
 
Tango::CmdArgType get_out_type ()
 Return the output parameter type. More...
 
string & get_in_type_desc ()
 Return the input parameter description. More...
 
string & get_out_type_desc ()
 Return the output parameter description. More...
 
Tango::DispLevel get_disp_level ()
 Return the command display level. More...
 
void set_in_type_desc (const char *desc)
 Set the input parameter description field. More...
 
void set_in_type_desc (string &desc)
 Set the input parameter description field. More...
 
void set_out_type_desc (const char *desc)
 Set the output parameter description field. More...
 
void set_out_type_desc (string &desc)
 Set the output parameter description field. More...
 
void set_disp_level (Tango::DispLevel level)
 Set the command display level. More...
 
void set_polling_period (long per)
 Set the command polling period. More...
 
long get_polling_period ()
 Get the command polling period. More...
 
Extract methods.

All these methods extract data from the CORBA Any object received as command input data

void extract (const CORBA::Any &in, Tango::DevBoolean &data)
 Extract a boolean data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, Tango::DevShort &data)
 Extract a short data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, Tango::DevLong &data)
 Extract a long data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, Tango::DevLong64 &data)
 Extract a 64 bits long data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, Tango::DevFloat &data)
 Extract a float data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, Tango::DevDouble &data)
 Extract a double data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, Tango::DevUShort &data)
 Extract an unsigned short data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, Tango::DevULong &data)
 Extract an unsigned long data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, Tango::DevULong64 &data)
 Extract an unsigned 64 bits long data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, Tango::DevString &data)
 Extract a string from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const char *&data)
 Extract a const string from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarCharArray *&data)
 Extract a char array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarShortArray *&data)
 Extract a short array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarLongArray *&data)
 Extract a long array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarLong64Array *&data)
 Extract a 64 bits long array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarFloatArray *&data)
 Extract a float array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarDoubleArray *&data)
 Extract a double array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarUShortArray *&data)
 Extract a unsigned short array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarULongArray *&data)
 Extract a unsigned long array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarULong64Array *&data)
 Extract a unsigned 64 bits long array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarStringArray *&data)
 Extract a string array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarBooleanArray *&data)
 Extract a string array from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarLongStringArray *&data)
 Extract a DevVarLongStringArray data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevVarDoubleStringArray *&data)
 Extract a DevVarDoubleStringArray data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, Tango::DevState &data)
 Extract a Tango device state data from a CORBA Any object. More...
 
void extract (const CORBA::Any &in, const Tango::DevEncoded *&data)
 Extract a Tango DevEncoded data from a CORBA Any object. More...
 
Insert methods.

All these methods create a CORBA Any object and insert data into this object

CORBA::Any * insert ()
 Create an empty CORBA Any object. More...
 
CORBA::Any * insert (Tango::DevBoolean data)
 Create a CORBA Any object and insert a Tango::DevBoolean data in it. More...
 
CORBA::Any * insert (Tango::DevShort data)
 Create a CORBA Any object and insert a Tango::DevShort data in it. More...
 
CORBA::Any * insert (Tango::DevLong data)
 Create a CORBA Any object and insert a Tango::DevLong data in it. More...
 
CORBA::Any * insert (Tango::DevLong64 data)
 Create a CORBA Any object and insert a Tango::DevLong64 data in it. More...
 
CORBA::Any * insert (Tango::DevFloat data)
 Create a CORBA Any object and insert a Tango::DevFloat data in it. More...
 
CORBA::Any * insert (Tango::DevDouble data)
 Create a CORBA Any object and insert a Tango::DevDouble data in it. More...
 
CORBA::Any * insert (Tango::DevUShort data)
 Create a CORBA Any object and insert a Tango::DevUShort data in it. More...
 
CORBA::Any * insert (Tango::DevULong data)
 Create a CORBA Any object and insert a Tango::DevULong data in it. More...
 
CORBA::Any * insert (Tango::DevULong64 data)
 Create a CORBA Any object and insert a Tango::DevULong64 data in it. More...
 
CORBA::Any * insert (Tango::DevString data)
 Create a CORBA Any object and insert a Tango::DevString data in it. More...
 
CORBA::Any * insert (const char *data)
 Create a CORBA Any object and insert a Tango::DevString data in it. More...
 
CORBA::Any * insert (Tango::DevVarCharArray &data)
 Create a CORBA Any object and insert a Tango::DevVarCharArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarCharArray *data)
 Create a CORBA Any object and insert a Tango::DevVarCharArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarShortArray &data)
 Create a CORBA Any object and insert a Tango::DevVarShortArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarShortArray *data)
 Create a CORBA Any object and insert a Tango::DevVarShortArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarLongArray &data)
 Create a CORBA Any object and insert a Tango::DevVarLongArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarLongArray *data)
 Create a CORBA Any object and insert a Tango::DevVarLongArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarLong64Array &data)
 Create a CORBA Any object and insert a Tango::DevVarLong64Array data in it. More...
 
CORBA::Any * insert (Tango::DevVarLong64Array *data)
 Create a CORBA Any object and insert a Tango::DevVarLong64Array data in it. More...
 
CORBA::Any * insert (Tango::DevVarFloatArray &data)
 Create a CORBA Any object and insert a Tango::DevVarFloatArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarFloatArray *data)
 Create a CORBA Any object and insert a Tango::DevVarFloatArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarDoubleArray &data)
 Create a CORBA Any object and insert a Tango::DevVarDoubleArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarDoubleArray *data)
 Create a CORBA CORBA::Any object and insert a Tango::DevVarDoubleArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarUShortArray &data)
 Create a CORBA Any object and insert a Tango::DevVarUShortArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarUShortArray *data)
 Create a CORBA Any object and insert a Tango::DevVarUShortArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarULongArray &data)
 Create a CORBA Any object and insert a Tango::DevVarULongArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarULongArray *data)
 Create a CORBA Any object and insert a Tango::DevVarULongArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarULong64Array &data)
 Create a CORBA Any object and insert a Tango::DevVarULong64Array data in it. More...
 
CORBA::Any * insert (Tango::DevVarULong64Array *data)
 Create a CORBA Any object and insert a Tango::DevVarULong64Array data in it. More...
 
CORBA::Any * insert (Tango::DevVarStringArray &data)
 Create a CORBA Any object and insert a Tango::DevVarStringArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarStringArray *data)
 Create a CORBA Any object and insert a Tango::DevVarStringArray data in it. More...
 
CORBA::Any * insert (DevVarBooleanArray *data)
 Create a CORBA Any object and insert a Tango::DevVarBooleanArray data in it. More...
 
CORBA::Any * insert (DevVarBooleanArray &data)
 Create a CORBA Any object and insert a Tango::DevVarBooleanArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarLongStringArray &data)
 Create a CORBA Any object and insert a Tango::DevVarLongStringArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarLongStringArray *data)
 Create a CORBA Any object and insert a Tango::DevVarLongStringArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarDoubleStringArray &data)
 Create a CORBA Any object and insert a Tango::DevVarDoubleStringArray data in it. More...
 
CORBA::Any * insert (Tango::DevVarDoubleStringArray *data)
 Create a CORBA Any object and insert a Tango::DevVarDoubleStringArray data in it. More...
 
CORBA::Any * insert (Tango::DevState data)
 Create a CORBA Any object and insert a Tango::DevState data in it. More...
 
CORBA::Any * insert (Tango::DevEncoded *data)
 Create a CORBA Any object and insert a Tango::DevEncoded data in it. More...
 

Protected Attributes

Class data members
string name
 The command name.
 
string lower_name
 The command name in lower case.
 
Tango::CmdArgType in_type
 The command input parameter type.
 
Tango::CmdArgType out_type
 The command output parameter type.
 
string in_type_desc
 The command input parameter description.
 
string out_type_desc
 The command output parameter type.
 

Detailed Description

This class is a class representing a command in the TANGO device server pattern.

it is an abstract class. It is the root class for all command related classes for command implemented with the inheritance model or with the template command model

$Author$ $Revision$

Constructor & Destructor Documentation

◆ Command() [1/9]

Tango::Command::Command ( )
inline

Constructs a newly allocated Command object.

The default constructor

◆ Command() [2/9]

Tango::Command::Command ( const char *  s,
Tango::CmdArgType  in,
Tango::CmdArgType  out 
)

Constructs a newly allocated Command object for a command from its name and its input and output parameter types.

The input and output parameter description are set to the default String "Uninitialised". The command display level is set to OPERATOR.

Parameters
sThe command name
inThe command input parameter type
outThe command output parameter type

◆ Command() [3/9]

Tango::Command::Command ( string &  s,
Tango::CmdArgType  in,
Tango::CmdArgType  out 
)

Constructs a newly allocated Command object for a command from its name and its input and output parameter types.

The input and output parameter description are set to the default String "Uninitialised". The command display level is set to OPERATOR.

Parameters
sThe command name
inThe command input parameter type
outThe command output parameter type

◆ Command() [4/9]

Tango::Command::Command ( const char *  s,
Tango::CmdArgType  in,
Tango::CmdArgType  out,
const char *  in_desc,
const char *  out_desc 
)

Constructs a newly allocated Command object for a command from its name, its input and output parameter types plus parameters description The command display level is set to OPERATOR.

Parameters
sThe command name
inThe command input parameter type
outThe command output parameter type
in_descThe input parameter description
out_descThe output parameter description

◆ Command() [5/9]

Tango::Command::Command ( string &  s,
Tango::CmdArgType  in,
Tango::CmdArgType  out,
string &  in_desc,
string &  out_desc 
)

Constructs a newly allocated Command object for a command from its name, its input and output parameter types plus parameters description The command display level is set to OPERATOR.

Parameters
sThe command name
inThe command input parameter type
outThe command output parameter type
in_descThe input parameter description
out_descThe output parameter description

◆ Command() [6/9]

Tango::Command::Command ( const char *  s,
Tango::CmdArgType  in,
Tango::CmdArgType  out,
Tango::DispLevel  level 
)

Constructs a newly allocated Command object for a command from its name and its input and output parameter types.

The input and output parameter description are set to the default String "Uninitialised".

Parameters
sThe command name
inThe command input parameter type
outThe command output parameter type
levelThe command display level

◆ Command() [7/9]

Tango::Command::Command ( string &  s,
Tango::CmdArgType  in,
Tango::CmdArgType  out,
Tango::DispLevel  level 
)

Constructs a newly allocated Command object for a command from its name and its input and output parameter types.

The input and output parameter description are set to the default String "Uninitialised".

Parameters
sThe command name
inThe command input parameter type
outThe command output parameter type
levelThe command display level

◆ Command() [8/9]

Tango::Command::Command ( const char *  s,
Tango::CmdArgType  in,
Tango::CmdArgType  out,
const char *  in_desc,
const char *  out_desc,
Tango::DispLevel  level 
)

Constructs a newly allocated Command object for a command from its name, its input and output parameter types plus parameters description.

Parameters
sThe command name
inThe command input parameter type
outThe command output parameter type
in_descThe input parameter description
out_descThe output parameter description
levelThe command display level

◆ Command() [9/9]

Tango::Command::Command ( string &  s,
Tango::CmdArgType  in,
Tango::CmdArgType  out,
string &  in_desc,
string &  out_desc,
Tango::DispLevel  level 
)

Constructs a newly allocated Command object for a command from its name, its input and output parameter types plus parameters description.

Parameters
sThe command name
inThe command input parameter type
outThe command output parameter type
in_descThe input parameter description
out_descThe output parameter description
levelThe command display level

Member Function Documentation

◆ execute()

virtual CORBA::Any* Tango::Command::execute ( DeviceImpl dev,
const CORBA::Any &  in_any 
)
pure virtual

Execute the command.

This method is automtically called by the TANGO core classes when the associated command is requested by a client. This method is abstract and must be redefined in each sub-class

Parameters
devThe device on which the command must be executed
in_anyThe incoming data still packed in a CORBA Any object.
Returns
The CORBA Any object returned to the client.
Exceptions
DevFailedIf the execution method failed. Click here to read DevFailed exception specification

Implemented in Tango::TemplCommandOut< OUTARG >, Tango::TemplCommandIn< INARG >, Tango::TemplCommandInOut< INARG, OUTARG >, and Tango::TemplCommand.

◆ extract() [1/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const char *&  data 
)

Extract a const string from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted string data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [2/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevEncoded *&  data 
)

Extract a Tango DevEncoded data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted DevEncoded data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [3/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarBooleanArray *&  data 
)

Extract a string array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted string array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [4/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarCharArray *&  data 
)

Extract a char array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted char array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [5/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarDoubleArray *&  data 
)

Extract a double array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted double array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [6/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarDoubleStringArray *&  data 
)

Extract a DevVarDoubleStringArray data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted DevVarDoubleStringArray data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [7/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarFloatArray *&  data 
)

Extract a float array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted float array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [8/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarLong64Array *&  data 
)

Extract a 64 bits long array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted 64 bits long array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [9/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarLongArray *&  data 
)

Extract a long array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted long array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [10/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarLongStringArray *&  data 
)

Extract a DevVarLongStringArray data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted DevVarLongStringArray data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [11/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarShortArray *&  data 
)

Extract a short array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted short array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [12/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarStringArray *&  data 
)

Extract a string array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted string array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [13/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarULong64Array *&  data 
)

Extract a unsigned 64 bits long array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted unsigned 64 bits long array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [14/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarULongArray *&  data 
)

Extract a unsigned long array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted unsigned long array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [15/26]

void Tango::Command::extract ( const CORBA::Any &  in,
const Tango::DevVarUShortArray *&  data 
)

Extract a unsigned short array from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted unsigned char array
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [16/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevBoolean &  data 
)

Extract a boolean data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted boolean data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [17/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevDouble &  data 
)

Extract a double data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted double data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [18/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevFloat &  data 
)

Extract a float data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted float data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [19/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevLong &  data 
)

Extract a long data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted long data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [20/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevLong64 &  data 
)

Extract a 64 bits long data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted 64 bits long data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [21/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevShort &  data 
)

Extract a short data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted short data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [22/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevState &  data 
)

Extract a Tango device state data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted device state data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [23/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevString &  data 
)

Extract a string from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted string data
Exceptions
DevFailedIf the Any object does not contains a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [24/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevULong &  data 
)

Extract an unsigned long data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted unsigned long data
Exceptions
DevFailedIf the Any object does not contanis a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [25/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevULong64 &  data 
)

Extract an unsigned 64 bits long data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted unsigned 64 bits long data
Exceptions
DevFailedIf the Any object does not contanis a data of the waited type. Click here to read DevFailed exception specification

◆ extract() [26/26]

void Tango::Command::extract ( const CORBA::Any &  in,
Tango::DevUShort &  data 
)

Extract an unsigned short data from a CORBA Any object.

Parameters
inThe CORBA Any object
dataReference to the extracted unsigned short data
Exceptions
DevFailedIf the Any object does not contanis a data of the waited type. Click here to read DevFailed exception specification

◆ get_disp_level()

Tango::DispLevel Tango::Command::get_disp_level ( )
inline

Return the command display level.

Returns
The command display level

◆ get_in_type()

Tango::CmdArgType Tango::Command::get_in_type ( )
inline

Return the input parameter type.

Returns
The input parameter type

References in_type.

◆ get_in_type_desc()

string& Tango::Command::get_in_type_desc ( )
inline

Return the input parameter description.

Returns
The input parameter description

References in_type_desc.

◆ get_lower_name()

string& Tango::Command::get_lower_name ( )
inline

Return the command name in lower case letters.

Returns
The command name

References lower_name.

◆ get_name()

string& Tango::Command::get_name ( )
inline

Return the command name.

Returns
The command name

References name.

◆ get_out_type()

Tango::CmdArgType Tango::Command::get_out_type ( )
inline

Return the output parameter type.

Returns
The output parameter type

References out_type.

◆ get_out_type_desc()

string& Tango::Command::get_out_type_desc ( )
inline

Return the output parameter description.

Returns
The output parameter description

References out_type_desc.

◆ get_polling_period()

long Tango::Command::get_polling_period ( )
inline

Get the command polling period.

Returns
The command polling period (in mS)

◆ init_types()

virtual void Tango::Command::init_types ( )
inlinevirtual

Init command parameters type.

This method is used only for command implemented using the Tango template command model. In this base class, it does nothing and is re-define in sub-classes.

Reimplemented in Tango::TemplCommandOut< OUTARG >, Tango::TemplCommandIn< INARG >, and Tango::TemplCommandInOut< INARG, OUTARG >.

◆ insert() [1/40]

CORBA::Any* Tango::Command::insert ( )

Create an empty CORBA Any object.

Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [2/40]

CORBA::Any* Tango::Command::insert ( const char *  data)

Create a CORBA Any object and insert a Tango::DevString data in it.

Te parameter type is char * and not Tango::DevString because the const C++ modifier applied to a Tango::DevString make the pointer constant and not the pointed to characters to be constant.

Parameters
dataThe string to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [3/40]

CORBA::Any* Tango::Command::insert ( DevVarBooleanArray &  data)

Create a CORBA Any object and insert a Tango::DevVarBooleanArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarBooleanArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [4/40]

CORBA::Any* Tango::Command::insert ( DevVarBooleanArray *  data)

Create a CORBA Any object and insert a Tango::DevVarBooleanArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [5/40]

CORBA::Any* Tango::Command::insert ( Tango::DevBoolean  data)

Create a CORBA Any object and insert a Tango::DevBoolean data in it.

Parameters
dataThe data to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [6/40]

CORBA::Any* Tango::Command::insert ( Tango::DevDouble  data)

Create a CORBA Any object and insert a Tango::DevDouble data in it.

Parameters
dataThe data to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [7/40]

CORBA::Any* Tango::Command::insert ( Tango::DevEncoded *  data)

Create a CORBA Any object and insert a Tango::DevEncoded data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarDoubleStringArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [8/40]

CORBA::Any* Tango::Command::insert ( Tango::DevFloat  data)

Create a CORBA Any object and insert a Tango::DevFloat data in it.

Parameters
dataThe data to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [9/40]

CORBA::Any* Tango::Command::insert ( Tango::DevLong  data)

Create a CORBA Any object and insert a Tango::DevLong data in it.

Parameters
dataThe data to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [10/40]

CORBA::Any* Tango::Command::insert ( Tango::DevLong64  data)

Create a CORBA Any object and insert a Tango::DevLong64 data in it.

Parameters
dataThe data to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [11/40]

CORBA::Any* Tango::Command::insert ( Tango::DevShort  data)

Create a CORBA Any object and insert a Tango::DevShort data in it.

Parameters
dataThe data to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [12/40]

CORBA::Any* Tango::Command::insert ( Tango::DevState  data)

Create a CORBA Any object and insert a Tango::DevState data in it.

Parameters
dataThe data to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [13/40]

CORBA::Any* Tango::Command::insert ( Tango::DevString  data)

Create a CORBA Any object and insert a Tango::DevString data in it.

This method will also de-allocate the string passed as parameter.

Parameters
dataThe string to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [14/40]

CORBA::Any* Tango::Command::insert ( Tango::DevULong  data)

Create a CORBA Any object and insert a Tango::DevULong data in it.

Parameters
dataThe data to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [15/40]

CORBA::Any* Tango::Command::insert ( Tango::DevULong64  data)

Create a CORBA Any object and insert a Tango::DevULong64 data in it.

Parameters
dataThe data to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [16/40]

CORBA::Any* Tango::Command::insert ( Tango::DevUShort  data)

Create a CORBA Any object and insert a Tango::DevUShort data in it.

Parameters
dataThe data to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [17/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarCharArray &  data)

Create a CORBA Any object and insert a Tango::DevVarCharArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [18/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarCharArray *  data)

Create a CORBA Any object and insert a Tango::DevVarCharArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarCharArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [19/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarDoubleArray &  data)

Create a CORBA Any object and insert a Tango::DevVarDoubleArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [20/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarDoubleArray *  data)

Create a CORBA CORBA::Any object and insert a Tango::DevVarDoubleArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarDoubleArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [21/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarDoubleStringArray &  data)

Create a CORBA Any object and insert a Tango::DevVarDoubleStringArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [22/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarDoubleStringArray *  data)

Create a CORBA Any object and insert a Tango::DevVarDoubleStringArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarDoubleStringArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [23/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarFloatArray &  data)

Create a CORBA Any object and insert a Tango::DevVarFloatArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [24/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarFloatArray *  data)

Create a CORBA Any object and insert a Tango::DevVarFloatArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarFloatArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [25/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarLong64Array &  data)

Create a CORBA Any object and insert a Tango::DevVarLong64Array data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [26/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarLong64Array *  data)

Create a CORBA Any object and insert a Tango::DevVarLong64Array data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarLongArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [27/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarLongArray &  data)

Create a CORBA Any object and insert a Tango::DevVarLongArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [28/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarLongArray *  data)

Create a CORBA Any object and insert a Tango::DevVarLongArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarLongArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [29/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarLongStringArray &  data)

Create a CORBA Any object and insert a Tango::DevVarLongStringArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [30/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarLongStringArray *  data)

Create a CORBA Any object and insert a Tango::DevVarLongStringArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarLongStringArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [31/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarShortArray &  data)

Create a CORBA Any object and insert a Tango::DevVarShortArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [32/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarShortArray *  data)

Create a CORBA Any object and insert a Tango::DevVarShortArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarShortArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [33/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarStringArray &  data)

Create a CORBA Any object and insert a Tango::DevVarStringArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [34/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarStringArray *  data)

Create a CORBA Any object and insert a Tango::DevVarStringArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarStringArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [35/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarULong64Array &  data)

Create a CORBA Any object and insert a Tango::DevVarULong64Array data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [36/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarULong64Array *  data)

Create a CORBA Any object and insert a Tango::DevVarULong64Array data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarULongArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [37/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarULongArray &  data)

Create a CORBA Any object and insert a Tango::DevVarULongArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [38/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarULongArray *  data)

Create a CORBA Any object and insert a Tango::DevVarULongArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarULongArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [39/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarUShortArray &  data)

Create a CORBA Any object and insert a Tango::DevVarUShortArray data in it.

This method will do a deep copy of the array into the Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ insert() [40/40]

CORBA::Any* Tango::Command::insert ( Tango::DevVarUShortArray *  data)

Create a CORBA Any object and insert a Tango::DevVarUShortArray data in it.

This method consumes the memory used by the array. When the CORBA layer will destroy the Any object, the memory allocated for the array will also be freed. This is the recommended method to insert Tango::DevVarUShortArray data type into a CORBA Any object.

Parameters
dataThe array to be inserted into the Any object
Exceptions
DevFailedIf the Any object creation failed. Click here to read DevFailed exception specification

◆ is_allowed()

virtual bool Tango::Command::is_allowed ( DeviceImpl dev,
const CORBA::Any &  in_any 
)
inlinevirtual

Check if the command is allowed in the actual device state.

This method is automtically called by the TANGO core classes when the associated command is requested by a client to check if the command is allowed in the actual device state. This method is the default is_allowed method which always allows the command to be executed. It is possible to re-define it if this default behaviour does not fulfill the device needs.

Parameters
devThe device on which the command must be executed
in_anyThe incoming data still packed in a CORBA Any object. This data is passed to this method in case it is necessary to take the command allowed decision
Returns
A boolean set to true is the command is allowed. Otherwise, the return value is false.

Reimplemented in Tango::TemplCommand.

◆ set_disp_level()

void Tango::Command::set_disp_level ( Tango::DispLevel  level)
inline

Set the command display level.

Parameters
levelThe command display level

◆ set_in_type_desc() [1/2]

void Tango::Command::set_in_type_desc ( const char *  desc)
inline

Set the input parameter description field.

Parameters
descThe input parameter description

References in_type_desc.

◆ set_in_type_desc() [2/2]

void Tango::Command::set_in_type_desc ( string &  desc)
inline

Set the input parameter description field.

Parameters
descThe input parameter description

References in_type_desc.

◆ set_name()

void Tango::Command::set_name ( string &  new_name)
inline

Set the command name.

Parameters
new_nameThe new command name

References name.

◆ set_out_type_desc() [1/2]

void Tango::Command::set_out_type_desc ( const char *  desc)
inline

Set the output parameter description field.

Parameters
descThe output parameter description

References out_type_desc.

◆ set_out_type_desc() [2/2]

void Tango::Command::set_out_type_desc ( string &  desc)
inline

Set the output parameter description field.

Parameters
descThe output parameter description

References out_type_desc.

◆ set_polling_period()

void Tango::Command::set_polling_period ( long  per)
inline

Set the command polling period.

Parameters
perThe command polling period (in mS)

The documentation for this class was generated from the following file: