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