Station Health Model
An implementation of a health model for a station.
- class StationHealthModel(*args: Any, **kwargs: Any)[source]
A health model for a station.
- __init__(field_station_trl: str, sps_station_trl: str, antenna_trls: Sequence[str], health_changed_callback: ska_low_mccs_common.health.HealthChangedCallbackProtocol, thresholds: dict[str, float] | None = None) None[source]
Initialise a new instance.
- Parameters:
field_station_trl – the TRL of this station’s FieldStation
sps_station_trl – the TRL of this MccsStation’s SpsStation.
antenna_trls – the TRLs of this station’s antennas
health_changed_callback – callback to be called whenever there is a change to this this health model’s evaluated health state.
thresholds – the threshold parameters for the health rules
- antenna_health_changed(antenna_trl: str, antenna_health: ska_control_model.HealthState | None) None[source]
Handle a change in antenna health.
- Parameters:
antenna_trl – the TRL of the antenna whose health has changed
antenna_health – the health state of the specified antenna, or None if the antenna’s admin mode indicates that its health should not be rolled up.
- evaluate_health() tuple[ska_control_model.HealthState, str][source]
Compute overall health of the station.
The overall health is based on the fault and communication status of the station overall, together with the health of the FieldStation, antennas and SpsStation that it manages.
This implementation simply sets the health of the station to the health of its least healthy component.
- Returns:
an overall health of the station
- field_station_health_changed(field_station_trl: str | None = None, field_station_health: ska_control_model.HealthState | None = None) None[source]
Handle a change in FieldStation health.
- Parameters:
field_station_health – the health state of the FieldStation, or None if the FieldStation’s admin mode indicates that its health should not be rolled up.
field_station_trl – the TRL of the FieldStation.
- sps_station_health_changed(sps_station_trl: str, sps_station_health: ska_control_model.HealthState | None) None[source]
Handle a change in SpsStation health.
- Parameters:
sps_station_trl – the TRL of the SpsStation
sps_station_health – the health state of the specified SpsStation, or None if the SpsStation’s admin mode indicates that its health should not be rolled up.