Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

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