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
27 structure DipSwellThresholds {
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. */
68 void clearRecentEvents();
69
70 /**
71 * Retrieve the dip/swell thresholds.
72 *
73 * @return Set of thresholds
74 */
75 DipSwellThresholds getDipSwellThresholds();
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 */
86 int setDipSwellThresholds(in DipSwellThresholds thresholds);
87 };
88}
89
90#endif
pdumodel::VoltageMonitoringSensor
Interface of a voltage sensor with extended monitoring capabilities.
Definition VoltageMonitoringSensor.idl:19
pdumodel::VoltageMonitoringSensor::getDipSwellThresholds
DipSwellThresholds getDipSwellThresholds()
Retrieve the dip/swell thresholds.
pdumodel::VoltageMonitoringSensor::setDipSwellThresholds
int setDipSwellThresholds(in DipSwellThresholds thresholds)
Change the dip/swell thresholds.
pdumodel::VoltageMonitoringSensor::clearRecentEvents
void clearRecentEvents()
Clear list of observed events.
pdumodel::VoltageMonitoringSensor::getRecentEvents
vector< Event > getRecentEvents()
Get all events that were observed so far, ordered from most recent to least recent event.
idl
Basic IDL definitions.
Definition Event.idl:10
pdumodel
PDU Model.
Definition Circuit.idl:16
sensors
Sensors Model.
Definition AccumulatingNumericSensor.idl:13
idl::Event
Common base for all events.
Definition Event.idl:13
pdumodel::VoltageMonitoringSensor::DipSwellThresholdsChangedEvent
Event: Dip/swell thresholds were changed.
Definition VoltageMonitoringSensor.idl:56
pdumodel::VoltageMonitoringSensor::DipSwellThresholds
Definition VoltageMonitoringSensor.idl:27
pdumodel::VoltageMonitoringSensor::DipSwellThresholds::deassertionHysteresis
float deassertionHysteresis
Deassertion hysteresis.
Definition VoltageMonitoringSensor.idl:32
pdumodel::VoltageMonitoringSensor::DipSwellThresholds::swellActive
boolean swellActive
true if swell events should be monitored
Definition VoltageMonitoringSensor.idl:30
pdumodel::VoltageMonitoringSensor::DipSwellThresholds::swellThreshold
double swellThreshold
Swell event threshold.
Definition VoltageMonitoringSensor.idl:31
pdumodel::VoltageMonitoringSensor::DipSwellThresholds::dipActive
boolean dipActive
true if dip events should be monitored
Definition VoltageMonitoringSensor.idl:28
pdumodel::VoltageMonitoringSensor::DipSwellThresholds::dipThreshold
double dipThreshold
Dip event threshold.
Definition VoltageMonitoringSensor.idl:29
pdumodel::VoltageMonitoringSensor::EventListClearedEvent
Event: The list of observed events was cleared.
Definition VoltageMonitoringSensor.idl:52
pdumodel::VoltageMonitoringSensor::EventOccurredEvent
Event: A new dip/swell event occurred.
Definition VoltageMonitoringSensor.idl:47
pdumodel::VoltageMonitoringSensor::EventOccurredEvent::event
Event event
Event that was observed.
Definition VoltageMonitoringSensor.idl:48
pdumodel::VoltageMonitoringSensor::Event
Definition of a voltage fluctuation event observed by this sensor.
Definition VoltageMonitoringSensor.idl:36
pdumodel::VoltageMonitoringSensor::Event::waveform
Waveform waveform
Waveform of event.
Definition VoltageMonitoringSensor.idl:43
pdumodel::VoltageMonitoringSensor::Event::timestamp
time timestamp
Time of event occurrence.
Definition VoltageMonitoringSensor.idl:38
pdumodel::VoltageMonitoringSensor::Event::duration
int duration
Event duration in milliseconds.
Definition VoltageMonitoringSensor.idl:39
pdumodel::VoltageMonitoringSensor::Event::type
EventType type
Type of event.
Definition VoltageMonitoringSensor.idl:37
pdumodel::VoltageMonitoringSensor::Event::voltage
double voltage
Voltage level observed during the event:
Definition VoltageMonitoringSensor.idl:40
pdumodel::Waveform
Waveform data, including metadata.
Definition Waveform.idl:12