OutletGroup.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2018 Raritan Inc. All rights reserved.
*/
#ifndef __PDUMODEL_OUTLETGROUP_IDL__
#define __PDUMODEL_OUTLETGROUP_IDL__
#include <AccumulatingNumericSensor.idl>
#include <Outlet.idl>
module pdumodel {
/** Main PDU interface */
interface OutletGroup_1_0_1 {
constant int ERR_INVALID_ARGUMENT = 1;
structure Sensors {
sensors.NumericSensor_4_0_3 activePower; ///< Active power sensor
sensors.AccumulatingNumericSensor_2_0_3 activeEnergy; ///< Active energy sensor
};
structure Settings {
string name;
vector<Outlet_2_1_5> members;
};
structure MetaData {
int groupId; ///< (ID) Value under which OutletGroupManager references this group,
///< unique only for a given point in time
int uniqueId; ///< (Random) ID value uniquely identifying this group,
///< even after group deletions and creations of new groups
};
/** Event: Group sensors have changed */
valueobject SensorsChangedEvent extends idl.Event {
Sensors oldSensors; ///< Sensors before change
Sensors newSensors; ///< Sensors after change
};
/** Event: Group settings have been changed */
valueobject SettingsChangedEvent extends event.UserEvent {
Settings oldSettings; ///< Settings before change
Settings newSettings; ///< Settings after change
};
/** Event: Group switch operation has been invoked */
valueobject PowerControlEvent extends event.UserEvent {
Outlet_2_1_5.PowerState state; ///< Target power state, only valid if not cycling
boolean cycle; ///< Whether a power cycle operation was invoked
};
/**
* Retrieve the PDU sensors.
*
* @return PDU sensors
*/
Sensors getSensors();
MetaData getMetaData();
/**
* Retrieve the PDU settings.
*
* @return PDU settings
*/
Settings getSettings();
/**
* 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);
/**
* Switch all outlets.
*
* @param pstate New power state for all outlets
*
* @return 0 if OK
*/
int setAllOutletPowerStates(in Outlet_2_1_5.PowerState pstate);
/**
* Power-cycle all outlets.
*
* @return 0 if OK
*/
int cycleAllOutletPowerStates();
};
}
#endif
pdumodel::OutletGroup_1_0_1::MetaData::uniqueId
int uniqueId
(Random) ID value uniquely identifying this group, even after group deletions and creations of new gr...
Definition: OutletGroup.idl:31
pdumodel::OutletGroup_1_0_1
Main PDU interface.
Definition: OutletGroup.idl:15
pdumodel::OutletGroup_1_0_1::Sensors::activePower
sensors::NumericSensor_4_0_3 activePower
Active power sensor.
Definition: OutletGroup.idl:19
pdumodel::OutletGroup_1_0_1::cycle
boolean cycle
Whether a power cycle operation was invoked.
Definition: OutletGroup.idl:50
pdumodel::OutletGroup_1_0_1::Settings
Definition: OutletGroup.idl:23
pdumodel::OutletGroup_1_0_1::newSettings
Settings newSettings
Settings after change.
Definition: OutletGroup.idl:44
idl
Basic IDL definitions.
Definition: Event.idl:10
pdumodel::OutletGroup_1_0_1::Sensors
Definition: OutletGroup.idl:18
pdumodel::OutletGroup_1_0_1::Sensors::activeEnergy
sensors::AccumulatingNumericSensor_2_0_3 activeEnergy
Active energy sensor.
Definition: OutletGroup.idl:20
pdumodel::OutletGroup_1_0_1::MetaData
Definition: OutletGroup.idl:28
sensors::AccumulatingNumericSensor_2_0_3
A sensor which accumulates numeric readings (e.g.
Definition: AccumulatingNumericSensor.idl:16
pdumodel::Outlet_2_1_5::PowerState
PowerState
Outlet power state.
Definition: Outlet.idl:50
pdumodel::OutletGroup_1_0_1::newSensors
Sensors newSensors
Sensors after change.
Definition: OutletGroup.idl:38
sensors
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
pdumodel
PDU Model.
Definition: Ade.idl:12
pdumodel::Outlet_2_1_5
Outlet interface
Definition: Outlet.idl:29
sensors::NumericSensor_4_0_3
A sensor with numeric readings.
Definition: NumericSensor.idl:17
pdumodel::OutletGroup_1_0_1::MetaData::groupId
int groupId
(ID) Value under which OutletGroupManager references this group, unique only for a given point in tim...
Definition: OutletGroup.idl:29