Station Beam Health Rules
A file to store health transition rules for station.
- class StationBeamHealthRules(*args: Any, **kwargs: Any)[source]
A class to handle transition rules for station.
- __init__(thresholds: dict[str, float] | None = None) None[source]
Create a new instance and initialise beam locked to true.
- Parameters:
thresholds – the conditions for particular health states
- property default_thresholds: dict[str, float]
Get the default thresholds for this device.
- Returns:
the default thresholds
- degraded_rule(failed_pointing_updates: int | None, station_fault: bool, station_health: ska_control_model.HealthState, antenna_healths: dict[str, ska_control_model.HealthState | None]) tuple[bool, str][source]
Test whether DEGRADED is valid for the station.
- Parameters:
failed_pointing_updates – how many failed pointing updates in a row.
station_fault – If the station is in fault state.
station_health – Health of the station.
antenna_healths – Health of the antennas.
- Returns:
If the station beam is degraded or not.
- failed_rule(failed_pointing_updates: int | None, station_fault: bool, station_health: ska_control_model.HealthState, antenna_healths: dict[str, ska_control_model.HealthState | None]) tuple[bool, str][source]
Test whether FAILED is valid for the station beam.
- Parameters:
failed_pointing_updates – how many failed pointing updates in a row.
station_fault – If the station is in fault state.
station_health – Health of the station.
antenna_healths – Health of the antennas.
- Returns:
If the station beam is failed or not.
- healthy_rule(failed_pointing_updates: int | None, station_fault: bool, station_health: ska_control_model.HealthState, antenna_healths: dict[str, ska_control_model.HealthState | None]) tuple[bool, str][source]
Test whether OK is valid for the station.
- Parameters:
failed_pointing_updates – how many failed pointing updates in a row.
station_fault – If the station is in fault state.
station_health – Health of the station.
antenna_healths – Health of the antennas.
- Returns:
If the station beam is healthy or not.
- unknown_rule(failed_pointing_updates: int | None, station_fault: bool, station_health: ska_control_model.HealthState, antenna_healths: dict[str, ska_control_model.HealthState | None]) tuple[bool, str][source]
Test whether UNKNOWN is valid for the station beam.
- Parameters:
failed_pointing_updates – how many failed pointing updates in a row.
station_fault – If the station is in fault state.
station_health – Health of the station.
antenna_healths – Health of the antennas.
- Returns:
If the station beam is in unknown state.