Controller Operational State Model

class ska_csp_lmc_common.controller.controller_op_state.ControllerOpStateModel(op_state_init: tango.DevState, op_state_changed_callback: Callable[[tango.DevState], None], logger: Logger | None = None)

Bases: OpStateModel

A simple operational state model that supports.

  • DevState.ON – when the component is powered on.

  • DevState.OFF – when the component is powered off.

  • DevState.STANDBY – when the component is low-power mode.

  • DevState.ON – when the component is powered on.

  • DevState.DISABLE – when the component is in OFFLINE administrative mode.

  • DevState.UNKNOWN – when communication with the component is not established.

  • DevState.FAILED – when the component has faulted

property op_state: tango.DevState

Return the operational state.

Returns:

the operational state state.

Return type:

DevState

update_op_state() None

Update the operational state.

This method calls the :py:meth:evaluate_op_state method to figure out what the new operational state should be, and then updates the op_state attribute, calling the TANGO device callback if required.

evaluate_op_state() tango.DevState

Compute overall operational state of the CSP controller device based on the fault and communication status of the controller overall, together with the aggregation of the operational states of the subordinate sub-systems components.

Returns:

an overall operational state of the controller.

Return type:

DevState

component_op_state_changed(component: Component, op_state: DevState | None) None

Handle change in CSP sub-system ctrl operational state.

This is a callback hook, called by the EventManager when the operational state of a CSP sub-system ctrl changes.

Parameters:
  • component (Component) – the sub-system component whose operational state has changed

  • op_state (DevState) – the new operational state of the sub-system ctrl.

Controller Health State Model

class ska_csp_lmc_common.controller.controller_health_state.ControllerHealthModel(init_state: ska_control_model.HealthState, health_changed_callback: Callable[[ska_control_model.HealthState], None], logger=None)

Bases: HealthStateModel

A simple health state model for the CSP Controller that supports.

  • HealthState.OK – when the component is fully operative.

  • HealthState.DEGRADED – when the component is partially operative.

  • HealthState.UNKNOWN – when communication with the component is not

    established.

  • HealthState.FAILED – when the component has faulted

evaluate_health() ska_control_model.HealthState

Compute overall health of the controller.

The overall health is based on the fault and communication status of the CSP sub-system controllers.

Returns:

an overall health of the controller

component_health_changed(component: Component, health_state: HealthState | None) None

Handle change in the health of the CSP subordinate sub-systems controllers.

This is a callback hook, called by the EventManager when the health and/or operational state of one of the CSP subordinate sub-system changes.

Parameters:
  • component – the sub-system component whose health has changed.

  • health_state – the new health state of the CSP sub-system.