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