Subarray Operational State Model
- class ska_csp_lmc_common.subarray.subarray_op_state_model.SubarrayOpStateModel(op_state_init, op_state_changed_callback: Callable[[tango.DevState], None], logger=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.UNKNWON – 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 theop_state
attribute, calling the TANGO device callback if required.
- evaluate_op_state() tango.DevState
Compute overall operational state of the CSP subarray device based on the fault and communication status of the subarray overall, together with the aggregation of the operational states of the subordinate sub- systems components.
- Returns:
an overall operational state of the subarray.
- Return type:
DevState
- component_op_state_changed(component: Component, op_state: DevState | None) None
Handle change in the operational state of a CSP sub-system subarray/beam.
This is a callback hook, called by the EventManager when the operational state of a CSP sub-system subarray/beam changes.
- Parameters:
component (
Component
) – the sub-system component whose operational state has changedop_state (DevState) – the new operational state of the sub-system subarray/beam.
Subarray Health State Model
- class ska_csp_lmc_common.subarray.subarray_health_model.SubarrayHealthModel(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 Subarray that supports.
HealthState.OK – when the component is fully operative.
HealthState.DEGRADED – when the component is partially operative.
- HealthState.UNKNWON – 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 subarray.
The overall health is based on the fault and communication status of the subarray overall, together with the health of its stations and subarray beams.
This implementation set the health of the CSP Subarray to the health of CBF Subarray component.
- Returns:
an overall health of the subarray.
- Return type:
HealthState
- component_health_changed(component: ObservingComponent, health_state: HealthState | None) None
Handle change in the health of the CSP Subarray subordinate sub- systems subarras/beams.
This is a callback hook, called by the Event Manager when the health of a CSP Subarray subordinate sub-system changes.
- Parameters:
component (
Component
) – the sub-system component whose health has changedhealth_state (HealthState) – the new health state of the sub-system.
Subarray Observing State Model
- class ska_csp_lmc_common.subarray.subarray_obs_state_model.SubarrayObsStateModel(obs_state_init, obs_state_changed_callback: Callable[[ska_control_model.ObsState], None], logger=None)
Bases:
ObsStateModel
A simple observing state model that supports the Observing State as described in ADR-8.
The subarray observing state at initialization is ObsState.EMPTY. This is the same value reported when communication with the component is not established or unknown.
- evaluate_obs_state() ska_control_model.ObsState
Compute overall observing state of the CSP Subarray based on the fault and communication status of the subarray overall, together with the aggregation of the operational states of the subordinate sub- systems components. as aggregation of the observing states of the subordinate sub-systems (subarrays/beams).
- Returns:
the overall observing State of the CSP subarray.
- Return type:
ObsState
- component_obs_state_changed(component: ObservingComponent, obs_state: ObsState | None) None
Handle change in the observing state of the CSP sub-system subarrays/beams.
This is a callback hook, called by the EventManager when the observing state of a CSP sub-system subarray/beam changes.
- Parameters:
component – the CSP sub-system component whose observing state has changed
obs_state (ObsState) – the new obsState of the sub-system subarray/beam
- Type:
Component