Tile Health Model

An implementation of a health model for a Tile.

class TileHealthModel(health_changed_callback, thresholds=None)

A health model for a tile.

At present this uses the base health model; this is a placeholder for a future, better implementation.

__init__(health_changed_callback, thresholds=None)

Initialise a new instance.

Parameters:
  • health_changed_callback (HealthChangedCallbackProtocol) – callback to be called whenever there is a change to this this health model’s evaluated health state.

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

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 tiles 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

property health_params: dict[str, Any]

Get the thresholds for health rules.

Returns:

the thresholds for health rules