Loading...
Searching...
No Matches
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>
#include <Waveform.idl>
/**
* PDU Model
*/
module pdumodel {
/** %Outlet statistics */
structure OutletStatistic {
int relayCycleCnt; ///< Relay switch count
int relayFailCnt; ///< Relay failure count
};
/** %Outlet interface */
interface Outlet 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_RELAY_CONTROL_DISABLED = 5; ///< Relay control is disabled in PDU settings
constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
constant int ERR_OPERATION_UNSUPPORTED = 1; ///< Operation is not supported
/** %Outlet metadata */
structure MetaData {
string label; ///< %Outlet label
string receptacleType; ///< Receptacle type
Nameplate namePlate; ///< %Nameplate information
Rating 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
boolean hasWaveformSupport; ///< Whether waveform reading is supported on this outlet
boolean hasServiceModeSupport; ///< Whether service mode is supported on this outlet
};
/** %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 */
[deprecated]
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
boolean isSuspended; ///< Whether the outlet was turned off automatically due to
///< being suspected to have caused an OCP trip event
boolean hasInrushWaveform; ///< Whether a valid waveform of last switch-on operation
///< can be read using {@link #getInrushWaveform()}.
boolean inServiceMode; ///< Whether the outlet is currently placed into service mode
LedState ledState; ///< LED state (deprecated and always sent as 'off')
time lastPowerStateChange; ///< Time of last power state change (UNIX timestamp, UTC)
};
/** %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 after power is applied to the outlet
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 voltage; ///< RMS voltage sensor (may be a VoltageMonitoringSensor)
sensors.NumericSensor current; ///< RMS current sensor
sensors.NumericSensor peakCurrent; ///< Peak current sensor
sensors.NumericSensor maximumCurrent; ///< Maximum current sensor
sensors.NumericSensor unbalancedCurrent; ///< Current unbalance sensor
sensors.NumericSensor activePower; ///< Active power sensor
sensors.NumericSensor reactivePower; ///< Reactive power sensor
sensors.NumericSensor apparentPower; ///< Apparent power sensor
sensors.NumericSensor powerFactor; ///< Power factor sensor
sensors.NumericSensor displacementPowerFactor;///< Displacement power factor sensor
sensors.NumericSensor activeEnergy; ///< Active energy sensor
sensors.NumericSensor apparentEnergy; ///< Apparent energy sensor
sensors.NumericSensor phaseAngle; ///< Phase angle sensor
sensors.NumericSensor lineFrequency; ///< AC line frequency sensor
sensors.NumericSensor crestFactor; ///< Crest factor sensor
sensors.NumericSensor voltageThd; ///< Voltage total harmonic distortion sensor
sensors.NumericSensor currentThd; ///< Current total harmonic distortion sensor
sensors.NumericSensor inrushCurrent; ///< In-rush current occuring after turning outlet on
sensors.StateSensor 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
};
/** Event: Service mode has been changed */
valueobject ServiceModeChangedEvent extends event.UserEvent {
boolean enabled; ///< Whether service mode is enabled after the 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
* @return 5 if relay control is disabled in the PDU settings
*/
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
* @return 5 if relay control is disabled in the PDU settings
*/
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 i, out OverCurrentProtector o, out vector<Pole> p);
/**
* Get the controller for this outlet.
*
* @return Sub controller reference
*/
Controller getController();
/**
* Get the voltage and current waveforms at the time of last switch on operation.
*
* @note If waveform reading is not supported or a waveform could not be acquired for other
* reasons (e.g. the outlet not actually be switchable, or the outlet board being reset
* since the outlet was turned on), an empty waveform is returned.
*
* @return Waveform samples
*/
Waveform getInrushWaveform();
/**
* Enable or disable service mode on this outlet.
*
* If service mode is enabled, the outlet LED blinks in a specific pattern to indicate the
* enabled service mode when looking at the PDU (e.g. for technicians working on that outlet).
* In addition to that, sensors belonging to the outlet won't cause alarm events while the
* service mode is active.
*
* @return 0 if OK
* @return 1 if service mode is not supported on this outlet
*/
int setServiceModeEnabled(in boolean enabled);
/**
* Trigger an attempt to un-stick sticking relay contacts
*
* Warning: Please contact Tech Support before using this.
*
* 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::Controller
Sub controller interface.
Definition Controller.idl:26
pdumodel::EDevice
Common base interface for any kind of electrical device that is used in the PDU model,...
Definition EDevice.idl:27
pdumodel::Inlet
Inlet interface
Definition Inlet.idl:22
pdumodel::Outlet
Outlet interface
Definition Outlet.idl:30
pdumodel::Outlet::getState
State getState()
Retrieve the outlet state.
pdumodel::Outlet::setSettings
int setSettings(in Settings settings)
Change the outlet settings.
pdumodel::Outlet::PowerState
PowerState
Outlet power state.
Definition Outlet.idl:56
pdumodel::Outlet::PS_OFF
@ PS_OFF
Switch off / Power is off.
Definition Outlet.idl:57
pdumodel::Outlet::setPowerState
int setPowerState(in PowerState pstate)
Switch the outlet.
pdumodel::Outlet::getController
Controller getController()
Get the controller for this outlet.
pdumodel::Outlet::getMetaData
MetaData getMetaData()
Retrieve the outlet metadata.
pdumodel::Outlet::setServiceModeEnabled
int setServiceModeEnabled(in boolean enabled)
Enable or disable service mode on this outlet.
pdumodel::Outlet::unstick
int unstick()
Trigger an attempt to un-stick sticking relay contacts.
pdumodel::Outlet::getSettings
Settings getSettings()
Retrieve the outlet settings.
pdumodel::Outlet::cyclePowerState
int cyclePowerState()
Power-cycle the outlet.
pdumodel::Outlet::StartupState
StartupState
Outlet power state on device startup
Definition Outlet.idl:91
pdumodel::Outlet::SS_LASTKNOWN
@ SS_LASTKNOWN
Last known power state will be restored.
Definition Outlet.idl:94
pdumodel::Outlet::SS_OFF
@ SS_OFF
Outlet will be switched off
Definition Outlet.idl:93
pdumodel::Outlet::SS_ON
@ SS_ON
Outlet will be switched on
Definition Outlet.idl:92
pdumodel::Outlet::getSensors
Sensors getSensors()
Get the outlet sensors.
pdumodel::Outlet::getInrushWaveform
Waveform getInrushWaveform()
Get the voltage and current waveforms at the time of last switch on operation.
pdumodel::Outlet::getIOP
void getIOP(out Inlet i, out OverCurrentProtector o, out vector< Pole > p)
Get inlet, overcurrent protector and poles.
pdumodel::OverCurrentProtector
Overcurrent protector interface.
Definition OverCurrentProtector.idl:27
sensors::NumericSensor
A sensor with numeric readings.
Definition NumericSensor.idl:17
sensors::StateSensor
Sensor with discrete readings.
Definition StateSensor.idl:43
idl
Basic IDL definitions.
Definition Event.idl:10
pdumodel
PDU Model.
Definition Ade.idl:12
sensors
Sensors Model.
Definition AccumulatingNumericSensor.idl:13
idl::Event
Common base for all events.
Definition Event.idl:13
pdumodel::Nameplate
Component nameplate information.
Definition Nameplate.idl:23
pdumodel::OutletStatistic
Outlet statistics
Definition Outlet.idl:24
pdumodel::OutletStatistic::relayFailCnt
int relayFailCnt
Relay failure count.
Definition Outlet.idl:26
pdumodel::OutletStatistic::relayCycleCnt
int relayCycleCnt
Relay switch count.
Definition Outlet.idl:25
pdumodel::Outlet::LedState
Outlet LED state
Definition Outlet.idl:63
pdumodel::Outlet::LedState::green
boolean green
true if the green LED is enabled
Definition Outlet.idl:65
pdumodel::Outlet::LedState::blinking
boolean blinking
true if the LED is blinking
Definition Outlet.idl:66
pdumodel::Outlet::LedState::red
boolean red
true if the red LED is enabled
Definition Outlet.idl:64
pdumodel::Outlet::MetaData
Outlet metadata
Definition Outlet.idl:43
pdumodel::Outlet::MetaData::label
string label
Outlet label
Definition Outlet.idl:44
pdumodel::Outlet::MetaData::receptacleType
string receptacleType
Receptacle type.
Definition Outlet.idl:45
pdumodel::Outlet::MetaData::isSwitchable
boolean isSwitchable
true if the outlet is switchable
Definition Outlet.idl:48
pdumodel::Outlet::MetaData::rating
Rating rating
Numerical usage ratings.
Definition Outlet.idl:47
pdumodel::Outlet::MetaData::hasWaveformSupport
boolean hasWaveformSupport
Whether waveform reading is supported on this outlet.
Definition Outlet.idl:51
pdumodel::Outlet::MetaData::namePlate
Nameplate namePlate
Nameplate information
Definition Outlet.idl:46
pdumodel::Outlet::MetaData::maxRelayCycleCnt
int maxRelayCycleCnt
Maximum relay cycle count.
Definition Outlet.idl:50
pdumodel::Outlet::MetaData::hasServiceModeSupport
boolean hasServiceModeSupport
Whether service mode is supported on this outlet.
Definition Outlet.idl:52
pdumodel::Outlet::MetaData::isLatching
boolean isLatching
true if the outlet is able to keep its state after power loss
Definition Outlet.idl:49
pdumodel::Outlet::PowerControlEvent
Event: Power control was initiated.
Definition Outlet.idl:132
pdumodel::Outlet::PowerControlEvent::cycle
boolean cycle
Whether the outlet was cycled.
Definition Outlet.idl:134
pdumodel::Outlet::PowerControlEvent::state
PowerState state
State the outlet was switched to (if cycle is false)
Definition Outlet.idl:133
pdumodel::Outlet::Sensors
Outlet sensors
Definition Outlet.idl:109
pdumodel::Outlet::Sensors::activeEnergy
sensors::NumericSensor activeEnergy
Active energy sensor.
Definition Outlet.idl:120
pdumodel::Outlet::Sensors::powerFactor
sensors::NumericSensor powerFactor
Power factor sensor.
Definition Outlet.idl:118
pdumodel::Outlet::Sensors::voltage
sensors::NumericSensor voltage
RMS voltage sensor (may be a VoltageMonitoringSensor)
Definition Outlet.idl:110
pdumodel::Outlet::Sensors::peakCurrent
sensors::NumericSensor peakCurrent
Peak current sensor.
Definition Outlet.idl:112
pdumodel::Outlet::Sensors::phaseAngle
sensors::NumericSensor phaseAngle
Phase angle sensor.
Definition Outlet.idl:122
pdumodel::Outlet::Sensors::lineFrequency
sensors::NumericSensor lineFrequency
AC line frequency sensor.
Definition Outlet.idl:123
pdumodel::Outlet::Sensors::activePower
sensors::NumericSensor activePower
Active power sensor.
Definition Outlet.idl:115
pdumodel::Outlet::Sensors::current
sensors::NumericSensor current
RMS current sensor.
Definition Outlet.idl:111
pdumodel::Outlet::Sensors::crestFactor
sensors::NumericSensor crestFactor
Crest factor sensor.
Definition Outlet.idl:124
pdumodel::Outlet::Sensors::inrushCurrent
sensors::NumericSensor inrushCurrent
In-rush current occuring after turning outlet on.
Definition Outlet.idl:127
pdumodel::Outlet::Sensors::displacementPowerFactor
sensors::NumericSensor displacementPowerFactor
Displacement power factor sensor.
Definition Outlet.idl:119
pdumodel::Outlet::Sensors::voltageThd
sensors::NumericSensor voltageThd
Voltage total harmonic distortion sensor.
Definition Outlet.idl:125
pdumodel::Outlet::Sensors::apparentPower
sensors::NumericSensor apparentPower
Apparent power sensor.
Definition Outlet.idl:117
pdumodel::Outlet::Sensors::apparentEnergy
sensors::NumericSensor apparentEnergy
Apparent energy sensor.
Definition Outlet.idl:121
pdumodel::Outlet::Sensors::unbalancedCurrent
sensors::NumericSensor unbalancedCurrent
Current unbalance sensor.
Definition Outlet.idl:114
pdumodel::Outlet::Sensors::outletState
sensors::StateSensor outletState
Outlet power state sensor
Definition Outlet.idl:128
pdumodel::Outlet::Sensors::maximumCurrent
sensors::NumericSensor maximumCurrent
Maximum current sensor.
Definition Outlet.idl:113
pdumodel::Outlet::Sensors::reactivePower
sensors::NumericSensor reactivePower
Reactive power sensor.
Definition Outlet.idl:116
pdumodel::Outlet::Sensors::currentThd
sensors::NumericSensor currentThd
Current total harmonic distortion sensor.
Definition Outlet.idl:126
pdumodel::Outlet::ServiceModeChangedEvent
Event: Service mode has been changed.
Definition Outlet.idl:150
pdumodel::Outlet::ServiceModeChangedEvent::enabled
boolean enabled
Whether service mode is enabled after the change.
Definition Outlet.idl:151
pdumodel::Outlet::SettingsChangedEvent
Event: Outlet settings have been changed.
Definition Outlet.idl:144
pdumodel::Outlet::SettingsChangedEvent::newSettings
Settings newSettings
Settings after change.
Definition Outlet.idl:146
pdumodel::Outlet::SettingsChangedEvent::oldSettings
Settings oldSettings
Settings before change.
Definition Outlet.idl:145
pdumodel::Outlet::Settings
Outlet settings
Definition Outlet.idl:99
pdumodel::Outlet::Settings::name
string name
User-defined name.
Definition Outlet.idl:100
pdumodel::Outlet::Settings::startupState
StartupState startupState
Power state after power is applied to the outlet.
Definition Outlet.idl:101
pdumodel::Outlet::Settings::nonCritical
boolean nonCritical
true if outlet is non-critical (for load shedding)
Definition Outlet.idl:104
pdumodel::Outlet::Settings::cycleDelay
int cycleDelay
Outlet-specific power-cycle delay
Definition Outlet.idl:103
pdumodel::Outlet::Settings::sequenceDelay
int sequenceDelay
Delay in ms after this outlet when switching multiple outlets on.
Definition Outlet.idl:105
pdumodel::Outlet::Settings::usePduCycleDelay
boolean usePduCycleDelay
true to use power-cycle delay as defined in PDU settings
Definition Outlet.idl:102
pdumodel::Outlet::StateChangedEvent
Event: Outlet state has changed.
Definition Outlet.idl:138
pdumodel::Outlet::StateChangedEvent::newState
State newState
State after change.
Definition Outlet.idl:140
pdumodel::Outlet::StateChangedEvent::oldState
State oldState
State before change.
Definition Outlet.idl:139
pdumodel::Outlet::State
Outlet state
Definition Outlet.idl:70
pdumodel::Outlet::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:79
pdumodel::Outlet::State::cycleInProgress
boolean cycleInProgress
if a power-cycle is in progress.
Definition Outlet.idl:77
pdumodel::Outlet::State::hasInrushWaveform
boolean hasInrushWaveform
Whether a valid waveform of last switch-on operation can be read using getInrushWaveform().
Definition Outlet.idl:83
pdumodel::Outlet::State::ledState
LedState ledState
LED state (deprecated and always sent as 'off')
Definition Outlet.idl:86
pdumodel::Outlet::State::inServiceMode
boolean inServiceMode
Whether the outlet is currently placed into service mode.
Definition Outlet.idl:85
pdumodel::Outlet::State::isSuspended
boolean isSuspended
Whether the outlet was turned off automatically due to being suspected to have caused an OCP trip eve...
Definition Outlet.idl:81
pdumodel::Outlet::State::switchOnInProgress
boolean switchOnInProgress
true if the outlet is pending to be switched on after the sequencing delay has passed.
Definition Outlet.idl:75
pdumodel::Outlet::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:72
pdumodel::Outlet::State::lastPowerStateChange
time lastPowerStateChange
Time of last power state change (UNIX timestamp, UTC)
Definition Outlet.idl:87
pdumodel::Outlet::State::available
boolean available
powerState is available
Definition Outlet.idl:71
pdumodel::Rating
Numerical usage ratings.
Definition Nameplate.idl:15
pdumodel::Waveform
Waveform data, including metadata.
Definition Waveform.idl:12