This class represents a Tango writable attribute.
Get the class level attribute properties
Parameters: None Return: (sequence<AttrProperty>) the class attribute properties
Get the attribute display level
Parameters: None Return: (DispLevel) the attribute display level
Get the attribute format
Parameters: None Return: (AttrDataFormat) the attribute format
Determine if the attribute is memorized or not.
Parameters: None Return: (bool) True if the attribute is memorized
Determine if the attribute is written at startup from the memorized value if it is memorized
Parameters: None Return: (bool) True if initialized with memorized value or not
Get the polling period (mS)
Parameters: None Return: (int) the polling period (mS)
Get the attribute data type
Parameters: None Return: (int) the attribute data type
Get the user default attribute properties
Parameters: None Return: (sequence<AttrProperty>) the user default attribute properties
Get the attribute write type
Parameters: None Return: (AttrWriteType) the attribute write type
Check if the archive event is fired manually for this attribute.
Parameters: None Return: (bool) true if a manual fire archive event is implemented.
Check if the change event is fired manually for this attribute.
Parameters: None Return: (bool) true if a manual fire change event is implemented.
Check if the archive event criteria should be checked when firing the event manually.
Parameters: None Return: (bool) true if a archive event criteria will be checked.
Check if the change event criteria should be checked when firing the event manually.
Parameters: None Return: (bool) true if a change event criteria will be checked.
Check if the data ready event is fired for this attribute.
Parameters: None Return: (bool) true if firing data ready event is implemented. New in PyTango 7.2.0
Set a flag to indicate that the server fires archive events manually without the polling to be started for the attribute If the detect parameter is set to true, the criteria specified for the archive event are verified and the event is only pushed if they are fullfilled.
If detect is set to false the event is fired without checking!
Parameters:
implemented: (bool) True when the server fires change events manually. detect: (bool) Triggers the verification of the archive event properties when set to true. Return: None
Set a flag to indicate that the server fires change events manually without the polling to be started for the attribute. If the detect parameter is set to true, the criteria specified for the change event are verified and the event is only pushed if they are fullfilled.
If detect is set to false the event is fired without checking!
Parameters:
implemented: (bool) True when the server fires change events manually. detect: (bool) Triggers the verification of the change event properties when set to true. Return: None
Set the class level attribute properties
Parameters:
props: (StdAttrPropertyVector) new class level attribute properties Return: None
Set a flag to indicate that the server fires data ready events.
Parameters:
implemented: (bool) True when the server fires data ready events Return: None
New in PyTango 7.2.0
Set default attribute properties.
Parameters:
attr_prop: (UserDefaultAttrProp) the user default property class Return: None
Set the attribute display level.
Parameters:
disp_level: (DispLevel) the new display level Return: None
Set the attribute as memorized in database (only for scalar and writable attribute) With no argument the setpoint will be written to the attribute during initialisation!
Parameters: None Return: None
Set the initialisation flag for memorized attributes true = the setpoint value will be written to the attribute on initialisation false = only the attribute setpoint is initialised. No action is taken on the attribute
Parameters:
write_on_init: (bool) if true the setpoint value will be written to the attribute on initialisation Return: None
This class represents a Tango attribute.
Get index of the associated writable attribute.
Parameters: None Return: (int) the index in the main attribute vector of the associated writable attribute
Get name of the associated writable attribute.
Parameters: None Return: (str) the associated writable attribute name
Get attribute serialization model.
Parameters: None Return: (AttrSerialModel) The attribute serialization model New in PyTango 7.1.0
Get attribute data format.
Parameters: None Return: (AttrDataFormat) the attribute data format
Get attribute data size.
Parameters: None Return: (int) the attribute data size
Get attribute data type.
Parameters: None Return: (int) the attribute data type
Get a COPY of the attribute date.
Parameters: None Return: (TimeVal) the attribute date
Get attribute label property.
Parameters: None Return: (str) he attribute label
Get attribute maximum data size in x dimension.
Parameters: None Return: (int) the attribute maximum data size in x dimension. Set to 1 for scalar attribute
Get attribute maximum data size in y dimension.
Parameters: None Return: (int) the attribute maximum data size in y dimension. Set to 0 for scalar attribute
Get attribute polling period.
Parameters: None Return: (int) The attribute polling period in mS. Set to 0 when the attribute is not polled
Get attribute properties.
Parameters : |
|
||
---|---|---|---|
Return : | (AttributeConfig) the config object filled with attribute configuration information |
New in PyTango 7.1.4
Get attribute properties.
Parameters : |
|
||
---|---|---|---|
Return : | (AttributeConfig_2) the config object filled with attribute configuration information |
New in PyTango 7.1.4
Get attribute properties.
Parameters : |
|
||
---|---|---|---|
Return : | (AttributeConfig_3) the config object filled with attribute configuration information |
New in PyTango 7.1.4
Get a COPY of the attribute data quality.
Parameters: None Return: (AttrQuality) the attribute data quality
Get the attribute writable type (RO/WO/RW).
Parameters: None Return: (AttrWriteType) The attribute write type.
Get attribute data size in x dimension.
Parameters: None Return: (int) the attribute data size in x dimension. Set to 1 for scalar attribute
Get attribute data size in y dimension.
Parameters: None Return: (int) the attribute data size in y dimension. Set to 1 for scalar attribute
Check if the archive event is fired manually (without polling) for this attribute.
Parameters: None Return: (bool) True if a manual fire archive event is implemented. New in PyTango 7.1.0
Check if the change event is fired manually (without polling) for this attribute.
Parameters: None Return: (bool) True if a manual fire change event is implemented. New in PyTango 7.1.0
Check if the archive event criteria should be checked when firing the event manually.
Parameters: None Return: (bool) True if a archive event criteria will be checked. New in PyTango 7.1.0
Check if the change event criteria should be checked when firing the event manually.
Parameters: None Return: (bool) True if a change event criteria will be checked. New in PyTango 7.1.0
Check if the data ready event is fired manually (without polling) for this attribute.
Parameters: None Return: (bool) True if a manual fire data ready event is implemented. New in PyTango 7.2.0
Check if the attribute is in maximum alarm condition.
Parameters: None Return: (bool) true if the attribute is in alarm condition (read value above the max. alarm).
Check if the attribute is in maximum warning condition.
Parameters: None Return: (bool) true if the attribute is in warning condition (read value above the max. warning).
Check if the attribute is in minimum alarm condition.
Parameters: None Return: (bool) true if the attribute is in alarm condition (read value below the min. alarm).
Check if the attribute is in minimum warning condition.
Parameters: None Return: (bool) true if the attribute is in warning condition (read value below the min. warning).
Check if the attribute is polled.
Parameters: None Return: (bool) true if the attribute is polled.
Check if the attribute is in RDS alarm condition.
Parameters: None Return: (bool) true if the attribute is in RDS condition (Read Different than Set).
Check if the attribute has an associated writable attribute.
Parameters: None Return: (bool) True if there is an associated writable attribute
Remove the attribute configuration from the database. This method can be used to clean-up all the configuration of an attribute to come back to its default values or the remove all configuration of a dynamic attribute before deleting it.
The method removes all configured attribute properties and removes the attribute from the list of polled attributes.
Parameters: None Return: None New in PyTango 7.1.0
Set a flag to indicate that the server fires archive events manually, without the polling to be started for the attribute If the detect parameter is set to true, the criteria specified for the archive event are verified and the event is only pushed if they are fullfilled.
Parameters:
implemented: (bool) True when the server fires archive events manually. detect: (bool) (optional, default is True) Triggers the verification of the archive event properties when set to true. Return: None
New in PyTango 7.1.0
Set index of the associated writable attribute.
Parameters:
index: (int) The new index in the main attribute vector of the associated writable attribute Return: None
Set attribute serialization model. This method allows the user to choose the attribute serialization model.
Parameters:
ser_model: (AttrSerialModel) The new serialisation model. The serialization model must be one of ATTR_BY_KERNEL, ATTR_BY_USER or ATTR_NO_SYNC Return: None
New in PyTango 7.1.0
Set a flag to indicate that the server fires change events manually, without the polling to be started for the attribute. If the detect parameter is set to true, the criteria specified for the change event are verified and the event is only pushed if they are fullfilled. If detect is set to false the event is fired without any value checking!
Parameters:
implemented: (bool) True when the server fires change events manually. detect: (bool) (optional, default is True) Triggers the verification of the change event properties when set to true. Return: None
New in PyTango 7.1.0
Set a flag to indicate that the server fires data ready events.
Parameters:
implemented: (bool) True when the server fires data ready events manually. Return: None
New in PyTango 7.2.0
Set attribute date.
Parameters:
new_date: (TimeVal) the attribute date Return: None
Set attribute properties.
This method sets the attribute properties value with the content of the fileds in the AttributeConfig/ AttributeConfig_3 object
Parameters : |
|
---|
New in PyTango 7.1.4
Set attribute data quality.
Parameters:
quality: (AttrQuality) the new attribute data quality send_event: (bool) true if a change event should be sent. Default is false. Return: None
set_value (self, data) -> None
set_value (self, str_data, data) -> None
Set internal attribute value. This method stores the attribute read value inside the object. This method also stores the date when it is called and initializes the attribute quality factor.
Parameters:
data: the data to be set. Data must be compatible with the attribute type and format. In the DEPRECATED form for SPECTRUM and IMAGE attributes, data can be any type of FLAT sequence of elements compatible with the attribute type. In the new form (without dim_x or dim_y) data should be any sequence for SPECTRUM and a SEQUENCE of equal-lenght SEQUENCES for IMAGE attributes. The recommended sequence is a C continuous and aligned numpy array, as it can be optimized. str_data: (str) special variation for DevEncoded data type. In this case ‘data’ must be a str or an object with the buffer interface. dim_x: (int) [DEPRECATED] the attribute x length. Default value is 1 dim_y: (int) [DEPRECATED] the attribute y length. Default value is 0 Return: None
set_value_date_quality (self, data, time_stamp, quality) -> None
set_value_date_quality (self, str_data, data, time_stamp, quality) -> None
Set internal attribute value, date and quality factor. This method stores the attribute read value, the date and the attribute quality factor inside the object.
Parameters:
data: the data to be set. Data must be compatible with the attribute type and format. In the DEPRECATED form for SPECTRUM and IMAGE attributes, data can be any type of FLAT sequence of elements compatible with the attribute type. In the new form (without dim_x or dim_y) data should be any sequence for SPECTRUM and a SEQUENCE of equal-lenght SEQUENCES for IMAGE attributes. The recommended sequence is a C continuous and aligned numpy array, as it can be optimized. str_data: (str) special variation for DevEncoded data type. In this case ‘data’ must be a str or an object with the buffer interface. dim_x: (int) [DEPRECATED] the attribute x length. Default value is 1 dim_y: (int) [DEPRECATED] the attribute y length. Default value is 0 time_stamp: (double) the time stamp quality: (AttrQuality) the attribute quality factor Return: None
This class represents a Tango writable attribute.
Get attribute maximum value or throws an exception if the attribute does not have a maximum value.
Parameters: None Return: (obj) an object with the python maximum value
Get attribute minimum value or throws an exception if the attribute does not have a minimum value.
Parameters: None Return: (obj) an object with the python minimum value
get_write_value (self, extract_as=ExtractAs.Numpy) -> obj
Retrieve the new value for writable attribute.
Parameters:
extract_as: (ExtractAs) lst: [out] (list) a list object that will be filled with the attribute write value (DEPRECATED) Return: (obj) the attribute write value.
Retrieve the new value length (data number) for writable attribute.
Parameters: None Return: (int) the new value data length
Check if the attribute has a maximum value.
Parameters: None Return: (bool) true if the attribute has a maximum value defined
Check if the attribute has a minimum value.
Parameters: None Return: (bool) true if the attribute has a minimum value defined
Set attribute maximum value.
Parameters:
data: the attribute maximum value. python data type must be compatible with the attribute data format and type. Return: None
Set attribute minimum value.
Parameters:
data: the attribute minimum value. python data type must be compatible with the attribute data format and type. Return: None
There is one instance of this class for each device. This class is mainly an aggregate of Attribute or WAttribute objects. It eases management of multiple attributes
check_alarm (self, attr_name) -> bool
check_alarm (self, ind) -> bool
- The 1st version of the method checks alarm on all attribute(s) with an alarm defined.
- The 2nd version of the method checks alarm for one attribute with a given name.
- The 3rd version of the method checks alarm for one attribute from its index in the main attributes vector.
Parameters:
attr_name: (str) attribute name ind: (int) the attribute index Return: (bool) True if at least one attribute is in alarm condition
Throws: DevFailed If at least one attribute does not have any alarm level defined
New in PyTango 7.0.0
Get Attribute index into the main attribute vector from its name. This method returns the index in the Attribute vector (stored in the MultiAttribute object) of an attribute with a given name. The name equality is case independant.
Parameters:
attr_name: (str) attribute name Return: (int) the attribute index
Throws: DevFailed If the attribute is not found in the vector.
New in PyTango 7.0.0
Get a writable attribute object from its index. This method returns an WAttribute object from the index in the main attribute vector.
Parameters:
ind: (int) the attribute index Return: (WAttribute) the attribute object
Get a writable attribute object from its name. This method returns an WAttribute object with a name passed as parameter. The equality on attribute name is case independant.
Parameters:
attr_name: (str) attribute name Return: (WAttribute) the attribute object
Throws: DevFailed If the attribute is not defined.
User class to set attribute default properties. This class is used to set attribute default properties. Three levels of attributes properties setting are implemented within Tango. The highest property setting level is the database. Then the user default (set using this UserDefaultAttrProp class) and finally a Tango library default value
Set default change event abs_change property.
Parameters:
def_abs_change: (str) the user default change event abs_change property Return: None
Deprecated since PyTango 8.0. Please use set_event_abs_change instead.
Set default archive event abs_change property.
Parameters:
def_archive_abs_change: (str) the user default archive event abs_change property Return: None
Deprecated since PyTango 8.0. Please use set_archive_event_abs_change instead.
Set default archive event abs_change property.
Parameters:
def_archive_abs_change: (str) the user default archive event abs_change property Return: None
New in PyTango 8.0
Set default archive event period property.
Parameters:
def_archive_period: (str) t Return: None
New in PyTango 8.0
Set default archive event rel_change property.
Parameters:
def_archive_rel_change: (str) the user default archive event rel_change property Return: None
New in PyTango 8.0
Set default archive event period property.
Parameters:
def_archive_period: (str) t Return: None
Deprecated since PyTango 8.0. Please use set_archive_event_period instead.
Set default archive event rel_change property.
Parameters:
def_archive_rel_change: (str) the user default archive event rel_change property Return: None
Deprecated since PyTango 8.0. Please use set_archive_event_rel_change instead.
Set default RDS alarm delta_t property.
Parameters:
def_delta_t: (str) the user default RDS alarm delta_t property Return: None
Set default RDS alarm delta_val property.
Parameters:
def_delta_val: (str) the user default RDS alarm delta_val property Return: None
Set default description property.
Parameters:
def_description: (str) the user default description property Return: None
Set default display unit property.
Parameters:
def_display_unit: (str) the user default display unit property Return: None
Set default change event abs_change property.
Parameters:
def_abs_change: (str) the user default change event abs_change property Return: None
New in PyTango 8.0
Set default periodic event period property.
Parameters:
def_period: (str) the user default periodic event period property Return: None
New in PyTango 8.0
Set default change event rel_change property.
Parameters:
def_rel_change: (str) the user default change event rel_change property Return: None
New in PyTango 8.0
Set default format property.
Parameters:
def_format: (str) the user default format property Return: None
Set default label property.
Parameters:
def_label: (str) the user default label property Return: None
Set default max_alarm property.
Parameters:
def_max_alarm: (str) the user default max_alarm property Return: None
Set default max_value property.
Parameters:
def_max_value: (str) the user default max_value property Return: None
Set default max_warning property.
Parameters:
def_max_warning: (str) the user default max_warning property Return: None
Set default min_alarm property.
Parameters:
def_min_alarm: (str) the user default min_alarm property Return: None
Set default min_value property.
Parameters:
def_min_value: (str) the user default min_value property Return: None
Set default min_warning property.
Parameters:
def_min_warning: (str) the user default min_warning property Return: None
Set default periodic event period property.
Parameters:
def_period: (str) the user default periodic event period property Return: None
Deprecated since PyTango 8.0. Please use set_event_period instead.
Set default change event rel_change property.
Parameters:
def_rel_change: (str) the user default change event rel_change property Return: None
Deprecated since PyTango 8.0. Please use set_event_rel_change instead.