Attribute classes

Attr

class tango.Attr
check_type(self: tango._tango.Attr) None

check_type(self)

This method checks data type and throws an exception in case of unsupported data type

Raises:

DevFailed: If the data type is unsupported.

get_assoc(self: tango._tango.Attr) str

get_assoc (self) -> str

Get the associated name.

Returns:

the associated name

Return type:

bool

get_cl_name(self: tango._tango.Attr) str

get_cl_name (self) -> str

Returns the class name.

Returns:

the class name

Return type:

str

New in PyTango 7.2.0

get_class_properties(self: tango._tango.Attr) list[tango._tango.AttrProperty]

get_class_properties (self) -> Sequence[AttrProperty]

Get the class level attribute properties.

Returns:

the class attribute properties

Return type:

Sequence[AttrProperty]

get_disp_level(self: tango._tango.Attr) tango._tango.DispLevel

get_disp_level (self) -> DispLevel

Get the attribute display level.

Returns:

the attribute display level

Return type:

DispLevel

get_format(self: tango._tango.Attr) tango._tango.AttrDataFormat

get_format (self) -> AttrDataFormat

Get the attribute format.

Returns:

the attribute format

Return type:

AttrDataFormat

get_memorized(self: tango._tango.Attr) bool

get_memorized (self) -> bool

Determine if the attribute is memorized or not.

Returns:

True if the attribute is memorized

Return type:

bool

get_memorized_init(self: tango._tango.Attr) bool

get_memorized_init (self) -> bool

Determine if the attribute is written at startup from the memorized value if it is memorized.

Returns:

True if initialized with memorized value or not

Return type:

bool

get_name(self: tango._tango.Attr) str

get_name (self) -> str

Get the attribute name.

Returns:

the attribute name

Return type:

str

get_polling_period(self: tango._tango.Attr) int

get_polling_period (self) -> int

Get the polling period (mS).

Returns:

the polling period (mS)

Return type:

int

get_type(self: tango._tango.Attr) int

get_type (self) -> int

Get the attribute data type.

Returns:

the attribute data type

Return type:

int

get_user_default_properties(self: tango._tango.Attr) list[tango._tango.AttrProperty]

get_user_default_properties (self) -> Sequence[AttrProperty]

Get the user default attribute properties.

Returns:

the user default attribute properties

Return type:

Sequence[AttrProperty]

get_writable(self: tango._tango.Attr) tango._tango.AttrWriteType

get_writable (self) -> AttrWriteType

Get the attribute write type.

Returns:

the attribute write type

Return type:

AttrWriteType

is_alarm_event(self: tango._tango.Attr) bool

is_alarm_event (self) -> bool

Check if the alarm event is fired manually (without polling) for this attribute.

Returns:

true if a manual fire alarm event is implemented

Return type:

bool

Added in version 10.0.0.

is_allowed(self: tango._tango.Attr, device: Tango::DeviceImpl, request_type: tango._tango.AttReqType) bool

is_allowed (self, device, request_type) -> bool

Returns whether the request_type is allowed for the specified device

Parameters:
  • device (tango.server.Device) – instance of Device

  • request_type (AttReqType) – AttReqType.READ_REQ for read request or AttReqType.WRITE_REQ for write request

Returns:

True if request_type is allowed for the specified device

Return type:

bool

is_archive_event(self: tango._tango.Attr) bool

is_archive_event (self) -> bool

Check if the archive event is fired manually for this attribute.

Returns:

true if a manual fire archive event is implemented.

Return type:

bool

is_assoc(self: tango._tango.Attr) bool

is_assoc (self) -> bool

Determine if it is assoc.

Returns:

if it is assoc

Return type:

bool

is_change_event(self: tango._tango.Attr) bool

is_change_event (self) -> bool

Check if the change event is fired manually for this attribute.

Returns:

true if a manual fire change event is implemented.

Return type:

bool

is_check_archive_criteria(self: tango._tango.Attr) bool

is_check_archive_criteria (self) -> bool

Check if the archive event criteria should be checked when firing the event manually.

Returns:

true if a archive event criteria will be checked.

Return type:

bool

is_check_change_criteria(self: tango._tango.Attr) bool

is_check_change_criteria (self) -> bool

Check if the change event criteria should be checked when firing the event manually.

Returns:

true if a change event criteria will be checked.

Return type:

bool

is_data_ready_event(self: tango._tango.Attr) bool

is_data_ready_event (self) -> bool

Check if the data ready event is fired for this attribute.

Returns:

true if firing data ready event is implemented.

Return type:

bool

New in PyTango 7.2.0

read(self: tango._tango.Attr, arg0: Tango::DeviceImpl, arg1: tango._tango.Attribute) None
set_alarm_event(self: tango._tango.Attr, implemented: bool, detect: bool) None

set_alarm_event(self, implemented, detect)

Set a flag to indicate that the server fires alarm events manually without the polling to be started for the attribute.

If the detect parameter is set to true, the criteria specified for the alarm event (rel_change and abs_change) are verified and the event is only pushed if a least one of them are fulfilled (change in value compared to previous event exceeds a threshold).

If detect is set to false the event is fired without checking!

Parameters:
  • implemented (bool) – True when the server fires alarm events manually.

  • detect (bool) – Triggers the verification of the alarm event properties when set to true.

Added in version 10.0.0.

set_archive_event(self: tango._tango.Attr, implemented: bool, detect: bool) None

set_archive_event(self)

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 (rel_change and abs_change) are verified and the event is only pushed if a least one of them are fulfilled (change in value compared to previous event exceeds a threshold).

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.

set_change_event(self: tango._tango.Attr, implemented: bool, detect: bool) None

set_change_event(self, implemented, detect)

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 (rel_change and abs_change) are verified and the event is only pushed if a least one of them are fulfilled (change in value compared to previous event exceeds a threshold).

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.

set_cl_name(self: tango._tango.Attr, arg0: str) None

set_cl_name(self, cl)

Sets the class name.

Parameters:

cl (str) – new class name

New in PyTango 7.2.0

set_class_properties(self: tango._tango.Attr, arg0: collections.abc.Sequence[tango._tango.AttrProperty]) None

set_class_properties(self, props)

Set the class level attribute properties.

Parameters:

props (StdAttrPropertyVector) – new class level attribute properties

set_data_ready_event(self: tango._tango.Attr, implemented: bool) None

set_data_ready_event(self, implemented)

Set a flag to indicate that the server fires data ready events.

Parameters:

implemented (bool) – True when the server fires data ready events

New in PyTango 7.2.0

set_default_properties(self: tango._tango.Attr, arg0: tango._tango.UserDefaultAttrProp) None

set_default_properties(self)

Set default attribute properties.

Parameters:

attr_prop (UserDefaultAttrProp) – the user default property class

set_disp_level(self: tango._tango.Attr, disp_level: tango._tango.DispLevel) None

set_disp_level(self, disp_level)

Set the attribute display level.

Parameters:

disp_level (DispLevel) – the new display level

set_memorized(self: tango._tango.Attr) None

set_memorized(self)

Set the attribute as memorized in database (only for scalar and writable attribute).

By default the setpoint will be written to the attribute during initialisation! Use method set_memorized_init() with False as argument if you don’t want this feature.

set_memorized_init(self: tango._tango.Attr, write_on_init: bool) None

set_memorized_init(self, write_on_init)

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

set_polling_period(self: tango._tango.Attr, period_ms: SupportsInt) None

set_polling_period(self, period_ms)

Set the attribute polling update period.

Parameters:

period_ms (int) – the attribute polling period (in mS)

write(self: tango._tango.Attr, arg0: Tango::DeviceImpl, arg1: tango._tango.WAttribute) None

Attribute

class tango.Attribute

This class represents a Tango attribute

alarm_event_subscribed(self: tango._tango.Attribute) bool

alarm_event_subscribed (self) -> bool

Returns:

true if there are some subscriber listening for alarm event

Return type:

bool

archive_event_subscribed(self: tango._tango.Attribute) bool

archive_event_subscribed (self) -> bool

Returns:

true if there are some subscriber listening for archive event

Return type:

bool

change_event_subscribed(self: tango._tango.Attribute) bool

change_event_subscribed (self) -> bool

Returns:

true if there are some subscriber listening for change event

Return type:

bool

check_alarm(self: tango._tango.Attribute) bool

check_alarm (self) -> bool

Check if the attribute read value is below/above the alarm level.

Returns:

true if the attribute is in alarm condition.

Return type:

bool

Raises:

DevFailed – If no alarm level is defined.

fire_alarm_event(*args, **kwargs)

Overloaded function.

  1. fire_alarm_event(self: tango._tango.Attribute) -> None

  2. fire_alarm_event(self: tango._tango.Attribute, exception: object) -> None

fire_change_event(*args, **kwargs)

Overloaded function.

  1. fire_change_event(self: tango._tango.Attribute) -> None

  2. fire_change_event(self: tango._tango.Attribute, exception: object) -> None

get_assoc_ind(self: tango._tango.Attribute) int

get_assoc_ind (self) -> int

Get index of the associated writable attribute.

Returns:

the index in the main attribute vector of the associated writable attribute

Return type:

int

get_assoc_name(self: tango._tango.Attribute) str

get_assoc_name (self) -> str

Get name of the associated writable attribute.

Returns:

the associated writable attribute name

Return type:

str

get_attr_serial_model(self: tango._tango.Attribute) tango._tango.AttrSerialModel

get_attr_serial_model (self) -> AttrSerialModel

Get attribute serialization model.

Returns:

The attribute serialization model

Return type:

AttrSerialModel

New in PyTango 7.1.0

get_data_format(self: tango._tango.Attribute) tango._tango.AttrDataFormat

get_data_format (self) -> AttrDataFormat

Get attribute data format.

Returns:

the attribute data format

Return type:

AttrDataFormat

get_data_size(self: tango._tango.Attribute) int

get_data_size(self)

Get attribute data size.

Returns:

the attribute data size

Return type:

int

get_data_type(self: tango._tango.Attribute) int

get_data_type (self) -> int

Get attribute data type.

Returns:

the attribute data type

Return type:

int

get_date(self: tango._tango.Attribute) tango._tango.TimeVal

get_date (self) -> TimeVal

Get a COPY of the attribute date.

Returns:

the attribute date

Return type:

TimeVal

get_disp_level(self: tango._tango.Attribute) tango._tango.DispLevel

get_disp_level (self) -> DisplLevel

Returns:

attribute display level

Return type:

DispLevel

get_label(self: tango._tango.Attribute) str

get_label (self) -> str

Get attribute label property.

Returns:

the attribute label

Return type:

str

get_max_alarm(self: tango._tango.Attribute) object
get_max_dim_x(self: tango._tango.Attribute) int

get_max_dim_x (self) -> int

Get attribute maximum data size in x dimension.

Returns:

the attribute maximum data size in x dimension. Set to 1 for scalar attribute

Return type:

int

get_max_dim_y(self: tango._tango.Attribute) int

get_max_dim_y (self) -> int

Get attribute maximum data size in y dimension.

Returns:

the attribute maximum data size in y dimension. Set to 0 for scalar attribute

Return type:

int

get_max_warning(self: tango._tango.Attribute) object
get_min_alarm(self: tango._tango.Attribute) object
get_min_warning(self: tango._tango.Attribute) object
get_name(self: tango._tango.Attribute) str

get_name (self) -> str

Get attribute name.

Returns:

The attribute name

Return type:

str

get_polling_period(self: tango._tango.Attribute) int

get_polling_period (self) -> int

Get attribute polling period.

Returns:

The attribute polling period in mS. Set to 0 when the attribute is not polled

Return type:

int

get_properties(self: Attribute, attr_cfg: AttributeConfig = None) AttributeConfig

Get attribute properties.

Parameters:

conf – the config object to be filled with the attribute configuration. Default is None meaning the method will create internally a new tango.AttributeConfig_5 and return it. Can be tango.AttributeConfig, tango.AttributeConfig_2, tango.AttributeConfig_3, tango.AttributeConfig_5 or tango.MultiAttrProp

Returns:

the config object filled with attribute configuration information

Return type:

tango.AttributeConfig

New in PyTango 7.1.4

get_quality(self: tango._tango.Attribute) tango._tango.AttrQuality

get_quality (self) -> AttrQuality

Get a COPY of the attribute data quality.

Returns:

the attribute data quality

Return type:

AttrQuality

get_writable(self: tango._tango.Attribute) tango._tango.AttrWriteType

get_writable (self) -> AttrWriteType

Get the attribute writable type (RO/WO/RW).

Returns:

The attribute write type.

Return type:

AttrWriteType

get_x(self: tango._tango.Attribute) int

get_x (self) -> int

Get attribute data size in x dimension.

Returns:

the attribute data size in x dimension. Set to 1 for scalar attribute

Return type:

int

get_y(self: tango._tango.Attribute) int

get_y (self) -> int

Get attribute data size in y dimension.

Returns:

the attribute data size in y dimension. Set to 0 for scalar attribute

Return type:

int

is_alarm_event(self: tango._tango.Attribute) bool

is_alarm_event (self) -> bool

Check if the alarm event is fired manually for this attribute.

Returns:

True if a manual fire alarm event is implemented.

Return type:

bool

New in PyTango 10.0.0

is_archive_event(self: tango._tango.Attribute) bool

is_archive_event (self) -> bool

Check if the archive event is fired manually (without polling) for this attribute.

Returns:

True if a manual fire archive event is implemented.

Return type:

bool

New in PyTango 7.1.0

is_change_event(self: tango._tango.Attribute) bool

is_change_event (self) -> bool

Check if the change event is fired manually (without polling) for this attribute.

Returns:

True if a manual fire change event is implemented.

Return type:

bool

New in PyTango 7.1.0

is_check_alarm_criteria(self: tango._tango.Attribute) bool

is_check_alarm_criteria (self) -> bool

Check if the alarm event criteria should be checked when firing the event manually.

Returns:

True if a change event criteria will be checked.

Return type:

bool

New in PyTango 10.0.0

is_check_archive_criteria(self: tango._tango.Attribute) bool

is_check_archive_criteria (self) -> bool

Check if the archive event criteria should be checked when firing the event manually.

Returns:

True if a archive event criteria will be checked.

Return type:

bool

New in PyTango 7.1.0

is_check_change_criteria(self: tango._tango.Attribute) bool

is_check_change_criteria (self) -> bool

Check if the change event criteria should be checked when firing the event manually.

Returns:

True if a change event criteria will be checked.

Return type:

bool

New in PyTango 7.1.0

is_data_ready_event(self: tango._tango.Attribute) bool

is_data_ready_event (self) -> bool

Check if the data ready event is fired manually (without polling) for this attribute.

Returns:

True if a manual fire data ready event is implemented.

Return type:

bool

New in PyTango 7.2.0

is_max_alarm(self: tango._tango.Attribute) bool

is_max_alarm (self) -> bool

Check if the attribute is in maximum alarm condition.

Returns:

true if the attribute is in alarm condition (read value above the max. alarm).

Return type:

bool

is_max_warning(self: tango._tango.Attribute) bool

is_max_warning (self) -> bool

Check if the attribute is in maximum warning condition.

Returns:

true if the attribute is in warning condition (read value above the max. warning).

Return type:

bool

is_min_alarm(self: tango._tango.Attribute) bool

is_min_alarm (self) -> bool

Check if the attribute is in minimum alarm condition.

Returns:

true if the attribute is in alarm condition (read value below the min. alarm).

Return type:

bool

is_min_warning(self: tango._tango.Attribute) bool

is_min_warning (self) -> bool

Check if the attribute is in minimum warning condition.

Returns:

true if the attribute is in warning condition (read value below the min. warning).

Return type:

bool

is_polled(self: tango._tango.Attribute) bool

is_polled (self) -> bool

Check if the attribute is polled.

Returns:

true if the attribute is polled.

Return type:

bool

is_rds_alarm(self: tango._tango.Attribute) bool

is_rds_alarm (self) -> bool

Check if the attribute is in RDS alarm condition.

Returns:

true if the attribute is in RDS condition (Read Different than Set).

Return type:

bool

is_write_associated(self: tango._tango.Attribute) bool

is_write_associated (self) -> bool

Check if the attribute has an associated writable attribute.

Returns:

True if there is an associated writable attribute

Return type:

bool

periodic_event_subscribed(self: tango._tango.Attribute) bool

periodic_event_subscribed (self) -> bool

Returns:

true if there are some subscriber listening for periodic event

Return type:

bool

remove_configuration(self: tango._tango.Attribute) None

remove_configuration(self)

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.

New in PyTango 7.1.0

reset_value(self: tango._tango.Attribute) None

reset_value (self) -> None

Clear attribute value

set_alarm_event(self: tango._tango.Attribute, implemented: bool, detect: bool = True) None

Set a flag to indicate that the server fires alarm events manually, without the polling to be started for the attribute.

If the detect parameter is set to true, the criteria specified for the alarm event (rel_change and abs_change) are verified and the event is only pushed if a least one of them are fulfilled (change in value compared to previous event exceeds a threshold). If detect is set to false the event is fired without any value checking!

Parameters:
  • implemented (bool) – True when the server fires alarm events manually.

  • detect (bool) – (optional, default is True) Triggers the verification of the alarm event properties when set to true.

Added in version 10.0.0.

set_archive_event(self: tango._tango.Attribute, implemented: bool, detect: bool = True) None

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 (rel_change and abs_change) are verified and the event is only pushed if a least one of them are fulfilled (change in value compared to previous event exceeds a threshold).

If detect is set to false the event is fired without any value checking!

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.

New in PyTango 7.1.0

set_assoc_ind(self: tango._tango.Attribute, index: SupportsInt) None

set_assoc_ind(self, index)

Set index of the associated writable attribute.

Parameters:

index (int) – The new index in the main attribute vector of the associated writable attribute

set_attr_serial_model(self: tango._tango.Attribute, ser_model: tango._tango.AttrSerialModel) None

set_attr_serial_model (self, ser_model) -> 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

New in PyTango 7.1.0

set_change_event(self: tango._tango.Attribute, implemented: bool, detect: bool = True) 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 (rel_change and abs_change) are verified and the event is only pushed if a least one of them are fulfilled (change in value compared to previous event exceeds a threshold). 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.

New in PyTango 7.1.0

set_data_ready_event(self: tango._tango.Attribute, implemented: bool) None

set_data_ready_event(self, implemented)

Set a flag to indicate that the server fires data ready events.

Parameters:

implemented (bool) – True when the server fires data ready events manually.

New in PyTango 7.2.0

set_date(self: tango._tango.Attribute, new_date: tango._tango.TimeVal) None

set_date(self, new_date)

Set attribute date.

Parameters:

new_date (TimeVal) – the attribute date

set_max_alarm(self: tango._tango.Attribute, value: object) None
set_max_warning(self: tango._tango.Attribute, value: object) None
set_min_alarm(self: tango._tango.Attribute, value: object) None
set_min_warning(self: tango._tango.Attribute, value: object) None
set_properties(self: Attribute, attr_cfg: AttributeConfig, dev: DeviceImpl = None)

Set attribute properties.

This method sets the attribute properties value with the content of the fields in the tango.AttributeConfig/ tango.AttributeConfig_3 object

Parameters:

New in PyTango 7.1.4

set_quality(self: tango._tango.Attribute, quality: tango._tango.AttrQuality, send_event: bool = False) None

set_quality(self, quality, send_event=False)

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.

set_upd_properties(*args, **kwargs)

Overloaded function.

  1. set_upd_properties(self: tango._tango.Attribute, attr_cfg: object) -> None

  2. set_upd_properties(self: tango._tango.Attribute, attr_cfg: object, dev_name: object) -> None

set_value(*args)
set_value(self, data)
set_value(self, str_data, data)

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. E.g., sequence for SPECTRUM and a SEQUENCE of equal-length 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.

Changed in version 10.1.0: The dim_x and dim_y parameters were removed.

set_value_date_quality(*args)
set_value_date_quality(self, data, time_stamp, quality)
set_value_date_quality(self, str_data, data, time_stamp, quality)

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. E.g., sequence for SPECTRUM and a SEQUENCE of equal-length 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.

  • time_stamp (double) – the time stamp

  • quality (AttrQuality) – the attribute quality factor

Changed in version 10.1.0: The dim_x and dim_y parameters were removed.

use_notifd_event(self: tango._tango.Attribute) bool

use_notifd_event (self) -> bool

Returns:

true if notifd events are emited

Return type:

bool

use_zmq_event(self: tango._tango.Attribute) bool

use_zmq_event (self) -> bool

Returns:

true if zmq events are emited

Return type:

bool

user_event_subscribed(self: tango._tango.Attribute) bool

user_event_subscribed (self) -> bool

Returns:

true if there are some subscriber listening for user event

Return type:

bool

value_is_set(self: tango._tango.Attribute) bool

value_is_set (self) -> bool

Returns:

true if attribute has a value

Return type:

bool

WAttribute

class tango.WAttribute

This class represents a Tango writable attribute

get_max_value(self: tango._tango.WAttribute) object

get_max_value (self) -> obj

Get attribute maximum value or throws an exception if the attribute does not have a maximum value.

Returns:

an object with the python maximum value

Return type:

obj

get_min_value(self: tango._tango.WAttribute) object

get_min_value (self) -> obj

Get attribute minimum value or throws an exception if the attribute does not have a minimum value.

Returns:

an object with the python minimum value

Return type:

obj

get_write_value(self: tango._tango.WAttribute, extract_as: tango._tango.ExtractAs = ExtractAs.Numpy) object

get_write_value (self, extract_as=ExtractAs.Numpy) -> obj

Retrieve the new value for writable attribute.

Parameters:

extract_as (ExtractAs) – defaults to ExtractAs.Numpy

Returns:

the attribute write value.

Return type:

obj

get_write_value_length(self: tango._tango.WAttribute) int

get_write_value_length (self) -> int

Retrieve the new value length (data number) for writable attribute.

Returns:

the new value data length

Return type:

int

is_max_value(self: tango._tango.WAttribute) bool

is_max_value (self) -> bool

Check if the attribute has a maximum value.

Returns:

true if the attribute has a maximum value defined

Return type:

bool

is_min_value(self: tango._tango.WAttribute) bool

is_min_value (self) -> bool

Check if the attribute has a minimum value.

Returns:

true if the attribute has a minimum value defined

Return type:

bool

set_max_value(self: tango._tango.WAttribute, value: object) None

set_max_value(self, value)

Set attribute maximum value.

Parameters:

value – the attribute maximum value. python data type must be compatible with the attribute data format and type.

set_min_value(self: tango._tango.WAttribute, value: object) None

set_min_value(self, value)

Set attribute minimum value.

Parameters:

value – the attribute minimum value. python data type must be compatible with the attribute data format and type.

set_write_value(self: tango._tango.WAttribute, value: object) None

set_write_value(self, value)

Set the writable attribute value.

Parameters:

value – the data to be set. Data must be compatible with the attribute type and format. for SPECTRUM and IMAGE attributes, data can be any type of sequence of elements compatible with the attribute type

Changed in version 10.1.0: The dim_x and dim_y parameters were removed.

MultiAttribute

class tango.MultiAttribute
check_alarm(*args, **kwargs)

Overloaded function.

  1. check_alarm(self: tango._tango.MultiAttribute) -> bool

check_alarm (self) -> bool

Checks an alarm on all attribute(s) with an alarm defined.

Returns:

True if at least one attribute is in alarm condition

Return type:

bool

Raises:

DevFailed – If at least one attribute does not have any alarm level defined

New in PyTango 7.0.0

  1. check_alarm(self: tango._tango.MultiAttribute, ind: typing.SupportsInt) -> bool

check_alarm (self, ind) -> bool

Checks an alarm for one attribute from its index in the main attributes vector.

Parameters:

ind (int) – the attribute index

Returns:

True if attribute is in alarm condition

Return type:

bool

Raises:

DevFailed – If at least one attribute does not have any alarm level defined

New in PyTango 7.0.0

  1. check_alarm(self: tango._tango.MultiAttribute, attr_name: str) -> bool

check_alarm (self, attr_name) -> bool

Checks an 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

Returns:

True if attribute is in alarm condition

Return type:

bool

Raises:

DevFailed – If at least one attribute does not have any alarm level defined

New in PyTango 7.0.0

get_alarm_list(self: tango._tango.MultiAttribute) tango._tango.StdLongVector

get_alarm_list (self) -> list[int]

Get list of attribute with an alarm level defined

Returns:

A vector of int data. Each object is the index in the main attribute vector of attribute with alarm level defined

Return type:

list[int]

get_attr_by_ind(self: tango._tango.MultiAttribute, ind: SupportsInt) tango._tango.Attribute

get_attr_by_ind (self, ind) -> Attribute

Get Attribute object from its index.

This method returns an Attribute object from the index in the main attribute vector.

Parameters:

ind (int) – the attribute index

Returns:

the attribute object

Return type:

Attribute

get_attr_by_name(self: tango._tango.MultiAttribute, attr_name: str) tango._tango.Attribute

get_attr_by_name (self, attr_name) -> Attribute

Get Attribute object from its name.

This method returns an Attribute object with a name passed as parameter. The equality on attribute name is case independent.

Parameters:

attr_name (str) – attribute name

Returns:

the attribute object

Return type:

Attribute

Raises:

DevFailed – If the attribute is not defined.

get_attr_ind_by_name(self: tango._tango.MultiAttribute, attr_name: str) int

get_attr_ind_by_name (self, attr_name) -> int

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 independent.

Parameters:

attr_name (str) – attribute name

Returns:

the attribute index

Return type:

int

Raises:

DevFailed – If the attribute is not found in the vector.

New in PyTango 7.0.0

get_attr_nb(self: tango._tango.MultiAttribute) int

get_attr_nb (self) -> int

Get the number of attributes.

Returns:

the number of attributes

Return type:

int

New in PyTango 7.0.0

get_attribute_list(self: tango._tango.MultiAttribute) tuple[Attribute]

get_attribute_list (self) -> tuple[Attribute]

Get the tuple of Attribute objects.

Returns:

attribute objects tuple.

Return type:

tuple[Attribute]

Changed in version 10.1.0: The return type was changed from AttributeList (now removed) to tuple[Attribute].

New in PyTango 7.2.1

get_w_attr_by_ind(self: tango._tango.MultiAttribute, ind: SupportsInt) tango._tango.WAttribute

get_w_attr_by_ind (self, ind) -> WAttribute

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

Returns:

the attribute object

Return type:

WAttribute

get_w_attr_by_name(self: tango._tango.MultiAttribute, attr_name: str) tango._tango.WAttribute

get_w_attr_by_name (self, attr_name) -> WAttribute

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 independent.

Parameters:

attr_name (str) – attribute name

Returns:

the attribute object

Return type:

WAttribute

Raises:

DevFailed – If the attribute is not defined.

read_alarm(self: tango._tango.MultiAttribute, status: str) None

read_alarm(self, status)

Add alarm message to device status.

This method add alarm message to the string passed as parameter. A message is added for each attribute which is in alarm condition

Parameters:

status (str) – a string (should be the device status)

New in PyTango 7.0.0

UserDefaultAttrProp

class tango.UserDefaultAttrProp

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_abs_change(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_abs_change(self, def_abs_change) <= DEPRECATED

Set default change event abs_change property.

Parameters:

def_abs_change (str) – the user default change event abs_change property

Deprecated since PyTango 8.0. Please use set_event_abs_change instead.

set_archive_abs_change(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_archive_abs_change(self, def_archive_abs_change) <= DEPRECATED

Set default archive event abs_change property.

Parameters:

def_archive_abs_change (str) – the user default archive event abs_change property

Deprecated since PyTango 8.0. Please use set_archive_event_abs_change instead.

set_archive_event_abs_change(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_archive_event_abs_change(self, def_archive_abs_change)

Set default archive event abs_change property.

Parameters:

def_archive_abs_change (str) – the user default archive event abs_change property

New in PyTango 8.0

set_archive_event_period(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_archive_event_period(self, def_archive_period)

Set default archive event period property.

Parameters:

def_archive_period (str) – t

New in PyTango 8.0

set_archive_event_rel_change(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_archive_event_rel_change(self, def_archive_rel_change)

Set default archive event rel_change property.

Parameters:

def_archive_rel_change (str) – the user default archive event rel_change property

New in PyTango 8.0

set_archive_period(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_archive_period(self, def_archive_period) <= DEPRECATED

Set default archive event period property.

Parameters:

def_archive_period (str) – t

Deprecated since PyTango 8.0. Please use set_archive_event_period instead.

set_archive_rel_change(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_archive_rel_change(self, def_archive_rel_change) <= DEPRECATED

Set default archive event rel_change property.

Parameters:

def_archive_rel_change (str) – the user default archive event rel_change property

Deprecated since PyTango 8.0. Please use set_archive_event_rel_change instead.

set_delta_t(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_delta_t(self, def_delta_t)

Set default RDS alarm delta_t property.

Parameters:

def_delta_t (str) – the user default RDS alarm delta_t property

set_delta_val(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_delta_val(self, def_delta_val)

Set default RDS alarm delta_val property.

Parameters:

def_delta_val (str) – the user default RDS alarm delta_val property

set_description(self: tango._tango.UserDefaultAttrProp, def_description: str) None

set_description(self, def_description: str)

Set default description property.

Parameters:

def_description (str) – the user default description property

set_display_unit(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_display_unit(self, def_display_unit)

Set default display unit property.

Parameters:

def_display_unit (str) – the user default display unit property

set_enum_labels(self, enum_labels)

Set default enumeration labels.

Parameters:

enum_labels (Sequence[str]) – list of enumeration labels

New in PyTango 9.2.0

set_event_abs_change(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_event_abs_change(self, def_abs_change)

Set default change event abs_change property.

Parameters:

def_abs_change (str) – the user default change event abs_change property

New in PyTango 8.0

set_event_period(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_event_period(self, def_period)

Set default periodic event period property.

Parameters:

def_period (str) – the user default periodic event period property

New in PyTango 8.0

set_event_rel_change(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_event_rel_change(self, def_rel_change)

Set default change event rel_change property.

Parameters:

def_rel_change (str) – the user default change event rel_change property

New in PyTango 8.0

set_format(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_format(self, def_format)

Set default format property.

Parameters:

def_format (str) – the user default format property

set_label(self: tango._tango.UserDefaultAttrProp, : str) None

set_label(self, def_label)

Set default label property.

Parameters:

def_label (str) – the user default label property

set_max_alarm(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_max_alarm(self, def_max_alarm)

Set default max_alarm property.

Parameters:

def_max_alarm (str) – the user default max_alarm property

set_max_value(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_max_value(self, def_max_value)

Set default max_value property.

Parameters:

def_max_value (str) – the user default max_value property

set_max_warning(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_max_warning(self, def_max_warning)

Set default max_warning property.

Parameters:

def_max_warning (str) – the user default max_warning property

set_min_alarm(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_min_alarm(self, def_min_alarm)

Set default min_alarm property.

Parameters:

def_min_alarm (str) – the user default min_alarm property

set_min_value(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_min_value(self, def_min_value)

Set default min_value property.

Parameters:

def_min_value (str) – the user default min_value property

set_min_warning(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_min_warning(self, def_min_warning)

Set default min_warning property.

Parameters:

def_min_warning (str) – the user default min_warning property

set_period(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_period(self, def_period) <= DEPRECATED

Set default periodic event period property.

Parameters:

def_period (str) – the user default periodic event period property

Deprecated since PyTango 8.0. Please use set_event_period instead.

set_rel_change(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_rel_change(self, def_rel_change) <= DEPRECATED

Set default change event rel_change property.

Parameters:

def_rel_change (str) – the user default change event rel_change property

Deprecated since PyTango 8.0. Please use set_event_rel_change instead.

set_standard_unit(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_standard_unit(self, def_standard_unit)

Set default standard unit property.

Parameters:

def_standard_unit (str) – the user default standard unit property

set_unit(self: tango._tango.UserDefaultAttrProp, arg0: str) None

set_unit(self, def_unit)

Set default unit property.

Parameters:

def_unit (str) – te user default unit property

Attribute Configs

class tango.AttributeConfig
property data_format
property data_type
property description
property display_unit
property extensions
property format
property label
property max_alarm
property max_dim_x
property max_dim_y
property max_value
property min_alarm
property min_value
property name
property standard_unit
property unit
property writable
property writable_attr_name
class tango.AttributeConfig_2
property data_format
property data_type
property description
property display_unit
property extensions
property format
property label
property level
property max_alarm
property max_dim_x
property max_dim_y
property max_value
property min_alarm
property min_value
property name
property standard_unit
property unit
property writable
property writable_attr_name
class tango.AttributeConfig_3
property att_alarm
property data_format
property data_type
property description
property display_unit
property event_prop
property extensions
property format
property label
property level
property max_dim_x
property max_dim_y
property max_value
property min_value
property name
property standard_unit
property sys_extensions
property unit
property writable
property writable_attr_name
class tango.AttributeConfig_5
property att_alarm
property data_format
property data_type
property description
property display_unit
property enum_labels
property event_prop
property extensions
property format
property label
property level
property max_dim_x
property max_dim_y
property max_value
property mem_init
property memorized
property min_value
property name
property root_attr_name
property standard_unit
property sys_extensions
property unit
property writable
property writable_attr_name

Multi Attribute Properties

class tango.MultiAttrProp(label: str = '', description: str = '', unit: str = '', standard_unit: str = '', display_unit: str = '', format: str = '', min_value: str = '', max_value: str = '', min_alarm: str = '', max_alarm: str = '', min_warning: str = '', max_warning: str = '', delta_t: str = '', delta_val: str = '', event_period: str = '', archive_period: str = '', rel_change: str = '', abs_change: str = '', archive_rel_change: str = '', archive_abs_change: str = '')[source]

This class represents the python interface for the Tango IDL object MultiAttrProp.

abs_change: str = ''
archive_abs_change: str = ''
archive_period: str = ''
archive_rel_change: str = ''
delta_t: str = ''
delta_val: str = ''
description: str = ''
display_unit: str = ''
event_period: str = ''
format: str = ''
label: str = ''
max_alarm: str = ''
max_value: str = ''
max_warning: str = ''
min_alarm: str = ''
min_value: str = ''
min_warning: str = ''
rel_change: str = ''
standard_unit: str = ''
unit: str = ''