Generic Component Manager
Generic component manager for a subservient tango device.
- class TangoDeviceComponentManager(tango_device_fqdn, logger, monitored_attributes, *args, communication_state_callback=None, component_state_callback=None, quality_state_callback=None, quality_monitored_attributes=(), **kwargs)[source]
A component manager for a Tango device.
- __init__(tango_device_fqdn, logger, monitored_attributes, *args, communication_state_callback=None, component_state_callback=None, quality_state_callback=None, quality_monitored_attributes=(), **kwargs)[source]
- clear_monitored_attributes()[source]
Sets all the monitored attribute values to 0.
This is a helper method that can be called before update_state_from_monitored_attributes to ensure that dishManager’s CM will update its attributes.
DishManager will only update its attributes when a tango device CM pushes a change event, by setting all the monitored attributes to 0 before calling update_state_from_monitored_attributes we can ensure that there will be a change and that dishManager will update its attributes.
- Return type:
None
- execute_command(command_name, command_arg)[source]
Check the connection and execute the command on the Tango device.
- Return type:
Tuple[TaskStatus,Any]
- read_attribute_value(attribute_name, log_read=True)[source]
Check the connection and read an attribute.
- Return type:
Any
- sync_communication_to_valid_event(event_attr_name)[source]
Sync communication state with valid events from monitored attributes.
- Return type:
None
- update_state_from_monitored_attributes(monitored_attributes=None)[source]
Update the component state by reading the monitored attributes.
When an attribute on the device does not match the component_state it won’t update unless it changes value (changes are updated via events).
This is a convenience method that can be called to sync up the monitored attributes on the device and the component state.
- Return type:
None