Loading...
Searching...
No Matches
VoltageMonitoringSensor.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2020 Raritan Inc. All rights reserved.
*/
#ifndef __PDUMODEL_VOLTAGE_MONITORING_SENSOR_IDL__
#define __PDUMODEL_VOLTAGE_MONITORING_SENSOR_IDL__
#include <NumericSensor.idl>
#include <UserEvent.idl>
#include <Waveform.idl>
/**
* PDU Model
*/
module pdumodel {
/** Interface of a voltage sensor with extended monitoring capabilities */
interface VoltageMonitoringSensor extends sensors.NumericSensor {
[unknown_fallback("UNKNOWN")]
enumeration EventType {
DIP,
SWELL,
UNKNOWN
};
structure DipSwellThresholds {
boolean dipActive; ///< \c true if dip events should be monitored
double dipThreshold; ///< Dip event threshold
boolean swellActive; ///< \c true if swell events should be monitored
double swellThreshold; ///< Swell event threshold
float deassertionHysteresis; ///< Deassertion hysteresis
};
/** Definition of a voltage fluctuation event observed by this sensor */
structure Event {
EventType type; ///< Type of event
time timestamp; ///< Time of event occurrence
int duration; ///< Event duration in milliseconds
double voltage; ///< Voltage level observed during the event:
///< - for dip events: lowest voltage observed
///< - for swell events: highest voltage observed
Waveform waveform; ///< Waveform of event
};
/** Event: A new dip/swell event occurred */
valueobject EventOccurredEvent extends idl.Event {
Event event; ///< Event that was observed
};
/** Event: The list of observed events was cleared */
valueobject EventListClearedEvent extends event.UserEvent {
};
/** Event: Dip/swell thresholds were changed */
valueobject DipSwellThresholdsChangedEvent extends event.UserEvent {
DipSwellThresholds oldThresholds;
DipSwellThresholds newThresholds;
};
/** Get all events that were observed so far, ordered from
* most recent to least recent event.
* Note: The response might be limited to a certain number of records.
*/
vector<Event> getRecentEvents();
/** Clear list of observed events. */
void clearRecentEvents();
/**
* Retrieve the dip/swell thresholds.
*
* @return Set of thresholds
*/
DipSwellThresholds getDipSwellThresholds();
/**
* Change the dip/swell thresholds.
*
* @param thresholds New set of thresholds
*
* @return 0 if OK
* @return THRESHOLD_OUT_OF_RANGE if any threshold is out of range
* @return THRESHOLD_INVALID if thresholds don't meet the requirements
*/
int setDipSwellThresholds(in DipSwellThresholds thresholds);
};
}
#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 Ade.idl:12
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