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