Outlet.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2009 Raritan Inc. All rights reserved.
*/
#ifndef __PDUMODEL_OUTLET_IDL__
#define __PDUMODEL_OUTLET_IDL__
#include <Nameplate.idl>
#include <NumericSensor.idl>
#include <StateSensor.idl>
#include <Pole.idl>
#include <Inlet.idl>
#include <OverCurrentProtector.idl>
#include <Controller.idl>
/**
* PDU Model
*/
module pdumodel {
/** %Outlet statistics */
structure OutletStatistic {
int relayCycleCnt; ///< Relay switch count
int relayFailCnt; ///< Relay failure count
};
/** %Outlet interface */
interface Outlet_2_1_5 extends EDevice {
constant int ERR_OUTLET_NOT_SWITCHABLE = 1; ///< Outlet is not switchable
constant int ERR_LOAD_SHEDDING_ACTIVE = 2; ///< Load-shedding is enabled (deprecated)
constant int ERR_OUTLET_DISABLED = 3; ///< Outlet is disabled
constant int ERR_OUTLET_NOT_OFF = 4; ///< Outlet is on or in power-cylce; unstick not possible
constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
/** %Outlet metadata */
structure MetaData {
string label; ///< %Outlet label
string receptacleType; ///< Receptacle type
Nameplate_2_0_0 namePlate; ///< %Nameplate information
Rating_2_0_0 rating; ///< Numerical usage ratings
boolean isSwitchable; ///< \c true if the outlet is switchable
boolean isLatching; ///< \c true if the outlet is able to keep its state after power loss
int maxRelayCycleCnt; ///< Maximum relay cycle count
};
/** %Outlet power state. Used both for switching and representing the current state */
enumeration PowerState {
PS_OFF, ///< Switch off / Power is off
PS_ON ///< Switch on / Power is on
};
/** %Outlet LED state */
structure LedState {
boolean red; ///< \c true if the red LED is enabled
boolean green; ///< \c true if the green LED is enabled
boolean blinking; ///< \c true if the LED is blinking
};
/** %Outlet state */
structure State {
boolean available; ///< powerState is available
PowerState powerState; ///< Current power state of outlet
///< (represented by the control state of the relay, which
///< was set by the last command sent to it)
boolean switchOnInProgress; ///< \c true if the outlet is pending to be switched on
///< after the sequencing delay has passed.
boolean cycleInProgress; ///< \c if a power-cycle is in progress. The outlet will
///< be switched on after the cycle delay has passed.
boolean isLoadShed; ///< \c true if the outlet is currently switched off due
///< to being non-critical and load shedding being active
LedState ledState; ///< LED state
time lastPowerStateChange; ///< Time of last power state change
};
/** %Outlet power state on device startup */
enumeration StartupState {
SS_ON, ///< %Outlet will be switched on
SS_OFF, ///< %Outlet will be switched off
SS_LASTKNOWN, ///< Last known power state will be restored
SS_PDUDEF ///< Use default state as defined in PDU settings
};
/** %Outlet settings */
structure Settings {
string name; ///< User-defined name
StartupState startupState; ///< Power state on device startup
boolean usePduCycleDelay; ///< \c true to use power-cycle delay as defined in PDU settings
int cycleDelay; ///< %Outlet-specific power-cycle delay
boolean nonCritical; ///< \c true if outlet is non-critical (for load shedding)
int sequenceDelay; ///< Delay in ms after this outlet when switching multiple outlets on
};
/** %Outlet sensors */
structure Sensors {
sensors.NumericSensor_4_0_3 voltage; ///< RMS voltage sensor
sensors.NumericSensor_4_0_3 current; ///< RMS current sensor
sensors.NumericSensor_4_0_3 peakCurrent; ///< Peak current sensor
sensors.NumericSensor_4_0_3 maximumCurrent; ///< Maximum current sensor
sensors.NumericSensor_4_0_3 unbalancedCurrent; ///< Current unbalance sensor
sensors.NumericSensor_4_0_3 activePower; ///< Active power sensor
sensors.NumericSensor_4_0_3 reactivePower; ///< Reactive power sensor
sensors.NumericSensor_4_0_3 apparentPower; ///< Apparent power sensor
sensors.NumericSensor_4_0_3 powerFactor; ///< Power factor sensor
sensors.NumericSensor_4_0_3 displacementPowerFactor;///< Displacement power factor sensor
sensors.NumericSensor_4_0_3 activeEnergy; ///< Active energy sensor
sensors.NumericSensor_4_0_3 apparentEnergy; ///< Apparent energy sensor
sensors.NumericSensor_4_0_3 phaseAngle; ///< Phase angle sensor
sensors.NumericSensor_4_0_3 lineFrequency; ///< AC line frequency sensor
sensors.NumericSensor_4_0_3 crestFactor; ///< Crest factor sensor
sensors.StateSensor_4_0_3 outletState; ///< %Outlet power state sensor
};
/** Event: Power control was initiated */
valueobject PowerControlEvent extends event.UserEvent {
PowerState state; ///< State the outlet was switched to (if cycle is false)
boolean cycle; ///< Whether the outlet was cycled
};
/** Event: Outlet state has changed */
valueobject StateChangedEvent extends idl.Event {
State oldState; ///< State before change
State newState; ///< State after change
};
/** Event: Outlet settings have been changed */
valueobject SettingsChangedEvent extends event.UserEvent {
Settings oldSettings; ///< Settings before change
Settings newSettings; ///< Settings after change
};
/**
* Retrieve the outlet metadata.
*
* @return %Outlet metadata
*/
MetaData getMetaData();
/**
* Get the outlet sensors.
*
* @return %Outlet sensors
*/
Sensors getSensors();
/**
* Retrieve the outlet state.
*
* @return %Outlet state
*/
State getState();
/**
* Switch the outlet.
*
* @param pstate New power state
*
* @return 0 if OK
* @return 1 if the outlet is not switchable
* @return 3 if the outlet is disabled
*/
int setPowerState(in PowerState pstate);
/**
* Power-cycle the outlet.
*
* @return 0 if OK
* @return 1 if the outlet is not switchable
* @return 3 if the outlet is disabled
*/
int cyclePowerState();
/**
* Retrieve the outlet settings.
*
* @return %Outlet settings
*/
Settings getSettings();
/**
* Change the outlet settings.
*
* @param settings New outlet settings
*
* @return 0 if OK
* @return 1 if any parameters are invalid
*/
int setSettings(in Settings settings);
/**
* Get inlet, overcurrent protector and poles.
*
* @param i Result: %Inlet reference
* @param o Result: Overcurrent protector reference
* @param p Result: List of poles
*/
void getIOP(out Inlet_2_0_4 i, out OverCurrentProtector_3_0_4 o, out vector<Pole_5_0_0> p);
/**
* Get the controller for this outlet.
*
* @return Slave controller reference
*/
Controller_4_0_1 getController();
/**
* Trigger an attempt to un-stick sticking relay contacts
*
* Tries repairing relay contacts that are sticked together due to wear
* by switching the relay in a certain pattern.
* Prior to running this method, the outlet must be in 'off' state
* to acknowledge that loads were disconnected.
*
* @return 0 if unsticking was triggered successfully
* @return 1 if outlet is not switchable
* @return 3 if the outlet is disabled
* @return 4 if relay is in a power cycle or on
*/
int unstick();
};
}
#endif
pdumodel::Outlet_2_1_5::Settings::startupState
StartupState startupState
Power state on device startup.
Definition: Outlet.idl:89
pdumodel::Outlet_2_1_5::MetaData::receptacleType
string receptacleType
Receptacle type.
Definition: Outlet.idl:41
pdumodel::Outlet_2_1_5::newState
State newState
State after change.
Definition: Outlet.idl:125
pdumodel::Outlet_2_1_5::Sensors::powerFactor
sensors::NumericSensor_4_0_3 powerFactor
Power factor sensor.
Definition: Outlet.idl:106
pdumodel::Outlet_2_1_5::Settings::nonCritical
boolean nonCritical
true if outlet is non-critical (for load shedding)
Definition: Outlet.idl:92
pdumodel::Outlet_2_1_5::State::powerState
PowerState powerState
Current power state of outlet (represented by the control state of the relay, which was set by the la...
Definition: Outlet.idl:65
pdumodel::Outlet_2_1_5::Sensors
Outlet sensors
Definition: Outlet.idl:97
pdumodel::OverCurrentProtector_3_0_4
Overcurrent protector interface.
Definition: OverCurrentProtector.idl:26
pdumodel::Outlet_2_1_5::Sensors::outletState
sensors::StateSensor_4_0_3 outletState
Outlet power state sensor
Definition: Outlet.idl:113
pdumodel::Outlet_2_1_5::State::switchOnInProgress
boolean switchOnInProgress
true if the outlet is pending to be switched on after the sequencing delay has passed.
Definition: Outlet.idl:68
pdumodel::Inlet_2_0_4
Inlet interface
Definition: Inlet.idl:22
pdumodel::Outlet_2_1_5::MetaData::isLatching
boolean isLatching
true if the outlet is able to keep its state after power loss
Definition: Outlet.idl:45
pdumodel::Outlet_2_1_5::Sensors::voltage
sensors::NumericSensor_4_0_3 voltage
RMS voltage sensor.
Definition: Outlet.idl:98
pdumodel::Outlet_2_1_5::Sensors::activeEnergy
sensors::NumericSensor_4_0_3 activeEnergy
Active energy sensor.
Definition: Outlet.idl:108
pdumodel::Outlet_2_1_5::LedState::green
boolean green
true if the green LED is enabled
Definition: Outlet.idl:58
pdumodel::OutletStatistic::relayFailCnt
int relayFailCnt
Relay failure count.
Definition: Outlet.idl:25
pdumodel::EDevice
Common base interface for any kind of electrical device that is used in the PDU model, such as inlets, OCPs and outlets.
Definition: EDevice.idl:24
pdumodel::Outlet_2_1_5::Sensors::reactivePower
sensors::NumericSensor_4_0_3 reactivePower
Reactive power sensor.
Definition: Outlet.idl:104
pdumodel::Outlet_2_1_5::LedState::red
boolean red
true if the red LED is enabled
Definition: Outlet.idl:57
pdumodel::Outlet_2_1_5::SS_ON
Outlet will be switched on
Definition: Outlet.idl:80
pdumodel::Outlet_2_1_5::newSettings
Settings newSettings
Settings after change.
Definition: Outlet.idl:131
pdumodel::Outlet_2_1_5::SS_OFF
Outlet will be switched off
Definition: Outlet.idl:81
pdumodel::Outlet_2_1_5::LedState::blinking
boolean blinking
true if the LED is blinking
Definition: Outlet.idl:59
pdumodel::Outlet_2_1_5::Sensors::crestFactor
sensors::NumericSensor_4_0_3 crestFactor
Crest factor sensor.
Definition: Outlet.idl:112
pdumodel::Outlet_2_1_5::State::cycleInProgress
boolean cycleInProgress
if a power-cycle is in progress.
Definition: Outlet.idl:70
pdumodel::Outlet_2_1_5::State::available
boolean available
powerState is available
Definition: Outlet.idl:64
pdumodel::Outlet_2_1_5::State
Outlet state
Definition: Outlet.idl:63
pdumodel::Outlet_2_1_5::Sensors::apparentEnergy
sensors::NumericSensor_4_0_3 apparentEnergy
Apparent energy sensor.
Definition: Outlet.idl:109
pdumodel::Outlet_2_1_5::MetaData::rating
Rating_2_0_0 rating
Numerical usage ratings.
Definition: Outlet.idl:43
pdumodel::Outlet_2_1_5::PS_OFF
Switch off / Power is off.
Definition: Outlet.idl:51
pdumodel::Outlet_2_1_5::State::ledState
LedState ledState
LED state.
Definition: Outlet.idl:74
pdumodel::Outlet_2_1_5::cycle
boolean cycle
Whether the outlet was cycled.
Definition: Outlet.idl:119
pdumodel::Outlet_2_1_5::Sensors::maximumCurrent
sensors::NumericSensor_4_0_3 maximumCurrent
Maximum current sensor.
Definition: Outlet.idl:101
pdumodel::Outlet_2_1_5::State::lastPowerStateChange
time lastPowerStateChange
Time of last power state change.
Definition: Outlet.idl:75
pdumodel::Outlet_2_1_5::Sensors::lineFrequency
sensors::NumericSensor_4_0_3 lineFrequency
AC line frequency sensor.
Definition: Outlet.idl:111
pdumodel::Outlet_2_1_5::MetaData::isSwitchable
boolean isSwitchable
true if the outlet is switchable
Definition: Outlet.idl:44
idl
Basic IDL definitions.
Definition: Event.idl:10
pdumodel::Outlet_2_1_5::Sensors::apparentPower
sensors::NumericSensor_4_0_3 apparentPower
Apparent power sensor.
Definition: Outlet.idl:105
pdumodel::Outlet_2_1_5::Sensors::peakCurrent
sensors::NumericSensor_4_0_3 peakCurrent
Peak current sensor.
Definition: Outlet.idl:100
pdumodel::Outlet_2_1_5::Sensors::unbalancedCurrent
sensors::NumericSensor_4_0_3 unbalancedCurrent
Current unbalance sensor.
Definition: Outlet.idl:102
pdumodel::Outlet_2_1_5::MetaData::label
string label
Outlet label
Definition: Outlet.idl:40
pdumodel::Nameplate_2_0_0
Component nameplate information.
Definition: Nameplate.idl:23
pdumodel::Outlet_2_1_5::Sensors::displacementPowerFactor
sensors::NumericSensor_4_0_3 displacementPowerFactor
Displacement power factor sensor.
Definition: Outlet.idl:107
pdumodel::Outlet_2_1_5::Settings::usePduCycleDelay
boolean usePduCycleDelay
true to use power-cycle delay as defined in PDU settings
Definition: Outlet.idl:90
pdumodel::Outlet_2_1_5::Settings::cycleDelay
int cycleDelay
Outlet-specific power-cycle delay
Definition: Outlet.idl:91
pdumodel::Outlet_2_1_5::SS_LASTKNOWN
Last known power state will be restored.
Definition: Outlet.idl:82
pdumodel::Outlet_2_1_5::Sensors::activePower
sensors::NumericSensor_4_0_3 activePower
Active power sensor.
Definition: Outlet.idl:103
pdumodel::OutletStatistic
Outlet statistics
Definition: Outlet.idl:23
pdumodel::Outlet_2_1_5::MetaData::maxRelayCycleCnt
int maxRelayCycleCnt
Maximum relay cycle count.
Definition: Outlet.idl:46
pdumodel::Controller_4_0_1
Slave controller interface.
Definition: Controller.idl:26
pdumodel::Outlet_2_1_5::StartupState
StartupState
Outlet power state on device startup
Definition: Outlet.idl:79
pdumodel::Outlet_2_1_5::Settings
Outlet settings
Definition: Outlet.idl:87
pdumodel::Outlet_2_1_5::PowerState
PowerState
Outlet power state.
Definition: Outlet.idl:50
pdumodel::Outlet_2_1_5::Sensors::current
sensors::NumericSensor_4_0_3 current
RMS current sensor.
Definition: Outlet.idl:99
pdumodel::Outlet_2_1_5::MetaData::namePlate
Nameplate_2_0_0 namePlate
Nameplate information
Definition: Outlet.idl:42
sensors
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
pdumodel::Outlet_2_1_5::MetaData
Outlet metadata
Definition: Outlet.idl:39
pdumodel
PDU Model.
Definition: Ade.idl:12
pdumodel::Outlet_2_1_5::Sensors::phaseAngle
sensors::NumericSensor_4_0_3 phaseAngle
Phase angle sensor.
Definition: Outlet.idl:110
pdumodel::Outlet_2_1_5::Settings::name
string name
User-defined name.
Definition: Outlet.idl:88
pdumodel::Outlet_2_1_5
Outlet interface
Definition: Outlet.idl:29
pdumodel::Outlet_2_1_5::Settings::sequenceDelay
int sequenceDelay
Delay in ms after this outlet when switching multiple outlets on.
Definition: Outlet.idl:93
pdumodel::Outlet_2_1_5::State::isLoadShed
boolean isLoadShed
true if the outlet is currently switched off due to being non-critical and load shedding being active...
Definition: Outlet.idl:72
sensors::NumericSensor_4_0_3
A sensor with numeric readings.
Definition: NumericSensor.idl:17
pdumodel::Rating_2_0_0
Numerical usage ratings.
Definition: Nameplate.idl:15
sensors::StateSensor_4_0_3
Sensor with discrete readings.
Definition: StateSensor.idl:43
pdumodel::Outlet_2_1_5::LedState
Outlet LED state
Definition: Outlet.idl:56
pdumodel::OutletStatistic::relayCycleCnt
int relayCycleCnt
Relay switch count.
Definition: Outlet.idl:24