Raritan PX2/PX3 JSON-RPC API
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 
12 module pdumodel {
13 
14  /** Main PDU interface */
15  interface OutletGroup_1_0_1 {
16  constant int ERR_INVALID_ARGUMENT = 1;
17 
18  structure Sensors {
19  sensors.NumericSensor_4_0_3 activePower; ///< Active power sensor
21  };
22 
23  structure Settings {
24  string name;
25  vector<Outlet_2_1_5> members;
26  };
27 
28  structure MetaData {
29  int groupId; ///< (ID) Value under which OutletGroupManager references this group,
30  ///< unique only for a given point in time
31  int uniqueId; ///< (Random) ID value uniquely identifying this group,
32  ///< even after group deletions and creations of new groups
33  };
34 
35  /** Event: Group sensors have changed */
36  valueobject SensorsChangedEvent extends idl.Event {
37  Sensors oldSensors; ///< Sensors before change
38  Sensors newSensors; ///< Sensors after change
39  };
40 
41  /** Event: Group settings have been changed */
42  valueobject SettingsChangedEvent extends event.UserEvent {
43  Settings oldSettings; ///< Settings before change
44  Settings newSettings; ///< Settings after change
45  };
46 
47  /** Event: Group switch operation has been invoked */
48  valueobject PowerControlEvent extends event.UserEvent {
49  Outlet_2_1_5.PowerState state; ///< Target power state, only valid if not cycling
50  boolean cycle; ///< Whether a power cycle operation was invoked
51  };
52 
53  /**
54  * Retrieve the PDU sensors.
55  *
56  * @return PDU sensors
57  */
58  Sensors getSensors();
59 
60  MetaData getMetaData();
61 
62  /**
63  * Retrieve the PDU settings.
64  *
65  * @return PDU settings
66  */
67  Settings getSettings();
68 
69  /**
70  * Change the PDU settings.
71  *
72  * @param settings New PDU settings
73  *
74  * @return 0 if OK
75  * @return 1 if any parameters are invalid
76  */
77  int setSettings(in Settings settings);
78 
79  /**
80  * Switch all outlets.
81  *
82  * @param pstate New power state for all outlets
83  *
84  * @return 0 if OK
85  */
86  int setAllOutletPowerStates(in Outlet_2_1_5.PowerState pstate);
87 
88  /**
89  * Power-cycle all outlets.
90  *
91  * @return 0 if OK
92  */
93  int cycleAllOutletPowerStates();
94  };
95 }
96 
97 #endif
int uniqueId
(Random) ID value uniquely identifying this group, even after group deletions and creations of new gr...
Definition: OutletGroup.idl:31
Main PDU interface.
Definition: OutletGroup.idl:15
sensors::NumericSensor_4_0_3 activePower
Active power sensor.
Definition: OutletGroup.idl:19
boolean cycle
Whether a power cycle operation was invoked.
Definition: OutletGroup.idl:50
Definition: OutletGroup.idl:23
Settings newSettings
Settings after change.
Definition: OutletGroup.idl:44
Basic IDL definitions.
Definition: Event.idl:10
Definition: OutletGroup.idl:18
sensors::AccumulatingNumericSensor_2_0_3 activeEnergy
Active energy sensor.
Definition: OutletGroup.idl:20
Definition: OutletGroup.idl:28
A sensor which accumulates numeric readings (e.g.
Definition: AccumulatingNumericSensor.idl:16
PowerState
Outlet power state.
Definition: Outlet.idl:50
Sensors newSensors
Sensors after change.
Definition: OutletGroup.idl:38
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
PDU Model.
Definition: Ade.idl:12
Outlet interface
Definition: Outlet.idl:29
A sensor with numeric readings.
Definition: NumericSensor.idl:17
int groupId
(ID) Value under which OutletGroupManager references this group, unique only for a given point in tim...
Definition: OutletGroup.idl:29