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
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 */
64
65 /**
66 * Retrieve the outlet group metadata.
67 *
68 * @return outlet group metadata
69 */
71
72 /**
73 * Retrieve the outlet group settings.
74 *
75 * @return outlet group settings
76 */
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 */
97
98 /**
99 * Power-cycle all member outlets.
100 *
101 * @return 0 if OK
102 */
104 };
105}
106
107#endif
Outlet group interface.
Definition: OutletGroup.idl:15
Sensors getSensors()
Retrieve the outlet group sensors.
MetaData getMetaData()
Retrieve the outlet group metadata.
int setAllOutletPowerStates(in Outlet::PowerState pstate)
Switch all member outlets.
int cycleAllOutletPowerStates()
Power-cycle all member outlets.
Settings getSettings()
Retrieve the outlet group settings.
int setSettings(in Settings settings)
Change the outlet group settings.
Outlet interface
Definition: Outlet.idl:30
PowerState
Outlet power state.
Definition: Outlet.idl:56
A sensor which accumulates numeric readings (e.g.
A sensor with numeric readings.
Basic IDL definitions.
Definition: Event.idl:10
PDU Model.
Definition: Ade.idl:12
Sensors Model.
Common base for all events.
Definition: Event.idl:13
Outlet group metadata.
Definition: OutletGroup.idl:33
int groupId
(ID) Value under which OutletGroupManager references this group, unique only for a given point in tim...
Definition: OutletGroup.idl:34
int uniqueId
(Random) ID value uniquely identifying this group, even after group deletions and creations of new gr...
Definition: OutletGroup.idl:36
Event: Group switch operation has been invoked.
Definition: OutletGroup.idl:53
boolean cycle
Whether a power cycle operation was invoked.
Definition: OutletGroup.idl:55
Outlet::PowerState state
Target power state, only valid if not cycling.
Definition: OutletGroup.idl:54
Event: Group sensors have changed.
Definition: OutletGroup.idl:41
Sensors newSensors
Sensors after change.
Definition: OutletGroup.idl:43
Sensors oldSensors
Sensors before change.
Definition: OutletGroup.idl:42
Outlet group sensors.
Definition: OutletGroup.idl:19
sensors::NumericSensor apparentPower
Apparent power sensor.
Definition: OutletGroup.idl:21
sensors::AccumulatingNumericSensor apparentEnergy
Apparent energy sensor.
Definition: OutletGroup.idl:23
sensors::NumericSensor activePower
Active power sensor.
Definition: OutletGroup.idl:20
sensors::AccumulatingNumericSensor activeEnergy
Active energy sensor.
Definition: OutletGroup.idl:22
Event: Group settings have been changed.
Definition: OutletGroup.idl:47
Settings newSettings
Settings after change.
Definition: OutletGroup.idl:49
Settings oldSettings
Settings before change.
Definition: OutletGroup.idl:48
Outlet group settings.
Definition: OutletGroup.idl:27
string name
User-defined name.
Definition: OutletGroup.idl:28
vector< Outlet > members
List of member outlets.
Definition: OutletGroup.idl:29