4 * This is the new TACO interface defined in IDL. New TACO (or TANGO)
5 * is a total rethink of (old) TACO which was based on remote procedure
7 * TANGO is an extension of old TACO.
8 * The fundamental idea of a device as a network object which
9 * has methods and data has been retained. However
10 * in TANGO objects will be real C++/Java objects which can be instantiated
11 * and accessed via their methods and data by the client as if they were local
13 * Certain aspects of the old DSAPI application programmer's
14 * interface have been suppressed in order to simplify the client (e.g. import,
15 * free, data collector api).
16 * Features which have been considered missing in old TACO have been added
17 * e.g. signals, events and groups.
18 * Asynchronism and groups have been foreseen right from the beginning
20 * This interface is defined in CORBA IDL.
21 * The fundamental interface is Device.
22 * All TANGO control objects will be of this type i.e. they will implement and
23 * offer the Device interface.
24 * New classes of control objects e.g. PowerSupply, will be created by
25 * wrapping the Device class appropriately.
26 * The wrapper class will hide the calls to the Device interface from
27 * the client so that the client will only see the wrapper class.
28 * All CORBA details will be hidden from the client as far as possible.
29 * Generic clients will use the Device interface directly.
30 * In addition to Device TANGO offers the interfaces Monitor,
31 * GroupDevice and GroupSignal.
32 * These interfaces implement TANGO services for monitoring and
33 * executing grouped accesses to device/signals.<BR><BR>
34 * Version history: <BR>
35 * 20/08/98 : 1.1 : First official release<BR>
36 * 18/08/99 : 2.0 : Separe idl and pseudo-idl<BR>
37 * 08/09/99 : 2.1 : Remove the applet attribute and the initiliase and serialise operation from the device interface<BR>
38 * 15/09/99 : 2.2 : Adapted to the ICALEPS show<BR>
39 * 06/12/99 : 2.3 : Less possible state and add strings in the DevCmdInfo struct<BR>
40 * 31/01/00 : 2.4 : Update DevVarCharArray to array of octet<BR>
41 * 10/02/00 : 2.5 : Updated all attribute related stuff<BR>
42 * 21/03/00 : 2.6 : Change arguments for the write_attributes device operation<BR>
43 * 15/09/00 : 2.7 : Change arguments for the read_attributes operation. Remove the
44 * CORBA field of the ErrFacility enumeration.
45 * Replace the WARMUP state by INIT.
46 * Change name of the dim_x and dim_y fields of the
47 * AttributeConfig structure to max_dim_x and max_dim_y<BR>
48 * 27/09/00 : 2.8 : Change the writable field type of the AttributeConfig structure<BR>
49 * 26/10/00 : 2.9 : Change the DevError structure fields<BR>
50 * 12/02/01 : 2.10 : Change in the ErrSeverity enum. Windows does not like enum member like ERROR<BR>
51 * 14/02/01 : 2.11 : Another change in the ErrSeverity enum. WARNING is now WARN<BR>
52 * 23/03/01 : 2.12 : Add a new attribute in the Device interface called adm_name<BR>
53 * 26/10/01 : 3.0 : Add a new Device interface version using inheritance<BR>
54 * Add a new parameter to command_inout operation<BR>
55 * Add the command and attribute display level in command and attribute config structure<BR>
56 * Add a new call to get command or attribute cache history<BR>
57 * 06/04/02 : 2.0 : Update release number to be coherent with the real Tango software release number<BR>
59 @author JM.Chaize,<BR>A.Gotz,<BR>W-D.Klotz,<BR>J.Meyer,<BR>E.Taurel
66 //-------------------------------------------------------------------------
68 // Include all types, struct.... definition file
70 //-------------------------------------------------------------------------
74 //-------------------------------------------------------------------------
76 // Basic types to transport command data
78 //-------------------------------------------------------------------------
80 typedef boolean DevBoolean;
81 typedef double DevDouble;
82 typedef float DevFloat;
84 typedef short DevShort;
85 typedef string DevString;
86 typedef octet DevUChar;
87 typedef unsigned long DevULong;
88 typedef unsigned short DevUShort;
89 typedef sequence<float> DevVarFloatArray;
90 typedef sequence<double> DevVarDoubleArray;
91 typedef sequence<short> DevVarShortArray;
92 typedef sequence<long> DevVarLongArray;
93 typedef sequence<octet> DevVarCharArray;
94 typedef sequence<string> DevVarStringArray;
95 typedef sequence<unsigned short> DevVarUShortArray;
96 typedef sequence<unsigned long> DevVarULongArray;
97 typedef sequence<boolean> DevVarBooleanArray;
99 struct DevVarLongStringArray
101 DevVarLongArray lvalue;
102 DevVarStringArray svalue;
105 struct DevVarDoubleStringArray
107 DevVarDoubleArray dvalue;
108 DevVarStringArray svalue;
112 //-------------------------------------------------------------------------
116 //-------------------------------------------------------------------------
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 struct ChangeEventProp
348 DevVarStringArray extensions;
351 struct PeriodicEventProp
354 DevVarStringArray extensions;
357 struct ArchiveEventProp
362 DevVarStringArray extensions;
365 struct EventProperties
367 ChangeEventProp ch_event;
368 PeriodicEventProp per_event;
369 ArchiveEventProp arch_event;
372 struct AttributeAlarm
380 DevVarStringArray extensions;
383 struct AttributeConfig_3
386 AttrWriteType writable;
387 AttrDataFormat data_format;
394 string standard_unit;
399 string writable_attr_name;
401 AttributeAlarm att_alarm;
402 EventProperties event_prop;
403 DevVarStringArray extensions;
404 DevVarStringArray sys_extensions;
407 typedef sequence<AttributeConfig> AttributeConfigList;
408 typedef sequence<AttributeConfig_2> AttributeConfigList_2;
409 typedef sequence<AttributeConfig_3> AttributeConfigList_3;
410 typedef sequence<AttributeValue> AttributeValueList;
411 typedef sequence<AttributeValue_3> AttributeValueList_3;
414 //-------------------------------------------------------------------------
416 // For device interface info operation
418 //-------------------------------------------------------------------------
439 //-------------------------------------------------------------------------
441 // For command and attribute history
443 //-------------------------------------------------------------------------
453 typedef sequence<DevCmdHistory> DevCmdHistoryList;
455 struct DevAttrHistory
458 AttributeValue value;
462 struct DevAttrHistory_3
465 AttributeValue_3 value;
468 typedef sequence<DevAttrHistory> DevAttrHistoryList;
469 typedef sequence<DevAttrHistory_3> DevAttrHistoryList_3;
471 //-------------------------------------------------------------------------
473 // Include the device interface
475 //-------------------------------------------------------------------------
482 * The fundamental interface for all TANGO objects.
483 * Each Device is a network object which can be accessed locally or via
485 * The network protocol on the wire will be IIOP.
486 * The Device interface implements all the basic functions needed for doing
487 * generic synchronous and asynchronous I/O on a device.
488 * A Device object has data and actions.
489 * Data are represented in the form of Attributes.
490 * Actions are represented in the form of Commands.
491 * The CORBA Device interface offers attributes and methods to access
492 * the attributes and commands.
493 * A client will either use these methods directly from C++ or Java or access
494 * them via a wrapper class.
495 * The Device interface describes only the remote network interface.
496 * Implementation features like threads, command security, priority
497 * etc. are dealt with in server side of the device server model.
504 * name (readonly) - unique ascii identifier
506 readonly attribute string name;
508 * description (readonly) - general description of device
510 readonly attribute string description;
512 * state (readonly) - device state
514 readonly attribute DevState state;
516 * status (readonly) - device state as ascii string
518 readonly attribute string status;
520 * adm_name (readonly) - administrator device unique ascii identifier
522 readonly attribute string adm_name;
525 * execute a command on a device synchronously with
526 * one input parameter and one output parameter
527 @param command ascii string e.g. "On"
528 @param argin command input parameter e.g. float
529 @return command result.
531 any command_inout(in string command, in any argin) raises(DevFailed);
535 * read the configuration for a variable list of attributes from a device
536 @param name list of attribute names to read
537 @return list of attribute configurations read
539 AttributeConfigList get_attribute_config(in DevVarStringArray names) raises(DevFailed);
543 * set the configuration for a variable list of attributes from the device
544 @param new_conf list of attribute configuration to be set
547 void set_attribute_config(in AttributeConfigList new_conf) raises(DevFailed);
551 * read a variable list of attributes from a device
552 @param name list of attribute names to read
553 @return list of attribute values read
555 AttributeValueList read_attributes(in DevVarStringArray names) raises(DevFailed);
560 * write a variable list of attributes to a device
561 @param values list of attribute values to write
564 void write_attributes(in AttributeValueList values) raises(DevFailed);
567 * ping a device to see if it alive
569 void ping() raises(DevFailed);
572 * read list of last N commands executed by clients
573 @param number of commands to return
574 @return list of command and clients
576 DevVarStringArray black_box(in long n) raises(DevFailed);
580 * return general information about object e.g. class, type, ...
583 DevInfo info() raises(DevFailed);
587 * query device to see what commands it supports
588 @return list of commands and their types
590 DevCmdInfoList command_list_query() raises(DevFailed);
594 * query device to see command argument
595 @return command and its types
598 DevCmdInfo command_query(in string command) raises(DevFailed);
603 * A new release of the basic Device interface.
604 * This new release has been introduced mainly to support Tango device server
605 * internal polling. Inheritance is used between this new release and the
606 * old one. This release mainly defines a new release of the command_inout and
607 * read_attributes calls with a new parameter. It also add a new call to read
608 * command or attributes result history.
611 interface Device_2: Device
614 * Execute a command on a device synchronously with
615 * one input parameter and one output parameter
616 @param command ascii string e.g. "On"
617 @param argin command input parameter e.g. float
618 @param source The data source. Used to specify if the command result must be
619 read from the polling cache buffer or from the device itself
620 @return command result.
622 any command_inout_2(in string command,
624 in DevSource source) raises(DevFailed);
627 * Read a variable list of attributes from a device
628 @param name list of attribute names to read
629 @param source The data source. Used to specify if the command result must be
630 read from the polling cache buffer or from the device itself
631 @return list of attribute values read
633 AttributeValueList read_attributes_2(in DevVarStringArray names,
634 in DevSource source) raises(DevFailed);
637 * Read the configuration for a variable list of attributes from a device.
638 * Compared to the Device interface, the attribute configuration has one more
639 * field (The display level)
640 @param name list of attribute names to read
641 @return list of attribute configurations read
643 AttributeConfigList_2 get_attribute_config_2(in DevVarStringArray names) raises(DevFailed);
646 * Query device to see what commands it supports.
647 * Compared to the Device interface, the command configuration has one more
648 * field (The display level)
649 @return list of commands and their types
651 DevCmdInfoList_2 command_list_query_2() raises(DevFailed);
654 * Query device to see command argument.
655 * Compared to the Device interface, the command configuration has one more
656 * field (The display level)
657 @return command and its types
660 DevCmdInfo_2 command_query_2(in string command) raises(DevFailed);
663 * Get command history buffer.
664 * Return command result history for polled command
665 @param command ascii string e.g. "On"
666 @param n The history depth
667 @return command history.
669 DevCmdHistoryList command_inout_history_2(in string command,
670 in long n) raises (DevFailed);
673 * Get attribute value history buffer.
674 * Return attribute value history for polled attribute
675 @param name ascii string
676 @param n The history depth
677 @return attribute value history.
679 DevAttrHistoryList read_attribute_history_2(in string name,
680 in long n) raises (DevFailed);
684 interface Device_3: Device_2
688 * Read a variable list of attributes from a device
689 @param name list of attribute names to read
690 @param source The data source. Used to specify if the command result must be
691 read from the polling cache buffer or from the device itself
692 @return list of attribute values read
694 AttributeValueList_3 read_attributes_3(in DevVarStringArray names,
695 in DevSource source) raises(DevFailed);
698 * write a variable list of attributes to a device
699 @param values list of attribute values to write
702 void write_attributes_3(in AttributeValueList values) raises(DevFailed,MultiDevFailed);
704 * Get attribute value history buffer.
705 * Return attribute value history for polled attribute
706 @param name ascii string
707 @param n The history depth
708 @return attribute value history.
710 DevAttrHistoryList_3 read_attribute_history_3(in string name,
711 in long n) raises (DevFailed);
714 * return general information about object e.g. class, type, ...
717 DevInfo_3 info_3() raises(DevFailed);
720 * Read the configuration for a variable list of attributes from a device.
721 * Compared to the Device interface, the attribute configuration has one more
722 * field (The display level)
723 @param name list of attribute names to read
724 @return list of attribute configurations read
726 AttributeConfigList_3 get_attribute_config_3(in DevVarStringArray names) raises(DevFailed);
729 * set the configuration for a variable list of attributes from the device
730 @param new_conf list of attribute configuration to be set
733 void set_attribute_config_3(in AttributeConfigList_3 new_conf) raises(DevFailed);
736 }; /* module tango */