Controller Health Rules
A file to store health transition rules for station.
- class ControllerHealthRules(*args, **kwargs)
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, subarray_beam_healths, station_beam_healths)
Test whether DEGRADED is valid for the station.
- Parameters:
station_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the station subdevices.subarray_beam_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the subarray beam subdevices.station_beam_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the station beam subdevices.
- Return type:
- Returns:
If the subarray is degraded or not.
- failed_rule(station_healths, subarray_beam_healths, station_beam_healths)
Test whether FAILED is valid for the station.
- Parameters:
station_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the station subdevices.subarray_beam_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the subarray beam subdevices.station_beam_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the station beam subdevices.
- Return type:
- Returns:
If the subarray is failed or not.
- healthy_rule(station_healths, subarray_beam_healths, station_beam_healths)
Test whether OK is valid for the station.
- Parameters:
station_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the station subdevices.subarray_beam_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the subarray beam subdevices.station_beam_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the station beam subdevices.
- Return type:
- Returns:
If the subarray is healthy or not.
- unknown_rule(station_healths, subarray_beam_healths, station_beam_healths)
Test whether UNKNOWN is valid for the station.
- Parameters:
station_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the station subdevices.subarray_beam_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the subarray beam subdevices.station_beam_healths (
dict
[str
,Optional
[HealthState
]]) – The healths of the station beam subdevices.
- Return type:
- Returns:
If the subarray is in unknown state.