Subrack Health Model

An implementation of a health model for a subrack.

class SubrackHealthModel(component_state_changed_callback, thresholds=None)

A health model for a subrack.

__init__(component_state_changed_callback, thresholds=None)

Initialise a new instance.

Parameters:
  • component_state_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]]) – Thresholds for the subrack device.

evaluate_health()

Compute overall health of the subrack.

The overall health is based on the fault and communication status of the subrack overall, together with the health of the tpms that it manages.

This implementation simply sets the health of the subrack to the health of its least healthy component.

Return type:

HealthState

Returns:

an overall health of the subrack

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