Top | Previous | Next |
system.alarm.acknowledge |
Description Acknowledges any number of alarms, specified by their event ids. The event id is generated for an alarm when it becomes active, and is used to identify a particular event from other events for the same source. The alarms will be acknowledged by the logged in user making the call. Additionally, acknowledgement notes may be included and will be stored along with the acknowledgement. Syntax system.alarm.acknowledge(alarmIds, notes) Parameters String[] alarmIds - List of alarm event ids (uuids) to acknowledge. String notes - Notes that will be stored on the acknowledged alarm events. Returns nothing Scope Client system.alarm.acknowledge(alarmIds, notes, user) Parameters String[] alarmIds - List of alarm event ids (uuids) to acknowledge. String notes - Notes that will be stored on the acknowledged alarm events. String user - User name for acknowledging. Returns nothing Scope Gateway Examples This example shows the basic syntax for acknowledging an alarm.
system.alarm.acknowledge(['c27c06d8-698f-4814-af89-3c22944f58c5'], 'Saw this alarm, did something about it.')
This code snippet could be used as a mouseReleased event handler on a Table component whose data was the return value of the system.alarm.queryAlarmStatus function. It would present a right-click menu to acknowledge the currently selected alarms (for more than one, the table must be set to allow multiple selection). This example does not ask for an ack message, and therefore might fail if the alarms we're attempting to acknowledge require notes. Also, note that the system will ignore any alarms that have already been acknowledged.
if event.button==3:
See also: |