Loading...
Searching...
No Matches
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 {
/** Outlet group interface */
interface OutletGroup {
constant int ERR_INVALID_ARGUMENT = 1;
/** Outlet group sensors */
structure Sensors {
sensors.NumericSensor activePower; ///< Active power sensor
sensors.NumericSensor apparentPower; ///< Apparent power sensor
sensors.AccumulatingNumericSensor activeEnergy; ///< Active energy sensor
sensors.AccumulatingNumericSensor apparentEnergy; ///< Apparent energy sensor
};
/** Outlet group settings */
structure Settings {
string name; ///< User-defined name
vector<Outlet> members; ///< List of member outlets
};
/** Outlet group metadata */
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.PowerState state; ///< Target power state, only valid if not cycling
boolean cycle; ///< Whether a power cycle operation was invoked
};
/**
* Retrieve the outlet group sensors.
*
* @return outlet group sensors
*/
Sensors getSensors();
/**
* Retrieve the outlet group metadata.
*
* @return outlet group metadata
*/
MetaData getMetaData();
/**
* Retrieve the outlet group settings.
*
* @return outlet group settings
*/
Settings getSettings();
/**
* Change the outlet group settings.
*
* @param settings New outlet group settings
*
* @return 0 if OK
* @return 1 if any parameters are invalid
*/
int setSettings(in Settings settings);
/**
* Switch all member outlets.
*
* @param pstate New power state for all outlets
*
* @return 0 if OK
*/
int setAllOutletPowerStates(in Outlet.PowerState pstate);
/**
* Power-cycle all member outlets.
*
* @return 0 if OK
*/
int cycleAllOutletPowerStates();
};
}
#endif
pdumodel::OutletGroup
Outlet group interface.
Definition OutletGroup.idl:15
pdumodel::OutletGroup::getSensors
Sensors getSensors()
Retrieve the outlet group sensors.
pdumodel::OutletGroup::getMetaData
MetaData getMetaData()
Retrieve the outlet group metadata.
pdumodel::OutletGroup::setAllOutletPowerStates
int setAllOutletPowerStates(in Outlet::PowerState pstate)
Switch all member outlets.
pdumodel::OutletGroup::cycleAllOutletPowerStates
int cycleAllOutletPowerStates()
Power-cycle all member outlets.
pdumodel::OutletGroup::getSettings
Settings getSettings()
Retrieve the outlet group settings.
pdumodel::OutletGroup::setSettings
int setSettings(in Settings settings)
Change the outlet group settings.
pdumodel::Outlet
Outlet interface
Definition Outlet.idl:30
pdumodel::Outlet::PowerState
PowerState
Outlet power state.
Definition Outlet.idl:56
sensors::AccumulatingNumericSensor
A sensor which accumulates numeric readings (e.g.
Definition AccumulatingNumericSensor.idl:16
sensors::NumericSensor
A sensor with numeric readings.
Definition NumericSensor.idl:17
idl
Basic IDL definitions.
Definition Event.idl:10
pdumodel
PDU Model.
Definition Circuit.idl:16
sensors
Sensors Model.
Definition AccumulatingNumericSensor.idl:13
idl::Event
Common base for all events.
Definition Event.idl:13
pdumodel::OutletGroup::MetaData
Outlet group metadata.
Definition OutletGroup.idl:33
pdumodel::OutletGroup::MetaData::groupId
int groupId
(ID) Value under which OutletGroupManager references this group, unique only for a given point in tim...
Definition OutletGroup.idl:34
pdumodel::OutletGroup::MetaData::uniqueId
int uniqueId
(Random) ID value uniquely identifying this group, even after group deletions and creations of new gr...
Definition OutletGroup.idl:36
pdumodel::OutletGroup::PowerControlEvent
Event: Group switch operation has been invoked.
Definition OutletGroup.idl:53
pdumodel::OutletGroup::PowerControlEvent::cycle
boolean cycle
Whether a power cycle operation was invoked.
Definition OutletGroup.idl:55
pdumodel::OutletGroup::PowerControlEvent::state
Outlet::PowerState state
Target power state, only valid if not cycling.
Definition OutletGroup.idl:54
pdumodel::OutletGroup::SensorsChangedEvent
Event: Group sensors have changed.
Definition OutletGroup.idl:41
pdumodel::OutletGroup::SensorsChangedEvent::newSensors
Sensors newSensors
Sensors after change.
Definition OutletGroup.idl:43
pdumodel::OutletGroup::SensorsChangedEvent::oldSensors
Sensors oldSensors
Sensors before change.
Definition OutletGroup.idl:42
pdumodel::OutletGroup::Sensors
Outlet group sensors.
Definition OutletGroup.idl:19
pdumodel::OutletGroup::Sensors::apparentPower
sensors::NumericSensor apparentPower
Apparent power sensor.
Definition OutletGroup.idl:21
pdumodel::OutletGroup::Sensors::apparentEnergy
sensors::AccumulatingNumericSensor apparentEnergy
Apparent energy sensor.
Definition OutletGroup.idl:23
pdumodel::OutletGroup::Sensors::activePower
sensors::NumericSensor activePower
Active power sensor.
Definition OutletGroup.idl:20
pdumodel::OutletGroup::Sensors::activeEnergy
sensors::AccumulatingNumericSensor activeEnergy
Active energy sensor.
Definition OutletGroup.idl:22
pdumodel::OutletGroup::SettingsChangedEvent
Event: Group settings have been changed.
Definition OutletGroup.idl:47
pdumodel::OutletGroup::SettingsChangedEvent::newSettings
Settings newSettings
Settings after change.
Definition OutletGroup.idl:49
pdumodel::OutletGroup::SettingsChangedEvent::oldSettings
Settings oldSettings
Settings before change.
Definition OutletGroup.idl:48
pdumodel::OutletGroup::Settings
Outlet group settings.
Definition OutletGroup.idl:27
pdumodel::OutletGroup::Settings::name
string name
User-defined name.
Definition OutletGroup.idl:28
pdumodel::OutletGroup::Settings::members
vector< Outlet > members
List of member outlets.
Definition OutletGroup.idl:29