Raritan PX2/PX3 JSON-RPC API

PowerMeter.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3 * Copyright 2015 Raritan Inc. All rights reserved.
4 */
5
6 #ifndef __PDUMODEL_POWER_METER_IDL__
7 #define __PDUMODEL_POWER_METER_IDL__
8
9 #include <Controller.idl>
10 #include <NumericSensor.idl>
11 #include <Pole.idl>
12 #include <StateSensor.idl>
13 #include <UserEvent.idl>
14
15 /**
16 * PDU Model
17 */
18 module pdumodel {
19
20 /**
21 * A three-phase power meter (PMC).
22 */
23 interface PowerMeter_1_1_5 {
24
25 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
26 constant int ERR_MODBUS_UNIT_IN_USE = 2; ///< Modbus unit address is already in use
27
28 /** Power meter type */
29 enumeration Type {
30 ONE_PHASE, ///< Single-phase meter (A)
31 SPLIT_PHASE, ///< Split-phase meter (A, B)
32 THREE_PHASE ///< Three-phase meter (A, B, C)
33 };
34
35 /** Power meter configuration */
36 structure Config {
37 int powerMeterId; ///< The meter board ID
38 Type type; ///< Power meter type
39 };
40
41 /**
42 * Retrieve the power meter configuration.
43 *
44 * @return Power meter configuration
45 */
46 Config getConfig();
47
48 /** Power meter sensors */
49 structure Sensors {
50 sensors.NumericSensor_4_0_3 voltage; ///< RMS voltage sensor
51 sensors.NumericSensor_4_0_3 lineFrequency; ///< Line AC frequency sensor
52 sensors.NumericSensor_4_0_3 current; ///< RMS current sensor
53 sensors.NumericSensor_4_0_3 activePower; ///< Active power sensor
54 sensors.NumericSensor_4_0_3 reactivePower; ///< Reactive power sensor
55 sensors.NumericSensor_4_0_3 apparentPower; ///< Apparent power sensor
56 sensors.NumericSensor_4_0_3 powerFactor; ///< Power factor sensor
57 sensors.NumericSensor_4_0_3 phaseAngle; ///< Phase angle sensor
58 sensors.NumericSensor_4_0_3 displacementPowerFactor; ///< Displacement power factor sensor
59 sensors.NumericSensor_4_0_3 activeEnergy; ///< Active energy sensor
60 sensors.NumericSensor_4_0_3 unbalancedCurrent; ///< Current unbalance sensor
61 sensors.NumericSensor_4_0_3 crestFactor; ///< Crest factor sensor
62 sensors.StateSensor_4_0_3 powerQuality; ///< Power quality sensor
63 };
64
65 /**
66 * Get the power meter sensors.
67 *
68 * @return Power meter sensors
69 */
70 Sensors getSensors();
71
72 /**
73 * Get the list of power meter poles.
74 *
75 * @return List of power meter poles (A, B, C, N, PE)
76 */
77 vector<Pole_5_0_0> getPoles();
78
79 /**
80 * Get the list of slave controllers for this power meter
81 *
82 * @return List of controllers
83 */
84 vector<Controller_4_0_1> getControllers();
85
86 /** Power meter settings */
87 structure Settings {
88 string name; ///< User-defined name
89 int currentRating; ///< Current rating in Amps
90 int phaseCtRating; ///< Phase current transformer rating in Amps (0 for none)
91 int neutralCtRating; ///< Neutral current transformer rating in Amps (0 for none)
92 int earthCtRating; ///< P.E. current transformer rating in Amps (0 for none)
93 int modbusUnitAddress; ///< Modbus unit address (1..255, 0 to disable Modbus for this meter)
94 };
95
96 /** Event: Power meter settings have changed */
97 valueobject SettingsChangedEvent extends event.UserEvent {
98 Settings oldSettings; ///< Settings before change
99 Settings newSettings; ///< Settings after change
100 };
101
102 /**
103 * Retrieve the power meter settings.
104 *
105 * @return Power meter settings
106 */
107 Settings getSettings();
108
109 /**
110 * Change the power meter settings.
111 *
112 * @param settings New settings
113 *
114 * @return 0 if OK
115 * @return 1 if any parameters are invalid
116 * @return 2 if the Modbus unit address is already in use
117 */
118 int setSettings(in Settings settings);
119
120 /** Energy LED pulse settings */
121 structure EnergyPulseSettings {
122 boolean pulseEnabled; ///< \c true to enable the energy LED pulse
123 vector<int> poles; ///< Emit pulses for energy counted on any of these poles
124 int pulsesPerKWh; ///< Number of LED pulses per kWh of energy
125 };
126
127 /** Event: Energy LED pulse settings have changed */
128 valueobject EnergyPulseSettingsChangedEvent extends event.UserEvent {
129 EnergyPulseSettings oldSettings;
130 EnergyPulseSettings newSettings;
131 };
132
133 /**
134 * Retrieve the energy LED pulse settings.
135 *
136 * @return Energy LED pulse settings
137 */
138 EnergyPulseSettings getEnergyPulseSettings();
139
140 /**
141 * Change the energy LED pulse settings.
142 *
143 * @param settings New settings
144 *
145 * @return 0 if OK
146 * @return 1 if any parameters are invalid
147 */
148 int setEnergyPulseSettings(in EnergyPulseSettings settings);
149
150 };
151
152 }
153
154 #endif
pdumodel::PowerMeter_1_1_5::Sensors::lineFrequency
sensors::NumericSensor_4_0_3 lineFrequency
Line AC frequency sensor.
Definition: PowerMeter.idl:51
pdumodel::PowerMeter_1_1_5::Settings::currentRating
int currentRating
Current rating in Amps.
Definition: PowerMeter.idl:89
pdumodel::PowerMeter_1_1_5::Sensors::unbalancedCurrent
sensors::NumericSensor_4_0_3 unbalancedCurrent
Current unbalance sensor.
Definition: PowerMeter.idl:60
pdumodel::PowerMeter_1_1_5::Sensors::phaseAngle
sensors::NumericSensor_4_0_3 phaseAngle
Phase angle sensor.
Definition: PowerMeter.idl:57
pdumodel::PowerMeter_1_1_5::Type
Type
Power meter type.
Definition: PowerMeter.idl:29
pdumodel::PowerMeter_1_1_5
A three-phase power meter (PMC).
Definition: PowerMeter.idl:23
pdumodel::PowerMeter_1_1_5::Sensors::displacementPowerFactor
sensors::NumericSensor_4_0_3 displacementPowerFactor
Displacement power factor sensor.
Definition: PowerMeter.idl:58
pdumodel::PowerMeter_1_1_5::Sensors::activeEnergy
sensors::NumericSensor_4_0_3 activeEnergy
Active energy sensor.
Definition: PowerMeter.idl:59
pdumodel::PowerMeter_1_1_5::Sensors::current
sensors::NumericSensor_4_0_3 current
RMS current sensor.
Definition: PowerMeter.idl:52
pdumodel::PowerMeter_1_1_5::Settings::modbusUnitAddress
int modbusUnitAddress
Modbus unit address (1..255, 0 to disable Modbus for this meter)
Definition: PowerMeter.idl:93
pdumodel::PowerMeter_1_1_5::Sensors::voltage
sensors::NumericSensor_4_0_3 voltage
RMS voltage sensor.
Definition: PowerMeter.idl:50
pdumodel::PowerMeter_1_1_5::Settings::neutralCtRating
int neutralCtRating
Neutral current transformer rating in Amps (0 for none)
Definition: PowerMeter.idl:91
pdumodel::PowerMeter_1_1_5::Sensors::crestFactor
sensors::NumericSensor_4_0_3 crestFactor
Crest factor sensor.
Definition: PowerMeter.idl:61
pdumodel::PowerMeter_1_1_5::Sensors::powerQuality
sensors::StateSensor_4_0_3 powerQuality
Power quality sensor.
Definition: PowerMeter.idl:62
pdumodel::PowerMeter_1_1_5::EnergyPulseSettings::pulsesPerKWh
int pulsesPerKWh
Number of LED pulses per kWh of energy.
Definition: PowerMeter.idl:124
pdumodel::PowerMeter_1_1_5::Sensors::powerFactor
sensors::NumericSensor_4_0_3 powerFactor
Power factor sensor.
Definition: PowerMeter.idl:56
pdumodel::PowerMeter_1_1_5::EnergyPulseSettings
Energy LED pulse settings.
Definition: PowerMeter.idl:121
pdumodel::PowerMeter_1_1_5::Sensors
Power meter sensors.
Definition: PowerMeter.idl:49
pdumodel::PowerMeter_1_1_5::Settings::phaseCtRating
int phaseCtRating
Phase current transformer rating in Amps (0 for none)
Definition: PowerMeter.idl:90
pdumodel::PowerMeter_1_1_5::ONE_PHASE
Single-phase meter (A)
Definition: PowerMeter.idl:30
pdumodel::PowerMeter_1_1_5::Settings
Power meter settings.
Definition: PowerMeter.idl:87
pdumodel::PowerMeter_1_1_5::Config::type
Type type
Power meter type.
Definition: PowerMeter.idl:38
sensors
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
pdumodel
PDU Model.
Definition: Ade.idl:12
pdumodel::PowerMeter_1_1_5::Config::powerMeterId
int powerMeterId
The meter board ID.
Definition: PowerMeter.idl:37
pdumodel::PowerMeter_1_1_5::EnergyPulseSettings::pulseEnabled
boolean pulseEnabled
true to enable the energy LED pulse
Definition: PowerMeter.idl:122
pdumodel::PowerMeter_1_1_5::Settings::earthCtRating
int earthCtRating
P.E. current transformer rating in Amps (0 for none)
Definition: PowerMeter.idl:92
pdumodel::PowerMeter_1_1_5::Sensors::reactivePower
sensors::NumericSensor_4_0_3 reactivePower
Reactive power sensor.
Definition: PowerMeter.idl:54
sensors::NumericSensor_4_0_3
A sensor with numeric readings.
Definition: NumericSensor.idl:17
pdumodel::PowerMeter_1_1_5::newSettings
Settings newSettings
Settings after change.
Definition: PowerMeter.idl:99
sensors::StateSensor_4_0_3
Sensor with discrete readings.
Definition: StateSensor.idl:43
pdumodel::PowerMeter_1_1_5::SPLIT_PHASE
Split-phase meter (A, B)
Definition: PowerMeter.idl:31
pdumodel::PowerMeter_1_1_5::Config
Power meter configuration.
Definition: PowerMeter.idl:36
pdumodel::PowerMeter_1_1_5::Sensors::apparentPower
sensors::NumericSensor_4_0_3 apparentPower
Apparent power sensor.
Definition: PowerMeter.idl:55
pdumodel::PowerMeter_1_1_5::Sensors::activePower
sensors::NumericSensor_4_0_3 activePower
Active power sensor.
Definition: PowerMeter.idl:53
pdumodel::PowerMeter_1_1_5::EnergyPulseSettings::poles
vector< int > poles
Emit pulses for energy counted on any of these poles.
Definition: PowerMeter.idl:123
pdumodel::PowerMeter_1_1_5::Settings::name
string name
User-defined name.
Definition: PowerMeter.idl:88