Station Health Model

An implementation of a health model for a station.

class StationHealthModel(field_station_trl, sps_station_trl, antenna_trls, component_state_callback, thresholds=None)

A health model for a station.

__init__(field_station_trl, sps_station_trl, antenna_trls, component_state_callback, thresholds=None)

Initialise a new instance.

Parameters:
  • field_station_trl (str) – the TRL of this station’s FieldStation

  • sps_station_trl (str) – the TRL of this MccsStation’s SpsStation.

  • antenna_trls (Sequence[str]) – the TRLs of this station’s antennas

  • component_state_callback (Callable[..., None]) – callback to be called whenever there is a change to this component’s state, including the health model’s evaluated health state.

  • thresholds (Optional[dict[str, float]]) – the threshold parameters for the health rules

antenna_health_changed(antenna_trl, antenna_health)

Handle a change in antenna health.

Parameters:
  • antenna_trl (str) – the TRL of the antenna whose health has changed

  • antenna_health (Optional[HealthState]) – the health state of the specified antenna, or None if the antenna’s admin mode indicates that its health should not be rolled up.

Return type:

None

evaluate_health()

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.

Return type:

HealthState

Returns:

an overall health of the station

field_station_health_changed(field_station_trl=None, field_station_health=None)

Handle a change in FieldStation health.

Parameters:
  • field_station_health (Optional[HealthState]) – 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 (Optional[str]) – the TRL of the FieldStation.

Return type:

None

sps_station_health_changed(sps_station_trl, sps_station_health)

Handle a change in SpsStation health.

Parameters:
  • sps_station_trl (str) – the TRL of the SpsStation

  • sps_station_health (Optional[HealthState]) – the health state of the specified SpsStation, or None if the SpsStation’s admin mode indicates that its health should not be rolled up.

Return type:

None