SAT9/.resources/46b4c8196ff5162f0b038003d3c8f90f48afbaa1e55c24befaaa23562cb3dae9
2025-04-18 19:44:27 +04:00

33 lines
632 B
Plaintext

def get_alarm_state(state):
"""
This function returns a string representing the current alarm state from
a state argument enum 1 to 7.
Args:
state: Enum for current alarm state.
Returns:
String representing current alarm state.
Raises:
KeyError: None.
"""
if state == 0:
return "Not Active"
elif state == 1:
return "Active"
elif state == 2:
return "Shelved"
# elif state == 4:
# return "Return to unacknowledged"
# elif state == 5:
# return "Shelved state"
# elif state == 6:
# return "Suppressed-by-design"
# elif state == 7:
# return "Out-of-service state"
else:
return "Unknown"