diff --git a/docs/AlarmEcosystem.md b/docs/AlarmEcosystem.md new file mode 100644 index 0000000000000000000000000000000000000000..22955d9f56028cdf382fddbfb7596c1299a01c4c --- /dev/null +++ b/docs/AlarmEcosystem.md @@ -0,0 +1,59 @@ +# The Alarm Ecosystem + +There are several projects related to alarms, which can work together with AlarmHandlers. + +## AlarmNotify + +[alarm-notify](https://gitlab.elettra.eu/cs/ds/alarm-notify) connect to a list of alarm-handler devices and subscribes for the change event of their alarm attributes. It checks whether there are Recipients configured in individual alarms, or interested in alarms belonging to a group, or all alarms, then builds a list of recipients for each alarm state of each alarm. +When an event is received, if there are recipients configured for the new alarm state, a command is triggered on a device for notification. +A string parameter with a semicolon-separated list of “key=value†fields is passed to the notification command, with the following keys: +``` +name=<_tag_>;handler=<AlarmHandler device>;values=<JSON attribute values>url=<_url_>;msg=<_msg_>;formula=<_formula_>;groups=<_groups_>;shlvd_time=<_shlvd_time_>;state=<Alarm state DevEnum label>;ack=<true|false>;time=<timestamp>; +``` + +See an example of configuration properties: + + + +## AlarmManager + +[alarm-manager](https://gitlab.elettra.eu/cs/ds/alarm-manager) is a Tango device server that supports the configuration of AlarmHandlers. AlarmHandlers are designed to be modular, so that different AlarmManagers can be configured to handle different groups/subsets of AlarmHandlers. +AlarmManager can display the selected alarm configuration as attributes (_tag_, _formula_, _message_, _priority_, _group_, _shlvd_time_, _on_delay_, _off_delay_, _on_command_, _off_command_, _receivers_) or can Load/Modify alarms with the configuration provided in the attributes (_tag_, _formula_, _message_, ... same list as above) + +## AlarmMail + +[alarm-mail](https://gitlab.elettra.eu/cs/ds/alarm-mail) is a Tango device server which exports commands able to send emails. Its commands can be configured in _on_command_ and _off_command_ properties (deprecated) or called by AlarmNotify. + +## AlarmHandlerGUI + +[alarm-handler-gui](https://gitlab.elettra.eu/cs/gui/alarm-ng) is the default AlarmHandler GUI at [Elettra](www.elettra.eu). It is designed to display different sets of AlarmHandlers. See: + + + +The different lists of AlarmHandlers to use are taken from free properties. Same properties that can be used to configure AlarmManagers. See: + + + +AlarmHandlerGUI is also able to display and search in alarm history stored by HDB++ (MySQL schema only). See: + + + +## AlarmManagerGUI + +[alarm-manager-gui](https://gitlab.elettra.eu/cs/gui/alarm-manager) displays in a tree the list of alarms read from the AlarmManager's _alarmList_ attribute. When an alarm is selected in the tree, AlarmManager's _tag_ and _handler_ are written accordingly and all the other attributes contain the updated configuration, see: + + + +This can then be modified or loaded as a new alarm if the _tag_ attribute has changed. + +## HDB++ + +[EventSubscriber](https://gitlab.com/tango-controls/hdbpp/hdbpp-es) can be used to store alarm history: alarm are exported by the AlarmHandler interface as DevEnum attributes whose change and archive events are pushed in the code at any variation. The configuration of HDB++ is independent of the AlarmHandlers, but also AlarmManagerGUI can also do this. + +## PANIC + +[PANIC](https://gitlab.com/tango-controls/panic) is the Alarm System developed at [Alba](www.cells.es). Preliminary work has been done to support AlarmHandler as an alarm formula evaluation device for PANIC. Specifically, the _alarmSummary_ attribute, GetAlarmInfo command and alarm Devenum attributes are compatible between the two systems. PANIC should also be able of handle the configuation of AlarmHandlers in attribute properties, but the work has not yet been finalized. + + + + diff --git a/docs/AlarmHandler.md b/docs/AlarmHandler.md index 947af6f4e6477791a716f7971c063eb89400d22c..89c870eade4c9f4f5ebadbbe26b1c8f17de6ddef 100644 --- a/docs/AlarmHandler.md +++ b/docs/AlarmHandler.md @@ -116,14 +116,16 @@ See [Formula.md](./Formula.md). | Shelve | DEVVAR_STRINGARRAY | DEV_VOID | Shelve command disable temporarily the list of alarms passed as input argument. Only alarms which have a silent_time property > 0 can be shelved. Their state is changed to SHLVD for the period specified as silent_time or until the Enable command is called | | Silence | DEVVAR_STRINGARRAY | DEV_VOID | Silence command disable temporarily the management of the audible condition of the list of alarms passed as input argument. Only alarms which have a silent_time property > 0 can be silenced. Their state continue to change following their normal behavior but they do not participate to the audibleAlarm evaluation for the period specified as silent_time or until the Enable command is called | | SearchAlarm | DEV_STRING | DEVVAR_STRINGARRAY | Returns the list of configured alarms that match the name of the filter string. If the filter string is empty or *, the command returns the configuration of all alarms. The Alarm configuration is returned as a concatenated _“key=value;â€_ string, with the same syntax as the Load command | -| GetAlarmInfo | DEVVAR_STRINGARRAY | DEVVAR_STRINGARRAY | Returns the complete status of the alarm whose name is passed as input argument [0]. The return value is an array _“key=value;â€_ strings. Other input arguments may specify keys to be included in the response. Format described below | +| GetAlarmInfo | DEVVAR_STRINGARRAY | DEVVAR_STRINGARRAY | Returns the complete status of the alarm whose name is passed as input argument [0]. The return value is an array of strings _“key=value;â€_. Other input arguments may specify keys to be included in the response. Format described below | +| ReLoadAll | DEV_VOID | DEV_VOID | Reaload the configuration of all alarms from attribute properties | | ResetStatistics | DEV_VOID | DEV_VOID | Reset frequency counters | | StopAudible | DEV_VOID | DEV_VOID | Reset audibleAlarm attribute | | StopNew | DEV_VOID | DEV_VOID | Same as StopAudible, kept temporarily for compatibility with legacy alarm GUI | + * _GetAlarmInfo_ Returns the complete status of the alarm whose name is passed as the input argument. -The return value is an array of strings_“key=value;â€_. The keys are those described in the attribute properties plus: +The return value is an array of strings _“key=value;â€_. The keys are those described in the attribute properties plus: * value=one of the alarm state enum labels * attr_values=concatenation of “attrname=value;†of the last value of attributes evaluated in the formula * quality=the tango quality @@ -174,4 +176,8 @@ The return value is an array of strings_“key=value;â€_. The keys are those de | SHLVD | 4 | ANY | Any | Not applicable | Shelved: temporarily disabled with the Shelve command | | DSUPR | 5 | ANY | Any | Not applicable | Suppressed by design: not possible to evaluate to alarm because of formula conditions. Note: it is not possible to enter in this state in this AlarmHandler implementation | | OOSRV | 6 | ANY | Any | Not applicable | Out of service: manually disabled with the Disable command | -| ERROR | 7 | ANY | Any | Not applicable | Cannot be evaluated due to Tango or formula evaluation errors | \ No newline at end of file +| ERROR | 7 | ANY | Any | Not applicable | Cannot be evaluated due to Tango or formula evaluation errors | + +# Alarm Ecosystem + +See [Alarm Ecosystem](./AlarmEcosystem.md) for other projects related to AlarmHandlers and how they can be used together. \ No newline at end of file diff --git a/docs/images/alarm_manager.png b/docs/images/alarm_manager.png new file mode 100644 index 0000000000000000000000000000000000000000..9c2ae9d6eb3e6f259b74bde9b46c7c6c976bc3f7 Binary files /dev/null and b/docs/images/alarm_manager.png differ diff --git a/docs/images/alarm_ng.png b/docs/images/alarm_ng.png new file mode 100644 index 0000000000000000000000000000000000000000..19de409e081e4284bc487b2e4677577d94245532 Binary files /dev/null and b/docs/images/alarm_ng.png differ diff --git a/docs/images/alarm_ng_history.png b/docs/images/alarm_ng_history.png new file mode 100644 index 0000000000000000000000000000000000000000..2ae9d76296ff66521ceea27fe1ffaabdf86dc331 Binary files /dev/null and b/docs/images/alarm_ng_history.png differ diff --git a/docs/images/alarm_notify_properties.png b/docs/images/alarm_notify_properties.png new file mode 100644 index 0000000000000000000000000000000000000000..898e7348ce25a72e0aa79acea20a4fd73b4d5f0e Binary files /dev/null and b/docs/images/alarm_notify_properties.png differ diff --git a/docs/images/free_properties.png b/docs/images/free_properties.png new file mode 100644 index 0000000000000000000000000000000000000000..787926aca0791f12e49de17eb4124df90fc8eaaf Binary files /dev/null and b/docs/images/free_properties.png differ