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::Device_4Impl Class Reference

Base class for all TANGO device since version 4. More...

#include <device_4.h>

Inheritance diagram for Tango::Device_4Impl:

Tango::Device_3Impl Tango::Device_2Impl Tango::DeviceImpl

List of all members.

Public Member Functions

Constructors
Miscellaneous constructors

 Device_4Impl (DeviceClass *device_class, string &dev_name)
 Constructs a newly allocated Device_4Impl object from its name.
 Device_4Impl (DeviceClass *device_class, string &dev_name, string &desc)
 Constructs a newly allocated Device_4Impl object from its name and its description.
 Device_4Impl (DeviceClass *device_class, string &dev_name, string &desc, Tango::DevState dev_state, string &dev_status)
 Constructs a newly allocated Device_4Impl object from all its creation parameters.
 Device_4Impl (DeviceClass *device_class, const char *dev_name, const char *desc="A TANGO device", Tango::DevState dev_state=Tango::UNKNOWN, const char *dev_status=StatusNotSet)
 Constructs a newly allocated Device_4Impl object from all its creation parameters with some default values.
Destructor
Only one desctructor is defined for this class

virtual ~Device_4Impl ()
 The device desctructor.
CORBA operation methods
Method defined to implement TANGO device CORBA operation

virtual Tango::DevAttrHistory_4 * read_attribute_history_4 (const char *name, CORBA::Long n) throw (Tango::DevFailed, CORBA::SystemException)
 Read attribute value history.
virtual Tango::DevCmdHistory_4 * command_inout_history_4 (const char *command, CORBA::Long n) throw (Tango::DevFailed, CORBA::SystemException)
 Read command value history.
virtual CORBA::Any * command_inout_4 (const char *in_cmd, const CORBA::Any &in_data, Tango::DevSource source, const Tango::ClntIdent &cl_ident) throw (Tango::DevFailed, CORBA::SystemException)
 Execute a command.
virtual
Tango::AttributeValueList_4 * 
read_attributes_4 (const Tango::DevVarStringArray &names, Tango::DevSource source, const Tango::ClntIdent &cl_ident) throw (Tango::DevFailed, CORBA::SystemException)
 Read attribute(s) value.
virtual void write_attributes_4 (const Tango::AttributeValueList_4 &values, const Tango::ClntIdent &cl_ident) throw (Tango::MultiDevFailed, Tango::DevFailed,CORBA::SystemException)
 Write attribute(s) value.
virtual void set_attribute_config_4 (const Tango::AttributeConfigList_3 &new_conf, const Tango::ClntIdent &cl_ident) throw (Tango::DevFailed, CORBA::SystemException)
 Set attribute(s) configuration.
virtual
Tango::AttributeValueList_4 * 
write_read_attributes_4 (const Tango::AttributeValueList_4 &values, const Tango::ClntIdent &cl_ident) throw (Tango::MultiDevFailed,Tango::DevFailed, CORBA::SystemException)
 Write then read attribute(s) value.


Detailed Description

Base class for all TANGO device since version 4.

This class inherits from DeviceImpl class which itself inherits from CORBA classes where all the network layer is implemented. This class has been created since release 7 of Tango library where the IDL Tango module has been modified in order to create a Device_4 interface which inherits from the original Device interface

Author
taurel
Revision
15556

Constructor & Destructor Documentation

Tango::Device_4Impl::Device_4Impl ( DeviceClass device_class,
string &  dev_name 
)

Constructs a newly allocated Device_4Impl object from its name.

The device description field is set to A Tango device. The device state is set to unknown and the device status is set to Not Initialised

Parameters:
device_class Pointer to the device class object
dev_name The device name

Tango::Device_4Impl::Device_4Impl ( DeviceClass device_class,
string &  dev_name,
string &  desc 
)

Constructs a newly allocated Device_4Impl object from its name and its description.

The device state is set to unknown and the device status is set to Not Initialised

Parameters:
device_class Pointer to the device class object
dev_name The device name
desc The device description

Tango::Device_4Impl::Device_4Impl ( DeviceClass device_class,
string &  dev_name,
string &  desc,
Tango::DevState  dev_state,
string &  dev_status 
)

Constructs a newly allocated Device_4Impl object from all its creation parameters.

The device is constructed from its name, its description, an original state and status

Parameters:
device_class Pointer to the device class object
dev_name The device name
desc The device description
dev_state The device initial state
dev_status The device initial status

Tango::Device_4Impl::Device_4Impl ( DeviceClass device_class,
const char *  dev_name,
const char *  desc = "A TANGO device",
Tango::DevState  dev_state = Tango::UNKNOWN,
const char *  dev_status = StatusNotSet 
)

Constructs a newly allocated Device_4Impl object from all its creation parameters with some default values.

The device is constructed from its name, its description, an original state and status. This constructor defined default values for the description, state and status parameters. The default device description is A TANGO device. The default device state is UNKNOWN and the default device status is Not initialised.

Parameters:
device_class Pointer to the device class object
dev_name The device name
desc The device desc
dev_state The device initial state
dev_status The device initial status


Member Function Documentation

virtual CORBA::Any* Tango::Device_4Impl::command_inout_4 ( const char *  in_cmd,
const CORBA::Any &  in_data,
Tango::DevSource  source,
const Tango::ClntIdent &  cl_ident 
) throw (Tango::DevFailed, CORBA::SystemException) [virtual]

Execute a command.

It's the master method executed when a "command_inout_4" CORBA operation is requested by a client. It checks the device lock, updates the device black-box, call the TANGO command handler and returned the output Any

Parameters:
in_cmd The command name
in_data The command input data packed in a CORBA Any
source The data source. This parameter is new in Tango release 2. It allows a client to choose the data source between the device itself or the data cache for polled command.
cl_ident The client identificator. This parameter is new in release 4. It allows device locking feature implemented in Tango V7
Returns:
The command output data packed in a CORBA Any object
Exceptions:
DevFailed Re-throw of the exception thrown by the command_handler method. Click here to read DevFailed exception specification

virtual Tango::DevCmdHistory_4* Tango::Device_4Impl::command_inout_history_4 ( const char *  command,
CORBA::Long  n 
) throw (Tango::DevFailed, CORBA::SystemException) [virtual]

Read command value history.

Invoked when the client request the command_inout_history_2 CORBA operation. This operation allows a client to retrieve command return value history for polled command. The depth of the history is limited to the depth of the device server internal polling buffer. It returns to the client one DevCmdHistory structure for each record.

Parameters:
command The command name
n The record number.
Returns:
A DevCmdHistory_4 structure. This strucure contains all the element allowing a client to retrieve for each history record the command return value (in an Any), the date and in case of the command returns an error when it was read, the DevErrors data. Click here to read DevCmdHistory structure definition.
Exceptions:
DevFailed Thrown if the attribute does not exist or is not polled. Click here to read DevFailed exception specification

virtual Tango::DevAttrHistory_4* Tango::Device_4Impl::read_attribute_history_4 ( const char *  name,
CORBA::Long  n 
) throw (Tango::DevFailed, CORBA::SystemException) [virtual]

Read attribute value history.

Invoked when the client request the read_attribute_history_3 CORBA operation. This operation allows a client to retrieve attribute value history for polled attribute. The depth of the history is limited to the depth of the device server internal polling buffer. It returns to the client one DevAttrHistory structure for each record.

Parameters:
name The attribute name
n The record number.
Returns:
A DevAttrHistory_4 structure. This strucure contains all the element allowing a client to retrieve for each history record the attribute value, the date and in case of the attribute returns an error when it was read, the DevErrors data. Click here to read DevAttrHistory structure definition.
Exceptions:
DevFailed Thrown if the attribute does not exist or is not polled. Click here to read DevFailed exception specification

virtual Tango::AttributeValueList_4* Tango::Device_4Impl::read_attributes_4 ( const Tango::DevVarStringArray &  names,
Tango::DevSource  source,
const Tango::ClntIdent &  cl_ident 
) throw (Tango::DevFailed, CORBA::SystemException) [virtual]

Read attribute(s) value.

Invoked when the client request the read_attributes_2 CORBA operation. It returns to the client one AttributeValue structure for each wanted attribute.

Parameters:
names The attribute(s) name list
source The data source. This parameter is new in Tango release 2. It allows a client to choose the data source between the device itself or the data cache for polled attribute.
cl_ident The client identificator. This parameter is new in release 4. It allows device locking feature implemented in Tango V7
Returns:
A sequence of AttributeValue_4 structure. One structure is initialised for each wanted attribute with the attribute value, the date and the attribute value quality. Click here to read AttributeValue structure definition.
Exceptions:
DevFailed Thrown if the attribute does not exist. Click here to read DevFailed exception specification

virtual void Tango::Device_4Impl::set_attribute_config_4 ( const Tango::AttributeConfigList_3 &  new_conf,
const Tango::ClntIdent &  cl_ident 
) throw (Tango::DevFailed, CORBA::SystemException) [virtual]

Set attribute(s) configuration.

Invoked when the client request the set_attribute_config_3 CORBA operation. It updates the device attribute configuration actually used by the device but this method also updates the Tango database. One structure of the AttributeConfig_3 type is needed for each attribute to update configuration. Click here to read AttributeConfig_3 structure specification.

Parameters:
new_conf The attribute(s) new configuration structure sequence
cl_ident The client identificator. This parameter is new in release 4. It allows device locking feature implemented in Tango V7
Exceptions:
DevFailed Thrown if the command does not exist. Click here to read DevFailed exception specification

virtual void Tango::Device_4Impl::write_attributes_4 ( const Tango::AttributeValueList_4 &  values,
const Tango::ClntIdent &  cl_ident 
) throw (Tango::MultiDevFailed, Tango::DevFailed,CORBA::SystemException) [virtual]

Write attribute(s) value.

Invoked when the client request the write_attributes CORBA operation. It sets the attribute(s) with the new value(s) passed as parameter.

Parameters:
values The attribute(s) new value(s). One structure is initialised for each wanted attribute with the attribute value. The attribute quality and date are not used by this method. Click here to read AttributeValue_4 structure definition.
cl_ident The client identificator. This parameter is new in release 4. It allows device locking feature implemented in Tango V7
Exceptions:
DevFailed Thrown if the command does not exist. Click here to read DevFailed exception specification

virtual Tango::AttributeValueList_4* Tango::Device_4Impl::write_read_attributes_4 ( const Tango::AttributeValueList_4 &  values,
const Tango::ClntIdent &  cl_ident 
) throw (Tango::MultiDevFailed,Tango::DevFailed, CORBA::SystemException) [virtual]

Write then read attribute(s) value.

Invoked when the client request the write_read_attributes CORBA operation. It sets the attribute(s) with the new value(s) passed as parameter and then read the attribute(s) and return the read value to the caller.

Parameters:
values The attribute(s) new value(s). One structure is initialised for each wanted attribute with the attribute value. The attribute quality and date are not used by this method. Click here to read AttributeValue structure definition.
cl_ident The client identificator. This parameter is new in release 4. It allows device locking feature implemented in Tango V7
Returns:
A sequence of AttributeValue_4 structure. One structure is initialised for each wanted attribute with the attribute value, the date and the attribute value quality. Click here to read AttributeValue_4 structure definition.
Exceptions:
DevFailed Thrown if the command does not exist. 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