Raritan / Server Technology Xerus™ PDU JSON-RPC API: Outlet.idl Source File

Raritan / Server Technology Xerus™ PDU JSON-RPC API

Outlet.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3 * Copyright 2009 Raritan Inc. All rights reserved.
4 */
5
6 #ifndef __PDUMODEL_OUTLET_IDL__
7 #define __PDUMODEL_OUTLET_IDL__
8
9 #include <Nameplate.idl>
10 #include <NumericSensor.idl>
11 #include <StateSensor.idl>
12 #include <Pole.idl>
13 #include <Inlet.idl>
14 #include <OverCurrentProtector.idl>
15 #include <Controller.idl>
16 #include <Waveform.idl>
17
18 /**
19 * PDU Model
20 */
21 module pdumodel {
22
23 /** %Outlet statistics */
24 structure OutletStatistic {
25 int relayCycleCnt; ///< Relay switch count
26 int relayFailCnt; ///< Relay failure count
27 };
28
29 /** %Outlet interface */
30 interface Outlet extends EDevice {
31
32 constant int ERR_OUTLET_NOT_SWITCHABLE = 1; ///< Outlet is not switchable
33 constant int ERR_LOAD_SHEDDING_ACTIVE = 2; ///< Load-shedding is enabled (deprecated)
34 constant int ERR_OUTLET_DISABLED = 3; ///< Outlet is disabled
35 constant int ERR_OUTLET_NOT_OFF = 4; ///< Outlet is on or in power-cylce; unstick not possible
36
37 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
38
39 /** %Outlet metadata */
40 structure MetaData {
41 string label; ///< %Outlet label
42 string receptacleType; ///< Receptacle type
43 Nameplate namePlate; ///< %Nameplate information
44 Rating rating; ///< Numerical usage ratings
45 boolean isSwitchable; ///< \c true if the outlet is switchable
46 boolean isLatching; ///< \c true if the outlet is able to keep its state after power loss
47 int maxRelayCycleCnt; ///< Maximum relay cycle count
48 boolean hasWaveformSupport; ///< Whether waveform reading is supported on this outlet
49 };
50
51 /** %Outlet power state. Used both for switching and representing the current state */
52 enumeration PowerState {
53 PS_OFF, ///< Switch off / Power is off
54 PS_ON ///< Switch on / Power is on
55 };
56
57 /** %Outlet LED state */
58 [deprecated]
59 structure LedState {
60 boolean red; ///< \c true if the red LED is enabled
61 boolean green; ///< \c true if the green LED is enabled
62 boolean blinking; ///< \c true if the LED is blinking
63 };
64
65 /** %Outlet state */
66 structure State {
67 boolean available; ///< powerState is available
68 PowerState powerState; ///< Current power state of outlet
69 ///< (represented by the control state of the relay, which
70 ///< was set by the last command sent to it)
71 boolean switchOnInProgress; ///< \c true if the outlet is pending to be switched on
72 ///< after the sequencing delay has passed.
73 boolean cycleInProgress; ///< \c if a power-cycle is in progress. The outlet will
74 ///< be switched on after the cycle delay has passed.
75 boolean isLoadShed; ///< \c true if the outlet is currently switched off due
76 ///< to being non-critical and load shedding being active
77 boolean isSuspended; ///< Whether the outlet was turned off automatically due to
78 ///< being suspected to have caused an OCP trip event
79 boolean hasInrushWaveform; ///< Whether a valid waveform of last switch-on operation
80 ///< can be read using {@link #getInrushWaveform()}.
81 LedState ledState; ///< LED state (deprecated and always sent as 'off')
82 time lastPowerStateChange; ///< Time of last power state change (UNIX timestamp, UTC)
83 };
84
85 /** %Outlet power state on device startup */
86 enumeration StartupState {
87 SS_ON, ///< %Outlet will be switched on
88 SS_OFF, ///< %Outlet will be switched off
89 SS_LASTKNOWN, ///< Last known power state will be restored
90 SS_PDUDEF ///< Use default state as defined in PDU settings
91 };
92
93 /** %Outlet settings */
94 structure Settings {
95 string name; ///< User-defined name
96 StartupState startupState; ///< Power state after power is applied to the outlet
97 boolean usePduCycleDelay; ///< \c true to use power-cycle delay as defined in PDU settings
98 int cycleDelay; ///< %Outlet-specific power-cycle delay
99 boolean nonCritical; ///< \c true if outlet is non-critical (for load shedding)
100 int sequenceDelay; ///< Delay in ms after this outlet when switching multiple outlets on
101 };
102
103 /** %Outlet sensors */
104 structure Sensors {
105 sensors.NumericSensor voltage; ///< RMS voltage sensor (may be a VoltageMonitoringSensor)
106 sensors.NumericSensor current; ///< RMS current sensor
107 sensors.NumericSensor peakCurrent; ///< Peak current sensor
108 sensors.NumericSensor maximumCurrent; ///< Maximum current sensor
109 sensors.NumericSensor unbalancedCurrent; ///< Current unbalance sensor
110 sensors.NumericSensor activePower; ///< Active power sensor
111 sensors.NumericSensor reactivePower; ///< Reactive power sensor
112 sensors.NumericSensor apparentPower; ///< Apparent power sensor
113 sensors.NumericSensor powerFactor; ///< Power factor sensor
114 sensors.NumericSensor displacementPowerFactor;///< Displacement power factor sensor
115 sensors.NumericSensor activeEnergy; ///< Active energy sensor
116 sensors.NumericSensor apparentEnergy; ///< Apparent energy sensor
117 sensors.NumericSensor phaseAngle; ///< Phase angle sensor
118 sensors.NumericSensor lineFrequency; ///< AC line frequency sensor
119 sensors.NumericSensor crestFactor; ///< Crest factor sensor
120 sensors.NumericSensor voltageThd; ///< Voltage total harmonic distortion sensor
121 sensors.NumericSensor currentThd; ///< Current total harmonic distortion sensor
122 sensors.NumericSensor inrushCurrent; ///< In-rush current occuring after turning outlet on
123 sensors.StateSensor outletState; ///< %Outlet power state sensor
124 };
125
126 /** Event: Power control was initiated */
127 valueobject PowerControlEvent extends event.UserEvent {
128 PowerState state; ///< State the outlet was switched to (if cycle is false)
129 boolean cycle; ///< Whether the outlet was cycled
130 };
131
132 /** Event: Outlet state has changed */
133 valueobject StateChangedEvent extends idl.Event {
134 State oldState; ///< State before change
135 State newState; ///< State after change
136 };
137
138 /** Event: Outlet settings have been changed */
139 valueobject SettingsChangedEvent extends event.UserEvent {
140 Settings oldSettings; ///< Settings before change
141 Settings newSettings; ///< Settings after change
142 };
143
144 /**
145 * Retrieve the outlet metadata.
146 *
147 * @return %Outlet metadata
148 */
149 MetaData getMetaData();
150
151 /**
152 * Get the outlet sensors.
153 *
154 * @return %Outlet sensors
155 */
156 Sensors getSensors();
157
158 /**
159 * Retrieve the outlet state.
160 *
161 * @return %Outlet state
162 */
163 State getState();
164
165 /**
166 * Switch the outlet.
167 *
168 * @param pstate New power state
169 *
170 * @return 0 if OK
171 * @return 1 if the outlet is not switchable
172 * @return 3 if the outlet is disabled
173 */
174 int setPowerState(in PowerState pstate);
175
176 /**
177 * Power-cycle the outlet.
178 *
179 * @return 0 if OK
180 * @return 1 if the outlet is not switchable
181 * @return 3 if the outlet is disabled
182 */
183 int cyclePowerState();
184
185 /**
186 * Retrieve the outlet settings.
187 *
188 * @return %Outlet settings
189 */
190 Settings getSettings();
191
192 /**
193 * Change the outlet settings.
194 *
195 * @param settings New outlet settings
196 *
197 * @return 0 if OK
198 * @return 1 if any parameters are invalid
199 */
200 int setSettings(in Settings settings);
201
202 /**
203 * Get inlet, overcurrent protector and poles.
204 *
205 * @param i Result: %Inlet reference
206 * @param o Result: Overcurrent protector reference
207 * @param p Result: List of poles
208 */
209 void getIOP(out Inlet i, out OverCurrentProtector o, out vector<Pole> p);
210
211 /**
212 * Get the controller for this outlet.
213 *
214 * @return Sub controller reference
215 */
216 Controller getController();
217
218 /**
219 * Get the voltage and current waveforms at the time of last switch on operation.
220 *
221 * @note If waveform reading is not supported or a waveform could not be acquired for other
222 * reasons (e.g. the outlet not actually be switchable, or the outlet board being reset
223 * since the outlet was turned on), an empty waveform is returned.
224 *
225 * @return Waveform samples
226 */
227 Waveform getInrushWaveform();
228
229 /**
230 * Trigger an attempt to un-stick sticking relay contacts
231 *
232 * Warning: Please contact Tech Support before using this.
233 *
234 * Tries repairing relay contacts that are sticked together due to wear
235 * by switching the relay in a certain pattern.
236 * Prior to running this method, the outlet must be in 'off' state
237 * to acknowledge that loads were disconnected.
238 *
239 * @return 0 if unsticking was triggered successfully
240 * @return 1 if outlet is not switchable
241 * @return 3 if the outlet is disabled
242 * @return 4 if relay is in a power cycle or on
243 */
244 int unstick();
245 };
246
247 }
248
249 #endif
pdumodel::Controller
Sub controller interface.
Definition: Controller.idl:26
pdumodel::EDevice
Common base interface for any kind of electrical device that is used in the PDU model,...
Definition: EDevice.idl:27
pdumodel::Inlet
Inlet interface
Definition: Inlet.idl:22
pdumodel::Outlet
Outlet interface
Definition: Outlet.idl:30
pdumodel::Outlet::getState
State getState()
Retrieve the outlet state.
pdumodel::Outlet::setSettings
int setSettings(in Settings settings)
Change the outlet settings.
pdumodel::Outlet::PowerState
PowerState
Outlet power state.
Definition: Outlet.idl:52
pdumodel::Outlet::PS_OFF
@ PS_OFF
Switch off / Power is off.
Definition: Outlet.idl:53
pdumodel::Outlet::setPowerState
int setPowerState(in PowerState pstate)
Switch the outlet.
pdumodel::Outlet::getController
Controller getController()
Get the controller for this outlet.
pdumodel::Outlet::getMetaData
MetaData getMetaData()
Retrieve the outlet metadata.
pdumodel::Outlet::unstick
int unstick()
Trigger an attempt to un-stick sticking relay contacts.
pdumodel::Outlet::getSettings
Settings getSettings()
Retrieve the outlet settings.
pdumodel::Outlet::cyclePowerState
int cyclePowerState()
Power-cycle the outlet.
pdumodel::Outlet::StartupState
StartupState
Outlet power state on device startup
Definition: Outlet.idl:86
pdumodel::Outlet::SS_LASTKNOWN
@ SS_LASTKNOWN
Last known power state will be restored.
Definition: Outlet.idl:89
pdumodel::Outlet::SS_OFF
@ SS_OFF
Outlet will be switched off
Definition: Outlet.idl:88
pdumodel::Outlet::SS_ON
@ SS_ON
Outlet will be switched on
Definition: Outlet.idl:87
pdumodel::Outlet::getSensors
Sensors getSensors()
Get the outlet sensors.
pdumodel::Outlet::getInrushWaveform
Waveform getInrushWaveform()
Get the voltage and current waveforms at the time of last switch on operation.
pdumodel::Outlet::getIOP
void getIOP(out Inlet i, out OverCurrentProtector o, out vector< Pole > p)
Get inlet, overcurrent protector and poles.
pdumodel::OverCurrentProtector
Overcurrent protector interface.
Definition: OverCurrentProtector.idl:27
sensors::NumericSensor
A sensor with numeric readings.
Definition: NumericSensor.idl:17
sensors::StateSensor
Sensor with discrete readings.
Definition: StateSensor.idl:43
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::Nameplate
Component nameplate information.
Definition: Nameplate.idl:23
pdumodel::OutletStatistic
Outlet statistics
Definition: Outlet.idl:24
pdumodel::OutletStatistic::relayFailCnt
int relayFailCnt
Relay failure count.
Definition: Outlet.idl:26
pdumodel::OutletStatistic::relayCycleCnt
int relayCycleCnt
Relay switch count.
Definition: Outlet.idl:25
pdumodel::Outlet::LedState
Outlet LED state
Definition: Outlet.idl:59
pdumodel::Outlet::LedState::green
boolean green
true if the green LED is enabled
Definition: Outlet.idl:61
pdumodel::Outlet::LedState::blinking
boolean blinking
true if the LED is blinking
Definition: Outlet.idl:62
pdumodel::Outlet::LedState::red
boolean red
true if the red LED is enabled
Definition: Outlet.idl:60
pdumodel::Outlet::MetaData
Outlet metadata
Definition: Outlet.idl:40
pdumodel::Outlet::MetaData::label
string label
Outlet label
Definition: Outlet.idl:41
pdumodel::Outlet::MetaData::receptacleType
string receptacleType
Receptacle type.
Definition: Outlet.idl:42
pdumodel::Outlet::MetaData::isSwitchable
boolean isSwitchable
true if the outlet is switchable
Definition: Outlet.idl:45
pdumodel::Outlet::MetaData::rating
Rating rating
Numerical usage ratings.
Definition: Outlet.idl:44
pdumodel::Outlet::MetaData::hasWaveformSupport
boolean hasWaveformSupport
Whether waveform reading is supported on this outlet.
Definition: Outlet.idl:48
pdumodel::Outlet::MetaData::namePlate
Nameplate namePlate
Nameplate information
Definition: Outlet.idl:43
pdumodel::Outlet::MetaData::maxRelayCycleCnt
int maxRelayCycleCnt
Maximum relay cycle count.
Definition: Outlet.idl:47
pdumodel::Outlet::MetaData::isLatching
boolean isLatching
true if the outlet is able to keep its state after power loss
Definition: Outlet.idl:46
pdumodel::Outlet::PowerControlEvent
Event: Power control was initiated.
Definition: Outlet.idl:127
pdumodel::Outlet::PowerControlEvent::cycle
boolean cycle
Whether the outlet was cycled.
Definition: Outlet.idl:129
pdumodel::Outlet::PowerControlEvent::state
PowerState state
State the outlet was switched to (if cycle is false)
Definition: Outlet.idl:128
pdumodel::Outlet::Sensors
Outlet sensors
Definition: Outlet.idl:104
pdumodel::Outlet::Sensors::activeEnergy
sensors::NumericSensor activeEnergy
Active energy sensor.
Definition: Outlet.idl:115
pdumodel::Outlet::Sensors::powerFactor
sensors::NumericSensor powerFactor
Power factor sensor.
Definition: Outlet.idl:113
pdumodel::Outlet::Sensors::voltage
sensors::NumericSensor voltage
RMS voltage sensor (may be a VoltageMonitoringSensor)
Definition: Outlet.idl:105
pdumodel::Outlet::Sensors::peakCurrent
sensors::NumericSensor peakCurrent
Peak current sensor.
Definition: Outlet.idl:107
pdumodel::Outlet::Sensors::phaseAngle
sensors::NumericSensor phaseAngle
Phase angle sensor.
Definition: Outlet.idl:117
pdumodel::Outlet::Sensors::lineFrequency
sensors::NumericSensor lineFrequency
AC line frequency sensor.
Definition: Outlet.idl:118
pdumodel::Outlet::Sensors::activePower
sensors::NumericSensor activePower
Active power sensor.
Definition: Outlet.idl:110
pdumodel::Outlet::Sensors::current
sensors::NumericSensor current
RMS current sensor.
Definition: Outlet.idl:106
pdumodel::Outlet::Sensors::crestFactor
sensors::NumericSensor crestFactor
Crest factor sensor.
Definition: Outlet.idl:119
pdumodel::Outlet::Sensors::inrushCurrent
sensors::NumericSensor inrushCurrent
In-rush current occuring after turning outlet on.
Definition: Outlet.idl:122
pdumodel::Outlet::Sensors::displacementPowerFactor
sensors::NumericSensor displacementPowerFactor
Displacement power factor sensor.
Definition: Outlet.idl:114
pdumodel::Outlet::Sensors::voltageThd
sensors::NumericSensor voltageThd
Voltage total harmonic distortion sensor.
Definition: Outlet.idl:120
pdumodel::Outlet::Sensors::apparentPower
sensors::NumericSensor apparentPower
Apparent power sensor.
Definition: Outlet.idl:112
pdumodel::Outlet::Sensors::apparentEnergy
sensors::NumericSensor apparentEnergy
Apparent energy sensor.
Definition: Outlet.idl:116
pdumodel::Outlet::Sensors::unbalancedCurrent
sensors::NumericSensor unbalancedCurrent
Current unbalance sensor.
Definition: Outlet.idl:109
pdumodel::Outlet::Sensors::outletState
sensors::StateSensor outletState
Outlet power state sensor
Definition: Outlet.idl:123
pdumodel::Outlet::Sensors::maximumCurrent
sensors::NumericSensor maximumCurrent
Maximum current sensor.
Definition: Outlet.idl:108
pdumodel::Outlet::Sensors::reactivePower
sensors::NumericSensor reactivePower
Reactive power sensor.
Definition: Outlet.idl:111
pdumodel::Outlet::Sensors::currentThd
sensors::NumericSensor currentThd
Current total harmonic distortion sensor.
Definition: Outlet.idl:121
pdumodel::Outlet::SettingsChangedEvent
Event: Outlet settings have been changed.
Definition: Outlet.idl:139
pdumodel::Outlet::SettingsChangedEvent::newSettings
Settings newSettings
Settings after change.
Definition: Outlet.idl:141
pdumodel::Outlet::SettingsChangedEvent::oldSettings
Settings oldSettings
Settings before change.
Definition: Outlet.idl:140
pdumodel::Outlet::Settings
Outlet settings
Definition: Outlet.idl:94
pdumodel::Outlet::Settings::name
string name
User-defined name.
Definition: Outlet.idl:95
pdumodel::Outlet::Settings::startupState
StartupState startupState
Power state after power is applied to the outlet.
Definition: Outlet.idl:96
pdumodel::Outlet::Settings::nonCritical
boolean nonCritical
true if outlet is non-critical (for load shedding)
Definition: Outlet.idl:99
pdumodel::Outlet::Settings::cycleDelay
int cycleDelay
Outlet-specific power-cycle delay
Definition: Outlet.idl:98
pdumodel::Outlet::Settings::sequenceDelay
int sequenceDelay
Delay in ms after this outlet when switching multiple outlets on.
Definition: Outlet.idl:100
pdumodel::Outlet::Settings::usePduCycleDelay
boolean usePduCycleDelay
true to use power-cycle delay as defined in PDU settings
Definition: Outlet.idl:97
pdumodel::Outlet::StateChangedEvent
Event: Outlet state has changed.
Definition: Outlet.idl:133
pdumodel::Outlet::StateChangedEvent::newState
State newState
State after change.
Definition: Outlet.idl:135
pdumodel::Outlet::StateChangedEvent::oldState
State oldState
State before change.
Definition: Outlet.idl:134
pdumodel::Outlet::State
Outlet state
Definition: Outlet.idl:66
pdumodel::Outlet::State::isLoadShed
boolean isLoadShed
true if the outlet is currently switched off due to being non-critical and load shedding being active
Definition: Outlet.idl:75
pdumodel::Outlet::State::cycleInProgress
boolean cycleInProgress
if a power-cycle is in progress.
Definition: Outlet.idl:73
pdumodel::Outlet::State::hasInrushWaveform
boolean hasInrushWaveform
Whether a valid waveform of last switch-on operation can be read using getInrushWaveform().
Definition: Outlet.idl:79
pdumodel::Outlet::State::ledState
LedState ledState
LED state (deprecated and always sent as 'off')
Definition: Outlet.idl:81
pdumodel::Outlet::State::isSuspended
boolean isSuspended
Whether the outlet was turned off automatically due to being suspected to have caused an OCP trip eve...
Definition: Outlet.idl:77
pdumodel::Outlet::State::switchOnInProgress
boolean switchOnInProgress
true if the outlet is pending to be switched on after the sequencing delay has passed.
Definition: Outlet.idl:71
pdumodel::Outlet::State::powerState
PowerState powerState
Current power state of outlet (represented by the control state of the relay, which was set by the la...
Definition: Outlet.idl:68
pdumodel::Outlet::State::lastPowerStateChange
time lastPowerStateChange
Time of last power state change (UNIX timestamp, UTC)
Definition: Outlet.idl:82
pdumodel::Outlet::State::available
boolean available
powerState is available
Definition: Outlet.idl:67
pdumodel::Rating
Numerical usage ratings.
Definition: Nameplate.idl:15
pdumodel::Waveform
Waveform data, including metadata.
Definition: Waveform.idl:12