Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
Pdu.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2009 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __PDUMODEL_PDU_IDL__
7#define __PDUMODEL_PDU_IDL__
8
9#include <Nameplate.idl>
10#include <Outlet.idl>
11#include <PeripheralDeviceSlot.idl>
12#include <PeripheralDeviceManager.idl>
13#include <Port.idl>
14#include <OverCurrentProtector.idl>
15#include <Inlet.idl>
16#include <TransferSwitch.idl>
17#include <StateSensor.idl>
18#include <SensorLogger.idl>
19#include <Controller.idl>
20#include <InternalBeeper.idl>
21#include <AlertedSensorManager.idl>
22#include <PowerBus.idl>
23#include <PowerShelfManager.idl>
24
25/**
26 * PDU Model
27 */
28module pdumodel {
29
30 /** Main PDU interface */
31 interface Pdu {
32
33 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
34
35 /** PDU orientations */
36 enumeration PduOrientation {
37 PO_NONE, ///< No PDU orientation (non-reversible ETO, default)
38 PO_BOTTOMFEED, ///< Bottom feed PDU orientation (reversible ETO, normal order)
39 PO_TOPFEED ///< Top feed PDU orientation (reversible ETO, reversed order)
40 };
41
42 /** PDU inlet fallback wiring (if no detection is possible) */
43 enumeration InletWiring {
44 IW_AUTO_DETECT, ///< Autodetect inlet wiring
45 IW_SINGLE_PHASE, ///< Single phase inlet wiring
46 IW_WYE, ///< Three phase wye inlet wiring
47 IW_DELTA ///< Three phase delta inlet wiring
48 };
49
50 /** PDU metadata */
51 structure MetaData {
52 Nameplate nameplate; ///< %Nameplate information
53 string ctrlBoardSerial; ///< Main controller serial number
54 string hwRevision; ///< Hardware revision
55 string fwRevision; ///< Firmware revision
56 string macAddress; ///< MAC address
57 boolean hasSwitchableOutlets; ///< \c true if at least one outlet is switchable
58 boolean hasMeteredOutlets; ///< \c true if at least one outlet is metered
59 boolean hasLatchingOutletRelays; ///< \c true if at least one outlet has a latching relay
60 boolean isInlineMeter; ///< \c true if all inlets have exactly one outlet
61 boolean isEnergyPulseSupported; ///< \c true if the PDU has one or more LED(s) capable
62 ///< of emitting pulses to measure consumed energy
63 boolean hasDCInlets; ///< \c true if at least one inlet is DC
64 PduOrientation pduOrientation; ///< PDU orientation at boot
65 vector<InletWiring> supportedInletWirings; ///< Supported inlet wiring settings
66 };
67
68 /** PDU sensors */
69 structure Sensors {
70 vector<sensors.StateSensor> powerSupplyStatus; ///< Power supply fault status
71 sensors.NumericSensor activePower; ///< Active power sensor
72 sensors.NumericSensor apparentPower; ///< Active power sensor
73 sensors.NumericSensor activeEnergy; ///< Active energy sensor
74 sensors.NumericSensor apparentEnergy; ///< Active energy sensor
75 };
76
77 /** PDU statistics */
78 structure Statistic {
79 vector<CircuitBreakerStatistic> cbStats; ///< Circuit breaker statistics
80 vector<CtrlStatistic> ctrlStats; ///< Sub controller statistics
81 vector<OutletStatistic> outletStats; ///< %Outlet statistics
82 peripheral.DeviceManager.Statistics peripheralStats; ///< Peripheral device statistics
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 ///< Restore last known power state
90 };
91
92 /** PDU settings */
93 [sparse_in]
94 structure Settings {
95 string name; ///< User-defined name
96 StartupState startupState; ///< Default outlet state after applying power to outlets; can be overridden per outlet
97 int cycleDelay; ///< Default power-cycle interval in seconds; can be overridden per outlet
98 int inRushGuardDelay; ///< Minimum delay in milliseconds between switching two outlets on
99 vector<int> outletPowerStateSequence; ///< The order in which multiple outlets should be switched.
100 ///< Format: List of outlet numbers (0-based), empty for default.
101 ///< \n Affects the following functions:
102 ///< \li \c setAllOutletPowerStates
103 ///< \li \c cycleAllOutletPowerStates
104 ///< \li \c setMultipleOutletPowerStates
105 ///< \li \c cycleMultipleOutletPowerStates
106 int powerOnDelay; ///< Delay in seconds before restoring outlet states after power is applied to outlets
107 boolean latchingRelays; ///< If true, relays keep their state during power-cycling
108 boolean energyPulseEnabled; ///< Enables energy consumption counting using the PDU's LED(s)
109 int energyPulsesPerKWh; ///< Ratio between LED pulses and energy consumption
110 int demandUpdateInterval; ///< BCM2 only: Update interval in seconds for demand sensors
111 int demandAveragingIntervals; ///< BCM2 only: Average demand sensors over this many update intervals
112 boolean suspendTripCauseOutlets; ///< If true, outlets suspected to have caused an OCP to trip are
113 ///< automatically suspended (turned off)
114 boolean inhibitRelayControl; ///< If true, all relay control methods are disabled
115 InletWiring inletWiring; ///< Sets the preferred fallback wiring for all inlets (in case detection fails)
116 };
117
118 /** %Outlet sequencing status */
120 boolean sequenceRunning; ///< \c true if an outlet sequence is currently running
121 int nextOutletToSwitch; ///< Number (0-based) of the next outlet in the sequence
122 int timeUntilNextSwitch; ///< Time in milliseconds before the next outlet is switched
123 int outletsRemaining; ///< Number of outlets remaining in the sequence
124 int cancelableOutletsRemaining; ///< Number of outlets remaining whose switch operation can be canceled
125 ///< (non-cancelable operations won't be affected by canceling the sequence)
126 };
127
128 /** Port with id and properties, used in PortAppearedEvent and getPorts() */
130 string id; ///< this id corresponds to portID in PortDisappearedEvent
131 portsmodel.Port port; ///< the appeared port
132 portsmodel.Port.Properties properties; ///< actual properties of appeared port
133 };
134
135 /** Event: PDU settings have been changed */
136 valueobject SettingsChangedEvent extends event.UserEvent {
137 Settings oldSettings; ///< Settings before change
138 Settings newSettings; ///< Settings after change
139 };
140
141 /** Event: Load shedding mode was enabled or disabled */
142 valueobject LoadSheddingModeChangedEvent extends event.UserEvent {
143 boolean enabled; ///< Whether load shedding mode is enabled after the change
144 };
145
146 /** Event: Outlet sequencing state has changed */
148 OutletSequenceState newState; ///< New sequencing state
149 };
150
151 /** Event: Serial port has appeared */
152 valueobject PortAppearedEvent extends idl.Event {
153 PortWithProperties port; ///< port with id and actual properties
154 };
155
156 /** Event: Serial port has disappeared */
157 valueobject PortDisappearedEvent extends idl.Event {
158 string portId; ///< this id corresponds to port id used in PortAppearedEvent and getPorts()
159 };
160
161 /**
162 * Retrieve the PDU nameplate information.
163 *
164 * @return Nameplate information
165 */
167
168 /**
169 * Retrieve the PDU metadata.
170 *
171 * @return PDU metadata
172 */
174
175 /**
176 * Retrieve the PDU sensors.
177 *
178 * @return PDU sensors
179 */
181
182 /**
183 * Get the sensor logger.
184 *
185 * @return Sensor logger reference
186 */
188
189 /**
190 * Get the alerted sensor manager.
191 *
192 * @return Alerted sensor manager
193 */
195
196 /**
197 * Get the list of sub controllers.
198 *
199 * @return List of sub controllers
200 */
201 vector<Controller> getControllers();
202
203 /**
204 * Get the list of outlets.
205 *
206 * @return List of outlets, indexed by their number (0-based)
207 */
208 vector<Outlet> getOutlets();
209
210 /**
211 * Get the list of overcurrent protectors.
212 *
213 * @return List of OCPs, indexed by their number (0-based)
214 */
215 vector<OverCurrentProtector> getOverCurrentProtectors();
216
217 /**
218 * Get the list of inlets.
219 *
220 * @return List of inlets, indexed by their number (0-based)
221 */
222 vector<Inlet> getInlets();
223
224 /**
225 * Returns list of Transfer Switches.
226 * This list may be empty.
227 */
228 vector<TransferSwitch> getTransferSwitches();
229
230 /**
231 * Get the peripheral device manager.
232 *
233 * @return Peripheral device manager
234 */
236
237 /**
238 * Get the built-in beeper, if there is any.
239 *
240 * @return Beeper interface
241 */
243
244 /**
245 * Retrieve the PDU settings.
246 *
247 * @return PDU settings
248 */
250
251 /**
252 * Retrieve the current load shedding state.
253 *
254 * @return \c true if load shedding is currently enabled
255 */
257
258 /**
259 * Change the PDU settings.
260 *
261 * @param settings New PDU settings
262 *
263 * @return 0 if OK
264 * @return 1 if any parameters are invalid
265 *
266 * @note The Settings structure can be "sparse"; fields missing in the
267 * JSON representation will remain unchanged.
268 */
269 int setSettings(in Settings settings);
270
271 /**
272 * Enable or disable load shedding.
273 *
274 * @param active \c true to enable, \c false to disable load shedding
275 */
276 void setLoadSheddingActive(in boolean active);
277
278 /**
279 * Get all feature ports of this device
280 *
281 * This returns an entry for all feature ports, no matter whether
282 * something is connected or not.
283 * A device with n feature ports will return n entries here.
284 *
285 * @return List of all Feature Ports
286 */
288
289 /**
290 * Get all sensor ports of this device
291 *
292 * This returns an entry for all sensor ports, no matter whether
293 * something is connected or not.
294 * A device with n sensor ports will return n entries here.
295 *
296 * @return List of all Sensor Ports
297 */
299
300 /**
301 * Get all remote hub ports of this device
302 *
303 * This returns an entry for all remote hub ports, no matter whether
304 * something is connected or not.
305 * A device with n remote hub ports will return n entries here.
306 *
307 * @return List of all Remote Hub Ports
308 */
310
311 /**
312 * Get all serial ports of this device using filters
313 *
314 * This returns an entry for all detected ports, no matter whether
315 * something is connected or not. The ports may be filtered by
316 * peripheral.PortType and/or supported device type portsmodel.Port.DeviceTypeId.
317 *
318 * @param portType filter for port type, or use peripheral.PortType.UNSPECIFIED
319 * @param devType filter the ports that support a specific device, or use portsmodel.Port.DeviceTypeId.UNSPECIFIED
320 *
321 * @return List of ports with id and properties.
322 */
323 vector<PortWithProperties> getPorts(in peripheral.PortType portType, in portsmodel.Port.DeviceTypeId devType);
324
325 /**
326 * Get the power shelf manager instance of this PDU
327 *
328 * @return Power shelf manager if this PDU is a power shelf
329 */
331
332 /**
333 * Enter RS485 config mode and assign an address to a relay board.
334 * @warning This is dangerous! Do not use except for manufacturing.
335 *
336 * @param addr New relay board address
337 *
338 * @return 0 if OK
339 * @return 1 if any parameters are invalid
340 */
342
343 /**
344 * Enter RS485 config mode and assign an address to a sub controller
345 * device with a given device ID.
346 * @warning This is dangerous! Do not use except for manufacturing.
347 *
348 * @param deviceId Device id of the sub controller
349 * which is supposed to get the address
350 * @param addr New relay board address
351 *
352 * @return 0 if OK
353 * @return 1 if any parameters are invalid
354 */
355 int enterRS485ConfigModeAndAssignSCBoardAddress(in int deviceId, in int addr);
356
357 /**
358 * Leave RS485 config mode.
359 *
360 * @return 0 if OK
361 */
363
364 /**
365 * Switch all outlets.
366 *
367 * @param pstate New power state for all outlets
368 *
369 * @return 0 if OK
370 * @return 5 if relay control is disabled in the PDU settings
371 */
373
374 /**
375 * Switch multiple outlets.
376 *
377 * @param outletNumbers List of outlet numbers (0-based)
378 * @param state New power state for all outlets in list
379 * @param respectSequence \c true to switch in defined sequence order
380 *
381 * @return 0 if OK
382 * @return 3 if any of the selected outlets is disabled
383 * @return 5 if relay control is disabled in the PDU settings
384 */
385 int setMultipleOutletPowerStates(in vector<int> outletNumbers,
386 in Outlet.PowerState state,
387 in boolean respectSequence);
388
389 /**
390 * Power-cycle all outlets.
391 *
392 * @return 0 if OK
393 * @return 5 if relay control is disabled in the PDU settings
394 */
396
397 /**
398 * Power-cycle multiple outlets.
399 *
400 * @param outletNumbers List of outlet numbers (0-based)
401 * @param respectSequence \c true to switch in defined sequence order
402 *
403 * @return 0 if OK
404 * @return 3 if any of the selected outlets is disabled
405 * @return 5 if relay control is disabled in the PDU settings
406 */
407 int cycleMultipleOutletPowerStates(in vector<int> outletNumbers,
408 in boolean respectSequence);
409
410 /**
411 * Retrieve PDU statistics.
412 *
413 * @return PDU statistics
414 */
416
417 /**
418 * Retrieve the current outlet sequencing status.
419 *
420 * @return Sequencing status
421 */
423
424 /**
425 * Stop a currently running outlet sequence.
426 */
428 };
429
430}
431
432#endif
Internal beeper interface.
Outlet interface
Definition Outlet.idl:30
PowerState
Outlet power state.
Definition Outlet.idl:56
Main PDU interface.
Definition Pdu.idl:31
Sensors getSensors()
Retrieve the PDU sensors.
int cycleMultipleOutletPowerStates(in vector< int > outletNumbers, in boolean respectSequence)
Power-cycle multiple outlets.
hmi::InternalBeeper getBeeper()
Get the built-in beeper, if there is any.
int leaveRS485ConfigMode()
Leave RS485 config mode.
vector< Controller > getControllers()
Get the list of sub controllers.
sensors::Logger getSensorLogger()
Get the sensor logger.
vector< Inlet > getInlets()
Get the list of inlets.
vector< PortWithProperties > getPorts(in peripheral::PortType portType, in portsmodel.Port.DeviceTypeId devType)
Get all serial ports of this device using filters.
boolean isLoadSheddingActive()
Retrieve the current load shedding state.
int setAllOutletPowerStates(in Outlet::PowerState pstate)
Switch all outlets.
Settings getSettings()
Retrieve the PDU settings.
PduOrientation
PDU orientations.
Definition Pdu.idl:36
@ PO_TOPFEED
Top feed PDU orientation (reversible ETO, reversed order)
Definition Pdu.idl:39
@ PO_BOTTOMFEED
Bottom feed PDU orientation (reversible ETO, normal order)
Definition Pdu.idl:38
@ PO_NONE
No PDU orientation (non-reversible ETO, default)
Definition Pdu.idl:37
vector< OverCurrentProtector > getOverCurrentProtectors()
Get the list of overcurrent protectors.
int enterRS485ConfigModeAndAssignSCBoardAddress(in int deviceId, in int addr)
Enter RS485 config mode and assign an address to a sub controller device with a given device ID.
vector< portsmodel::Port > getFeaturePorts()
Get all feature ports of this device.
void cancelOutletSequence()
Stop a currently running outlet sequence.
int setMultipleOutletPowerStates(in vector< int > outletNumbers, in Outlet::PowerState state, in boolean respectSequence)
Switch multiple outlets.
vector< portsmodel::Port > getRemoteHubPorts()
Get all remote hub ports of this device.
StartupState
Outlet power state on device startup
Definition Pdu.idl:86
@ SS_LASTKNOWN
Restore last known power state.
Definition Pdu.idl:89
@ SS_ON
Outlet will be switched on
Definition Pdu.idl:87
@ SS_OFF
Outlet will be switched off
Definition Pdu.idl:88
vector< Outlet > getOutlets()
Get the list of outlets.
int setSettings(in Settings settings)
Change the PDU settings.
PowerShelfManager getPowerShelfManager()
Get the power shelf manager instance of this PDU.
peripheral::DeviceManager getPeripheralDeviceManager()
Get the peripheral device manager.
Nameplate getNameplate()
Retrieve the PDU nameplate information.
OutletSequenceState getOutletSequenceState()
Retrieve the current outlet sequencing status.
sensors::AlertedSensorManager getAlertedSensorManager()
Get the alerted sensor manager.
int enterRS485ConfigModeAndAssignCtrlBoardAddress(in int addr)
Enter RS485 config mode and assign an address to a relay board.
constant int ERR_INVALID_PARAM
Invalid parameters.
Definition Pdu.idl:33
void setLoadSheddingActive(in boolean active)
Enable or disable load shedding.
vector< portsmodel::Port > getSensorPorts()
Get all sensor ports of this device.
int cycleAllOutletPowerStates()
Power-cycle all outlets.
InletWiring
PDU inlet fallback wiring (if no detection is possible)
Definition Pdu.idl:43
@ IW_DELTA
Three phase delta inlet wiring.
Definition Pdu.idl:47
@ IW_AUTO_DETECT
Autodetect inlet wiring.
Definition Pdu.idl:44
@ IW_SINGLE_PHASE
Single phase inlet wiring.
Definition Pdu.idl:45
@ IW_WYE
Three phase wye inlet wiring.
Definition Pdu.idl:46
Statistic getStatistic()
Retrieve PDU statistics.
MetaData getMetaData()
Retrieve the PDU metadata.
vector< TransferSwitch > getTransferSwitches()
Returns list of Transfer Switches.
Power shelf management interface.
Peripheral Device Manager.
Port interface.
Definition Port.idl:19
DeviceTypeId
devices types that may be connected to port
Definition Port.idl:35
A global instance keeping track of sensors in alerted state.
Sensor logger interface.
A sensor with numeric readings.
Sensor with discrete readings.
Human Machine Interface.
Basic IDL definitions.
Definition Event.idl:10
PDU Model.
Definition Circuit.idl:16
Peripheral Devices.
Ports.
Definition Port.idl:16
Common base for all events.
Definition Event.idl:13
Component nameplate information.
Definition Nameplate.idl:23
Event: Load shedding mode was enabled or disabled.
Definition Pdu.idl:142
boolean enabled
Whether load shedding mode is enabled after the change.
Definition Pdu.idl:143
PDU metadata.
Definition Pdu.idl:51
boolean hasDCInlets
true if at least one inlet is DC
Definition Pdu.idl:63
boolean hasSwitchableOutlets
true if at least one outlet is switchable
Definition Pdu.idl:57
boolean hasMeteredOutlets
true if at least one outlet is metered
Definition Pdu.idl:58
boolean isEnergyPulseSupported
true if the PDU has one or more LED(s) capable of emitting pulses to measure consumed energy
Definition Pdu.idl:61
vector< InletWiring > supportedInletWirings
Supported inlet wiring settings.
Definition Pdu.idl:65
boolean isInlineMeter
true if all inlets have exactly one outlet
Definition Pdu.idl:60
boolean hasLatchingOutletRelays
true if at least one outlet has a latching relay
Definition Pdu.idl:59
PduOrientation pduOrientation
PDU orientation at boot.
Definition Pdu.idl:64
string hwRevision
Hardware revision.
Definition Pdu.idl:54
Nameplate nameplate
Nameplate information
Definition Pdu.idl:52
string fwRevision
Firmware revision.
Definition Pdu.idl:55
string macAddress
MAC address.
Definition Pdu.idl:56
string ctrlBoardSerial
Main controller serial number.
Definition Pdu.idl:53
Event: Outlet sequencing state has changed.
Definition Pdu.idl:147
OutletSequenceState newState
New sequencing state.
Definition Pdu.idl:148
Outlet sequencing status
Definition Pdu.idl:119
int cancelableOutletsRemaining
Number of outlets remaining whose switch operation can be canceled (non-cancelable operations won't b...
Definition Pdu.idl:124
int timeUntilNextSwitch
Time in milliseconds before the next outlet is switched.
Definition Pdu.idl:122
int outletsRemaining
Number of outlets remaining in the sequence.
Definition Pdu.idl:123
boolean sequenceRunning
true if an outlet sequence is currently running
Definition Pdu.idl:120
int nextOutletToSwitch
Number (0-based) of the next outlet in the sequence.
Definition Pdu.idl:121
Event: Serial port has appeared.
Definition Pdu.idl:152
PortWithProperties port
port with id and actual properties
Definition Pdu.idl:153
Event: Serial port has disappeared.
Definition Pdu.idl:157
string portId
this id corresponds to port id used in PortAppearedEvent and getPorts()
Definition Pdu.idl:158
Port with id and properties, used in PortAppearedEvent and getPorts()
Definition Pdu.idl:129
string id
this id corresponds to portID in PortDisappearedEvent
Definition Pdu.idl:130
portsmodel::Port port
the appeared port
Definition Pdu.idl:131
portsmodel::Port Properties properties
actual properties of appeared port
Definition Pdu.idl:132
PDU sensors.
Definition Pdu.idl:69
sensors::NumericSensor apparentEnergy
Active energy sensor.
Definition Pdu.idl:74
vector< sensors::StateSensor > powerSupplyStatus
Power supply fault status.
Definition Pdu.idl:70
sensors::NumericSensor apparentPower
Active power sensor.
Definition Pdu.idl:72
sensors::NumericSensor activeEnergy
Active energy sensor.
Definition Pdu.idl:73
sensors::NumericSensor activePower
Active power sensor.
Definition Pdu.idl:71
Event: PDU settings have been changed.
Definition Pdu.idl:136
Settings oldSettings
Settings before change.
Definition Pdu.idl:137
Settings newSettings
Settings after change.
Definition Pdu.idl:138
PDU settings.
Definition Pdu.idl:94
string name
User-defined name.
Definition Pdu.idl:95
vector< int > outletPowerStateSequence
The order in which multiple outlets should be switched.
Definition Pdu.idl:99
int cycleDelay
Default power-cycle interval in seconds; can be overridden per outlet.
Definition Pdu.idl:97
int inRushGuardDelay
Minimum delay in milliseconds between switching two outlets on.
Definition Pdu.idl:98
int powerOnDelay
Delay in seconds before restoring outlet states after power is applied to outlets.
Definition Pdu.idl:106
boolean inhibitRelayControl
If true, all relay control methods are disabled.
Definition Pdu.idl:114
boolean suspendTripCauseOutlets
If true, outlets suspected to have caused an OCP to trip are automatically suspended (turned off)
Definition Pdu.idl:112
int energyPulsesPerKWh
Ratio between LED pulses and energy consumption.
Definition Pdu.idl:109
boolean energyPulseEnabled
Enables energy consumption counting using the PDU's LED(s)
Definition Pdu.idl:108
boolean latchingRelays
If true, relays keep their state during power-cycling.
Definition Pdu.idl:107
InletWiring inletWiring
Sets the preferred fallback wiring for all inlets (in case detection fails)
Definition Pdu.idl:115
StartupState startupState
Default outlet state after applying power to outlets; can be overridden per outlet.
Definition Pdu.idl:96
int demandUpdateInterval
BCM2 only: Update interval in seconds for demand sensors.
Definition Pdu.idl:110
int demandAveragingIntervals
BCM2 only: Average demand sensors over this many update intervals.
Definition Pdu.idl:111
PDU statistics.
Definition Pdu.idl:78
vector< CircuitBreakerStatistic > cbStats
Circuit breaker statistics.
Definition Pdu.idl:79
vector< CtrlStatistic > ctrlStats
Sub controller statistics.
Definition Pdu.idl:80
peripheral::DeviceManager Statistics peripheralStats
Peripheral device statistics.
Definition Pdu.idl:82
vector< OutletStatistic > outletStats
Outlet statistics
Definition Pdu.idl:81
Port properties.
Definition Port.idl:57