aboutsummaryrefslogtreecommitdiffstats
path: root/idl/tango.idl
blob: 1bea6fcd4c4fcdb5375e38a61d41afb0d774d267 (plain)
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
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
/**
 * This is the TANGO interface defined in IDL.
 * 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.
**/

module Tango
{

//-------------------------------------------------------------------------
//
// 		Basic types to transport command data
//
//-------------------------------------------------------------------------

typedef boolean 				DevBoolean;
typedef double 					DevDouble;
typedef float 					DevFloat;
typedef short 					DevShort;
typedef	long 					DevLong;
typedef long long				DevLong64;
typedef string 					DevString;
typedef octet					DevUChar;
typedef unsigned short 			DevUShort;
typedef unsigned long 			DevULong;
typedef unsigned long long		DevULong64;

typedef sequence<boolean>		DevVarBooleanArray;
typedef sequence<double> 		DevVarDoubleArray;
typedef sequence<float> 		DevVarFloatArray;
typedef sequence<short> 		DevVarShortArray;
typedef sequence<long> 			DevVarLongArray;
typedef sequence<long long>		DevVarLong64Array;
typedef sequence<octet> 		DevVarCharArray;
typedef sequence<string> 		DevVarStringArray;
typedef sequence<unsigned short> 	DevVarUShortArray;
typedef sequence<unsigned long> 	DevVarULongArray;
typedef sequence<unsigned long long>	DevVarULong64Array;


struct DevVarLongStringArray
{
	DevVarLongArray 	lvalue;
	DevVarStringArray 	svalue;
};

struct DevVarDoubleStringArray
{
	DevVarDoubleArray 	dvalue;
	DevVarStringArray 	svalue;
};

struct DevEncoded
{
	DevString			encoded_format;
	DevVarCharArray		encoded_data;
};

typedef sequence<DevEncoded>	DevVarEncodedArray;

//-------------------------------------------------------------------------
//
// 		Data types for client identification
//
//-------------------------------------------------------------------------

typedef	unsigned long long  	JavaUUID[2];
typedef unsigned long			CppClntIdent;

struct JavaClntIdent
{
	string			MainClass;
	JavaUUID		uuid;
};

enum LockerLanguage { CPP, JAVA };

union ClntIdent switch (LockerLanguage)
{
case CPP:
	CppClntIdent		cpp_clnt;
case JAVA:
	JavaClntIdent		java_clnt;
};

//-------------------------------------------------------------------------
//
// 		Some enumerations
//
//-------------------------------------------------------------------------


enum AttrQuality
{
	ATTR_VALID,
	ATTR_INVALID,
	ATTR_ALARM,
	ATTR_CHANGING,
	ATTR_WARNING
};

enum AttrWriteType
{
	READ,
	READ_WITH_WRITE,
	WRITE,
	READ_WRITE,
    WT_UNKNOWN
};

enum AttrDataFormat
{
	SCALAR,
	SPECTRUM,
	IMAGE,
	FMT_UNKNOWN
};

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,
	DL_UNKNOWN
};

typedef sequence<DevState>	DevVarStateArray;

//-------------------------------------------------------------------------
//
//		 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;
};

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
};

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;
};

struct AttributeValue_4
{
	AttrValUnion		value;
	AttrQuality 		quality;
	AttrDataFormat		data_format;
	TimeVal 			time;
	string				name;
	AttributeDim		r_dim;
	AttributeDim		w_dim;
	DevErrorList		err_list;
};

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;
};

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;
};

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;
};

typedef sequence<AttributeConfig> 	AttributeConfigList;
typedef sequence<AttributeConfig_2> AttributeConfigList_2;
typedef sequence<AttributeConfig_3> AttributeConfigList_3;
typedef sequence<AttributeConfig_5> AttributeConfigList_5;
typedef sequence<AttributeValue> 	AttributeValueList;
typedef sequence<AttributeValue_3> 	AttributeValueList_3;
typedef sequence<AttributeValue_4>	AttributeValueList_4;
typedef sequence<AttributeValue_5>	AttributeValueList_5;

//-------------------------------------------------------------------------
//
//		For pipe management
//
//-------------------------------------------------------------------------

enum PipeWriteType
{
	PIPE_READ,
	PIPE_READ_WRITE,
    PIPE_WT_UNKNOWN
};

struct PipeConfig
{
	string				name;
	string 				description;
	string 				label;
	DispLevel			level;
	PipeWriteType		writable;
	DevVarStringArray	extensions;
};

typedef sequence<PipeConfig> PipeConfigList;

struct DevPipeDataElt;
typedef sequence<DevPipeDataElt>	DevVarPipeDataEltArray;

struct DevPipeDataElt
{
	string					name;
	AttrValUnion			value;
	DevVarPipeDataEltArray	inner_blob;
	string					inner_blob_name;
};

struct DevPipeBlob
{
	string 					name;
	DevVarPipeDataEltArray	blob_data;
};

struct DevPipeData
{
	string					name;
	TimeVal					time;
	DevPipeBlob				data_blob;
};

//-------------------------------------------------------------------------
//
//		For data ready event
//
//-------------------------------------------------------------------------

struct AttDataReady
{
	string 	name;
	long 	data_type;
	long 	ctr;
};


//-------------------------------------------------------------------------
//
//		For device interface change event
//
//-------------------------------------------------------------------------

struct DevIntrChange
{
	boolean					dev_started;
	DevCmdInfoList_2 		cmds;
	AttributeConfigList_5 	atts;
};

//-------------------------------------------------------------------------
//
//		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;
};

struct EltInArray
{
	long			start;
	long			nb_elt;
};

typedef sequence<EltInArray> EltInArrayList;
typedef sequence<TimeVal> TimeValList;
typedef sequence<AttrQuality> AttrQualityList;
typedef sequence<AttributeDim> AttributeDimList;
typedef sequence<DevErrorList> DevErrorListList;

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;
};

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;
};

struct DevCmdHistory_4
{
	TimeValList				dates;
	any						value;
	AttributeDimList		dims;
	EltInArrayList			dims_array;
	DevErrorListList		errors;
	EltInArrayList			errors_array;
	long 					cmd_type;
};

typedef sequence<DevAttrHistory> 	DevAttrHistoryList;
typedef sequence<DevAttrHistory_3> 	DevAttrHistoryList_3;

//-------------------------------------------------------------------------
//
//		For ZMQ event system
//
//-------------------------------------------------------------------------

struct ZmqCallInfo
{
	long					version;
	unsigned long 			ctr;
	string					method_name;
	DevVarCharArray			oid;
	boolean					call_is_except;
};

//-------------------------------------------------------------------------
//
//		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);

};

//-------------------------------------------------------------------------
//
//		The Device_2 interface
//
//-------------------------------------------------------------------------


/**
 * 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);
};

//-------------------------------------------------------------------------
//
//		The Device_3 interface (corresponding to Tango V5)
//
//-------------------------------------------------------------------------

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);
};

//-------------------------------------------------------------------------
//
//		The Device_4 interface (corresponding to Tango V7)
//
//-------------------------------------------------------------------------

interface Device_4: Device_3
{
/**
 * 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.
 **/
	DevAttrHistory_4 read_attribute_history_4(in string name,
						      in long n) 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.
 **/
	DevCmdHistory_4 command_inout_history_4(in string command,
						  in long n) raises (DevFailed);

/**
 * 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
@param cl_ident The client identificator
@return command result.
 **/
	any command_inout_4(in string command,
			    in any argin,
			    in DevSource source,
				in ClntIdent cl_ident) 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_4 read_attributes_4(in DevVarStringArray names,
					       in DevSource source,in ClntIdent cl_ident) raises(DevFailed);

/**
 * write a variable list of attributes to a device
@param values list of attribute values to write
@return nothing
 **/
	void write_attributes_4(in AttributeValueList_4 values,in ClntIdent cl_ident) raises(DevFailed,MultiDevFailed);

/**
 * 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_4(in AttributeConfigList_3 new_conf,in ClntIdent cl_ident) raises(DevFailed);

/**
 * Write then Read device attribute(s)
@param values List of attribute values to be written
@param cl_ident The client identificator
@return Attributes value read
 **/
	AttributeValueList_4 write_read_attributes_4(in AttributeValueList_4 values,in ClntIdent cl_ident)
	raises(DevFailed,MultiDevFailed);
};

//-------------------------------------------------------------------------
//
//		The Device_5 interface (corresponding to Tango V9)
//
//-------------------------------------------------------------------------

interface Device_5: Device_4
{
/**
 * 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_5 get_attribute_config_5(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_5(in AttributeConfigList_5 new_conf,in ClntIdent cl_ident) 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_5 read_attributes_5(in DevVarStringArray names,
					       in DevSource source,in ClntIdent cl_ident) raises(DevFailed);

/**
 * Write then Read device attribute(s)
@param values List of attribute values to be written
@param cl_ident The client identificator
@return Attributes value read
 **/
	AttributeValueList_5 write_read_attributes_5(in AttributeValueList_4 values,in DevVarStringArray r_names,in ClntIdent cl_ident)
	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.
 **/
	DevAttrHistory_5 read_attribute_history_5(in string name,
						      in long n) raises (DevFailed);

/**
 * Read the configuration for a variable list of pipes from a device.
@param names list of pipe names to read
@return list of pipe configurations read
 **/
	PipeConfigList get_pipe_config_5(in DevVarStringArray names) raises(DevFailed);

/**
 * set the configuration for a variable list of pipes from the device
@param new_conf list of pipe configuration to be set
@return nothing
 **/
	void set_pipe_config_5(in PipeConfigList new_conf,in ClntIdent cl_ident) raises(DevFailed);

/**
 * Read a pipe from a device
@param name pipe name
@param cl_ident client identifier
@return pipe value
 **/
	DevPipeData read_pipe_5(in string name,in ClntIdent cl_ident) raises(DevFailed);

/**
 * write a pipe to a device
@param value new pipe value
@param cl_ident client identifier
@return nothing
 **/
	void write_pipe_5(in DevPipeData value,in ClntIdent cl_ident) raises(DevFailed);

/**
 * write then read a pipe to a device
@param value new pipe value
@param cl_ident client identifier
@return pipe value
 **/
	DevPipeData write_read_pipe_5(in DevPipeData value,in ClntIdent cl_ident) raises(DevFailed);

};

};  /* module tango */