The TANGO IDL file : Module Tango¶
Intended audience: developers, Programming language: all
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.
Aliases¶
AttributeConfigList
AttributeConfigList_2
AttributeConfigList_3
AttributeConfigList_5
AttributeDimList
AttributeValueList
AttributeValueList_3
AttributeValueList_4
AttributeValueList_5
AttrQualityList
CppClntIdent
DevAttrHistoryList
DevAttrHistoryList_3
DevBoolean
DevCmdHistoryList
DevCmdInfoList
DevCmdInfoList_2
DevDouble
DevErrorList
DevErrorListList
DevFloat
DevLong
DevShort
DevString
DevULong
DevUShort
DevVarCharArray
DevVarDoubleArray
DevVarEncodedArray
DevVarFloatArray
DevVarLongArray
DevVarPipeDataEltArray
DevVarShortArray
DevVarStringArray
DevVarULongArray
DevVarUShortArray
EltInArrayList
JavaUUID
TimeValList
Enums¶
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,
ATT_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,
WT_UNKNOWN
DispLevel
enum DispLevel
{
OPERATOR,
EXPERT,
DL_UNKNOWN
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
enum PipeWriteType
{
PIPE_READ,
PIPE_READ_WRITE,
PIPE_WT_UNKNOWN
};
Structs¶
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;
};
AttributeConfig_5
struct AttributeConfig_5
{
string name;
AttrWriteType writable;
AttrDataFormat data_format;
long data_type;
boolean memorized;
boolean mem_init;
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;
string root_attr_name;
DevVarStringArray enum_labels;
AttributeAlarm att_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;
};
AttributeValue_5
struct AttributeValue_5
{
AttrValUnion value;
AttrQuality quality;
AttrDataFormat data_format;
long data_type;
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;
};
DevAttrHistory_5
struct DevAttrHistory_5
{
string name;
AttrDataFormat data_format;
long data_type;
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;
};
DevIntrChange
struct DevIntrChange
{
boolean dev_started;
DevCmdInfoList_2 cmds;
AttributeConfigList_5 atts;
};
DevPipeBlob
struct DevPipeBlob
{
string name;
DevVarPipeDataEltArray blob_data;
DevPipeData
struct DevPipeData
{
string name;
TimeVal time;
DevPipeBlob data_blob;
};
DevPipeDataElt
struct DevPipeDataElt
{
string name;
AttrValUnion value;
DevVarPipeDataEltArray inner_blob;
string inner_blob_name;
};
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;
};
PipeConfig
struct PipeConfig
{
string name;
string description;
string label;
DispLevel level;
PipeWriteType writable;
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;
};
Unions¶
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 ATT_NO_DATA:
DevBoolean union_no_data;
};
ClntIdent
union ClntIdent switch (LockerLanguage)
{
case CPP:
CppClntIdent cpp_clnt;
case JAVA:
JavaClntIdent java_clnt;
};
Exceptions¶
DevFailed
exception DevFailed
{
DevErrorList errors;
};
MultiDevFailed
exception MultiDevFailed
{
NamedDevErrorList errors;
};
Interface Tango::Device¶
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.
Attributes¶
adm_name
readonly attribute string adm_name;
description
readonly attribute string description;
name
readonly attribute string name;
state
readonly attribute DevState state;
status
readonly attribute string status;
status (readonly) - device state as ascii string
Operations¶
black_box
DevVarStringArray black_box(in long number)
number – of commands to return
Returns:
command_inout
any command_inout(in string command, in any argin)
command – ascii string e.g. On
argin – command input parameter e.g. float
Returns:
command_list_query
DevCmdInfoList command_list_query()
command_query
DevCmdInfo command_query(in string command)
command – name
Returns:
get_attribute_config
AttributeConfigList get_attribute_config(in DevVarStringArray names)
name – list of attribute names to read
Returns:
info
DevInfo info()
ping
void ping()
read_attributes
AttributeValueList read_attributes(in DevVarStringArray names)
name – list of attribute names to read
Returns:
set_attribute_config
void set_attribute_config(in AttributeConfigList new_conf)
write_attributes
void write_attributes(in AttributeValueList values)
values – list of attribute values to write
Interface Tango::Device_2¶
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)
Operations¶
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_inout_history_2
DevCmdHistoryList command_inout_history_2(in string command, in long n)
command – ascii string e.g. On
n – record number
Returns:
command_list_query_2
DevCmdInfoList_2 command_list_query_2()
command_query_2
DevCmdInfo_2 command_query_2(in string command)
command – name
Returns:
get_attribute_config_2
AttributeConfigList_2 get_attribute_config_2(in DevVarStringArray names)
name – list of attribute names to read
Returns:
read_attributes_2
AttributeValueList read_attributes_2(in DevVarStringArray names, in DevSource source)
name – list of attribute names to read
Returns:
read_attribute_history_2
DevAttrHistoryList read_attributes_history_2(in string name, in long n)
name – Attribute name to read history
n – Record number
Returns:
Interface Tango::Device_3¶
Operations¶
read_attributes_3
AttributeValueList_3 read_attributes_3(in DevVarStringArray names, in DevSource source)
name – list of attribute names to read
source – data source
Returns:
write_attributes_3
void write_attributes_3(in AttributeValueList values)
read_attribute_history_3
DevAttrHistoryList_3 read_attributes_history_3(in string name, in long n)
name – Attribute name to read history
n – Record number
Returns:
info_3
DevInfo_3 info()
get_attribute_config_3
AttributeConfigList_3 get_attribute_config_3(in DevVarStringArray names)
name – list of attribute names to read
Returns:
set_attribute_config_3
void set_attribute_config_3(in AttributeConfigList_3 new_conf)
Interface Tango::Device_4¶
Operations¶
read_attributes_4
AttributeValueList_4 read_attributes_4(in DevVarStringArray names, in DevSource source,in ClntIdent cl_ident)
name – list of attribute names to read
source – data source
cl_ident – client identificator
Returns:
write_attributes_4
void write_attributes_3(in AttributeValueList_4 values, in ClniIdent cl_ident)
values – list of attribute values to write
command_inout_4
any command_inout_4(in string command, in any argin, in DevSource source, In ClntIdent cl_ident)
command – ascii string e.g. On
argin – command input parameter
source – data source
cl_ident – client identificator
Returns:
read_attribute_history_4
DevAttrHistory_4 read_attributes_history_4(in string name, in long n)
name – Attribute name to read history
n – Record number
Returns:
command_inout_history_4
DevCmdHistory_4 command_inout_history_4(in string command, in long n)
name – Command name to read history
n – Record number
Returns:
write_read_attribute_4
AttributeValueList_4 write_read_attribute_4(in AttributeValueList_4 values, in ClntIdent cl_ident)
values – list of attribute values to write
cl_ident – client identificator
Returns:
set_attribute_config_4
void set_attribute_config_4(in AttributeConfigList_3 new_conf, in ClntIdent cl_ident)
new_conf – list of attribute configuration to be set
Interface Tango::Device_5¶
operations¶
get_attribute_config_5
AttributeConfigList_5 get_attribute_config_5(in DevVarStringArray names)
name – list of attribute names to read
Returns:
set_attribute_config_5
void set_attribute_config_5(in AttributeConfigList_5 new_conf, in ClntIdent cl_ident)
new_conf – list of attribute configuration to be set
AttributeValueList_5 read_attributes_5(in DevVarStringArray names, in DevSource source,in ClntIdent cl_ident)
name – list of attribute names to read
source – data source
cl_ident – client identificator
Returns:
AttributeValueList_5 write_read_attributes_5(in AttributeValueList_4 values, in DevVarStringArray r_names, in ClntIdent cl_ident)
values – list of attribute values to write
r_names – list of attribute to read
cl_ident – client identificator
Returns:
DevAttrHistory_5 read_attributes_history_5(in string name, in long n)
name – Attribute name to read history
n – Record number
Returns:
PipeConfigList get_pipe_config_5(in DevVarStringArray names)
name – list of pipe names to read
Returns:
void set_pipe_config_5(in PipeConfigList new_conf, in ClntIdent cl_ident)
new_conf – list of pipe configuration to be set
DevPipeData read_pipe_5(in string name, in ClntIdent cl_ident)
name – pipe name to read
cl_ident – client identificator
Returns:
write_pipe_5
void write_pipe_5(in DevPipeData value, in ClniIdent cl_ident)
value – new pipe value to write
DevPipeData write_read_pipe_5(in DevPipeData value, in ClntIdent cl_ident)
value – New pipe value to write
cl_ident – client identificator
Returns:
pipe values read