Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

Loading...
Searching...
No Matches
OutletGroup.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2018 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __PDUMODEL_OUTLETGROUP_IDL__
7#define __PDUMODEL_OUTLETGROUP_IDL__
8
9#include <AccumulatingNumericSensor.idl>
10#include <Outlet.idl>
11
12module pdumodel {
13
14 /** Outlet group interface */
15 interface OutletGroup {
16 constant int ERR_INVALID_ARGUMENT = 1;
17
18 /** Outlet group sensors */
19 structure Sensors {
20 sensors.NumericSensor activePower; ///< Active power sensor
21 sensors.NumericSensor apparentPower; ///< Apparent power sensor
22 sensors.AccumulatingNumericSensor activeEnergy; ///< Active energy sensor
23 sensors.AccumulatingNumericSensor apparentEnergy; ///< Apparent energy sensor
24 };
25
26 /** Outlet group settings */
27 structure Settings {
28 string name; ///< User-defined name
29 vector<Outlet> members; ///< List of member outlets
30 };
31
32 /** Outlet group metadata */
33 structure MetaData {
34 int groupId; ///< (ID) Value under which OutletGroupManager references this group,
35 ///< unique only for a given point in time
36 int uniqueId; ///< (Random) ID value uniquely identifying this group,
37 ///< even after group deletions and creations of new groups
38 };
39
40 /** Event: Group sensors have changed */
41 valueobject SensorsChangedEvent extends idl.Event {
42 Sensors oldSensors; ///< Sensors before change
43 Sensors newSensors; ///< Sensors after change
44 };
45
46 /** Event: Group settings have been changed */
47 valueobject SettingsChangedEvent extends event.UserEvent {
48 Settings oldSettings; ///< Settings before change
49 Settings newSettings; ///< Settings after change
50 };
51
52 /** Event: Group switch operation has been invoked */
53 valueobject PowerControlEvent extends event.UserEvent {
54 Outlet.PowerState state; ///< Target power state, only valid if not cycling
55 boolean cycle; ///< Whether a power cycle operation was invoked
56 };
57
58 /**
59 * Retrieve the outlet group sensors.
60 *
61 * @return outlet group sensors
62 */
63 Sensors getSensors();
64
65 /**
66 * Retrieve the outlet group metadata.
67 *
68 * @return outlet group metadata
69 */
70 MetaData getMetaData();
71
72 /**
73 * Retrieve the outlet group settings.
74 *
75 * @return outlet group settings
76 */
77 Settings getSettings();
78
79 /**
80 * Change the outlet group settings.
81 *
82 * @param settings New outlet group settings
83 *
84 * @return 0 if OK
85 * @return 1 if any parameters are invalid
86 */
87 int setSettings(in Settings settings);
88
89 /**
90 * Switch all member outlets.
91 *
92 * @param pstate New power state for all outlets
93 *
94 * @return 0 if OK
95 */
96 int setAllOutletPowerStates(in Outlet.PowerState pstate);
97
98 /**
99 * Power-cycle all member outlets.
100 *
101 * @return 0 if OK
102 */
103 int cycleAllOutletPowerStates();
104 };
105}
106
107#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