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