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__ */
event::AlarmManager
AlarmManager interface.
Definition AlarmManager.idl:15
event::AlarmManager::acknowledgeAlarm
int acknowledgeAlarm(in string alarmId)
Acknowledges an alarm.
event::AlarmManager::listAlarms
vector< Alarm > listAlarms()
List alarms that need to be acknowledged.
idl
Basic IDL definitions.
Definition Event.idl:10
event::AlarmManager::AlarmAcknowledgedEvent
Existing alarm acknowledgement event.
Definition AlarmManager.idl:67
event::AlarmManager::AlarmAcknowledgedEvent::alarmId
string alarmId
Alarm id of acknowledged alarm.
Definition AlarmManager.idl:68
event::AlarmManager::AlarmAddedEvent
New alarm added event.
Definition AlarmManager.idl:53
event::AlarmManager::AlarmAddedEvent::alarm
Alarm alarm
Newly added alarm.
Definition AlarmManager.idl:54
event::AlarmManager::AlarmUpdatedEvent
Alarm updated event.
Definition AlarmManager.idl:60
event::AlarmManager::AlarmUpdatedEvent::alarm
Alarm alarm
Updated alarm.
Definition AlarmManager.idl:61
event::AlarmManager::Alarm
Alarm structure.
Definition AlarmManager.idl:43
event::AlarmManager::Alarm::id
string id
Alarm id.
Definition AlarmManager.idl:44
event::AlarmManager::Alarm::actionId
string actionId
Corresponding action id.
Definition AlarmManager.idl:46
event::AlarmManager::Alarm::alerts
vector< Alert > alerts
List of alerts.
Definition AlarmManager.idl:47
event::AlarmManager::Alarm::name
string name
Alarm name.
Definition AlarmManager.idl:45
event::AlarmManager::Alert
Alert structure.
Definition AlarmManager.idl:29
event::AlarmManager::Alert::numberAlerts
int numberAlerts
Number of alerts.
Definition AlarmManager.idl:34
event::AlarmManager::Alert::eventCondition
string eventCondition
Event condition.
Definition AlarmManager.idl:30
event::AlarmManager::Alert::lastAppearance
time lastAppearance
Date & time of last appearance (UNIX timestamp, UTC)
Definition AlarmManager.idl:33
event::AlarmManager::Alert::message
string message
Log message.
Definition AlarmManager.idl:31
event::AlarmManager::Alert::firstAppearance
time firstAppearance
Date & time of first appearance (UNIX timestamp, UTC)
Definition AlarmManager.idl:32
idl::Event
Common base for all events.
Definition Event.idl:13