Tile Health Model

An implementation of a health model for a Tile.

class TileHealthModel(health_changed_callback, hw_version, bios_version, preadu_presence, 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, hw_version, bios_version, preadu_presence, 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.

  • hw_version (str) – the TPM version.

  • bios_version (str) – the TPM bios version.

  • preadu_presence (list[bool]) – on a per channel basis is there a PreAdu present.

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

evaluate_health()

Compute overall health of the tile.

The overall health is based on the fault and communication status of the tile.

Return type:

tuple[HealthState, str]

Returns:

an overall health of the tile

property health_params: dict[str, Any]

Get the thresholds for health rules.

Returns:

the thresholds for health rules

property intermediate_healths: dict[str, tuple[ska_control_model.HealthState, str]]

Get the intermediate health roll-up states.

Returns:

the intermediate health roll-up states

set_logger(logger)

Set logger for debugging.

Parameters:

logger (Any) – a logger.

Return type:

None

update_data(new_states)

Update this health model with state relevant to evaluating health.

Parameters:

new_states (dict) – New states of the data points.

Return type:

None