Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
VoltageMonitoringSensor.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2020 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __PDUMODEL_VOLTAGE_MONITORING_SENSOR_IDL__
7#define __PDUMODEL_VOLTAGE_MONITORING_SENSOR_IDL__
8
9#include <NumericSensor.idl>
10#include <UserEvent.idl>
11#include <Waveform.idl>
12
13/**
14 * PDU Model
15 */
16module pdumodel {
17
18 /** Interface of a voltage sensor with extended monitoring capabilities */
19 interface VoltageMonitoringSensor extends sensors.NumericSensor {
20 [unknown_fallback("UNKNOWN")]
21 enumeration EventType {
22 DIP,
23 SWELL,
24 UNKNOWN
25 };
26
28 boolean dipActive; ///< \c true if dip events should be monitored
29 double dipThreshold; ///< Dip event threshold
30 boolean swellActive; ///< \c true if swell events should be monitored
31 double swellThreshold; ///< Swell event threshold
32 float deassertionHysteresis; ///< Deassertion hysteresis
33 };
34
35 /** Definition of a voltage fluctuation event observed by this sensor */
36 structure Event {
37 EventType type; ///< Type of event
38 time timestamp; ///< Time of event occurrence
39 int duration; ///< Event duration in milliseconds
40 double voltage; ///< Voltage level observed during the event:
41 ///< - for dip events: lowest voltage observed
42 ///< - for swell events: highest voltage observed
43 Waveform waveform; ///< Waveform of event
44 };
45
46 /** Event: A new dip/swell event occurred */
47 valueobject EventOccurredEvent extends idl.Event {
48 Event event; ///< Event that was observed
49 };
50
51 /** Event: The list of observed events was cleared */
52 valueobject EventListClearedEvent extends event.UserEvent {
53 };
54
55 /** Event: Dip/swell thresholds were changed */
56 valueobject DipSwellThresholdsChangedEvent extends event.UserEvent {
57 DipSwellThresholds oldThresholds;
58 DipSwellThresholds newThresholds;
59 };
60
61 /** Get all events that were observed so far, ordered from
62 * most recent to least recent event.
63 * Note: The response might be limited to a certain number of records.
64 */
65 vector<Event> getRecentEvents();
66
67 /** Clear list of observed events. */
69
70 /**
71 * Retrieve the dip/swell thresholds.
72 *
73 * @return Set of thresholds
74 */
76
77 /**
78 * Change the dip/swell thresholds.
79 *
80 * @param thresholds New set of thresholds
81 *
82 * @return 0 if OK
83 * @return THRESHOLD_OUT_OF_RANGE if any threshold is out of range
84 * @return THRESHOLD_INVALID if thresholds don't meet the requirements
85 */
87 };
88}
89
90#endif
Interface of a voltage sensor with extended monitoring capabilities.
DipSwellThresholds getDipSwellThresholds()
Retrieve the dip/swell thresholds.
int setDipSwellThresholds(in DipSwellThresholds thresholds)
Change the dip/swell thresholds.
void clearRecentEvents()
Clear list of observed events.
vector< Event > getRecentEvents()
Get all events that were observed so far, ordered from most recent to least recent event.
Basic IDL definitions.
Definition: Event.idl:10
PDU Model.
Definition: Ade.idl:12
Sensors Model.
Common base for all events.
Definition: Event.idl:13
boolean swellActive
true if swell events should be monitored
boolean dipActive
true if dip events should be monitored
Event: The list of observed events was cleared.
Definition of a voltage fluctuation event observed by this sensor.
int duration
Event duration in milliseconds.
double voltage
Voltage level observed during the event:
Waveform data, including metadata.
Definition: Waveform.idl:12