4 * This is the TANGO interface defined in IDL.
5 * TANGO is an extension of old TACO.
6 * The fundamental idea of a device as a network object which
7 * has methods and data has been retained. However
8 * in TANGO objects will be real C++/Java objects which can be instantiated
9 * and accessed via their methods and data by the client as if they were local
11 * Certain aspects of the old DSAPI application programmer's
12 * interface have been suppressed in order to simplify the client (e.g. import,
13 * free, data collector api).
14 * Features which have been considered missing in old TACO have been added
15 * e.g. signals, events and groups.
16 * Asynchronism and groups have been foreseen right from the beginning
18 * This interface is defined in CORBA IDL.
19 * The fundamental interface is Device.
20 * All TANGO control objects will be of this type i.e. they will implement and
21 * offer the Device interface.
22 * New classes of control objects e.g. PowerSupply, will be created by
23 * wrapping the Device class appropriately.
24 * The wrapper class will hide the calls to the Device interface from
25 * the client so that the client will only see the wrapper class.
26 * All CORBA details will be hidden from the client as far as possible.
32 //-------------------------------------------------------------------------
34 // Basic types to transport command data
36 //-------------------------------------------------------------------------
38 typedef boolean DevBoolean;
39 typedef double DevDouble;
40 typedef float DevFloat;
41 typedef short DevShort;
43 typedef long long DevLong64;
44 typedef string DevString;
45 typedef octet DevUChar;
46 typedef unsigned short DevUShort;
47 typedef unsigned long DevULong;
48 typedef unsigned long long DevULong64;
50 typedef sequence<boolean> DevVarBooleanArray;
51 typedef sequence<double> DevVarDoubleArray;
52 typedef sequence<float> DevVarFloatArray;
53 typedef sequence<short> DevVarShortArray;
54 typedef sequence<long> DevVarLongArray;
55 typedef sequence<long long> DevVarLong64Array;
56 typedef sequence<octet> DevVarCharArray;
57 typedef sequence<string> DevVarStringArray;
58 typedef sequence<unsigned short> DevVarUShortArray;
59 typedef sequence<unsigned long> DevVarULongArray;
60 typedef sequence<unsigned long long> DevVarULong64Array;
63 struct DevVarLongStringArray
65 DevVarLongArray lvalue;
66 DevVarStringArray svalue;
69 struct DevVarDoubleStringArray
71 DevVarDoubleArray dvalue;
72 DevVarStringArray svalue;
77 DevString encoded_format;
78 DevVarCharArray encoded_data;
81 typedef sequence<DevEncoded> DevVarEncodedArray;
83 //-------------------------------------------------------------------------
85 // Data types for client identification
87 //-------------------------------------------------------------------------
89 typedef unsigned long long JavaUUID[2];
90 typedef unsigned long CppClntIdent;
98 enum LockerLanguage { CPP, JAVA };
100 union ClntIdent switch (LockerLanguage)
103 CppClntIdent cpp_clnt;
105 JavaClntIdent java_clnt;
108 //-------------------------------------------------------------------------
112 //-------------------------------------------------------------------------
180 typedef sequence<DevState> DevVarStateArray;
182 //-------------------------------------------------------------------------
184 // Some miscellaneous structures definitions
186 //-------------------------------------------------------------------------
196 //-------------------------------------------------------------------------
198 // For the command query device operation
200 //-------------------------------------------------------------------------
210 string out_type_desc;
221 string out_type_desc;
224 typedef sequence<DevCmdInfo> DevCmdInfoList;
225 typedef sequence<DevCmdInfo_2> DevCmdInfoList_2;
228 //-------------------------------------------------------------------------
230 // For the DevFailed exceptions
232 //-------------------------------------------------------------------------
237 ErrSeverity severity;
242 typedef sequence<DevError> DevErrorList;
248 DevErrorList err_list;
251 typedef sequence<NamedDevError> NamedDevErrorList;
259 exception MultiDevFailed
261 NamedDevErrorList errors;
265 //-------------------------------------------------------------------------
267 // For attribute management
269 //-------------------------------------------------------------------------
272 struct AttributeConfig
275 AttrWriteType writable;
276 AttrDataFormat data_format;
283 string standard_unit;
290 string writable_attr_name;
291 DevVarStringArray extensions;
294 struct AttributeConfig_2
297 AttrWriteType writable;
298 AttrDataFormat data_format;
305 string standard_unit;
312 string writable_attr_name;
314 DevVarStringArray extensions;
317 struct AttributeValue
333 struct AttributeValue_3
341 DevErrorList err_list;
344 enum AttributeDataType
363 union AttrValUnion switch (AttributeDataType)
366 DevVarBooleanArray bool_att_value;
368 DevVarShortArray short_att_value;
370 DevVarLongArray long_att_value;
372 DevVarLong64Array long64_att_value;
374 DevVarFloatArray float_att_value;
376 DevVarDoubleArray double_att_value;
378 DevVarCharArray uchar_att_value;
380 DevVarUShortArray ushort_att_value;
382 DevVarULongArray ulong_att_value;
384 DevVarULong64Array ulong64_att_value;
386 DevVarStringArray string_att_value;
388 DevVarStateArray state_att_value;
390 DevState dev_state_att;
392 DevVarEncodedArray encoded_att_value;
394 DevBoolean union_no_data;
397 struct AttributeValue_4
401 AttrDataFormat data_format;
406 DevErrorList err_list;
409 struct AttributeValue_5
413 AttrDataFormat data_format;
419 DevErrorList err_list;
422 struct ChangeEventProp
426 DevVarStringArray extensions;
429 struct PeriodicEventProp
432 DevVarStringArray extensions;
435 struct ArchiveEventProp
440 DevVarStringArray extensions;
443 struct EventProperties
445 ChangeEventProp ch_event;
446 PeriodicEventProp per_event;
447 ArchiveEventProp arch_event;
450 struct AttributeAlarm
458 DevVarStringArray extensions;
461 struct AttributeConfig_3
464 AttrWriteType writable;
465 AttrDataFormat data_format;
472 string standard_unit;
477 string writable_attr_name;
479 AttributeAlarm att_alarm;
480 EventProperties event_prop;
481 DevVarStringArray extensions;
482 DevVarStringArray sys_extensions;
485 struct AttributeConfig_5
488 AttrWriteType writable;
489 AttrDataFormat data_format;
498 string standard_unit;
503 string writable_attr_name;
505 string root_attr_name;
506 DevVarStringArray enum_labels;
507 AttributeAlarm att_alarm;
508 EventProperties event_prop;
509 DevVarStringArray extensions;
510 DevVarStringArray sys_extensions;
513 typedef sequence<AttributeConfig> AttributeConfigList;
514 typedef sequence<AttributeConfig_2> AttributeConfigList_2;
515 typedef sequence<AttributeConfig_3> AttributeConfigList_3;
516 typedef sequence<AttributeConfig_5> AttributeConfigList_5;
517 typedef sequence<AttributeValue> AttributeValueList;
518 typedef sequence<AttributeValue_3> AttributeValueList_3;
519 typedef sequence<AttributeValue_4> AttributeValueList_4;
520 typedef sequence<AttributeValue_5> AttributeValueList_5;
522 //-------------------------------------------------------------------------
524 // For pipe management
526 //-------------------------------------------------------------------------
541 PipeWriteType writable;
542 DevVarStringArray extensions;
545 typedef sequence<PipeConfig> PipeConfigList;
547 struct DevPipeDataElt;
548 typedef sequence<DevPipeDataElt> DevVarPipeDataEltArray;
550 struct DevPipeDataElt
554 DevVarPipeDataEltArray inner_blob;
555 string inner_blob_name;
561 DevVarPipeDataEltArray blob_data;
568 DevPipeBlob data_blob;
571 //-------------------------------------------------------------------------
573 // For data ready event
575 //-------------------------------------------------------------------------
585 //-------------------------------------------------------------------------
587 // For device interface change event
589 //-------------------------------------------------------------------------
594 DevCmdInfoList_2 cmds;
595 AttributeConfigList_5 atts;
598 //-------------------------------------------------------------------------
600 // For device interface info operation
602 //-------------------------------------------------------------------------
623 //-------------------------------------------------------------------------
625 // For command and attribute history
627 //-------------------------------------------------------------------------
637 typedef sequence<DevCmdHistory> DevCmdHistoryList;
639 struct DevAttrHistory
642 AttributeValue value;
646 struct DevAttrHistory_3
649 AttributeValue_3 value;
658 typedef sequence<EltInArray> EltInArrayList;
659 typedef sequence<TimeVal> TimeValList;
660 typedef sequence<AttrQuality> AttrQualityList;
661 typedef sequence<AttributeDim> AttributeDimList;
662 typedef sequence<DevErrorList> DevErrorListList;
664 struct DevAttrHistory_4
669 AttrQualityList quals;
670 EltInArrayList quals_array;
671 AttributeDimList r_dims;
672 EltInArrayList r_dims_array;
673 AttributeDimList w_dims;
674 EltInArrayList w_dims_array;
675 DevErrorListList errors;
676 EltInArrayList errors_array;
679 struct DevAttrHistory_5
682 AttrDataFormat data_format;
686 AttrQualityList quals;
687 EltInArrayList quals_array;
688 AttributeDimList r_dims;
689 EltInArrayList r_dims_array;
690 AttributeDimList w_dims;
691 EltInArrayList w_dims_array;
692 DevErrorListList errors;
693 EltInArrayList errors_array;
696 struct DevCmdHistory_4
700 AttributeDimList dims;
701 EltInArrayList dims_array;
702 DevErrorListList errors;
703 EltInArrayList errors_array;
707 typedef sequence<DevAttrHistory> DevAttrHistoryList;
708 typedef sequence<DevAttrHistory_3> DevAttrHistoryList_3;
710 //-------------------------------------------------------------------------
712 // For ZMQ event system
714 //-------------------------------------------------------------------------
722 boolean call_is_except;
725 //-------------------------------------------------------------------------
727 // Include the device interface
729 //-------------------------------------------------------------------------
736 * The fundamental interface for all TANGO objects.
737 * Each Device is a network object which can be accessed locally or via
739 * The network protocol on the wire will be IIOP.
740 * The Device interface implements all the basic functions needed for doing
741 * generic synchronous and asynchronous I/O on a device.
742 * A Device object has data and actions.
743 * Data are represented in the form of Attributes.
744 * Actions are represented in the form of Commands.
745 * The CORBA Device interface offers attributes and methods to access
746 * the attributes and commands.
747 * A client will either use these methods directly from C++ or Java or access
748 * them via a wrapper class.
749 * The Device interface describes only the remote network interface.
750 * Implementation features like threads, command security, priority
751 * etc. are dealt with in server side of the device server model.
758 * name (readonly) - unique ascii identifier
760 readonly attribute string name;
762 * description (readonly) - general description of device
764 readonly attribute string description;
766 * state (readonly) - device state
768 readonly attribute DevState state;
770 * status (readonly) - device state as ascii string
772 readonly attribute string status;
774 * adm_name (readonly) - administrator device unique ascii identifier
776 readonly attribute string adm_name;
779 * execute a command on a device synchronously with
780 * one input parameter and one output parameter
781 @param command ascii string e.g. "On"
782 @param argin command input parameter e.g. float
783 @return command result.
785 any command_inout(in string command, in any argin) raises(DevFailed);
789 * read the configuration for a variable list of attributes from a device
790 @param name list of attribute names to read
791 @return list of attribute configurations read
793 AttributeConfigList get_attribute_config(in DevVarStringArray names) raises(DevFailed);
797 * set the configuration for a variable list of attributes from the device
798 @param new_conf list of attribute configuration to be set
801 void set_attribute_config(in AttributeConfigList new_conf) raises(DevFailed);
805 * read a variable list of attributes from a device
806 @param name list of attribute names to read
807 @return list of attribute values read
809 AttributeValueList read_attributes(in DevVarStringArray names) raises(DevFailed);
814 * write a variable list of attributes to a device
815 @param values list of attribute values to write
818 void write_attributes(in AttributeValueList values) raises(DevFailed);
821 * ping a device to see if it alive
823 void ping() raises(DevFailed);
826 * read list of last N commands executed by clients
827 @param number of commands to return
828 @return list of command and clients
830 DevVarStringArray black_box(in long n) raises(DevFailed);
834 * return general information about object e.g. class, type, ...
837 DevInfo info() raises(DevFailed);
841 * query device to see what commands it supports
842 @return list of commands and their types
844 DevCmdInfoList command_list_query() raises(DevFailed);
848 * query device to see command argument
849 @return command and its types
852 DevCmdInfo command_query(in string command) raises(DevFailed);
856 //-------------------------------------------------------------------------
858 // The Device_2 interface
860 //-------------------------------------------------------------------------
864 * A new release of the basic Device interface.
865 * This new release has been introduced mainly to support Tango device server
866 * internal polling. Inheritance is used between this new release and the
867 * old one. This release mainly defines a new release of the command_inout and
868 * read_attributes calls with a new parameter. It also add a new call to read
869 * command or attributes result history.
872 interface Device_2: Device
875 * Execute a command on a device synchronously with
876 * one input parameter and one output parameter
877 @param command ascii string e.g. "On"
878 @param argin command input parameter e.g. float
879 @param source The data source. Used to specify if the command result must be
880 read from the polling cache buffer or from the device itself
881 @return command result.
883 any command_inout_2(in string command,
885 in DevSource source) raises(DevFailed);
888 * Read a variable list of attributes from a device
889 @param name list of attribute names to read
890 @param source The data source. Used to specify if the command result must be
891 read from the polling cache buffer or from the device itself
892 @return list of attribute values read
894 AttributeValueList read_attributes_2(in DevVarStringArray names,
895 in DevSource source) raises(DevFailed);
898 * Read the configuration for a variable list of attributes from a device.
899 * Compared to the Device interface, the attribute configuration has one more
900 * field (The display level)
901 @param name list of attribute names to read
902 @return list of attribute configurations read
904 AttributeConfigList_2 get_attribute_config_2(in DevVarStringArray names) raises(DevFailed);
907 * Query device to see what commands it supports.
908 * Compared to the Device interface, the command configuration has one more
909 * field (The display level)
910 @return list of commands and their types
912 DevCmdInfoList_2 command_list_query_2() raises(DevFailed);
915 * Query device to see command argument.
916 * Compared to the Device interface, the command configuration has one more
917 * field (The display level)
918 @return command and its types
921 DevCmdInfo_2 command_query_2(in string command) raises(DevFailed);
924 * Get command history buffer.
925 * Return command result history for polled command
926 @param command ascii string e.g. "On"
927 @param n The history depth
928 @return command history.
930 DevCmdHistoryList command_inout_history_2(in string command,
931 in long n) raises (DevFailed);
934 * Get attribute value history buffer.
935 * Return attribute value history for polled attribute
936 @param name ascii string
937 @param n The history depth
938 @return attribute value history.
940 DevAttrHistoryList read_attribute_history_2(in string name,
941 in long n) raises (DevFailed);
944 //-------------------------------------------------------------------------
946 // The Device_3 interface (corresponding to Tango V5)
948 //-------------------------------------------------------------------------
950 interface Device_3: Device_2
954 * Read a variable list of attributes from a device
955 @param name list of attribute names to read
956 @param source The data source. Used to specify if the command result must be
957 read from the polling cache buffer or from the device itself
958 @return list of attribute values read
960 AttributeValueList_3 read_attributes_3(in DevVarStringArray names,
961 in DevSource source) raises(DevFailed);
964 * write a variable list of attributes to a device
965 @param values list of attribute values to write
968 void write_attributes_3(in AttributeValueList values) raises(DevFailed,MultiDevFailed);
970 * Get attribute value history buffer.
971 * Return attribute value history for polled attribute
972 @param name ascii string
973 @param n The history depth
974 @return attribute value history.
976 DevAttrHistoryList_3 read_attribute_history_3(in string name,
977 in long n) raises (DevFailed);
980 * return general information about object e.g. class, type, ...
983 DevInfo_3 info_3() raises(DevFailed);
986 * Read the configuration for a variable list of attributes from a device.
987 * Compared to the Device interface, the attribute configuration has one more
988 * field (The display level)
989 @param name list of attribute names to read
990 @return list of attribute configurations read
992 AttributeConfigList_3 get_attribute_config_3(in DevVarStringArray names) raises(DevFailed);
995 * set the configuration for a variable list of attributes from the device
996 @param new_conf list of attribute configuration to be set
999 void set_attribute_config_3(in AttributeConfigList_3 new_conf) raises(DevFailed);
1002 //-------------------------------------------------------------------------
1004 // The Device_4 interface (corresponding to Tango V7)
1006 //-------------------------------------------------------------------------
1008 interface Device_4: Device_3
1011 * Get attribute value history buffer.
1012 * Return attribute value history for polled attribute
1013 @param name ascii string
1014 @param n The history depth
1015 @return attribute value history.
1017 DevAttrHistory_4 read_attribute_history_4(in string name,
1018 in long n) raises (DevFailed);
1021 * Get command history buffer.
1022 * Return command result history for polled command
1023 @param command ascii string e.g. "On"
1024 @param n The history depth
1025 @return command history.
1027 DevCmdHistory_4 command_inout_history_4(in string command,
1028 in long n) raises (DevFailed);
1031 * Execute a command on a device synchronously with
1032 * one input parameter and one output parameter
1033 @param command ascii string e.g. "On"
1034 @param argin command input parameter e.g. float
1035 @param source The data source. Used to specify if the command result must be
1036 read from the polling cache buffer or from the device itself
1037 @param cl_ident The client identificator
1038 @return command result.
1040 any command_inout_4(in string command,
1042 in DevSource source,
1043 in ClntIdent cl_ident) raises(DevFailed);
1046 * Read a variable list of attributes from a device
1047 @param name list of attribute names to read
1048 @param source The data source. Used to specify if the command result must be
1049 read from the polling cache buffer or from the device itself
1050 @return list of attribute values read
1052 AttributeValueList_4 read_attributes_4(in DevVarStringArray names,
1053 in DevSource source,in ClntIdent cl_ident) raises(DevFailed);
1056 * write a variable list of attributes to a device
1057 @param values list of attribute values to write
1060 void write_attributes_4(in AttributeValueList_4 values,in ClntIdent cl_ident) raises(DevFailed,MultiDevFailed);
1063 * set the configuration for a variable list of attributes from the device
1064 @param new_conf list of attribute configuration to be set
1067 void set_attribute_config_4(in AttributeConfigList_3 new_conf,in ClntIdent cl_ident) raises(DevFailed);
1070 * Write then Read device attribute(s)
1071 @param values List of attribute values to be written
1072 @param cl_ident The client identificator
1073 @return Attributes value read
1075 AttributeValueList_4 write_read_attributes_4(in AttributeValueList_4 values,in ClntIdent cl_ident)
1076 raises(DevFailed,MultiDevFailed);
1079 //-------------------------------------------------------------------------
1081 // The Device_5 interface (corresponding to Tango V9)
1083 //-------------------------------------------------------------------------
1085 interface Device_5: Device_4
1088 * Read the configuration for a variable list of attributes from a device.
1089 * Compared to the Device interface, the attribute configuration has one more
1090 * field (The display level)
1091 @param name list of attribute names to read
1092 @return list of attribute configurations read
1094 AttributeConfigList_5 get_attribute_config_5(in DevVarStringArray names) raises(DevFailed);
1097 * set the configuration for a variable list of attributes from the device
1098 @param new_conf list of attribute configuration to be set
1101 void set_attribute_config_5(in AttributeConfigList_5 new_conf,in ClntIdent cl_ident) raises(DevFailed);
1104 * Read a variable list of attributes from a device
1105 @param name list of attribute names to read
1106 @param source The data source. Used to specify if the command result must be
1107 read from the polling cache buffer or from the device itself
1108 @return list of attribute values read
1110 AttributeValueList_5 read_attributes_5(in DevVarStringArray names,
1111 in DevSource source,in ClntIdent cl_ident) raises(DevFailed);
1114 * Write then Read device attribute(s)
1115 @param values List of attribute values to be written
1116 @param cl_ident The client identificator
1117 @return Attributes value read
1119 AttributeValueList_5 write_read_attributes_5(in AttributeValueList_4 values,in DevVarStringArray r_names,in ClntIdent cl_ident)
1120 raises(DevFailed,MultiDevFailed);
1123 * Get attribute value history buffer.
1124 * Return attribute value history for polled attribute
1125 @param name ascii string
1126 @param n The history depth
1127 @return attribute value history.
1129 DevAttrHistory_5 read_attribute_history_5(in string name,
1130 in long n) raises (DevFailed);
1133 * Read the configuration for a variable list of pipes from a device.
1134 @param names list of pipe names to read
1135 @return list of pipe configurations read
1137 PipeConfigList get_pipe_config_5(in DevVarStringArray names) raises(DevFailed);
1140 * set the configuration for a variable list of pipes from the device
1141 @param new_conf list of pipe configuration to be set
1144 void set_pipe_config_5(in PipeConfigList new_conf,in ClntIdent cl_ident) raises(DevFailed);
1147 * Read a pipe from a device
1148 @param name pipe name
1149 @param cl_ident client identifier
1152 DevPipeData read_pipe_5(in string name,in ClntIdent cl_ident) raises(DevFailed);
1155 * write a pipe to a device
1156 @param value new pipe value
1157 @param cl_ident client identifier
1160 void write_pipe_5(in DevPipeData value,in ClntIdent cl_ident) raises(DevFailed);
1163 * write then read a pipe to a device
1164 @param value new pipe value
1165 @param cl_ident client identifier
1168 DevPipeData write_read_pipe_5(in DevPipeData value,in ClntIdent cl_ident) raises(DevFailed);
1172 }; /* module tango */