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_4 {
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_4 current; ///< RMS current sensor
50  sensors.NumericSensor_4_0_4 activePower; ///< Active power sensor
51  sensors.NumericSensor_4_0_4 reactivePower; ///< Reactive power sensor
52  sensors.NumericSensor_4_0_4 apparentPower; ///< Apparent power sensor
53  sensors.NumericSensor_4_0_4 powerFactor; ///< Power factor sensor
54  sensors.NumericSensor_4_0_4 phaseAngle; ///< Phase angle sensor
55  sensors.NumericSensor_4_0_4 displacementPowerFactor; ///< Displacement power factor
56  sensors.NumericSensor_4_0_4 activeEnergy; ///< Active energy sensor
57  sensors.NumericSensor_4_0_4 unbalancedCurrent; ///< Current unbalance sensor
58  sensors.NumericSensor_4_0_4 crestFactor; ///< Crest factor sensor
59  sensors.NumericSensor_4_0_4 activePowerDemand; ///< Active power demand
60  };
61 
62  /**
63  * Retrieve the circuit sensors.
64  *
65  * @return Circuit sensors
66  */
67  Sensors getSensors();
68 
69  /**
70  * Retrieve the list of circuit poles.
71  *
72  * @return List of circuit poles
73  */
74  vector<Pole_6_0_0> getPoles();
75 
76  /** Circuit pole settings */
77  structure PoleSettings {
78  pdumodel.PowerLine_2_0_0 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  */
101  Settings getSettings();
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
string name
Circuit name.
Definition: Circuit.idl:84
int position
Circuit position of first pole.
Definition: Circuit.idl:36
A sensor with numeric readings.
Definition: NumericSensor.idl:17
Type type
Circuit type.
Definition: Circuit.idl:37
Circuit sensors.
Definition: Circuit.idl:48
Circuit pole settings.
Definition: Circuit.idl:77
sensors::NumericSensor_4_0_4 powerFactor
Power factor sensor.
Definition: Circuit.idl:53
Circuit configuration.
Definition: Circuit.idl:35
int rating
Circuit current rating.
Definition: Circuit.idl:85
Settings newSettings
Settings after change.
Definition: Circuit.idl:93
int ctRating
Current transformer rating.
Definition: Circuit.idl:86
sensors::NumericSensor_4_0_4 apparentPower
Apparent power sensor.
Definition: Circuit.idl:52
Circuit settings.
Definition: Circuit.idl:83
BCM circuit.
Definition: Circuit.idl:21
sensors::NumericSensor_4_0_4 activePower
Active power sensor.
Definition: Circuit.idl:50
sensors::NumericSensor_4_0_4 crestFactor
Crest factor sensor.
Definition: Circuit.idl:58
sensors::NumericSensor_4_0_4 phaseAngle
Phase angle sensor.
Definition: Circuit.idl:54
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
sensors::NumericSensor_4_0_4 reactivePower
Reactive power sensor.
Definition: Circuit.idl:51
sensors::NumericSensor_4_0_4 activePowerDemand
Active power demand.
Definition: Circuit.idl:59
PDU Model.
Definition: Ade.idl:12
One-phase line-neutral.
Definition: Circuit.idl:28
pdumodel::PowerLine_2_0_0 line
Power line.
Definition: Circuit.idl:78
sensors::NumericSensor_4_0_4 current
RMS current sensor.
Definition: Circuit.idl:49
One-phase line-line.
Definition: Circuit.idl:29
One-phase line-line-neutral.
Definition: Circuit.idl:30
sensors::NumericSensor_4_0_4 activeEnergy
Active energy sensor.
Definition: Circuit.idl:56
sensors::NumericSensor_4_0_4 displacementPowerFactor
Displacement power factor.
Definition: Circuit.idl:55
vector< PoleSettings > poleSettings
Pole settings (excluding Neutral)
Definition: Circuit.idl:87
sensors::NumericSensor_4_0_4 unbalancedCurrent
Current unbalance sensor.
Definition: Circuit.idl:57
Type
Circuit type.
Definition: Circuit.idl:27
int meterChannel
Meter channel index; -1 for unmetered poles.
Definition: Circuit.idl:79