CbfComponentManager Class

class ska_mid_cbf_mcs.component.component_manager.CbfComponentManager(*args: Any, **kwargs: Any)[source]

Bases: BaseComponentManager

A base component manager for SKA Mid.CBF MCS

This class exists to modify the interface of the ska_tango_base.base.component_manager.BaseComponentManager. The BaseComponentManager accepts an op_state_model argument, and is expected to interact directly with it. This is not a very good design decision. It is better to leave the op_state_model behind in the device, and drive it indirectly through callbacks.

Therefore this class accepts three callback arguments: one for when communication with the component changes, one for when the power mode of the component changes, and one for when the component fault status changes. In the last two cases, callback hooks are provided so that the component can indicate the change to this component manager.

start_communicating() None[source]

Start communicating with the component.

stop_communicating() None[source]

Break off communicating with the component.

update_communication_status(communication_status: CommunicationStatus) None[source]

Handle a change in communication status.

This is a helper method for use by subclasses.

Parameters:

communication_status – the new communication status of the component manager.

property is_communicating: bool

Return communication with the component is established.

SKA Mid.CBF MCS uses the more expressive communication_status for this, but this is still needed as a base classes hook.

Returns:

whether communication with the component is established.

property communication_status: CommunicationStatus

Return the communication status of this component manager.

This is implemented as a replacement for the is_communicating property, which should be deprecated.

Returns:

status of the communication channel with the component.

update_component_power_mode(power_mode: ska_tango_base.control_model.PowerMode | None) None[source]

Update the power mode, calling callbacks as required.

This is a helper method for use by subclasses.

Parameters:

power_mode – the new power mode of the component. This can be None, in which case the internal value is updated but no callback is called. This is useful to ensure that the callback is called next time a real value is pushed.

component_power_mode_changed(power_mode: ska_tango_base.control_model.PowerMode) None[source]

Handle notification that the component’s power mode has changed.

This is a callback hook, to be passed to the managed component.

Parameters:

power_mode – the new power mode of the component

property power_mode: ska_tango_base.control_model.PowerMode | None

Return the power mode of this component manager.

Returns:

the power mode of this component manager.

update_component_fault(faulty: bool | None) None[source]

Update the component fault status, calling callbacks as required.

This is a helper method for use by subclasses.

Parameters:

faulty – whether the component has faulted. If False, then this is a notification that the component has recovered from a fault.

component_fault_changed(faulty: bool) None[source]

Handle notification that the component’s fault status has changed.

This is a callback hook, to be passed to the managed component.

Parameters:

faulty – whether the component has faulted. If False, then this is a notification that the component has recovered from a fault.

property faulty: bool | None

Return whether this component manager is currently experiencing a fault.

Returns:

whether this component manager is currently experiencing a fault.

The MCS contains two types of Tango devices: observing and non-observing. Non-observing devices contain only an op_state_model while observing devices contain both an op_state_model and obs_state_model. As shown in the inheritance diagram below, non-observing devices inherit from CbfComponentManager while observing devices inherit from CbfComponentManager and CspObsComponentManager.

../../_images/component-manager-inheritance.png