Alarms
pyhades.alarms.Alarm
(name, tag, description, load=False)This class implements all definitions for Alarm object
get_trigger
(self)Gets Trigger object for alarm
set_trigger
(self, value, _type)Sets Trigger object for alarm
Parameters
- value: (int - float - bool) Value at which the alarm is triggered
- _type: (str) ["HIGH-HIGH" - "HIGH" - "LOW" - "LOW-LOW" - "BOOL"] Alarm type
name
Property (str) Sets and Gets Alarm name
tag
Property (str) Sets and Gets tag of the CVT that alarm monitors
description
Property (str) Sets and Gets alarm description
value
Property Sets and Gets current value of the tag that the alarm monitors
tag_alarm
Property (str) Sets and Gets tag of the alarm
update_alarm_definition
(self, **kwargs)Update alarm configuration
Parameters
- name (str): Alarm name
- tag (str): Tag binded to alarm
- description (str): Alarm description
- type (str): Alarm type ['HIGH-HIGH', 'HIGH', 'LOW', 'LOW-LOW', 'BOOL']
- trigger_value (float): Alarm trigger value
state
Property (AlarmState Object) Sets and Gets Alarm state
enabled
Property, check if alarm is enabled
update
(self, value)Update alarm state according the tag value that the alarm monitors and according its state
Parameters
- value: (int - float - bool) according alarm type, current tag value
enable
(self)Enable or disable alarm according the parameter value
Parameters
- value: (bool) if True enable alarm, otherwise, disable it
acknowledge
(self)Allows you to acknowledge alarm triggered
reset
(self)Returns alarm to normal condition
shelve
(self, **options)Set alarm to Shelved state
Parameters
- days: (int)
- seconds: (int)
- minutes: (int)
- hours: (int)
- weeks: (int)
unshelve
(self)Set Alarm to normal state after Shelved state
suppress_by_design
(self)Suppress Alarm by design
unsuppress_by_design
(self)Unsuppress alarm, return to normal state after suppress state
out_of_service
(self)Remove alarm from service
return_to_service
(self)Return alarm to normal condition after Out Of Service state
serialize
(self)Allows you to serialize alarm to a dict jsonable
Return
- alarm_info: (dict) A jsonable dictionary
trigger_alarm
(self)Trigger alarm in Unacknowledge state if the alarm is enabled