Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
AlarmManager.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2012 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __EVENT_ALARMMANAGER_IDL__
7#define __EVENT_ALARMMANAGER_IDL__
8
9#include <Event.idl>
10
11/** Event interface */
12module event {
13
14 /** AlarmManager interface */
15 interface AlarmManager {
16
17 /** Error codes */
18 constant int NO_ERROR = 0; ///< operation successful, no error
19 constant int ERR_UNKNOWN_ALARM_ID = 1; ///< unknown alarmId
20 constant int ERR_EXECUTING_ACTIONS = 2; ///< failure during executing actions
21
22 /**
23 * Alert structure
24 *
25 * An alert contains the event id, the log message of the triggered
26 * alarm condition plus time and counter fields to express
27 * when and how often the alarm condition was triggered.
28 */
29 structure Alert {
30 string eventCondition; ///< Event condition
31 string message; ///< Log message
32 time firstAppearance; ///< Date & time of first appearance (UNIX timestamp, UTC)
33 time lastAppearance; ///< Date & time of last appearance (UNIX timestamp, UTC)
34 int numberAlerts; ///< Number of alerts
35 };
36
37 /**
38 * Alarm structure
39 *
40 * An alarm has a name, a reference to its action source
41 * and a list of all alerts which created the alarm.
42 */
43 structure Alarm {
44 string id; ///< Alarm id
45 string name; ///< Alarm name
46 string actionId; ///< Corresponding action id
47 vector<Alert> alerts; ///< List of alerts
48 };
49
50 /**
51 * New alarm added event
52 */
53 valueobject AlarmAddedEvent extends idl.Event {
54 Alarm alarm; ///< Newly added alarm
55 };
56
57 /**
58 * Alarm updated event
59 */
60 valueobject AlarmUpdatedEvent extends idl.Event {
61 Alarm alarm; ///< Updated alarm
62 };
63
64 /**
65 * Existing alarm acknowledgement event
66 */
67 valueobject AlarmAcknowledgedEvent extends idl.Event {
68 string alarmId; ///< Alarm id of acknowledged alarm
69 };
70
71 /**
72 * Acknowledges an alarm.
73 *
74 * This stops notification sending and will remove
75 * the specified alarm from the alarm list.
76 *
77 * @param alarmId alarm id
78 * @return NO_ERROR if OK
79 * @return ERR_UNKNOWN_ALARM_ID if alarmId is unknown
80 * @return ERR_EXECUTING_ACTIONS if failure during executing acknowledgment actions
81 */
82 int acknowledgeAlarm(in string alarmId);
83
84 /**
85 * List alarms that need to be acknowledged.
86 */
87 vector<Alarm> listAlarms();
88
89 };
90
91}
92
93#endif /* __EVENT_ALARMMANAGER_IDL__ */
AlarmManager interface.
int acknowledgeAlarm(in string alarmId)
Acknowledges an alarm.
vector< Alarm > listAlarms()
List alarms that need to be acknowledged.
Basic IDL definitions.
Definition: Event.idl:10
Existing alarm acknowledgement event.
string alarmId
Alarm id of acknowledged alarm.
string actionId
Corresponding action id.
vector< Alert > alerts
List of alerts.
string name
Alarm name.
int numberAlerts
Number of alerts.
string eventCondition
Event condition.
time lastAppearance
Date & time of last appearance (UNIX timestamp, UTC)
string message
Log message.
time firstAppearance
Date & time of first appearance (UNIX timestamp, UTC)
Common base for all events.
Definition: Event.idl:13