Alarm Objects¶
Alarm objects represent the state and severity of active alarms, but are otherwise intentionally quite featureless.
They are created and maintained by the Alarm_Manager
and sent to any listeners registered in Alarm_Manager.callbacks
.
Classes:
|
Representation of alarm status and parameters |
|
An enumeration. |
|
An enumeration. |
|
count(start=0, step=1) –> count object |
|
The year, month and day arguments are required. |
-
class
pvp.alarm.alarm.
Alarm
(alarm_type: pvp.alarm.AlarmType, severity: pvp.alarm.AlarmSeverity, start_time: float = None, latch: bool = True, cause: list = None, value=None, message=None)[source]¶ Representation of alarm status and parameters
Parameterized by a
Alarm_Rule
and managed byAlarm_Manager
- Parameters
alarm_type (
AlarmType
) – Type of alarmseverity (
AlarmSeverity
) – Severity of alarmstart_time (float) – Timestamp of alarm start, (as generated by
time.time()
cause (ValueName) – The
ValueName
that caused the alarm to be firedvalue (int, float) – optional - numerical value that generated the alarm
message (str) – optional - override default text generated by
AlarmManager
Methods:
__init__
(alarm_type, severity[, start_time, …])- param alarm_type
Type of alarm
If active, register an end time and set as
active == False
Returns:Attributes:
Alarm Type, property without setter to prevent change after instantiation
used to generate unique IDs for each alarm
Alarm Severity, property without setter to prevent change after instantiation
-
id_counter
= count(0)¶ used to generate unique IDs for each alarm
- Type
itertools.count
-
__init__
(alarm_type: pvp.alarm.AlarmType, severity: pvp.alarm.AlarmSeverity, start_time: float = None, latch: bool = True, cause: list = None, value=None, message=None)[source]¶ - Parameters
alarm_type (
AlarmType
) – Type of alarmseverity (
AlarmSeverity
) – Severity of alarmstart_time (float) – Timestamp of alarm start, (as generated by
time.time()
cause (ValueName) – The
ValueName
that caused the alarm to be firedvalue (int, float) – optional - numerical value that generated the alarm
message (str) – optional - override default text generated by
AlarmManager
-
property
severity
¶ Alarm Severity, property without setter to prevent change after instantiation
- Returns
-
property
alarm_type
¶ Alarm Type, property without setter to prevent change after instantiation
- Returns