Skip to content

Alarm States

This module defines the standard states and attributes as per ISA 18.2.

class automation.alarms.states.States(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Enumeration of standard alarm states (ISA 18.2).

class automation.alarms.states.Status(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Enumeration of alarm status attributes.

class automation.alarms.states.AlarmAttrs(mnemonic, state, process_condition, alarm_status, annunciate_status, acknowledge_status)

Defines the attributes and behavior of a specific alarm state.

is_acknowledged(self)

Checks if the alarm is in an acknowledged state.

Returns:

  • bool: True if acknowledged, False otherwise.
serialize(self)

Serializes the state attributes to a dictionary.

Returns:

  • dict: State attributes.
class automation.alarms.states.AlarmState()

Static definitions of all standard alarm states with their attributes.

get_state_by_name(state)

Retrieves an AlarmAttrs object by its state name.

Parameters:

  • state (str): The name of the state (e.g., 'Normal').

Returns:

  • AlarmAttrs: The state attributes object.