Raritan / Server Technology Xerus™ PDU JSON-RPC API
Circuit.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3  * Copyright 2015 Raritan Inc. All rights reserved.
4  */
5 
6 #ifndef __PDUMODEL_CIRCUIT_IDL__
7 #define __PDUMODEL_CIRCUIT_IDL__
8 
9 #include <NumericSensor.idl>
10 #include <Pole.idl>
11 #include <UserEvent.idl>
12 
13 /**
14  * PDU Model
15  */
16 module pdumodel {
17 
18  /**
19  * BCM circuit
20  */
21  interface Circuit {
22 
23  constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
24  constant int ERR_METER_CHANNEL_BUSY = 2; ///< Meter channel already in use
25 
26  /** Circuit type */
27  enumeration Type {
28  ONE_PHASE_LN, ///< One-phase line-neutral
29  ONE_PHASE_LL, ///< One-phase line-line
30  ONE_PHASE_LLN, ///< One-phase line-line-neutral
31  THREE_PHASE ///< Three-phase
32  };
33 
34  /** Circuit configuration */
35  structure Config {
36  int position; ///< Circuit position of first pole
37  Type type; ///< Circuit type
38  };
39 
40  /**
41  * Retrieve the circuit configuration.
42  *
43  * @return Circuit configuration
44  */
46 
47  /** Circuit sensors */
48  structure Sensors {
49  sensors.NumericSensor current; ///< RMS current sensor
50  sensors.NumericSensor activePower; ///< Active power sensor
51  sensors.NumericSensor reactivePower; ///< Reactive power sensor
52  sensors.NumericSensor apparentPower; ///< Apparent power sensor
53  sensors.NumericSensor powerFactor; ///< Power factor sensor
54  sensors.NumericSensor phaseAngle; ///< Phase angle sensor
55  sensors.NumericSensor displacementPowerFactor; ///< Displacement power factor
56  sensors.NumericSensor activeEnergy; ///< Active energy sensor
57  sensors.NumericSensor unbalancedCurrent; ///< Current unbalance sensor
58  sensors.NumericSensor crestFactor; ///< Crest factor sensor
59  sensors.NumericSensor activePowerDemand; ///< Active power demand
60  };
61 
62  /**
63  * Retrieve the circuit sensors.
64  *
65  * @return Circuit sensors
66  */
68 
69  /**
70  * Retrieve the list of circuit poles.
71  *
72  * @return List of circuit poles
73  */
74  vector<Pole> getPoles();
75 
76  /** Circuit pole settings */
77  structure PoleSettings {
78  pdumodel.PowerLine line; ///< Power line
79  int meterChannel; ///< Meter channel index; -1 for unmetered poles
80  };
81 
82  /** Circuit settings */
83  structure Settings {
84  string name; ///< Circuit name
85  int rating; ///< Circuit current rating
86  int ctRating; ///< Current transformer rating
87  vector<PoleSettings> poleSettings; ///< Pole settings (excluding Neutral)
88  };
89 
90  /** Event: Circuit settings have changed */
91  valueobject SettingsChangedEvent extends event.UserEvent {
92  Settings oldSettings; ///< Settings before change
93  Settings newSettings; ///< Settings after change
94  };
95 
96  /**
97  * Get the circuit settings.
98  *
99  * @return Circuit settings
100  */
102 
103  /**
104  * Change the circuit settings.
105  *
106  * @param settings New circuit settings
107  *
108  * @return 0 if OK
109  * @return 1 if any parameters are invalid
110  * @return 2 if the requested meter channel is already in used
111  */
112  int setSettings(in Settings settings);
113 
114  };
115 
116 }
117 
118 #endif
BCM circuit.
Definition: Circuit.idl:21
int setSettings(in Settings settings)
Change the circuit settings.
Sensors getSensors()
Retrieve the circuit sensors.
Type
Circuit type.
Definition: Circuit.idl:27
@ ONE_PHASE_LL
One-phase line-line.
Definition: Circuit.idl:29
@ ONE_PHASE_LLN
One-phase line-line-neutral.
Definition: Circuit.idl:30
@ ONE_PHASE_LN
One-phase line-neutral.
Definition: Circuit.idl:28
Settings getSettings()
Get the circuit settings.
Config getConfig()
Retrieve the circuit configuration.
vector< Pole > getPoles()
Retrieve the list of circuit poles.
A sensor with numeric readings.
Definition: NumericSensor.idl:17
PDU Model.
Definition: Ade.idl:12
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
Circuit configuration.
Definition: Circuit.idl:35
Type type
Circuit type.
Definition: Circuit.idl:37
int position
Circuit position of first pole.
Definition: Circuit.idl:36
Circuit pole settings.
Definition: Circuit.idl:77
int meterChannel
Meter channel index; -1 for unmetered poles.
Definition: Circuit.idl:79
pdumodel::PowerLine line
Power line.
Definition: Circuit.idl:78
Circuit sensors.
Definition: Circuit.idl:48
sensors::NumericSensor activeEnergy
Active energy sensor.
Definition: Circuit.idl:56
sensors::NumericSensor powerFactor
Power factor sensor.
Definition: Circuit.idl:53
sensors::NumericSensor crestFactor
Crest factor sensor.
Definition: Circuit.idl:58
sensors::NumericSensor reactivePower
Reactive power sensor.
Definition: Circuit.idl:51
sensors::NumericSensor activePowerDemand
Active power demand.
Definition: Circuit.idl:59
sensors::NumericSensor current
RMS current sensor.
Definition: Circuit.idl:49
sensors::NumericSensor displacementPowerFactor
Displacement power factor.
Definition: Circuit.idl:55
sensors::NumericSensor unbalancedCurrent
Current unbalance sensor.
Definition: Circuit.idl:57
sensors::NumericSensor phaseAngle
Phase angle sensor.
Definition: Circuit.idl:54
sensors::NumericSensor apparentPower
Apparent power sensor.
Definition: Circuit.idl:52
sensors::NumericSensor activePower
Active power sensor.
Definition: Circuit.idl:50
Event: Circuit settings have changed.
Definition: Circuit.idl:91
Settings oldSettings
Settings before change.
Definition: Circuit.idl:92
Settings newSettings
Settings after change.
Definition: Circuit.idl:93
Circuit settings.
Definition: Circuit.idl:83
string name
Circuit name.
Definition: Circuit.idl:84
vector< PoleSettings > poleSettings
Pole settings (excluding Neutral)
Definition: Circuit.idl:87
int rating
Circuit current rating.
Definition: Circuit.idl:85
int ctRating
Current transformer rating.
Definition: Circuit.idl:86