Pdu.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2009 Raritan Inc. All rights reserved.
*/
#ifndef __PDUMODEL_PDU_IDL__
#define __PDUMODEL_PDU_IDL__
#include <Nameplate.idl>
#include <Outlet.idl>
#include <PeripheralDeviceManager.idl>
#include <Port.idl>
#include <OverCurrentProtector.idl>
#include <Inlet.idl>
#include <TransferSwitch.idl>
#include <StateSensor.idl>
#include <SensorLogger.idl>
#include <Controller.idl>
#include <InternalBeeper.idl>
/**
* PDU Model
*/
module pdumodel {
/** Main PDU interface */
interface Pdu_4_1_6 {
constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
/** PDU metadata */
structure MetaData {
Nameplate_2_0_0 nameplate; ///< %Nameplate information
string ctrlBoardSerial; ///< Main controller serial number
string hwRevision; ///< Hardware revision
string fwRevision; ///< Firmware revision
string macAddress; ///< MAC address
boolean hasSwitchableOutlets; ///< \c true if at least one outlet is switchable
boolean hasMeteredOutlets; ///< \c true if at least one outlet is metered
boolean hasLatchingOutletRelays; ///< \c true if at least one outlet has a latching relay
boolean isInlineMeter; ///< \c true if all inlets have exactly one outlet
boolean isEnergyPulseSupported; ///< \c true if the PDU has one or more LED(s) capable
///< of emitting pulses to measure consumed energy
};
/** PDU sensors */
structure Sensors {
vector<sensors.StateSensor_4_0_3> powerSupplyStatus; ///< Power supply fault status
sensors.NumericSensor_4_0_3 activePower; ///< Active power sensor
sensors.NumericSensor_4_0_3 activeEnergy; ///< Active energy sensor
};
/** PDU statistics */
structure Statistic {
vector<CircuitBreakerStatistic> cbStats; ///< Circuit breaker statistics
vector<CtrlStatistic> ctrlStats; ///< Slave controller statistics
vector<OutletStatistic> outletStats; ///< %Outlet statistics
peripheral.DeviceManager_3_0_2.Statistics peripheralStats; ///< Peripheral device statistics
};
/** %Outlet power state on device startup */
enumeration StartupState {
SS_ON, ///< %Outlet will be switched on
SS_OFF, ///< %Outlet will be switched off
SS_LASTKNOWN ///< Restore last known power state
};
/** PDU settings */
structure Settings {
string name; ///< User-defined name
StartupState startupState; ///< Default outlet state on device startup; can be overriden per outlet
int cycleDelay; ///< Default power-cycle interval in seconds; can be overriden per outlet
int inRushGuardDelay; ///< Minimum delay in milliseconds between switching two outlets on
vector<int> outletPowerStateSequence; ///< The order in which multiple outlets should be switched.
///< Format: List of outlet numbers (zero-based), empty for default.
///< \n Affects the following functions:
///< \li \c setAllOutletPowerStates
///< \li \c cycleAllOutletPowerStates
///< \li \c setMultipleOutletPowerStates
///< \li \c cycleMultipleOutletPowerStates
int powerOnDelay; ///< Delay in seconds before restoring outlet states after device startup
boolean latchingRelays; ///< If true, relays keep their state during power-cycling
boolean energyPulseEnabled; ///< Enables energy consumption counting using the PDU's LED(s)
int energyPulsesPerKWh; ///< Ratio between LED pulses and energy consumption
};
/** %Outlet sequencing status */
structure OutletSequenceState {
boolean sequenceRunning; ///< \c true if an outlet sequence is currently running
int nextOutletToSwitch; ///< Number (zero-based) of the next outlet in the sequence
int timeUntilNextSwitch; ///< Time in milliseconds before the next outlet is switched
int outletsRemaining; ///< Number of outlets remaining in the sequence
int cancelableOutletsRemaining; ///< Number of outlets remaining whose switch operation can be canceled
///< (non-cancelable operations won't be affected by canceling the sequence)
};
/** Event: PDU settings have been changed */
valueobject SettingsChangedEvent extends event.UserEvent {
Settings oldSettings; ///< Settings before change
Settings newSettings; ///< Settings after change
};
/** Event: Load shedding mode was enabled or disabled */
valueobject LoadSheddingModeChangedEvent extends event.UserEvent {
boolean enabled; ///< Whether load shedding mode is enabled after the change
};
/** Event: Outlet sequencing state has changed */
valueobject OutletSequenceStateChangedEvent extends idl.Event {
OutletSequenceState newState; ///< New sequencing state
};
/**
* Retrieve the PDU nameplate information.
*
* @return Nameplate information
*/
Nameplate_2_0_0 getNameplate();
/**
* Retrieve the PDU metadata.
*
* @return PDU metadata
*/
MetaData getMetaData();
/**
* Retrieve the PDU sensors.
*
* @return PDU sensors
*/
Sensors getSensors();
/**
* Get the sensor logger.
*
* @return Sensor logger reference
*/
sensors.Logger_2_1_6 getSensorLogger();
/**
* Get the list of slave controllers.
*
* @return List of slave controllers
*/
vector<Controller_4_0_1> getControllers();
/**
* Get the list of outlets.
*
* @return List of outlets, indexed by their number (zero-based)
*/
vector<Outlet_2_1_5> getOutlets();
/**
* Get the list of overcurrent protectors.
*
* @return List of OCPs, indexed by their number (zero-based)
*/
vector<OverCurrentProtector_3_0_4> getOverCurrentProtectors();
/**
* Get the list of inlets.
*
* @return List of inlets, indexed by their number (zero-based)
*/
vector<Inlet_2_0_4> getInlets();
/**
* Returns list of Transfer Switches.
* This list may be empty.
*/
vector<TransferSwitch_4_0_4> getTransferSwitches();
/**
* Get the peripheral device manager.
*
* @return Peripheral device manager
*/
peripheral.DeviceManager_3_0_2 getPeripheralDeviceManager();
/**
* Get the built-in beeper, if there is any.
*
* @return Beeper interface
*/
hmi.InternalBeeper_2_0_1 getBeeper();
/**
* Retrieve the PDU settings.
*
* @return PDU settings
*/
Settings getSettings();
/**
* Retrieve the current load shedding state.
*
* @return \c true if load shedding is currently enabled
*/
boolean isLoadSheddingActive();
/**
* Change the PDU settings.
*
* @param settings New PDU settings
*
* @return 0 if OK
* @return 1 if any parameters are invalid
*/
int setSettings(in Settings settings);
/**
* Enable or disable load shedding.
*
* @param active \c true to enable, \c false to disable load shedding
*/
void setLoadSheddingActive(in boolean active);
/**
* Get all feature ports of this device
*
* This returns an entry for all feature ports, no matter whether
* something is connected or not.
* A device with n feature ports will return n entries here.
*
* @return List of all Feature Ports
*/
vector<portsmodel.Port_2_0_2> getFeaturePorts();
/**
* Enter RS485 config mode and assign an address to a relay board.
* @warning This is dangerous! Do not use except for manufacturing.
*
* @param addr New relay board address
*
* @return 0 if OK
* @return 1 if any parameters are invalid
*/
int enterRS485ConfigModeAndAssignCtrlBoardAddress(in int addr);
/**
* Enter RS485 config mode and assign an address to a slave controller
* device with a given device ID.
* @warning This is dangerous! Do not use except for manufacturing.
*
* @param deviceId Device id of the slave controller board
* which is supposed to get the address
* @param addr New relay board address
*
* @return 0 if OK
* @return 1 if any parameters are invalid
*/
int enterRS485ConfigModeAndAssignSCBoardAddress(in int deviceId, in int addr);
/**
* Leave RS485 config mode.
*
* @return 0 if OK
*/
int leaveRS485ConfigMode();
/**
* Switch all outlets.
*
* @param pstate New power state for all outlets
*
* @return 0 if OK
*/
int setAllOutletPowerStates(in Outlet_2_1_5.PowerState pstate);
/**
* Switch multiple outlets.
*
* @param outletNumbers List of outlet numbers (zero-based)
* @param state New power state for all outlets in list
* @param respectSequence \c true to switch in defined sequence order
*
* @return 0 if OK
* @return 3 if any of the selected outlets is disabled
*/
int setMultipleOutletPowerStates(in vector<int> outletNumbers,
in Outlet_2_1_5.PowerState state,
in boolean respectSequence);
/**
* Power-cycle all outlets.
*
* @return 0 if OK
*/
int cycleAllOutletPowerStates();
/**
* Power-cycle multiple outlets.
*
* @param outletNumbers List of outlet numbers (zero-based)
* @param respectSequence \c true to switch in defined sequence order
*
* @return 0 if OK
* @return 3 if any of the selected outlets is disabled
*/
int cycleMultipleOutletPowerStates(in vector<int> outletNumbers,
in boolean respectSequence);
/**
* Retrieve PDU statistics.
*
* @return PDU statistics
*/
Statistic getStatistic();
/**
* Retrieve the current outlet sequencing status.
*
* @return Sequencing status
*/
OutletSequenceState getOutletSequenceState();
/**
* Stop a currently running outlet sequence.
*/
void cancelOutletSequence();
};
}
#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