Controller Health Model

An implementation of a health model for a controller.

class ControllerHealthModel(component_state_callback, station_trls, subarray_beam_trls, station_beam_trls, thresholds)

A health model for a controller.

__init__(component_state_callback, station_trls, subarray_beam_trls, station_beam_trls, thresholds)

Initialise a new instance.

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

  • station_trls (Sequence[str]) – the TRLs of this controller’s stations

  • subarray_beam_trls (Sequence[str]) – the TRLs of this controller’s subarray beams

  • station_beam_trls (Sequence[str]) – the TRLs of this controller’s station beams

  • thresholds (dict[str, float]) – The thresholds for number of sub devices healthy

evaluate_health()

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.

Return type:

HealthState

Returns:

an overall health of the controller

station_beam_health_changed(station_beam_trl, station_beam_health)

Handle a change in station beam health.

Parameters:
  • station_beam_trl (str) – the TRL of the station beam whose health has changed

  • station_beam_health (Optional[HealthState]) – 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.

Return type:

None

station_health_changed(station_trl, station_health)

Handle a change in station health.

Parameters:
  • station_trl (str) – the TRL of the station whose health has changed

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

Return type:

None

subarray_beam_health_changed(subarray_beam_trl, subarray_beam_health)

Handle a change in subarray beam health.

Parameters:
  • subarray_beam_trl (str) – the TRL of the subarray beam whose health has changed

  • subarray_beam_health (Optional[HealthState]) – 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.

Return type:

None