Station Health Rules

A file to store health transition rules for station.

class SpsStationHealthRules(*args, **kwargs)

A class to handle transition rules for station.

property default_thresholds: dict[str, float]

Get the default thresholds for this device.

Returns:

the default thresholds

degraded_rule(subrack_healths, tile_healths)

Test whether DEGRADED is valid for the station.

Parameters:
  • subrack_healths (dict[str, HealthState | None]) – dictionary of subrack healths

  • tile_healths (dict[str, HealthState | None]) – dictionary of tile healths

Return type:

bool

Returns:

True if DEGRADED is a valid state

failed_rule(subrack_healths, tile_healths)

Test whether FAILED is valid for the station.

Parameters:
  • subrack_healths (dict[str, HealthState | None]) – dictionary of subrack healths

  • tile_healths (dict[str, HealthState | None]) – dictionary of tile healths

Return type:

bool

Returns:

True if FAILED is a valid state

healthy_rule(subrack_healths, tile_healths)

Test whether OK is valid for the station.

Parameters:
  • subrack_healths (dict[str, HealthState | None]) – dictionary of subrack healths

  • tile_healths (dict[str, HealthState | None]) – dictionary of tile healths

Return type:

bool

Returns:

True if OK is a valid state

unknown_rule(subrack_healths, tile_healths)

Test whether UNKNOWN is valid for the station.

Parameters:
  • subrack_healths (dict[str, HealthState | None]) – dictionary of subrack healths

  • tile_healths (dict[str, HealthState | None]) – dictionary of tile healths

Return type:

bool

Returns:

True if UNKNOWN is a valid state