Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
ShelfPowerSupply.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2025 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __PDUMODEL_SHELF_POWER_SUPPLY_IDL__
7#define __PDUMODEL_SHELF_POWER_SUPPLY_IDL__
8
9#include <Controller.idl>
10#include <EDevice.idl>
11#include <NumericSensor.idl>
12#include <Pole.idl>
13
14/**
15 * PDU Model
16 */
17module pdumodel {
18
19 /** Shelf power supply interface */
20 interface ShelfPowerSupply extends EDevice {
21
22 constant int ERR_OPERATION_NOT_SUPPORTED = 1;
23 constant int ERR_INVALID_ARGUMENT = 2;
24
25 /** Power supply metadata */
26 structure MetaData {
27 string slotLabel; ///< Label of PSU slot the PSU is plugged into
28 string manufacturer; ///< PSU manufacturer
29 string model; ///< PSU model
30 string serialNumber; ///< PSU serial number
31 string firmwareVersion; ///< PSU firmware version (in PSU specific format)
32 string productionDate; ///< Production date of PSU (in PSU specific format)
33 string hardwareRevision; ///< Hardware revision of PDU (in PSU specific format)
34 int maxOutputPower; ///< Maximum output power of PSU (in W)
35 boolean hotplugSupported; ///< PSU can be removed or inserted while shelf is powered
36 boolean powerControlSupported; ///< PSU can be turned on or off
37 boolean fanSpeedControlSupported; ///< Fan speed of PSU can be controlled
38 int ratedLoad; ///< Load (in percent) at which efficiency is determined (0 if unsupported)
39 int efficiencyPercent; ///< Efficiency (in percent) at rated load (0 if unsupported)
40 };
41
42 /** Power supply power state. Used both for switching and representing the current state */
43 enumeration PowerState {
44 PS_OFF, ///< Turn off / Power is off
45 PS_ON ///< Turn on / Power is on
46 };
47
48 /** Power supply state */
49 structure State {
50 boolean available; ///< State reading is valid
51 boolean isPresent; ///< PSU is plugged into the slot
52 PowerState powerState; ///< Current power state of PSU (always PS_ON if power control is not supported)
53 int fanSpeedOverridePercent; ///< Current PSU fan speed override (in %); 0 if fan speed is not overridden
54 boolean hasPendingFault; ///< Whether any of the fault sensors of this power supply reports a non-normal state
55 };
56
57 /* State values for fault state sensors */
58 constant int FAULT_STATE_NO_FAULT = 0; ///< No fault is present
59 constant int FAULT_STATE_WARNING = 1; ///< Warning indicator active
60 constant int FAULT_STATE_CRITICAL = 2; ///< Critical indicator active
61
62 /** Power supply input (AC) sensors */
63 structure InputSensors {
64 sensors.NumericSensor voltage; ///< RMS voltage sensor
65 sensors.NumericSensor current; ///< RMS current sensor
66 sensors.NumericSensor peakCurrent; ///< Peak current sensor
67 sensors.NumericSensor unbalancedCurrent; ///< Current unbalance sensor
68 sensors.NumericSensor activePower; ///< Active power sensor
69 sensors.NumericSensor reactivePower; ///< Reactive power sensor
70 sensors.NumericSensor apparentPower; ///< Apparent power sensor
71 sensors.NumericSensor powerFactor; ///< Power factor sensor
72 sensors.NumericSensor displacementPowerFactor;///< Displacement power factor sensor
73 sensors.NumericSensor activeEnergy; ///< Active energy sensor
74 sensors.NumericSensor apparentEnergy; ///< Apparent energy sensor
75 sensors.NumericSensor phaseAngle; ///< Phase angle sensor
76 sensors.NumericSensor lineFrequency; ///< AC line frequency sensor
77 sensors.NumericSensor crestFactor; ///< Crest factor sensor
78 sensors.NumericSensor voltageThd; ///< Voltage total harmonic distortion sensor
79 sensors.NumericSensor currentThd; ///< Current total harmonic distortion sensor
80 sensors.StateSensor overCurrentFault; ///< Input over current fault (as reported by PSU) sensor
81 sensors.StateSensor underVoltageFault; ///< Input under voltage fault (as reported by PSU) sensor
82 sensors.StateSensor overVoltageFault; ///< Input over voltage fault (as reported by PSU) sensor
83 };
84
85 /** Power supply output (DC) sensors */
86 structure OutputSensors {
87 sensors.NumericSensor voltage; ///< Voltage sensor
88 sensors.NumericSensor current; ///< Current sensor
89 sensors.NumericSensor activePower; ///< Active power sensor
90 sensors.NumericSensor activeEnergy; ///< Active energy sensor
91 sensors.StateSensor overCurrentFault; ///< Output over current fault (as reported by PSU) sensor
92 sensors.StateSensor underVoltageFault; ///< Output under voltage fault (as reported by PSU) sensor
93 sensors.StateSensor overVoltageFault; ///< Output over voltage fault (as reported by PSU) sensor
94 };
95
96 /** Power supply auxiliary sensors */
98 sensors.NumericSensor fanSpeed; ///< PSU fan speed sensor
99 sensors.NumericSensor inputTemperature; ///< Temperature sensor at PSU input
100 sensors.NumericSensor outputTemperature; ///< Temperature sensor at PSU output
101 sensors.NumericSensor hotspotTemperature; ///< Temperature sensor at hotspot inside PSU
102 sensors.StateSensor underTemperatureFault; ///< Under temperature fault (as reported by PSU) sensor
103 sensors.StateSensor overTemperatureFault; ///< Over temperature fault (as reported by PSU) sensor
104 sensors.StateSensor fanFault; ///< Fan fault (as reported by PSU) sensor
105 };
106
107 /** Event: Power control was initiated */
108 valueobject PowerControlEvent extends event.UserEvent {
109 PowerState state; ///< State the supply was switched to
110 };
111
112 /** Event: Fan speed target was set */
113 valueobject FanSpeedControlEvent extends event.UserEvent {
114 boolean overrideEnabled; ///< Fan speed override is enabled
115 int targetPercent; ///< Newly set fan speed target
116 };
117
118 /** Event: Fault states of PSU were cleared */
119 valueobject FaultsClearedEvent extends event.UserEvent {
120 };
121
122 /** Event: Power supply state has changed */
123 valueobject StateChangedEvent extends idl.Event {
124 State oldState; ///< State before change
125 State newState; ///< State after change
126 };
127
128 /** Event: Metadata has changed */
129 valueobject MetaDataChangedEvent extends idl.Event {
130 MetaData oldMetaData; ///< Metadata before change
131 MetaData newMetaData; ///< Metadata after change
132 };
133
134 /**
135 * Retrieve the power supply metadata.
136 *
137 * @return Metadata
138 */
140
141 /**
142 * Get current PSU state
143 *
144 * @return Current state
145 */
147
148 /**
149 * Get the input (AC side) sensors.
150 *
151 * @return sensors
152 */
154
155 /**
156 * Get the output (DC side) sensors.
157 *
158 * @return sensors
159 */
161
162 /**
163 * Get the auxiliary sensors.
164 *
165 * @return sensors
166 */
168
169 /**
170 * Turn PSU on or off
171 *
172 * @param pstate New power state
173 *
174 * @return 0 if OK
175 * @return 1 if the PSU does not support power control
176 */
177 int setPowerState(in PowerState pstate);
178
179 /**
180 * Set PSU fan speed override
181 *
182 * @param enableOverride true if fan speed should be overridden; false to operate fan in automatic mode
183 * @param fanSpeedPercent New fan speed target in %
184 *
185 * @return 0 if OK
186 * @return 1 if fan speed control is not supported
187 * @return 2 if the supplied target is out of range (1..100%)
188 */
189 int setFanSpeedOverride(in boolean enableOverride, in int fanSpeedPercent);
190
191 /**
192 * Clear any PSU internal fault states
193 *
194 * This includes input and output related faults as well as temperature and fan faults.
195 */
197
198 /**
199 * Get the input (AC side) poles
200 *
201 * @return List of poles
202 */
203 vector<Pole> getInputPoles();
204
205 /**
206 * Get the output (DC side) poles
207 *
208 * @return List of poles
209 */
210 vector<Pole> getOutputPoles();
211
212 /**
213 * Get the controller for this power supply.
214 *
215 * @return Sub controller reference
216 */
218 };
219
220}
221
222#endif
Sub controller interface.
Common base interface for any kind of electrical device that is used in the PDU model,...
Definition EDevice.idl:27
Shelf power supply interface.
int setFanSpeedOverride(in boolean enableOverride, in int fanSpeedPercent)
Set PSU fan speed override.
State getState()
Get current PSU state.
vector< Pole > getInputPoles()
Get the input (AC side) poles.
InputSensors getInputSensors()
Get the input (AC side) sensors.
void clearFaults()
Clear any PSU internal fault states.
Controller getController()
Get the controller for this power supply.
PowerSupplySensors getPowerSupplySensors()
Get the auxiliary sensors.
PowerState
Power supply power state.
@ PS_OFF
Turn off / Power is off.
@ PS_ON
Turn on / Power is on.
constant int FAULT_STATE_CRITICAL
Critical indicator active.
vector< Pole > getOutputPoles()
Get the output (DC side) poles.
MetaData getMetaData()
Retrieve the power supply metadata.
constant int FAULT_STATE_NO_FAULT
No fault is present.
int setPowerState(in PowerState pstate)
Turn PSU on or off.
OutputSensors getOutputSensors()
Get the output (DC side) sensors.
constant int FAULT_STATE_WARNING
Warning indicator active.
A sensor with numeric readings.
Sensor with discrete readings.
Basic IDL definitions.
Definition Event.idl:10
PDU Model.
Definition Circuit.idl:16
Common base for all events.
Definition Event.idl:13
boolean overrideEnabled
Fan speed override is enabled.
Event: Fault states of PSU were cleared.
Power supply input (AC) sensors.
sensors::NumericSensor unbalancedCurrent
Current unbalance sensor.
sensors::StateSensor underVoltageFault
Input under voltage fault (as reported by PSU) sensor.
sensors::NumericSensor apparentEnergy
Apparent energy sensor.
sensors::NumericSensor current
RMS current sensor.
sensors::NumericSensor activePower
Active power sensor.
sensors::NumericSensor phaseAngle
Phase angle sensor.
sensors::NumericSensor powerFactor
Power factor sensor.
sensors::NumericSensor displacementPowerFactor
Displacement power factor sensor.
sensors::NumericSensor activeEnergy
Active energy sensor.
sensors::NumericSensor currentThd
Current total harmonic distortion sensor.
sensors::NumericSensor voltage
RMS voltage sensor.
sensors::StateSensor overCurrentFault
Input over current fault (as reported by PSU) sensor.
sensors::NumericSensor voltageThd
Voltage total harmonic distortion sensor.
sensors::NumericSensor lineFrequency
AC line frequency sensor.
sensors::NumericSensor apparentPower
Apparent power sensor.
sensors::StateSensor overVoltageFault
Input over voltage fault (as reported by PSU) sensor.
sensors::NumericSensor crestFactor
Crest factor sensor.
sensors::NumericSensor reactivePower
Reactive power sensor.
sensors::NumericSensor peakCurrent
Peak current sensor.
string hardwareRevision
Hardware revision of PDU (in PSU specific format)
boolean hotplugSupported
PSU can be removed or inserted while shelf is powered.
string firmwareVersion
PSU firmware version (in PSU specific format)
int efficiencyPercent
Efficiency (in percent) at rated load (0 if unsupported)
boolean powerControlSupported
PSU can be turned on or off.
int ratedLoad
Load (in percent) at which efficiency is determined (0 if unsupported)
string slotLabel
Label of PSU slot the PSU is plugged into.
int maxOutputPower
Maximum output power of PSU (in W)
string productionDate
Production date of PSU (in PSU specific format)
boolean fanSpeedControlSupported
Fan speed of PSU can be controlled.
Power supply output (DC) sensors.
sensors::NumericSensor current
Current sensor.
sensors::NumericSensor activePower
Active power sensor.
sensors::NumericSensor activeEnergy
Active energy sensor.
sensors::StateSensor overCurrentFault
Output over current fault (as reported by PSU) sensor.
sensors::StateSensor overVoltageFault
Output over voltage fault (as reported by PSU) sensor.
sensors::NumericSensor voltage
Voltage sensor.
sensors::StateSensor underVoltageFault
Output under voltage fault (as reported by PSU) sensor.
Event: Power control was initiated.
PowerState state
State the supply was switched to.
sensors::StateSensor overTemperatureFault
Over temperature fault (as reported by PSU) sensor.
sensors::StateSensor underTemperatureFault
Under temperature fault (as reported by PSU) sensor.
sensors::StateSensor fanFault
Fan fault (as reported by PSU) sensor.
sensors::NumericSensor hotspotTemperature
Temperature sensor at hotspot inside PSU.
sensors::NumericSensor inputTemperature
Temperature sensor at PSU input.
sensors::NumericSensor outputTemperature
Temperature sensor at PSU output.
sensors::NumericSensor fanSpeed
PSU fan speed sensor.
Event: Power supply state has changed.
PowerState powerState
Current power state of PSU (always PS_ON if power control is not supported)
int fanSpeedOverridePercent
Current PSU fan speed override (in %); 0 if fan speed is not overridden.
boolean hasPendingFault
Whether any of the fault sensors of this power supply reports a non-normal state.
boolean isPresent
PSU is plugged into the slot.
boolean available
State reading is valid.