Subsections
The fundamental idea of a device as a network object which has methods
and data has been retained for TANGO. In TANGO objects are real C++/Java
objects which can be instantiated and accessed via their methods and
data by the client as if they were local objects. This interface is
defined in CORBA IDL. The fundamental interface is Device. All TANGO
control objects will be of this type i.e. they will implement and
offer the Device interface. Some wrapper classes group in an API will
hide the calls to the Device interface from the client so that the
client will only see the wrapper classes. All CORBA details will be
hidden from the client as far as possible.
AttributeConfigList
typedef sequence<AttributeConfig> AttributeConfigList;
AttributeConfigList_2
typedef sequence<AttributeConfig_2> AttributeConfigList_2;
AttributeConfigList_3
typedef sequence<AttributeConfig_3> AttributeConfigList_3;
AttributeDimList
typedef sequence<AttributeDim> AttributeDimList;
AttributeValueList
typedef sequence<AttributeValue> AttributeValueList;
AttributeValueList_3
typedef sequence<AttributeValue_3> AttributeValueList_3;
AttributeValueList_4
typedef sequence<AttributeValue_4> AttributeValueList_4;
AttrQualityList
typedef sequence<AttrQuality> AttrQualityList;
CppClntIdent
typedef unsigned long CppClntIdent;
DevAttrHistoryList
typedef sequence<DevAttrHistory> DevAttrHistoryList;
DevAttrHistoryList_3
typedef sequence<DevAttrHistory_3> DevAttrHistoryList_3;
DevBoolean
typedef boolean DevBoolean;
DevCmdHistoryList
typedef sequence<DevCmdHistory> DevCmdHistoryList
DevCmdInfoList
typedef sequence<DevCmdInfo> DevCmdInfoList;
DevCmdInfoList_2
typedef sequence<DevCmdInfo_2> DevCmdInfoList_2;
DevDouble
typedef double DevDouble;
DevErrorList
typedef sequence<DevError> DevErrorList;
DevErrorListList
typedef sequence<DevErrorList> DevErrorListList;
DevFloat
typedef float DevFloat;
DevLong
typedef long DevLong;
DevShort
typedef short DevShort;
DevString
typedef string DevString;
DevULong
typedef unsigned long DevULong;
DevUShort
typedef unsigned short DevUShort;
DevVarCharArray
typedef sequence<octet> DevVarCharArray;
DevVarDoubleArray
typedef sequence<double> DevVarDoubleArray;
DevVarEncodedArray
typedef sequence<DevEncoded> DevVarEncodedArray;
DevVarFloatArray
typedef sequence<float> DevVarFloatArray;
DevVarLongArray
typedef sequence<long> DevVarLongArray;
DevVarShortArray
typedef sequence<short> DevVarShortArray;
DevVarStateArray
typedef sequence<DevState> DevVarStateArray;
DevVarStringArray
typedef sequence<string> DevVarStringArray;
DevVarULongArray
typedef sequence<unsigned long> DevVarULongArray;
DevVarUShortArray
typedef sequence<unsigned short> DevVarUShortArray;
EltInArrayList
typedef sequence<EltInArray> EltInArrayList;
JavaUUID
typedef unsigned long long JavaUUID[2];
NamedDevErrorList
typedef sequence<NamedDevError> NamedDevErrorList;
TimeValList
typedef sequence<TimeVal> TimeValList;
AttrDataFormat
enum AttrDataFormat
{
SCALAR,
SPECTRUM,
IMAGE,
FMT_UNKNOWN
};
AttributeDataType
enum AttributeDataType
{
ATT_BOOL,
ATT_SHORT,
ATT_LONG,
ATT_LONG64,
ATT_FLOAT,
ATT_DOUBLE,
ATT_UCHAR,
ATT_USHORT,
ATT_ULONG,
ATT_ULONG64,
ATT_STRING,
ATT_STATE,
DEVICE_STATE,
ATT_ENCODED,
NO_DATA
};
AttrQuality
enum AttrQuality
{
ATTR_VALID,
ATTR_INVALID,
ATTR_ALARM,
ATTR_CHANGING,
ATTR_WARNING
};
AttrWriteType
enum AttrWriteType
{
READ,
READ_WITH_WRITE,
WRITE,
READ_WRITE
};
DispLevel
enum DispLevel
{
OPERATOR,
EXPERT
};
DevSource
enum DevSource
{
DEV,
CACHE,
CACHE_DEV
};
DevState
enum DevState
{
ON,
OFF,
CLOSE,
OPEN,
INSERT,
EXTRACT,
MOVING,
STANDBY,
FAULT,
INIT,
RUNNING,
ALARM,
DISABLE,
UNKNOWN
};
ErrSeverity
enum ErrSeverity
{
WARN,
ERR,
PANIC
};
LockerLanguage
enum LockerLanguage
{
CPP,
JAVA
};
ArchiveEventProp
struct ArchiveEventProp
{
string rel_change;
string abs_change;
string period;
DevVarStringArray extensions;
};
AttributeAlarm
struct AttributeAlarm
{
string min_alarm;
string max_alarm;
string min_warning;
string max_warning;
string delta_t;
string delta_val;
DevVarStringArray extensions;
};
AttDataReady
struct AttributeAlarm
{
string name;
long data_type;
long ctr;
};
AttributeConfig
struct AttributeConfig
{
string name;
AttrWriteType writable;
AttrDataFormat data_format;
long data_type;
long max_dim_x;
long max_dim_y;
string description;
string label;
string unit;
string standard_unit;
string display_unit;
string format;
string min_value;
string max_value;
string min_alarm;
string max_alarm;
string writable_attr_name;
DevVarStringArray extensions;
};
AttributeConfig_2
struct AttributeConfig_2
{
string name;
AttrWriteType writable;
AttrDataFormat data_format;
long data_type;
long max_dim_x;
long max_dim_y;
string description;
string label;
string unit;
string standard_unit;
string display_unit;
string format;
string min_value;
string max_value;
string min_alarm;
string max_alarm;
string writable_attr_name;
DispLevel level;
DevVarStringArray extensions;
};
AttributeConfig_3
struct AttributeConfig_3
{
string name;
AttrWriteType writable;
AttrDataFormat data_format;
long data_type;
long max_dim_x;
long max_dim_y;
string description;
string label;
string unit;
string standard_unit;
string display_unit;
string format;
string min_value;
string max_value;
string writable_attr_name;
DispLevel level;
AttributeAlarm alarm;
EventProperties event_prop;
DevVarStringArray extensions;
DevVarStringArray sys_extensions;
};
AttributeDim
struct AttributeDim
{
long dim_x;
long dim_y;
};
AttributeValue
struct AttributeValue
{
any value;
AttrQuality quality;
TimeVal time;
string name;
long dim_x;
long dim_y;
};
AttributeValue_3
struct AttributeValue_3
{
any value;
AttrQuality quality;
TimeVal time;
string name;
AttributeDim r_dim;
AttributeDim w_dim;
DevErrorList err_list;
};
AttributeValue_4
struct AttributeValue_4
{
AttrValUnion value;
AttrQuality quality;
AttrDataFormat data_format;
TimeVal time;
string name;
AttributeDim r_dim;
AttributeDim w_dim;
DevErrorList err_list;
};
ChangeEventProp
struct ChangeEventProp
{
string rel_change;
string abs_change;
DevVarStringArray extensions;
};
DevAttrHistory
struct DevAttrHistory
{
boolean attr_failed;
AttributeValue value;
DevErrorList errors;
};
DevAttrHistory_3
struct DevAttrHistory_3
{
boolean attr_failed;
AttributeValue_3 value;
};
DevAttrHistory_4
struct DevAttrHistory_4
{
string name;
TimeValList dates;
any value;
AttrQualityList quals;
EltInArrayList quals_array;
AttributeDimList r_dims;
EltInArrayList r_dims_array;
AttributeDimList w_dims;
EltInArrayList w_dims_array;
DevErrorListList errors;
EltInArrayList errors_array;
};
DevCmdHistory
struct DevCmdHistory
{
TimeVal time;
boolean cmd_failed;
any value;
DevErrorList errors;
};
DevCmdHistory_4
struct DevCmdHistory_4
{
TimeValList dates;
any value;
AttributeDimList dims;
EltInArrayList dims_array;
DevErrorListList errors;
EltInArrayList errors_array;
long cmd_type;
};
DevCmdInfo
struct DevCmdInfo
{
string cmd_name;
long cmd_tag;
long in_type;
long out_type;
string in_type_desc;
string out_type_desc;
};
DevCmdInfo_2
struct DevCmdInfo_2
{
string cmd_name;
DispLevel level;
long cmd_tag;
long in_type;
long out_type;
string in_type_desc;
string out_type_desc;
};
DevEncoded
struct DevEncoded
{
DevString encoded_format;
DevVarCharArray encoded_data;
};
DevError
struct DevError
{
string reason;
ErrSeverity severity;
string desc;
string origin;
};
DevInfo
struct DevInfo
{
string dev_class;
string server_id;
string server_host;
long server_version;
string doc_url;
};
DevInfo_3
struct DevInfo_3
{
string dev_class;
string server_id;
string server_host;
long server_version;
string doc_url;
string dev_type;
};
DevVarDoubleStringArray
struct DevVarDoubleStringArray
{
DevVarDoubleArray dvalue;
DevVarStringArray svalue;
};
DevVarLongStringArray
struct DevVarLongStringArray
{
DevVarLongArray lvalue;
DevVarStringArray svalue;
};
EltInArray
struct EltInArray
{
long start;
long nb_elt;
};
EventProperties
struct EventProperties
{
ChangeEventProp ch_event;
PeriodicEventProp per_event;
ArchiveEventProp arch_event;
};
JavaClntIdent
struct JavaClntIdent
{
string MainClass;
JavaUUID uuid;
};
NamedDevError
struct NamedDevError
{
string name;
long index_in_call;
DevErrorList err_list;
};
PeriodicEventProp
struct PeriodicEventProp
{
string period;
DevVarStringArray extensions;
};
TimeVal
struct TimeVal
{
long tv_sec;
long tv_usec;
long tv_nsec;
};
ZmqCallInfo
struct ZmqCallInfo
{
long version;
unsigned long ctr;
string method_name;
DevVarCharArray oid;
boolean call_is_except;
};
AttrValUnion
union AttrValUnion switch (AttributeDataType)
{
case ATT_BOOL:
DevVarBooleanArray bool_att_value;
case ATT_SHORT:
DevVarShortArray short_att_value;
case ATT_LONG:
DevVarLongArray long_att_value;
case ATT_LONG64:
DevVarLong64Array long64_att_value;
case ATT_FLOAT:
DevVarFloatArray float_att_value;
case ATT_DOUBLE:
DevVarDoubleArray double_att_value;
case ATT_UCHAR
DevVarCharArray uchar_att_value;
case ATT_USHORT:
DevVarUShortArray ushort_att_value;
case ATT_ULONG:
DevVarULongArray ulong_att_value;
case ATT_ULONG64:
DevVarULong64Array ulong64_att_value;
case ATT_STRING:
DevVarStringArray string_att_value;
case ATT_STATE:
DevVarStateArray state_att_value;
case DEVICE_STATE:
DevState dev_state_att;
case ATT_ENCODED:
DevVarEncodedArray encoded_att_value;
case NO_DATA:
DevBoolean union_no_data;
};
ClntIdent
union ClntIdent switch (LockerLanguage)
{
case CPP:
CppClntIdent cpp_clnt;
case JAVA:
JavaClntIdent java_clnt;
};
DevFailed
exception DevFailed
{
DevErrorList errors;
};
MultiDevFailed
exception MultiDevFailed
{
NamedDevErrorList errors;
};
The fundamental interface for all TANGO objects. Each Device is a
network object which can be accessed locally or via network. The network
protocol on the wire will be IIOP. The Device interface implements
all the basic functions needed for doing generic synchronous and asynchronous
I/O on a device. A Device object has data and actions. Data are represented
in the form of Attributes. Actions are represented in the form of
Commands. The CORBA Device interface offers attributes and methods
to access the attributes and commands. A client will either use these
methods directly from C++ or Java or access them via wrapper classes
implemented in a API. The Device interface describes only the remote
network interface. Implementation features like threads, command security,
priority etc. are dealt with in server side of the device server model.
adm_name
readonly attribute string adm_name;
adm_name (readonly) - administrator device unique ascii identifier
description
readonly attribute string description;
description (readonly) - general description of device
name
readonly attribute string name;
name (readonly) - unique ascii identifier
state
readonly attribute DevState state;
state (readonly) - device state
status
readonly attribute string status;
status (readonly) - device state as ascii string
black_box
DevVarStringArray black_box(in long number)
raises(DevFailed);
read list of last N commands executed by clients
Parameters:
number - of commands to return
Returns:
list of command and clients
any command_inout(in string command, in any argin)
raises(DevFailed);
execute a command on a device synchronously with no input parameter
and one one output parameter
Parameters:
command - ascii string e.g. On
argin - command input parameter e.g. float
Returns:
command result.
DevCmdInfoList command_list_query()
raises(DevFailed);
query device to see what commands it supports
Returns:
list of commands and their types
DevCmdInfo command_query(in string command)
raises(DevFailed);
query device to see command argument
Parameters:
command - name
Returns:
command and its types
AttributeConfigList get_attribute_config(in DevVarStringArray names)
raises(DevFailed);
read the configuration for a variable list of attributes from a device
Parameters:
name - list of attribute names to read
Returns:
list of attribute configurations read
DevInfo info()
raises(DevFailed);
return general information about object e.g. class, type, ...
Returns:
device info
void ping()
raises(DevFailed);
ping a device to see if it alive
AttributeValueList read_attributes(in DevVarStringArray names)
raises(DevFailed);
read a variable list of attributes from a device
Parameters:
name - list of attribute names to read
Returns:
list of attribute values read
void set_attribute_config(in AttributeConfigList new_conf)
raises(DevFailed);
set the configuration for a variable list of attributes from the device
Parameters:
new_conf - list of attribute configuration to be set
void write_attributes(in AttributeValueList values)
raises(DevFailed);
write a variable list of attributes to a device
Parameters:
values - list of attribute values to write
interface Device_2 inherits from Tango::Device
The updated Tango device interface. It inherits from Tango::Device
and therefore supports all attribute/operation defined in the Tango::Device
interface. Two CORBA operations have been modified to support more
parameters (command_inout_2 and read_attribute_2). Three CORBA
operations now retrun a different data type (command_list_query_2,
command_query_2 and get_attribute_config)
command_inout_2
any command_inout_2(in string command, in any argin, in DevSource
source)
raises(DevFailed);
execute a command on a device synchronously with no input parameter
and one one output parameter
Parameters:
command - ascii string e.g. On
argin - command input parameter
source - data source
Returns:
command result.
DevCmdHistoryList command_inout_history_2(in string command, in
long n)
raises(DevFailed);
Get command result history from polling buffer. Obviously, the command
must be polled.
Parameters:
command - ascii string e.g. On
n - record number
Returns:
list of command result (or exception parameters if the command
failed).
command_list_query_2
DevCmdInfoList_2 command_list_query_2()
raises(DevFailed);
query device to see what commands it supports
Returns:
list of commands and their types
command_query_2
DevCmdInfo_2 command_query_2(in string command)
raises(DevFailed);
query device to see command argument
Parameters:
command - name
Returns:
command and its types
get_attribute_config_2
AttributeConfigList_2 get_attribute_config_2(in DevVarStringArray
names)
raises(DevFailed);
read the configuration for a variable list of attributes from a device
Parameters:
name - list of attribute names to read
Returns:
list of attribute configurations read
read_attributes_2
AttributeValueList read_attributes_2(in DevVarStringArray names,
in DevSource source)
raises(DevFailed)
read a variable list of attributes from a device
Parameters:
name - list of attribute names to read
Returns:
list of attribute values read
DevAttrHistoryList read_attributes_history_2(in string name, in
long n)
raises(DevFailed)
Get attribute value history from polling buffer. Obviously, the attribute
must be polled.
Parameters:
name - Attribute name to read history
n - Record number
Returns:
list of attribute value (or exception parameters if the attribute
failed).
interface Device_3 inherits from Tango::Device_2
The updated Tango device interface for Tango release 5. It inherits
from Tango::Device_2 and therefore supports all attribute/operation
defined in the Tango::Device_2 interface. Six CORBA operations now
return a different data type (read_attributes_3, write_attributes_3,
read_attribute_history_3, info_3, get_attribute_config_3 and
set_attribute_config_3)
read_attributes_3
AttributeValueList_3 read_attributes_3(in DevVarStringArray names,
in DevSource source)
raises(DevFailed);
read a variable list of attributes from a device
Parameters:
name - list of attribute names to read
source - data source
Returns:
list of attribute values read
void write_attributes_3(in AttributeValueList values)
raises(DevFailed, MultiDevFailed);
write a variable list of attributes to a device
Parameters:
values - list of attribute values to write
DevAttrHistoryList_3 read_attributes_history_3(in string name,
in long n)
raises(DevFailed)
Get attribute value history from polling buffer. Obviously, the attribute
must be polled.
Parameters:
name - Attribute name to read history
n - Record number
Returns:
list of attribute value (or exception parameters if the attribute
failed).
DevInfo_3 info()
raises(DevFailed);
return general information about object e.g. class, type, ...
Returns:
device info
get_attribute_config_3
AttributeConfigList_3 get_attribute_config_3(in DevVarStringArray
names)
raises(DevFailed);
read the configuration for a variable list of attributes from a device
Parameters:
name - list of attribute names to read
Returns:
list of attribute configurations read
void set_attribute_config_3(in AttributeConfigList_3 new_conf)
raises(DevFailed);
set the configuration for a variable list of attributes from the device
Parameters:
new_conf - list of attribute configuration to be set
interface Device_4 inherits from Tango::Device_3
The updated Tango device interface for Tango release 7. It inherits
from Tango::Device_3 and therefore supports all attribute/operation
defined in the Tango::Device_3 interface.
read_attributes_4
AttributeValueList_4 read_attributes_4(in DevVarStringArray names,
in DevSource source,in ClntIdent cl_ident)
raises(DevFailed);
read a variable list of attributes from a device
Parameters:
name - list of attribute names to read
source - data source
cl_ident - client identificator
Returns:
list of attribute values read
write_attributes_4
void write_attributes_3(in AttributeValueList_4 values, in ClniIdent
cl_ident)
raises(DevFailed, MultiDevFailed);
write a variable list of attributes to a device
Parameters:
values - list of attribute values to write
cl_ident - client identificator
any command_inout_4(in string command, in any argin, in DevSource
source, In ClntIdent cl_ident)
raises(DevFailed);
Execute a command on a device synchronously with one input parameter
and one one output parameter
Parameters:
command - ascii string e.g. On
argin - command input parameter
source - data source
cl_ident - client identificator
Returns:
command result
DevAttrHistory_4 read_attributes_history_4(in string name, in
long n)
raises(DevFailed)
Get attribute value history from polling buffer. Obviously, the attribute
must be polled.
Parameters:
name - Attribute name to read history
n - Record number
Returns:
Attribute value (or exception parameters if the attribute failed)
coded in a structure.
DevCmdHistory_4 command_inout_history_4(in string command, in
long n)
raises(DevFailed);
Get command value history from polling buffer. Obviously, the command
must be polled.
Parameters:
name - Command name to read history
n - Record number
Returns:
Command value (or exception paramteters) coded in a structure
write_read_attribute_4
AttributeValueList_4 write_read_attribute_4(in AttributeValueList_4
values, in ClntIdent cl_ident)
raises(DevFailed,MultiDevFailed);
Write then read a variable list of attributes from a device
Parameters:
values - list of attribute values to write
cl_ident - client identificator
Returns:
list of attribute values read
void set_attribute_config_4(in AttributeConfigList_3 new_conf,
in ClntIdent cl_ident)
raises(DevFailed);
set the configuration for a variable list of attributes from the device
Parameters:
new_conf - list of attribute configuration to be set
cl_ident - client identificator
Emmanuel Taurel
2012-06-06