API util¶
-
class
tango.
ApiUtil
¶ This class allows you to access the tango syncronization model API. It is designed as a singleton. To get a reference to the singleton object you must do:
import tango apiutil = tango.ApiUtil.instance()
New in PyTango 7.1.3
Information classes¶
See also Event configuration information
Attribute¶
-
class
tango.
AttributeAlarmInfo
¶ A structure containing available alarm information for an attribute with the folowing members:
-
class
tango.
AttributeDimension
¶ A structure containing x and y attribute data dimensions with the following members:
-
class
tango.
AttributeInfo
¶ A structure (inheriting from
DeviceAttributeConfig
) containing available information for an attribute with the following members:- disp_level : (
DispLevel
) display level (OPERATOR, EXPERT)
Inherited members are:
- name : (
str
) attribute name - writable : (
AttrWriteType
) write type (R, W, RW, R with W) - data_format : (
AttrDataFormat
) data format (SCALAR, SPECTRUM, IMAGE) - data_type : (
int
) attribute type (float, string,..) - max_dim_x : (
int
) first dimension of attribute (spectrum or image attributes) - max_dim_y : (
int
) second dimension of attribute(image attribute) - description : (
int
) attribute description - label : (
str
) attribute label (Voltage, time, ...) - unit : (
str
) attribute unit (V, ms, ...) - standard_unit : (
str
) standard unit - display_unit : (
str
) display unit - format : (
str
) how to display the attribute value (ex: for floats could be ‘%6.2f’) - min_value : (
str
) minimum allowed value - max_value : (
str
) maximum allowed value - min_alarm : (
str
) low alarm level - max_alarm : (
str
) high alarm level - writable_attr_name : (
str
) name of the writable attribute - extensions : (
StdStringVector
) extensions (currently not used)
- disp_level : (
-
class
tango.
AttributeInfoEx
¶ A structure (inheriting from
AttributeInfo
) containing available information for an attribute with the following members:- alarms : object containing alarm information (see AttributeAlarmInfo).
- events : object containing event information (see AttributeEventInfo).
- sys_extensions : StdStringVector
Inherited members are:
- name : (
str
) attribute name - writable : (
AttrWriteType
) write type (R, W, RW, R with W) - data_format : (
AttrDataFormat
) data format (SCALAR, SPECTRUM, IMAGE) - data_type : (
int
) attribute type (float, string,..) - max_dim_x : (
int
) first dimension of attribute (spectrum or image attributes) - max_dim_y : (
int
) second dimension of attribute(image attribute) - description : (
int
) attribute description - label : (
str
) attribute label (Voltage, time, ...) - unit : (
str
) attribute unit (V, ms, ...) - standard_unit : (
str
) standard unit - display_unit : (
str
) display unit - format : (
str
) how to display the attribute value (ex: for floats could be ‘%6.2f’) - min_value : (
str
) minimum allowed value - max_value : (
str
) maximum allowed value - min_alarm : (
str
) low alarm level - max_alarm : (
str
) high alarm level - writable_attr_name : (
str
) name of the writable attribute - extensions : (
StdStringVector
) extensions (currently not used) - disp_level : (
DispLevel
) display level (OPERATOR, EXPERT)
see also AttributeInfo
-
class
tango.
DeviceAttributeConfig
¶ A base structure containing available information for an attribute with the following members:
- name : (
str
) attribute name - writable : (
AttrWriteType
) write type (R, W, RW, R with W) - data_format : (
AttrDataFormat
) data format (SCALAR, SPECTRUM, IMAGE) - data_type : (
int
) attribute type (float, string,..) - max_dim_x : (
int
) first dimension of attribute (spectrum or image attributes) - max_dim_y : (
int
) second dimension of attribute(image attribute) - description : (
int
) attribute description - label : (
str
) attribute label (Voltage, time, ...) - unit : (
str
) attribute unit (V, ms, ...) - standard_unit : (
str
) standard unit - display_unit : (
str
) display unit - format : (
str
) how to display the attribute value (ex: for floats could be ‘%6.2f’) - min_value : (
str
) minimum allowed value - max_value : (
str
) maximum allowed value - min_alarm : (
str
) low alarm level - max_alarm : (
str
) high alarm level - writable_attr_name : (
str
) name of the writable attribute - extensions : (
StdStringVector
) extensions (currently not used)
- name : (
Command¶
-
class
tango.
DevCommandInfo
¶ A device command info with the following members:
- cmd_name : (
str
) command name - cmd_tag : command as binary value (for TACO)
- in_type : (
CmdArgType
) input type - out_type : (
CmdArgType
) output type - in_type_desc : (
str
) description of input type - out_type_desc : (
str
) description of output type
New in PyTango 7.0.0
- cmd_name : (
-
class
tango.
CommandInfo
¶ A device command info (inheriting from
DevCommandInfo
) with the following members:- disp_level : (
DispLevel
) command display level
Inherited members are (from
DevCommandInfo
):- cmd_name : (
str
) command name - cmd_tag : (
str
) command as binary value (for TACO) - in_type : (
CmdArgType
) input type - out_type : (
CmdArgType
) output type - in_type_desc : (
str
) description of input type - out_type_desc : (
str
) description of output type
- disp_level : (
Other¶
-
class
tango.
DeviceInfo
¶ A structure containing available information for a device with the” following members:
-
class
tango.
LockerInfo
¶ A structure with information about the locker with the folowing members:
- ll : (
tango.LockerLanguage
) the locker language - li : (pid_t / UUID) the locker id
- locker_host : (
str
) the host - locker_class : (
str
) the class
pid_t should be an int, UUID should be a tuple of four numbers.
New in PyTango 7.0.0
- ll : (
-
class
tango.
PollDevice
¶ A structure containing PollDevice information with the folowing members:
Storage classes¶
Attribute: DeviceAttribute¶
-
class
tango.
DeviceAttribute
¶ This is the fundamental type for RECEIVING data from device attributes.
It contains several fields. The most important ones depend on the ExtractAs method used to get the value. Normally they are:
- value : Normal scalar value or numpy array of values.
- w_value : The write part of the attribute.
See other ExtractAs for different possibilities. There are some more fields, these really fixed:
- name : (
str
) - data_format : (
AttrDataFormat
) Attribute format - quality : (
AttrQuality
) - time : (
TimeVal
) - dim_x : (
int
) attribute dimension x - dim_y : (
int
) attribute dimension y - w_dim_x : (
int
) attribute written dimension x - w_dim_y : (
int
) attribute written dimension y - r_rimension : (
tuple
) Attribute read dimensions. - w_dimension : (
tuple
) Attribute written dimensions. - nb_read : (
int
) attribute read total length - nb_written : (
int
) attribute written total length
- And two methods:
- get_date
- get_err_stack
-
ExtractAs
= <ExtensionMock name='_tango.ExtractAs' id='140594619989016'>¶
Command: DeviceData¶
Device data is the type used internally by Tango to deal with command parameters and return values. You don’t usually need to deal with it, as command_inout will automatically convert the parameters from any other type and the result value to another type.
You can still use them, using command_inout_raw to get the result in a DeviceData.
You also may deal with it when reading command history.
-
class
tango.
DeviceData
¶ This is the fundamental type for sending and receiving data from device commands. The values can be inserted and extracted using the insert() and extract() methods.
History classes¶
-
class
tango.
DeviceAttributeHistory
¶
See DeviceAttribute
.
-
class
tango.
DeviceDataHistory
¶
See DeviceData
.