Controller Health Model
An implementation of a health model for a controller.
- class ControllerHealthModel(*args: Any, **kwargs: Any)[source]
A health model for a controller.
- __init__(component_state_callback: Callable[[...], None], station_trls: Sequence[str], subarray_beam_trls: Sequence[str], station_beam_trls: Sequence[str], thresholds: dict[str, float]) None[source]
Initialise a new instance.
- Parameters:
component_state_callback – callback to be called whenever there is a change to this this health model’s evaluated health state.
station_trls – the TRLs of this controller’s stations
subarray_beam_trls – the TRLs of this controller’s subarray beams
station_beam_trls – the TRLs of this controller’s station beams
thresholds – The thresholds for number of sub devices healthy
- evaluate_health() tuple[ska_control_model.HealthState, str][source]
Compute overall health of the controller.
The overall health is based on the fault and communication status of the controller overall, together with the health of the stations, subarray beams and station beams.
This implementation simply sets the health of the controller to the health of its least healthy component.
- Returns:
an overall health of the controller
- station_beam_health_changed(station_beam_trl: str, station_beam_health: ska_control_model.HealthState | None) None[source]
Handle a change in station beam health.
- Parameters:
station_beam_trl – the TRL of the station beam whose health has changed
station_beam_health – the health state of the specified station beam, or None if the station beam’s admin mode indicates that its health should not be rolled up.
- station_health_changed(station_trl: str, station_health: ska_control_model.HealthState | None) None[source]
Handle a change in station health.
- Parameters:
station_trl – the TRL of the station whose health has changed
station_health – the health state of the specified station, or None if the station’s admin mode indicates that its health should not be rolled up.
- subarray_beam_health_changed(subarray_beam_trl: str, subarray_beam_health: ska_control_model.HealthState | None) None[source]
Handle a change in subarray beam health.
- Parameters:
subarray_beam_trl – the TRL of the subarray beam whose health has changed
subarray_beam_health – the health state of the specified subarray beam, or None if the subarray beam’s admin mode indicates that its health should not be rolled up.