Raritan PX2/PX3 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_1_0_3 {
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  */
45  Config getConfig();
46 
47  /** Circuit sensors */
48  structure Sensors {
49  sensors.NumericSensor_4_0_3 current; ///< RMS current sensor
50  sensors.NumericSensor_4_0_3 activePower; ///< Active power sensor
51  sensors.NumericSensor_4_0_3 reactivePower; ///< Reactive power sensor
52  sensors.NumericSensor_4_0_3 apparentPower; ///< Apparent power sensor
53  sensors.NumericSensor_4_0_3 powerFactor; ///< Power factor sensor
54  sensors.NumericSensor_4_0_3 phaseAngle; ///< Phase angle sensor
55  sensors.NumericSensor_4_0_3 displacementPowerFactor; ///< Displacement power factor
56  sensors.NumericSensor_4_0_3 activeEnergy; ///< Active energy sensor
57  sensors.NumericSensor_4_0_3 unbalancedCurrent; ///< Current unbalance sensor
58  sensors.NumericSensor_4_0_3 crestFactor; ///< Crest factor sensor
59  };
60 
61  /**
62  * Retrieve the circuit sensors.
63  *
64  * @return Circuit sensors
65  */
66  Sensors getSensors();
67 
68  /**
69  * Retrieve the list of circuit poles.
70  *
71  * @return List of circuit poles
72  */
73  vector<Pole_5_0_0> getPoles();
74 
75  /** Circuit pole settings */
76  structure PoleSettings {
77  pdumodel.PowerLine_2_0_0 line; ///< Power line
78  int meterChannel; ///< Meter channel index; -1 for unmetered poles
79  };
80 
81  /** Circuit settings */
82  structure Settings {
83  string name; ///< Circuit name
84  int rating; ///< Circuit current rating
85  int ctRating; ///< Current transformer rating
86  vector<PoleSettings> poleSettings; ///< Pole settings (excluding Neutral)
87  };
88 
89  /** Event: Circuit settings have changed */
90  valueobject SettingsChangedEvent extends event.UserEvent {
91  Settings oldSettings; ///< Settings before change
92  Settings newSettings; ///< Settings after change
93  };
94 
95  /**
96  * Get the circuit settings.
97  *
98  * @return Circuit settings
99  */
100  Settings getSettings();
101 
102  /**
103  * Change the circuit settings.
104  *
105  * @param settings New circuit settings
106  *
107  * @return 0 if OK
108  * @return 1 if any parameters are invalid
109  * @return 2 if the requested meter channel is already in used
110  */
111  int setSettings(in Settings settings);
112 
113  };
114 
115 }
116 
117 #endif
sensors::NumericSensor_4_0_3 activePower
Active power sensor.
Definition: Circuit.idl:50
Circuit configuration.
Definition: Circuit.idl:35
sensors::NumericSensor_4_0_3 phaseAngle
Phase angle sensor.
Definition: Circuit.idl:54
Settings newSettings
Settings after change.
Definition: Circuit.idl:92
Circuit settings.
Definition: Circuit.idl:82
BCM circuit.
Definition: Circuit.idl:21
sensors::NumericSensor_4_0_3 apparentPower
Apparent power sensor.
Definition: Circuit.idl:52
sensors::NumericSensor_4_0_3 crestFactor
Crest factor sensor.
Definition: Circuit.idl:58
sensors::NumericSensor_4_0_3 displacementPowerFactor
Displacement power factor.
Definition: Circuit.idl:55
string name
Circuit name.
Definition: Circuit.idl:83
Type type
Circuit type.
Definition: Circuit.idl:37
pdumodel::PowerLine_2_0_0 line
Power line.
Definition: Circuit.idl:77
sensors::NumericSensor_4_0_3 unbalancedCurrent
Current unbalance sensor.
Definition: Circuit.idl:57
One-phase line-line-neutral.
Definition: Circuit.idl:30
Type
Circuit type.
Definition: Circuit.idl:27
sensors::NumericSensor_4_0_3 activeEnergy
Active energy sensor.
Definition: Circuit.idl:56
sensors::NumericSensor_4_0_3 current
RMS current sensor.
Definition: Circuit.idl:49
Circuit sensors.
Definition: Circuit.idl:48
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
PDU Model.
Definition: Ade.idl:12
One-phase line-neutral.
Definition: Circuit.idl:28
int position
Circuit position of first pole.
Definition: Circuit.idl:36
sensors::NumericSensor_4_0_3 powerFactor
Power factor sensor.
Definition: Circuit.idl:53
int rating
Circuit current rating.
Definition: Circuit.idl:84
int ctRating
Current transformer rating.
Definition: Circuit.idl:85
A sensor with numeric readings.
Definition: NumericSensor.idl:17
int meterChannel
Meter channel index; -1 for unmetered poles.
Definition: Circuit.idl:78
vector< PoleSettings > poleSettings
Pole settings (excluding Neutral)
Definition: Circuit.idl:86
One-phase line-line.
Definition: Circuit.idl:29
Circuit pole settings.
Definition: Circuit.idl:76
sensors::NumericSensor_4_0_3 reactivePower
Reactive power sensor.
Definition: Circuit.idl:51