Raritan PX2/PX3 JSON-RPC API: pdu-json-rpc-api/idl/Pdu.idl Source File

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