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
pdumodel::Circuit_1_0_3::Sensors::activePower
sensors::NumericSensor_4_0_3 activePower
Active power sensor.
Definition: Circuit.idl:50
pdumodel::Circuit_1_0_3::Config
Circuit configuration.
Definition: Circuit.idl:35
pdumodel::Circuit_1_0_3::Sensors::phaseAngle
sensors::NumericSensor_4_0_3 phaseAngle
Phase angle sensor.
Definition: Circuit.idl:54
pdumodel::Circuit_1_0_3::newSettings
Settings newSettings
Settings after change.
Definition: Circuit.idl:92
pdumodel::Circuit_1_0_3::Settings
Circuit settings.
Definition: Circuit.idl:82
pdumodel::Circuit_1_0_3
BCM circuit.
Definition: Circuit.idl:21
pdumodel::Circuit_1_0_3::Sensors::apparentPower
sensors::NumericSensor_4_0_3 apparentPower
Apparent power sensor.
Definition: Circuit.idl:52
pdumodel::Circuit_1_0_3::Sensors::crestFactor
sensors::NumericSensor_4_0_3 crestFactor
Crest factor sensor.
Definition: Circuit.idl:58
pdumodel::Circuit_1_0_3::Sensors::displacementPowerFactor
sensors::NumericSensor_4_0_3 displacementPowerFactor
Displacement power factor.
Definition: Circuit.idl:55
pdumodel::Circuit_1_0_3::Settings::name
string name
Circuit name.
Definition: Circuit.idl:83
pdumodel::Circuit_1_0_3::Config::type
Type type
Circuit type.
Definition: Circuit.idl:37
pdumodel::Circuit_1_0_3::PoleSettings::line
pdumodel::PowerLine_2_0_0 line
Power line.
Definition: Circuit.idl:77
pdumodel::Circuit_1_0_3::Sensors::unbalancedCurrent
sensors::NumericSensor_4_0_3 unbalancedCurrent
Current unbalance sensor.
Definition: Circuit.idl:57
pdumodel::Circuit_1_0_3::ONE_PHASE_LLN
One-phase line-line-neutral.
Definition: Circuit.idl:30
pdumodel::Circuit_1_0_3::Type
Type
Circuit type.
Definition: Circuit.idl:27
pdumodel::Circuit_1_0_3::Sensors::activeEnergy
sensors::NumericSensor_4_0_3 activeEnergy
Active energy sensor.
Definition: Circuit.idl:56
pdumodel::Circuit_1_0_3::Sensors::current
sensors::NumericSensor_4_0_3 current
RMS current sensor.
Definition: Circuit.idl:49
pdumodel::Circuit_1_0_3::Sensors
Circuit sensors.
Definition: Circuit.idl:48
sensors
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
pdumodel
PDU Model.
Definition: Ade.idl:12
pdumodel::Circuit_1_0_3::ONE_PHASE_LN
One-phase line-neutral.
Definition: Circuit.idl:28
pdumodel::Circuit_1_0_3::Config::position
int position
Circuit position of first pole.
Definition: Circuit.idl:36
pdumodel::Circuit_1_0_3::Sensors::powerFactor
sensors::NumericSensor_4_0_3 powerFactor
Power factor sensor.
Definition: Circuit.idl:53
pdumodel::Circuit_1_0_3::Settings::rating
int rating
Circuit current rating.
Definition: Circuit.idl:84
pdumodel::Circuit_1_0_3::Settings::ctRating
int ctRating
Current transformer rating.
Definition: Circuit.idl:85
sensors::NumericSensor_4_0_3
A sensor with numeric readings.
Definition: NumericSensor.idl:17
pdumodel::Circuit_1_0_3::PoleSettings::meterChannel
int meterChannel
Meter channel index; -1 for unmetered poles.
Definition: Circuit.idl:78
pdumodel::Circuit_1_0_3::Settings::poleSettings
vector< PoleSettings > poleSettings
Pole settings (excluding Neutral)
Definition: Circuit.idl:86
pdumodel::Circuit_1_0_3::ONE_PHASE_LL
One-phase line-line.
Definition: Circuit.idl:29
pdumodel::Circuit_1_0_3::PoleSettings
Circuit pole settings.
Definition: Circuit.idl:76
pdumodel::Circuit_1_0_3::Sensors::reactivePower
sensors::NumericSensor_4_0_3 reactivePower
Reactive power sensor.
Definition: Circuit.idl:51