1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736
|
/**
* This is the new TACO interface defined in IDL. New TACO (or TANGO)
* is a total rethink of (old) TACO which was based on remote procedure
* calls.
* TANGO is an extension of old TACO.
* The fundamental idea of a device as a network object which
* has methods and data has been retained. However
* in TANGO objects will be real C++/Java objects which can be instantiated
* and accessed via their methods and data by the client as if they were local
* objects.
* Certain aspects of the old DSAPI application programmer's
* interface have been suppressed in order to simplify the client (e.g. import,
* free, data collector api).
* Features which have been considered missing in old TACO have been added
* e.g. signals, events and groups.
* Asynchronism and groups have been foreseen right from the beginning
* this time.
* 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.
* New classes of control objects e.g. PowerSupply, will be created by
* wrapping the Device class appropriately.
* The wrapper class will hide the calls to the Device interface from
* the client so that the client will only see the wrapper class.
* All CORBA details will be hidden from the client as far as possible.
* Generic clients will use the Device interface directly.
* In addition to Device TANGO offers the interfaces Monitor,
* GroupDevice and GroupSignal.
* These interfaces implement TANGO services for monitoring and
* executing grouped accesses to device/signals.<BR><BR>
* Version history: <BR>
* 20/08/98 : 1.1 : First official release<BR>
* 18/08/99 : 2.0 : Separe idl and pseudo-idl<BR>
* 08/09/99 : 2.1 : Remove the applet attribute and the initiliase and serialise operation from the device interface<BR>
* 15/09/99 : 2.2 : Adapted to the ICALEPS show<BR>
* 06/12/99 : 2.3 : Less possible state and add strings in the DevCmdInfo struct<BR>
* 31/01/00 : 2.4 : Update DevVarCharArray to array of octet<BR>
* 10/02/00 : 2.5 : Updated all attribute related stuff<BR>
* 21/03/00 : 2.6 : Change arguments for the write_attributes device operation<BR>
* 15/09/00 : 2.7 : Change arguments for the read_attributes operation. Remove the
* CORBA field of the ErrFacility enumeration.
* Replace the WARMUP state by INIT.
* Change name of the dim_x and dim_y fields of the
* AttributeConfig structure to max_dim_x and max_dim_y<BR>
* 27/09/00 : 2.8 : Change the writable field type of the AttributeConfig structure<BR>
* 26/10/00 : 2.9 : Change the DevError structure fields<BR>
* 12/02/01 : 2.10 : Change in the ErrSeverity enum. Windows does not like enum member like ERROR<BR>
* 14/02/01 : 2.11 : Another change in the ErrSeverity enum. WARNING is now WARN<BR>
* 23/03/01 : 2.12 : Add a new attribute in the Device interface called adm_name<BR>
* 26/10/01 : 3.0 : Add a new Device interface version using inheritance<BR>
* Add a new parameter to command_inout operation<BR>
* Add the command and attribute display level in command and attribute config structure<BR>
* Add a new call to get command or attribute cache history<BR>
* 06/04/02 : 2.0 : Update release number to be coherent with the real Tango software release number<BR>
@author JM.Chaize,<BR>A.Gotz,<BR>W-D.Klotz,<BR>J.Meyer,<BR>E.Taurel
@version 2.0
**/
module Tango
{
//-------------------------------------------------------------------------
//
// Include all types, struct.... definition file
//
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//
// Basic types to transport command data
//
//-------------------------------------------------------------------------
typedef boolean DevBoolean;
typedef double DevDouble;
typedef float DevFloat;
typedef long DevLong;
typedef short DevShort;
typedef string DevString;
typedef octet DevUChar;
typedef unsigned long DevULong;
typedef unsigned short DevUShort;
typedef sequence<float> DevVarFloatArray;
typedef sequence<double> DevVarDoubleArray;
typedef sequence<short> DevVarShortArray;
typedef sequence<long> DevVarLongArray;
typedef sequence<octet> DevVarCharArray;
typedef sequence<string> DevVarStringArray;
typedef sequence<unsigned short> DevVarUShortArray;
typedef sequence<unsigned long> DevVarULongArray;
typedef sequence<boolean> DevVarBooleanArray;
struct DevVarLongStringArray
{
DevVarLongArray lvalue;
DevVarStringArray svalue;
};
struct DevVarDoubleStringArray
{
DevVarDoubleArray dvalue;
DevVarStringArray svalue;
};
//-------------------------------------------------------------------------
//
// Some enumerations
//
//-------------------------------------------------------------------------
enum AttrQuality
{
ATTR_VALID,
ATTR_INVALID,
ATTR_ALARM,
ATTR_CHANGING,
ATTR_WARNING
};
enum AttrWriteType
{
READ,
READ_WITH_WRITE,
WRITE,
READ_WRITE
};
enum AttrDataFormat
{
SCALAR,
SPECTRUM,
IMAGE
};
enum DevSource
{
DEV,
CACHE,
CACHE_DEV
};
enum ErrSeverity
{
WARN,
ERR,
PANIC
};
enum DevState
{
ON,
OFF,
CLOSE,
OPEN,
INSERT,
EXTRACT,
MOVING,
STANDBY,
FAULT,
INIT,
RUNNING,
ALARM,
DISABLE,
UNKNOWN
};
enum DispLevel
{
OPERATOR,
EXPERT
};
//-------------------------------------------------------------------------
//
// Some miscellaneous structures definitions
//
//-------------------------------------------------------------------------
struct TimeVal
{
long tv_sec;
long tv_usec;
long tv_nsec;
};
//-------------------------------------------------------------------------
//
// For the command query device operation
//
//-------------------------------------------------------------------------
struct DevCmdInfo
{
string cmd_name;
long cmd_tag;
long in_type;
long out_type;
string in_type_desc;
string out_type_desc;
};
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;
};
typedef sequence<DevCmdInfo> DevCmdInfoList;
typedef sequence<DevCmdInfo_2> DevCmdInfoList_2;
//-------------------------------------------------------------------------
//
// For the DevFailed exceptions
//
//-------------------------------------------------------------------------
struct DevError
{
string reason;
ErrSeverity severity;
string desc;
string origin;
};
typedef sequence<DevError> DevErrorList;
struct NamedDevError
{
string name;
long index_in_call;
DevErrorList err_list;
};
typedef sequence<NamedDevError> NamedDevErrorList;
exception DevFailed
{
DevErrorList errors;
};
exception MultiDevFailed
{
NamedDevErrorList errors;
};
//-------------------------------------------------------------------------
//
// For attribute management
//
//-------------------------------------------------------------------------
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;
};
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;
};
struct AttributeValue
{
any value;
AttrQuality quality;
TimeVal time;
string name;
long dim_x;
long dim_y;
};
struct AttributeDim
{
long dim_x;
long dim_y;
};
struct AttributeValue_3
{
any value;
AttrQuality quality;
TimeVal time;
string name;
AttributeDim r_dim;
AttributeDim w_dim;
DevErrorList err_list;
};
struct ChangeEventProp
{
string rel_change;
string abs_change;
DevVarStringArray extensions;
};
struct PeriodicEventProp
{
string period;
DevVarStringArray extensions;
};
struct ArchiveEventProp
{
string rel_change;
string abs_change;
string period;
DevVarStringArray extensions;
};
struct EventProperties
{
ChangeEventProp ch_event;
PeriodicEventProp per_event;
ArchiveEventProp arch_event;
};
struct AttributeAlarm
{
string min_alarm;
string max_alarm;
string min_warning;
string max_warning;
string delta_t;
string delta_val;
DevVarStringArray extensions;
};
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 att_alarm;
EventProperties event_prop;
DevVarStringArray extensions;
DevVarStringArray sys_extensions;
};
typedef sequence<AttributeConfig> AttributeConfigList;
typedef sequence<AttributeConfig_2> AttributeConfigList_2;
typedef sequence<AttributeConfig_3> AttributeConfigList_3;
typedef sequence<AttributeValue> AttributeValueList;
typedef sequence<AttributeValue_3> AttributeValueList_3;
//-------------------------------------------------------------------------
//
// For device interface info operation
//
//-------------------------------------------------------------------------
struct DevInfo
{
string dev_class;
string server_id;
string server_host;
long server_version;
string doc_url;
};
struct DevInfo_3
{
string dev_class;
string server_id;
string server_host;
long server_version;
string doc_url;
string dev_type;
};
//-------------------------------------------------------------------------
//
// For command and attribute history
//
//-------------------------------------------------------------------------
struct DevCmdHistory
{
TimeVal time;
boolean cmd_failed;
any value;
DevErrorList errors;
};
typedef sequence<DevCmdHistory> DevCmdHistoryList;
struct DevAttrHistory
{
boolean attr_failed;
AttributeValue value;
DevErrorList errors;
};
struct DevAttrHistory_3
{
boolean attr_failed;
AttributeValue_3 value;
};
typedef sequence<DevAttrHistory> DevAttrHistoryList;
typedef sequence<DevAttrHistory_3> DevAttrHistoryList_3;
//-------------------------------------------------------------------------
//
// Include the device interface
//
//-------------------------------------------------------------------------
/**
* 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 a wrapper class.
* 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.
**/
interface Device
{
/**
* name (readonly) - unique ascii identifier
**/
readonly attribute string name;
/**
* description (readonly) - general description of device
**/
readonly attribute string description;
/**
* state (readonly) - device state
**/
readonly attribute DevState state;
/**
* status (readonly) - device state as ascii string
**/
readonly attribute string status;
/**
* adm_name (readonly) - administrator device unique ascii identifier
**/
readonly attribute string adm_name;
/**
* execute a command on a device synchronously with
* one input parameter and one output parameter
@param command ascii string e.g. "On"
@param argin command input parameter e.g. float
@return command result.
**/
any command_inout(in string command, in any argin) raises(DevFailed);
/**
* read the configuration for a variable list of attributes from a device
@param name list of attribute names to read
@return list of attribute configurations read
**/
AttributeConfigList get_attribute_config(in DevVarStringArray names) raises(DevFailed);
/**
* set the configuration for a variable list of attributes from the device
@param new_conf list of attribute configuration to be set
@return nothing
**/
void set_attribute_config(in AttributeConfigList new_conf) raises(DevFailed);
/**
* read a variable list of attributes from a device
@param name list of attribute names to read
@return list of attribute values read
**/
AttributeValueList read_attributes(in DevVarStringArray names) raises(DevFailed);
/**
* write a variable list of attributes to a device
@param values list of attribute values to write
@return nothing
**/
void write_attributes(in AttributeValueList values) raises(DevFailed);
/**
* ping a device to see if it alive
**/
void ping() raises(DevFailed);
/**
* read list of last N commands executed by clients
@param number of commands to return
@return list of command and clients
**/
DevVarStringArray black_box(in long n) raises(DevFailed);
/**
* return general information about object e.g. class, type, ...
@return device info
**/
DevInfo info() raises(DevFailed);
/**
* query device to see what commands it supports
@return list of commands and their types
**/
DevCmdInfoList command_list_query() raises(DevFailed);
/**
* query device to see command argument
@return command and its types
@param command name
**/
DevCmdInfo command_query(in string command) raises(DevFailed);
};
/**
* A new release of the basic Device interface.
* This new release has been introduced mainly to support Tango device server
* internal polling. Inheritance is used between this new release and the
* old one. This release mainly defines a new release of the command_inout and
* read_attributes calls with a new parameter. It also add a new call to read
* command or attributes result history.
**/
interface Device_2: Device
{
/**
* Execute a command on a device synchronously with
* one input parameter and one output parameter
@param command ascii string e.g. "On"
@param argin command input parameter e.g. float
@param source The data source. Used to specify if the command result must be
read from the polling cache buffer or from the device itself
@return command result.
**/
any command_inout_2(in string command,
in any argin,
in DevSource source) raises(DevFailed);
/**
* Read a variable list of attributes from a device
@param name list of attribute names to read
@param source The data source. Used to specify if the command result must be
read from the polling cache buffer or from the device itself
@return list of attribute values read
**/
AttributeValueList read_attributes_2(in DevVarStringArray names,
in DevSource source) raises(DevFailed);
/**
* Read the configuration for a variable list of attributes from a device.
* Compared to the Device interface, the attribute configuration has one more
* field (The display level)
@param name list of attribute names to read
@return list of attribute configurations read
**/
AttributeConfigList_2 get_attribute_config_2(in DevVarStringArray names) raises(DevFailed);
/**
* Query device to see what commands it supports.
* Compared to the Device interface, the command configuration has one more
* field (The display level)
@return list of commands and their types
**/
DevCmdInfoList_2 command_list_query_2() raises(DevFailed);
/**
* Query device to see command argument.
* Compared to the Device interface, the command configuration has one more
* field (The display level)
@return command and its types
@param command name
**/
DevCmdInfo_2 command_query_2(in string command) raises(DevFailed);
/**
* Get command history buffer.
* Return command result history for polled command
@param command ascii string e.g. "On"
@param n The history depth
@return command history.
**/
DevCmdHistoryList command_inout_history_2(in string command,
in long n) raises (DevFailed);
/**
* Get attribute value history buffer.
* Return attribute value history for polled attribute
@param name ascii string
@param n The history depth
@return attribute value history.
**/
DevAttrHistoryList read_attribute_history_2(in string name,
in long n) raises (DevFailed);
};
interface Device_3: Device_2
{
/**
* Read a variable list of attributes from a device
@param name list of attribute names to read
@param source The data source. Used to specify if the command result must be
read from the polling cache buffer or from the device itself
@return list of attribute values read
**/
AttributeValueList_3 read_attributes_3(in DevVarStringArray names,
in DevSource source) raises(DevFailed);
/**
* write a variable list of attributes to a device
@param values list of attribute values to write
@return nothing
**/
void write_attributes_3(in AttributeValueList values) raises(DevFailed,MultiDevFailed);
/**
* Get attribute value history buffer.
* Return attribute value history for polled attribute
@param name ascii string
@param n The history depth
@return attribute value history.
**/
DevAttrHistoryList_3 read_attribute_history_3(in string name,
in long n) raises (DevFailed);
/**
* return general information about object e.g. class, type, ...
@return device info
**/
DevInfo_3 info_3() raises(DevFailed);
/**
* Read the configuration for a variable list of attributes from a device.
* Compared to the Device interface, the attribute configuration has one more
* field (The display level)
@param name list of attribute names to read
@return list of attribute configurations read
**/
AttributeConfigList_3 get_attribute_config_3(in DevVarStringArray names) raises(DevFailed);
/**
* set the configuration for a variable list of attributes from the device
@param new_conf list of attribute configuration to be set
@return nothing
**/
void set_attribute_config_3(in AttributeConfigList_3 new_conf) raises(DevFailed);
};
}; /* module tango */
|