Tango Core Classes Reference  9.3.4
Tango::TemplCommand Class Reference

This class is a class representing a command in the template command model without input or output parameter. More...

#include "tango.h"

Inheritance diagram for Tango::TemplCommand:
Collaboration diagram for Tango::TemplCommand:

Public Member Functions

Constructors

Miscellaneous constructors

 TemplCommand ()
 Constructs a newly allocated Command object. More...
 
 TemplCommand (const char *cmd_name, void(DeviceImpl::*exe_method)())
 Constructs a newly allocated TemplCommand object for a command with a name and an execution method. More...
 
 TemplCommand (string &cmd_name, void(DeviceImpl::*exe_method)())
 Constructs a newly allocated TemplCommand object for a command with a name and an execution method. More...
 
 TemplCommand (const char *cmd_name, void(DeviceImpl::*exe_method)(), bool(DeviceImpl::*state_method)(const CORBA::Any &))
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a command allowed method. More...
 
 TemplCommand (string &cmd_name, void(DeviceImpl::*exe_method)(), bool(DeviceImpl::*state_method)(const CORBA::Any &))
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a command allowed method. More...
 
 TemplCommand (const char *cmd_name, void(DeviceImpl::*exe_method)(), const char *in_desc, const char *out_desc)
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a description for the input and output command parameters. More...
 
 TemplCommand (string &cmd_name, void(DeviceImpl::*exe_method)(), string &in_desc, string &out_desc)
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a description for the input and output command parameters. More...
 
 TemplCommand (const char *cmd_name, void(DeviceImpl::*exe_method)(), bool(DeviceImpl::*state_method)(const CORBA::Any &), const char *in_desc, const char *out_desc)
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method, a command allowed method and a description for the input and output command parameters. More...
 
 TemplCommand (string &cmd_name, void(DeviceImpl::*exe_method)(), bool(DeviceImpl::*state_method)(const CORBA::Any &), string &in_desc, string &out_desc)
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method, a command allowed method and a description for the input and output command parameters. More...
 
 TemplCommand (const char *cmd_name, void(DeviceImpl::*exe_method)(), Tango::DispLevel level)
 Constructs a newly allocated TemplCommand object for a command with a name and an execution method. More...
 
 TemplCommand (string &cmd_name, void(DeviceImpl::*exe_method)(), Tango::DispLevel level)
 Constructs a newly allocated TemplCommand object for a command with a name and an execution method. More...
 
 TemplCommand (const char *cmd_name, void(DeviceImpl::*exe_method)(), bool(DeviceImpl::*state_method)(const CORBA::Any &), Tango::DispLevel level)
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a command allowed method. More...
 
 TemplCommand (string &cmd_name, void(DeviceImpl::*exe_method)(), bool(DeviceImpl::*state_method)(const CORBA::Any &), Tango::DispLevel level)
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a command allowed method. More...
 
 TemplCommand (const char *cmd_name, void(DeviceImpl::*exe_method)(), const char *in_desc, const char *out_desc, Tango::DispLevel level)
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a description for the input and output command parameters. More...
 
 TemplCommand (string &cmd_name, void(DeviceImpl::*exe_method)(), string &in_desc, string &out_desc, Tango::DispLevel level)
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a description for the input and output command parameters. More...
 
 TemplCommand (const char *cmd_name, void(DeviceImpl::*exe_method)(), bool(DeviceImpl::*state_method)(const CORBA::Any &), const char *in_desc, const char *out_desc, Tango::DispLevel level)
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method, a command allowed method and a description for the input and output command parameters. More...
 
 TemplCommand (string &cmd_name, void(DeviceImpl::*exe_method)(), bool(DeviceImpl::*state_method)(const CORBA::Any &), string &in_desc, string &out_desc, Tango::DispLevel level)
 Constructs a newly allocated TemplCommand object for a command with a name, an execution method, a command allowed method and a description for the input and output command parameters. More...
 
 TemplCommand (const char *)
 
 TemplCommand (string &)
 
 TemplCommand (const char *, Tango::DispLevel)
 
 TemplCommand (string &, Tango::DispLevel)
 
 TemplCommand (const char *, const char *, const char *)
 
 TemplCommand (string &, string &, string &)
 
 TemplCommand (const char *, const char *, const char *, DispLevel)
 
 TemplCommand (string &, string &, string &, DispLevel)
 
- Public Member Functions inherited from Tango::Command
 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...
 
virtual ~Command ()
 The object desctructor.
 
virtual void init_types ()
 Init command parameters type. More...
 
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...
 
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...
 
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
bool(DeviceImpl::* allowed_ptr )(const CORBA::Any &)
 The command allowed method object reference.
 
- Protected Attributes inherited from Tango::Command
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.
 

Miscellaneous methods

void set_type (const type_info &data_type, Tango::CmdArgType &type)
 Choose the correct TANGO data type constant according to data type. More...
 
CORBA::Any * execute (DeviceImpl *dev, const CORBA::Any &in_any)
 Invoke the command execution method given at object creation time. More...
 
bool is_allowed (DeviceImpl *dev, const CORBA::Any &in_any)
 Invoke the command allowed method given at object creation time. More...
 

Detailed Description

This class is a class representing a command in the template command model without input or output parameter.

$Author$ $Revision$

Constructor & Destructor Documentation

◆ TemplCommand() [1/17]

Tango::TemplCommand::TemplCommand ( )
inline

Constructs a newly allocated Command object.

The default constructor

◆ TemplCommand() [2/17]

Tango::TemplCommand::TemplCommand ( const char *  cmd_name,
void(DeviceImpl::*)()  exe_method 
)

Constructs a newly allocated TemplCommand object for a command with a name and an execution method.

This constructor set the command input and output type to Tango::DEV_VOID. The input and output parameter description are set to the default String "Uninitialised". The command display level is set to OPERATOR.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method

◆ TemplCommand() [3/17]

Tango::TemplCommand::TemplCommand ( string &  cmd_name,
void(DeviceImpl::*)()  exe_method 
)

Constructs a newly allocated TemplCommand object for a command with a name and an execution method.

This constructor set the command input and output type to Tango::DEV_VOID. The input and output parameter description are set to the default String "Uninitialised". The command display level is set to OPERATOR.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method

◆ TemplCommand() [4/17]

Tango::TemplCommand::TemplCommand ( const char *  cmd_name,
void(DeviceImpl::*)()  exe_method,
bool(DeviceImpl::*)(const CORBA::Any &)  state_method 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a command allowed method.

This constructor set the command input and output type to Tango::DEV_VOID The input and output parameter description are set to the default String "Uninitialised". The command display level is set to OPERATOR.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
state_methodPointer to the command allowed method

◆ TemplCommand() [5/17]

Tango::TemplCommand::TemplCommand ( string &  cmd_name,
void(DeviceImpl::*)()  exe_method,
bool(DeviceImpl::*)(const CORBA::Any &)  state_method 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a command allowed method.

This constructor set the command input and output type to Tango::DEV_VOID The input and output parameter description are set to the default String "Uninitialised". The command display level is set to OPERATOR.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
state_methodPointer to the command allowed method

◆ TemplCommand() [6/17]

Tango::TemplCommand::TemplCommand ( const char *  cmd_name,
void(DeviceImpl::*)()  exe_method,
const char *  in_desc,
const char *  out_desc 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a description for the input and output command parameters.

The command display level is set to OPERATOR.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
in_descThe command input parameter description
out_descThe command output parameter description

◆ TemplCommand() [7/17]

Tango::TemplCommand::TemplCommand ( string &  cmd_name,
void(DeviceImpl::*)()  exe_method,
string &  in_desc,
string &  out_desc 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a description for the input and output command parameters.

The command display level is set to OPERATOR.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
in_descThe command input parameter description
out_descThe command output parameter description

◆ TemplCommand() [8/17]

Tango::TemplCommand::TemplCommand ( const char *  cmd_name,
void(DeviceImpl::*)()  exe_method,
bool(DeviceImpl::*)(const CORBA::Any &)  state_method,
const char *  in_desc,
const char *  out_desc 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method, a command allowed method and a description for the input and output command parameters.

This constructor set the command input and output type to Tango::DEV_VOID. The command display level is set to OPERATOR.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
state_methodPointer to the command allowed method
in_descThe command input parameter description
out_descThe command output parameter description

◆ TemplCommand() [9/17]

Tango::TemplCommand::TemplCommand ( string &  cmd_name,
void(DeviceImpl::*)()  exe_method,
bool(DeviceImpl::*)(const CORBA::Any &)  state_method,
string &  in_desc,
string &  out_desc 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method, a command allowed method and a description for the input and output command parameters.

This constructor set the command input and output type to Tango::DEV_VOID. The command display level is set to OPERATOR.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
state_methodPointer to the command allowed method
in_descThe command input parameter description
out_descThe command output parameter description

◆ TemplCommand() [10/17]

Tango::TemplCommand::TemplCommand ( const char *  cmd_name,
void(DeviceImpl::*)()  exe_method,
Tango::DispLevel  level 
)

Constructs a newly allocated TemplCommand object for a command with a name and an execution method.

This constructor set the command input and output type to Tango::DEV_VOID. The input and output parameter description are set to the default String "Uninitialised".

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
levelThe command display level

◆ TemplCommand() [11/17]

Tango::TemplCommand::TemplCommand ( string &  cmd_name,
void(DeviceImpl::*)()  exe_method,
Tango::DispLevel  level 
)

Constructs a newly allocated TemplCommand object for a command with a name and an execution method.

This constructor set the command input and output type to Tango::DEV_VOID. The input and output parameter description are set to the default String "Uninitialised".

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
levelThe command display level

◆ TemplCommand() [12/17]

Tango::TemplCommand::TemplCommand ( const char *  cmd_name,
void(DeviceImpl::*)()  exe_method,
bool(DeviceImpl::*)(const CORBA::Any &)  state_method,
Tango::DispLevel  level 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a command allowed method.

This constructor set the command input and output type to Tango::DEV_VOID The input and output parameter description are set to the default String "Uninitialised".

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
state_methodPointer to the command allowed method
levelThe command display level

◆ TemplCommand() [13/17]

Tango::TemplCommand::TemplCommand ( string &  cmd_name,
void(DeviceImpl::*)()  exe_method,
bool(DeviceImpl::*)(const CORBA::Any &)  state_method,
Tango::DispLevel  level 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a command allowed method.

This constructor set the command input and output type to Tango::DEV_VOID The input and output parameter description are set to the default String "Uninitialised".

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
state_methodPointer to the command allowed method
levelThe command display level

◆ TemplCommand() [14/17]

Tango::TemplCommand::TemplCommand ( const char *  cmd_name,
void(DeviceImpl::*)()  exe_method,
const char *  in_desc,
const char *  out_desc,
Tango::DispLevel  level 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a description for the input and output command parameters.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
in_descThe command input parameter description
out_descThe command output parameter description
levelThe command display level

◆ TemplCommand() [15/17]

Tango::TemplCommand::TemplCommand ( string &  cmd_name,
void(DeviceImpl::*)()  exe_method,
string &  in_desc,
string &  out_desc,
Tango::DispLevel  level 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method and a description for the input and output command parameters.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
in_descThe command input parameter description
out_descThe command output parameter description
levelThe command display level

◆ TemplCommand() [16/17]

Tango::TemplCommand::TemplCommand ( const char *  cmd_name,
void(DeviceImpl::*)()  exe_method,
bool(DeviceImpl::*)(const CORBA::Any &)  state_method,
const char *  in_desc,
const char *  out_desc,
Tango::DispLevel  level 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method, a command allowed method and a description for the input and output command parameters.

This constructor set the command input and output type to Tango::DEV_VOID.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
state_methodPointer to the command allowed method
in_descThe command input parameter description
out_descThe command output parameter description
levelThe command display level

◆ TemplCommand() [17/17]

Tango::TemplCommand::TemplCommand ( string &  cmd_name,
void(DeviceImpl::*)()  exe_method,
bool(DeviceImpl::*)(const CORBA::Any &)  state_method,
string &  in_desc,
string &  out_desc,
Tango::DispLevel  level 
)

Constructs a newly allocated TemplCommand object for a command with a name, an execution method, a command allowed method and a description for the input and output command parameters.

This constructor set the command input and output type to Tango::DEV_VOID.

Parameters
cmd_nameThe command name
exe_methodPointer to the command execution method
state_methodPointer to the command allowed method
in_descThe command input parameter description
out_descThe command output parameter description
levelThe command display level

Member Function Documentation

◆ execute()

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

Invoke the command execution method given at object creation time.

This method is automatically called by the TANGO core classes when the associated command is requested by a client.

Parameters
devThe device on which the command must be executed
in_anyThe incoming data still packed in a CORBA Any object. For command created with this TemplCommand class, this Any object does not contain usefull data
Returns
The CORBA Any object returned to the client. For command created with this TemplCommand class, this any object does not contain data.
Exceptions
DevFailedIf the execution method failed Click here to read DevFailed exception specification

Implements Tango::Command.

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

◆ is_allowed()

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

Invoke the command allowed method given at object creation time.

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. If the user give a command allowed method at object creation time, this method will be invoked.

Parameters
devThe device on which the command must be executed
in_anyThe incoming data still packed in a CORBA Any object. For command created with this TemplCommand class, this Any object does not contain data
Returns
A boolean set to true is the command is allowed. Otherwise, the return value is false. This return value is always set to true if the user does not supply a method to be excuted. If a method has been supplied, the return value is the value returned by the user supplied mehod.

Reimplemented from Tango::Command.

◆ set_type()

void Tango::TemplCommand::set_type ( const type_info &  data_type,
Tango::CmdArgType &  type 
)

Choose the correct TANGO data type constant according to data type.

The TANGO constant is determined using the type_info object passed as first argument of the method. This data is compared to each defined Tango type.

Parameters
data_typeThe type to be analysed
typeA reference where Tango data type constant must be stored
Exceptions
DevFailedIf the type is not a Tango data type Click here to read DevFailed exception specification

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