Legrand / Raritan / Server Technology Xerus™ JSON-RPC API: PowerMeter.idl Source File

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 */
46 Config getConfig();
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 */
71 Sensors getSensors();
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 */
108 Settings getSettings();
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 */
122 structure EnergyPulseSettings {
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 */
139 EnergyPulseSettings getEnergyPulseSettings();
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 */
149 int setEnergyPulseSettings(in EnergyPulseSettings settings);
150
151 };
152
153}
154
155#endif
pdumodel::PowerMeter
A three-phase power meter (PMC).
Definition PowerMeter.idl:23
pdumodel::PowerMeter::getPoles
vector< Pole > getPoles()
Get the list of power meter poles.
pdumodel::PowerMeter::setSettings
int setSettings(in Settings settings)
Change the power meter settings.
pdumodel::PowerMeter::getEnergyPulseSettings
EnergyPulseSettings getEnergyPulseSettings()
Retrieve the energy LED pulse settings.
pdumodel::PowerMeter::Type
Type
Power meter type.
Definition PowerMeter.idl:29
pdumodel::PowerMeter::SPLIT_PHASE
@ SPLIT_PHASE
Split-phase meter (A, B)
Definition PowerMeter.idl:31
pdumodel::PowerMeter::ONE_PHASE
@ ONE_PHASE
Single-phase meter (A)
Definition PowerMeter.idl:30
pdumodel::PowerMeter::getSettings
Settings getSettings()
Retrieve the power meter settings.
pdumodel::PowerMeter::setEnergyPulseSettings
int setEnergyPulseSettings(in EnergyPulseSettings settings)
Change the energy LED pulse settings.
pdumodel::PowerMeter::getSensors
Sensors getSensors()
Get the power meter sensors.
pdumodel::PowerMeter::getConfig
Config getConfig()
Retrieve the power meter configuration.
pdumodel::PowerMeter::getControllers
vector< Controller > getControllers()
Get the list of sub controllers for this power meter.
sensors::NumericSensor
A sensor with numeric readings.
Definition NumericSensor.idl:17
sensors::StateSensor
Sensor with discrete readings.
Definition StateSensor.idl:43
pdumodel
PDU Model.
Definition Ade.idl:12
sensors
Sensors Model.
Definition AccumulatingNumericSensor.idl:13
pdumodel::PowerMeter::Config
Power meter configuration.
Definition PowerMeter.idl:36
pdumodel::PowerMeter::Config::type
Type type
Power meter type.
Definition PowerMeter.idl:38
pdumodel::PowerMeter::Config::powerMeterId
int powerMeterId
The meter board ID.
Definition PowerMeter.idl:37
pdumodel::PowerMeter::EnergyPulseSettingsChangedEvent
Event: Energy LED pulse settings have changed.
Definition PowerMeter.idl:129
pdumodel::PowerMeter::EnergyPulseSettings
Energy LED pulse settings.
Definition PowerMeter.idl:122
pdumodel::PowerMeter::EnergyPulseSettings::poles
vector< int > poles
Emit pulses for energy counted on any of these poles.
Definition PowerMeter.idl:124
pdumodel::PowerMeter::EnergyPulseSettings::pulseEnabled
boolean pulseEnabled
true to enable the energy LED pulse
Definition PowerMeter.idl:123
pdumodel::PowerMeter::EnergyPulseSettings::pulsesPerKWh
int pulsesPerKWh
Number of LED pulses per kWh of energy.
Definition PowerMeter.idl:125
pdumodel::PowerMeter::Sensors
Power meter sensors.
Definition PowerMeter.idl:49
pdumodel::PowerMeter::Sensors::current
sensors::NumericSensor current
RMS current sensor.
Definition PowerMeter.idl:52
pdumodel::PowerMeter::Sensors::displacementPowerFactor
sensors::NumericSensor displacementPowerFactor
Displacement power factor sensor.
Definition PowerMeter.idl:58
pdumodel::PowerMeter::Sensors::voltage
sensors::NumericSensor voltage
RMS voltage sensor.
Definition PowerMeter.idl:50
pdumodel::PowerMeter::Sensors::powerFactor
sensors::NumericSensor powerFactor
Power factor sensor.
Definition PowerMeter.idl:56
pdumodel::PowerMeter::Sensors::activePowerDemand
sensors::NumericSensor activePowerDemand
Active power demand.
Definition PowerMeter.idl:62
pdumodel::PowerMeter::Sensors::phaseAngle
sensors::NumericSensor phaseAngle
Phase angle sensor.
Definition PowerMeter.idl:57
pdumodel::PowerMeter::Sensors::activePower
sensors::NumericSensor activePower
Active power sensor.
Definition PowerMeter.idl:53
pdumodel::PowerMeter::Sensors::activeEnergy
sensors::NumericSensor activeEnergy
Active energy sensor.
Definition PowerMeter.idl:59
pdumodel::PowerMeter::Sensors::apparentPower
sensors::NumericSensor apparentPower
Apparent power sensor.
Definition PowerMeter.idl:55
pdumodel::PowerMeter::Sensors::unbalancedCurrent
sensors::NumericSensor unbalancedCurrent
Current unbalance sensor.
Definition PowerMeter.idl:60
pdumodel::PowerMeter::Sensors::lineFrequency
sensors::NumericSensor lineFrequency
Line AC frequency sensor.
Definition PowerMeter.idl:51
pdumodel::PowerMeter::Sensors::powerQuality
sensors::StateSensor powerQuality
Power quality sensor.
Definition PowerMeter.idl:63
pdumodel::PowerMeter::Sensors::reactivePower
sensors::NumericSensor reactivePower
Reactive power sensor.
Definition PowerMeter.idl:54
pdumodel::PowerMeter::Sensors::crestFactor
sensors::NumericSensor crestFactor
Crest factor sensor.
Definition PowerMeter.idl:61
pdumodel::PowerMeter::SettingsChangedEvent
Event: Power meter settings have changed.
Definition PowerMeter.idl:98
pdumodel::PowerMeter::SettingsChangedEvent::oldSettings
Settings oldSettings
Settings before change.
Definition PowerMeter.idl:99
pdumodel::PowerMeter::SettingsChangedEvent::newSettings
Settings newSettings
Settings after change.
Definition PowerMeter.idl:100
pdumodel::PowerMeter::Settings
Power meter settings.
Definition PowerMeter.idl:88
pdumodel::PowerMeter::Settings::earthCtRating
int earthCtRating
P.E. current transformer rating in Amps (0 for none)
Definition PowerMeter.idl:93
pdumodel::PowerMeter::Settings::modbusUnitAddress
int modbusUnitAddress
Modbus unit address (1..255, 0 to disable Modbus for this meter)
Definition PowerMeter.idl:94
pdumodel::PowerMeter::Settings::neutralCtRating
int neutralCtRating
Neutral current transformer rating in Amps (0 for none)
Definition PowerMeter.idl:92
pdumodel::PowerMeter::Settings::phaseCtRating
int phaseCtRating
Phase current transformer rating in Amps (0 for none)
Definition PowerMeter.idl:91
pdumodel::PowerMeter::Settings::currentRating
int currentRating
Current rating in Amps.
Definition PowerMeter.idl:90
pdumodel::PowerMeter::Settings::name
string name
User-defined name.
Definition PowerMeter.idl:89