Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
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 */
18module pdumodel {
19
20 /**
21 * A three-phase power meter (PMC).
22 */
23 interface PowerMeter {
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 */
47
48 /** Power meter sensors */
49 structure Sensors {
50 sensors.NumericSensor voltage; ///< RMS voltage sensor
51 sensors.NumericSensor lineFrequency; ///< Line AC frequency sensor
52 sensors.NumericSensor current; ///< RMS current sensor
53 sensors.NumericSensor activePower; ///< Active power sensor
54 sensors.NumericSensor reactivePower; ///< Reactive power sensor
55 sensors.NumericSensor apparentPower; ///< Apparent power sensor
56 sensors.NumericSensor powerFactor; ///< Power factor sensor
57 sensors.NumericSensor phaseAngle; ///< Phase angle sensor
58 sensors.NumericSensor displacementPowerFactor; ///< Displacement power factor sensor
59 sensors.NumericSensor activeEnergy; ///< Active energy sensor
60 sensors.NumericSensor unbalancedCurrent; ///< Current unbalance sensor
61 sensors.NumericSensor crestFactor; ///< Crest factor sensor
62 sensors.NumericSensor activePowerDemand; ///< Active power demand
63 sensors.StateSensor powerQuality; ///< Power quality sensor
64 };
65
66 /**
67 * Get the power meter sensors.
68 *
69 * @return Power meter sensors
70 */
72
73 /**
74 * Get the list of power meter poles.
75 *
76 * @return List of power meter poles (A, B, C, N, PE)
77 */
78 vector<Pole> getPoles();
79
80 /**
81 * Get the list of sub controllers for this power meter
82 *
83 * @return List of controllers
84 */
85 vector<Controller> getControllers();
86
87 /** Power meter settings */
88 structure Settings {
89 string name; ///< User-defined name
90 int currentRating; ///< Current rating in Amps
91 int phaseCtRating; ///< Phase current transformer rating in Amps (0 for none)
92 int neutralCtRating; ///< Neutral current transformer rating in Amps (0 for none)
93 int earthCtRating; ///< P.E. current transformer rating in Amps (0 for none)
94 int modbusUnitAddress; ///< Modbus unit address (1..255, 0 to disable Modbus for this meter)
95 };
96
97 /** Event: Power meter settings have changed */
98 valueobject SettingsChangedEvent extends event.UserEvent {
99 Settings oldSettings; ///< Settings before change
100 Settings newSettings; ///< Settings after change
101 };
102
103 /**
104 * Retrieve the power meter settings.
105 *
106 * @return Power meter settings
107 */
109
110 /**
111 * Change the power meter settings.
112 *
113 * @param settings New settings
114 *
115 * @return 0 if OK
116 * @return 1 if any parameters are invalid
117 * @return 2 if the Modbus unit address is already in use
118 */
119 int setSettings(in Settings settings);
120
121 /** Energy LED pulse settings */
123 boolean pulseEnabled; ///< \c true to enable the energy LED pulse
124 vector<int> poles; ///< Emit pulses for energy counted on any of these poles
125 int pulsesPerKWh; ///< Number of LED pulses per kWh of energy
126 };
127
128 /** Event: Energy LED pulse settings have changed */
129 valueobject EnergyPulseSettingsChangedEvent extends event.UserEvent {
130 EnergyPulseSettings oldSettings;
131 EnergyPulseSettings newSettings;
132 };
133
134 /**
135 * Retrieve the energy LED pulse settings.
136 *
137 * @return Energy LED pulse settings
138 */
140
141 /**
142 * Change the energy LED pulse settings.
143 *
144 * @param settings New settings
145 *
146 * @return 0 if OK
147 * @return 1 if any parameters are invalid
148 */
150
151 };
152
153}
154
155#endif
A three-phase power meter (PMC).
Definition: PowerMeter.idl:23
vector< Pole > getPoles()
Get the list of power meter poles.
int setSettings(in Settings settings)
Change the power meter settings.
EnergyPulseSettings getEnergyPulseSettings()
Retrieve the energy LED pulse settings.
Type
Power meter type.
Definition: PowerMeter.idl:29
@ SPLIT_PHASE
Split-phase meter (A, B)
Definition: PowerMeter.idl:31
@ ONE_PHASE
Single-phase meter (A)
Definition: PowerMeter.idl:30
Settings getSettings()
Retrieve the power meter settings.
int setEnergyPulseSettings(in EnergyPulseSettings settings)
Change the energy LED pulse settings.
Sensors getSensors()
Get the power meter sensors.
Config getConfig()
Retrieve the power meter configuration.
vector< Controller > getControllers()
Get the list of sub controllers for this power meter.
A sensor with numeric readings.
Sensor with discrete readings.
Definition: StateSensor.idl:43
PDU Model.
Definition: Ade.idl:12
Sensors Model.
Power meter configuration.
Definition: PowerMeter.idl:36
Type type
Power meter type.
Definition: PowerMeter.idl:38
int powerMeterId
The meter board ID.
Definition: PowerMeter.idl:37
Event: Energy LED pulse settings have changed.
Definition: PowerMeter.idl:129
vector< int > poles
Emit pulses for energy counted on any of these poles.
Definition: PowerMeter.idl:124
boolean pulseEnabled
true to enable the energy LED pulse
Definition: PowerMeter.idl:123
int pulsesPerKWh
Number of LED pulses per kWh of energy.
Definition: PowerMeter.idl:125
Power meter sensors.
Definition: PowerMeter.idl:49
sensors::NumericSensor current
RMS current sensor.
Definition: PowerMeter.idl:52
sensors::NumericSensor displacementPowerFactor
Displacement power factor sensor.
Definition: PowerMeter.idl:58
sensors::NumericSensor voltage
RMS voltage sensor.
Definition: PowerMeter.idl:50
sensors::NumericSensor powerFactor
Power factor sensor.
Definition: PowerMeter.idl:56
sensors::NumericSensor activePowerDemand
Active power demand.
Definition: PowerMeter.idl:62
sensors::NumericSensor phaseAngle
Phase angle sensor.
Definition: PowerMeter.idl:57
sensors::NumericSensor activePower
Active power sensor.
Definition: PowerMeter.idl:53
sensors::NumericSensor activeEnergy
Active energy sensor.
Definition: PowerMeter.idl:59
sensors::NumericSensor apparentPower
Apparent power sensor.
Definition: PowerMeter.idl:55
sensors::NumericSensor unbalancedCurrent
Current unbalance sensor.
Definition: PowerMeter.idl:60
sensors::NumericSensor lineFrequency
Line AC frequency sensor.
Definition: PowerMeter.idl:51
sensors::StateSensor powerQuality
Power quality sensor.
Definition: PowerMeter.idl:63
sensors::NumericSensor reactivePower
Reactive power sensor.
Definition: PowerMeter.idl:54
sensors::NumericSensor crestFactor
Crest factor sensor.
Definition: PowerMeter.idl:61
Event: Power meter settings have changed.
Definition: PowerMeter.idl:98
Settings oldSettings
Settings before change.
Definition: PowerMeter.idl:99
Settings newSettings
Settings after change.
Definition: PowerMeter.idl:100
Power meter settings.
Definition: PowerMeter.idl:88
int earthCtRating
P.E. current transformer rating in Amps (0 for none)
Definition: PowerMeter.idl:93
int modbusUnitAddress
Modbus unit address (1..255, 0 to disable Modbus for this meter)
Definition: PowerMeter.idl:94
int neutralCtRating
Neutral current transformer rating in Amps (0 for none)
Definition: PowerMeter.idl:92
int phaseCtRating
Phase current transformer rating in Amps (0 for none)
Definition: PowerMeter.idl:91
int currentRating
Current rating in Amps.
Definition: PowerMeter.idl:90
string name
User-defined name.
Definition: PowerMeter.idl:89