Controller Health Rules

A file to store health transition rules for station.

class ControllerHealthRules(*args: Any, **kwargs: Any)[source]

A class to handle transition rules for station.

property default_thresholds: dict[str, float]

Get the default thresholds for this device.

Returns:

default thresholds

degraded_rule(station_healths: dict[str, Optional[ska_control_model.HealthState]], subarray_beam_healths: dict[str, Optional[ska_control_model.HealthState]], station_beam_healths: dict[str, Optional[ska_control_model.HealthState]]) tuple[bool, str][source]

Test whether DEGRADED is valid for the station.

Parameters:
  • station_healths – The healths of the station subdevices.

  • subarray_beam_healths – The healths of the subarray beam subdevices.

  • station_beam_healths – The healths of the station beam subdevices.

Returns:

If the subarray is degraded or not.

failed_rule(station_healths: dict[str, Optional[ska_control_model.HealthState]], subarray_beam_healths: dict[str, Optional[ska_control_model.HealthState]], station_beam_healths: dict[str, Optional[ska_control_model.HealthState]]) tuple[bool, str][source]

Test whether FAILED is valid for the station.

Parameters:
  • station_healths – The healths of the station subdevices.

  • subarray_beam_healths – The healths of the subarray beam subdevices.

  • station_beam_healths – The healths of the station beam subdevices.

Returns:

If the subarray is failed or not.

healthy_rule(station_healths: dict[str, Optional[ska_control_model.HealthState]], subarray_beam_healths: dict[str, Optional[ska_control_model.HealthState]], station_beam_healths: dict[str, Optional[ska_control_model.HealthState]]) tuple[bool, str][source]

Test whether OK is valid for the station.

Parameters:
  • station_healths – The healths of the station subdevices.

  • subarray_beam_healths – The healths of the subarray beam subdevices.

  • station_beam_healths – The healths of the station beam subdevices.

Returns:

If the subarray is healthy or not.

unknown_rule(station_healths: dict[str, Optional[ska_control_model.HealthState]], subarray_beam_healths: dict[str, Optional[ska_control_model.HealthState]], station_beam_healths: dict[str, Optional[ska_control_model.HealthState]]) tuple[bool, str][source]

Test whether UNKNOWN is valid for the station.

Parameters:
  • station_healths – The healths of the station subdevices.

  • subarray_beam_healths – The healths of the subarray beam subdevices.

  • station_beam_healths – The healths of the station beam subdevices.

Returns:

If the subarray is in unknown state.