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 */
160
161 /**
162 * Get the outlet sensors.
163 *
164 * @return %Outlet sensors
165 */
167
168 /**
169 * Retrieve the outlet state.
170 *
171 * @return %Outlet state
172 */
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 */
196
197 /**
198 * Retrieve the outlet settings.
199 *
200 * @return %Outlet settings
201 */
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 */
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 */
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
Sub controller interface.
Definition: Controller.idl:26
Common base interface for any kind of electrical device that is used in the PDU model,...
Definition: EDevice.idl:27
Inlet interface
Definition: Inlet.idl:22
Outlet interface
Definition: Outlet.idl:30
State getState()
Retrieve the outlet state.
int setSettings(in Settings settings)
Change the outlet settings.
PowerState
Outlet power state.
Definition: Outlet.idl:56
@ PS_OFF
Switch off / Power is off.
Definition: Outlet.idl:57
int setPowerState(in PowerState pstate)
Switch the outlet.
Controller getController()
Get the controller for this outlet.
MetaData getMetaData()
Retrieve the outlet metadata.
int setServiceModeEnabled(in boolean enabled)
Enable or disable service mode on this outlet.
int unstick()
Trigger an attempt to un-stick sticking relay contacts.
Settings getSettings()
Retrieve the outlet settings.
int cyclePowerState()
Power-cycle the outlet.
StartupState
Outlet power state on device startup
Definition: Outlet.idl:91
@ SS_LASTKNOWN
Last known power state will be restored.
Definition: Outlet.idl:94
@ SS_OFF
Outlet will be switched off
Definition: Outlet.idl:93
@ SS_ON
Outlet will be switched on
Definition: Outlet.idl:92
Sensors getSensors()
Get the outlet sensors.
Waveform getInrushWaveform()
Get the voltage and current waveforms at the time of last switch on operation.
void getIOP(out Inlet i, out OverCurrentProtector o, out vector< Pole > p)
Get inlet, overcurrent protector and poles.
Overcurrent protector interface.
A sensor with numeric readings.
Sensor with discrete readings.
Definition: StateSensor.idl:43
Basic IDL definitions.
Definition: Event.idl:10
PDU Model.
Definition: Ade.idl:12
Sensors Model.
Common base for all events.
Definition: Event.idl:13
Component nameplate information.
Definition: Nameplate.idl:23
Outlet statistics
Definition: Outlet.idl:24
int relayFailCnt
Relay failure count.
Definition: Outlet.idl:26
int relayCycleCnt
Relay switch count.
Definition: Outlet.idl:25
Outlet LED state
Definition: Outlet.idl:63
boolean green
true if the green LED is enabled
Definition: Outlet.idl:65
boolean blinking
true if the LED is blinking
Definition: Outlet.idl:66
boolean red
true if the red LED is enabled
Definition: Outlet.idl:64
Outlet metadata
Definition: Outlet.idl:43
string label
Outlet label
Definition: Outlet.idl:44
string receptacleType
Receptacle type.
Definition: Outlet.idl:45
boolean isSwitchable
true if the outlet is switchable
Definition: Outlet.idl:48
Rating rating
Numerical usage ratings.
Definition: Outlet.idl:47
boolean hasWaveformSupport
Whether waveform reading is supported on this outlet.
Definition: Outlet.idl:51
Nameplate namePlate
Nameplate information
Definition: Outlet.idl:46
int maxRelayCycleCnt
Maximum relay cycle count.
Definition: Outlet.idl:50
boolean hasServiceModeSupport
Whether service mode is supported on this outlet.
Definition: Outlet.idl:52
boolean isLatching
true if the outlet is able to keep its state after power loss
Definition: Outlet.idl:49
Event: Power control was initiated.
Definition: Outlet.idl:132
boolean cycle
Whether the outlet was cycled.
Definition: Outlet.idl:134
PowerState state
State the outlet was switched to (if cycle is false)
Definition: Outlet.idl:133
Outlet sensors
Definition: Outlet.idl:109
sensors::NumericSensor activeEnergy
Active energy sensor.
Definition: Outlet.idl:120
sensors::NumericSensor powerFactor
Power factor sensor.
Definition: Outlet.idl:118
sensors::NumericSensor voltage
RMS voltage sensor (may be a VoltageMonitoringSensor)
Definition: Outlet.idl:110
sensors::NumericSensor peakCurrent
Peak current sensor.
Definition: Outlet.idl:112
sensors::NumericSensor phaseAngle
Phase angle sensor.
Definition: Outlet.idl:122
sensors::NumericSensor lineFrequency
AC line frequency sensor.
Definition: Outlet.idl:123
sensors::NumericSensor activePower
Active power sensor.
Definition: Outlet.idl:115
sensors::NumericSensor current
RMS current sensor.
Definition: Outlet.idl:111
sensors::NumericSensor crestFactor
Crest factor sensor.
Definition: Outlet.idl:124
sensors::NumericSensor inrushCurrent
In-rush current occuring after turning outlet on.
Definition: Outlet.idl:127
sensors::NumericSensor displacementPowerFactor
Displacement power factor sensor.
Definition: Outlet.idl:119
sensors::NumericSensor voltageThd
Voltage total harmonic distortion sensor.
Definition: Outlet.idl:125
sensors::NumericSensor apparentPower
Apparent power sensor.
Definition: Outlet.idl:117
sensors::NumericSensor apparentEnergy
Apparent energy sensor.
Definition: Outlet.idl:121
sensors::NumericSensor unbalancedCurrent
Current unbalance sensor.
Definition: Outlet.idl:114
sensors::StateSensor outletState
Outlet power state sensor
Definition: Outlet.idl:128
sensors::NumericSensor maximumCurrent
Maximum current sensor.
Definition: Outlet.idl:113
sensors::NumericSensor reactivePower
Reactive power sensor.
Definition: Outlet.idl:116
sensors::NumericSensor currentThd
Current total harmonic distortion sensor.
Definition: Outlet.idl:126
Event: Service mode has been changed.
Definition: Outlet.idl:150
boolean enabled
Whether service mode is enabled after the change.
Definition: Outlet.idl:151
Event: Outlet settings have been changed.
Definition: Outlet.idl:144
Settings newSettings
Settings after change.
Definition: Outlet.idl:146
Settings oldSettings
Settings before change.
Definition: Outlet.idl:145
Outlet settings
Definition: Outlet.idl:99
string name
User-defined name.
Definition: Outlet.idl:100
StartupState startupState
Power state after power is applied to the outlet.
Definition: Outlet.idl:101
boolean nonCritical
true if outlet is non-critical (for load shedding)
Definition: Outlet.idl:104
int cycleDelay
Outlet-specific power-cycle delay
Definition: Outlet.idl:103
int sequenceDelay
Delay in ms after this outlet when switching multiple outlets on.
Definition: Outlet.idl:105
boolean usePduCycleDelay
true to use power-cycle delay as defined in PDU settings
Definition: Outlet.idl:102
Event: Outlet state has changed.
Definition: Outlet.idl:138
State newState
State after change.
Definition: Outlet.idl:140
State oldState
State before change.
Definition: Outlet.idl:139
Outlet state
Definition: Outlet.idl:70
boolean isLoadShed
true if the outlet is currently switched off due to being non-critical and load shedding being active
Definition: Outlet.idl:79
boolean cycleInProgress
if a power-cycle is in progress.
Definition: Outlet.idl:77
boolean hasInrushWaveform
Whether a valid waveform of last switch-on operation can be read using getInrushWaveform().
Definition: Outlet.idl:83
LedState ledState
LED state (deprecated and always sent as 'off')
Definition: Outlet.idl:86
boolean inServiceMode
Whether the outlet is currently placed into service mode.
Definition: Outlet.idl:85
boolean isSuspended
Whether the outlet was turned off automatically due to being suspected to have caused an OCP trip eve...
Definition: Outlet.idl:81
boolean switchOnInProgress
true if the outlet is pending to be switched on after the sequencing delay has passed.
Definition: Outlet.idl:75
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
time lastPowerStateChange
Time of last power state change (UNIX timestamp, UTC)
Definition: Outlet.idl:87
boolean available
powerState is available
Definition: Outlet.idl:71
Numerical usage ratings.
Definition: Nameplate.idl:15
Waveform data, including metadata.
Definition: Waveform.idl:12