ESRF Logo

Elettra Logo

Soleil Logo

Alba Logo

Desy Logo

MAX-lab Logo

FRM2 Logo


SYNCHROTRON ALBA --- SYNCHROTRON ELETTRA

EUROPEAN SYNCHROTRON RADIATION FACILITY --- SYNCHROTRON PETRA III

SYNCHROTRON SOLEIL --- SYNCHROTRON MAX 4

NEUTRON SOURCE FRM 2

Tango::TemplCommand Class Reference

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

#include <command.h>

Inheritance diagram for Tango::TemplCommand:

Tango::Command Tango::TemplCommandIn< INARG > Tango::TemplCommandInOut< INARG, OUTARG > Tango::TemplCommandOut< OUTARG >

List of all members.

Public Member Functions

Constructors
Miscellaneous constructors

 TemplCommand ()
 Constructs a newly allocated Command object.
 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.
 TemplCommand (string &cmd_name, void(DeviceImpl::*exe_method)())
 Constructs a newly allocated TemplCommand object for a command with a name and an execution method.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
Destructor
Only one desctructor is defined for this class

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

Protected Attributes

Class data members
bool(DeviceImpl::* allowed_ptr )(const CORBA::Any &)
 The command allowed method object reference.


Detailed Description

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

Author
taurel
Revision
15556

Constructor & Destructor Documentation

Tango::TemplCommand::TemplCommand (  )  [inline]

Constructs a newly allocated Command object.

The default constructor

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_name The command name
exe_method Pointer to the command execution method

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_name The command name
exe_method Pointer to the command execution method

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_name The command name
exe_method Pointer to the command execution method
state_method Pointer to the command allowed method

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_name The command name
exe_method Pointer to the command execution method
state_method Pointer to the command allowed method

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_name The command name
exe_method Pointer to the command execution method
in_desc The command input parameter description
out_desc The command output parameter description

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_name The command name
exe_method Pointer to the command execution method
in_desc The command input parameter description
out_desc The command output parameter description

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_name The command name
exe_method Pointer to the command execution method
state_method Pointer to the command allowed method
in_desc The command input parameter description
out_desc The command output parameter description

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_name The command name
exe_method Pointer to the command execution method
state_method Pointer to the command allowed method
in_desc The command input parameter description
out_desc The command output parameter description

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_name The command name
exe_method Pointer to the command execution method
level The command display level

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_name The command name
exe_method Pointer to the command execution method
level The command display level

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_name The command name
exe_method Pointer to the command execution method
state_method Pointer to the command allowed method
level The command display level

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_name The command name
exe_method Pointer to the command execution method
state_method Pointer to the command allowed method
level The command display level

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_name The command name
exe_method Pointer to the command execution method
in_desc The command input parameter description
out_desc The command output parameter description
level The command display level

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_name The command name
exe_method Pointer to the command execution method
in_desc The command input parameter description
out_desc The command output parameter description
level The command display level

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_name The command name
exe_method Pointer to the command execution method
state_method Pointer to the command allowed method
in_desc The command input parameter description
out_desc The command output parameter description
level The command display level

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_name The command name
exe_method Pointer to the command execution method
state_method Pointer to the command allowed method
in_desc The command input parameter description
out_desc The command output parameter description
level The command display level


Member Function Documentation

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:
dev The device on which the command must be executed
in_any The 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:
DevFailed If the execution method failed Click here to read DevFailed exception specification

Implements Tango::Command.

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

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:
dev The device on which the command must be executed
in_any The 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.

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_type The type to be analysed
type A reference where Tango data type constant must be stored
Exceptions:
DevFailed If 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:
Tango Device Server User's Guide



ALBA - Control Team / DESY - Hasylab Petra III

ELETTRA - Controls and Diagnostics / ESRF - Software Engineering Group

SOLEIL - Controle Commande et Acquisition / MAX-lab - MAX 4

FRM2 - Control group