Loading...
Searching...
No Matches
PowerMeter.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2015 Raritan Inc. All rights reserved.
*/
#ifndef __PDUMODEL_POWER_METER_IDL__
#define __PDUMODEL_POWER_METER_IDL__
#include <Controller.idl>
#include <NumericSensor.idl>
#include <Pole.idl>
#include <StateSensor.idl>
#include <UserEvent.idl>
/**
* PDU Model
*/
module pdumodel {
/**
* A three-phase power meter (PMC).
*/
interface PowerMeter {
constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
constant int ERR_MODBUS_UNIT_IN_USE = 2; ///< Modbus unit address is already in use
/** Power meter type */
enumeration Type {
ONE_PHASE, ///< Single-phase meter (A)
SPLIT_PHASE, ///< Split-phase meter (A, B)
THREE_PHASE ///< Three-phase meter (A, B, C)
};
/** Power meter configuration */
structure Config {
int powerMeterId; ///< The meter board ID
Type type; ///< Power meter type
};
/**
* Retrieve the power meter configuration.
*
* @return Power meter configuration
*/
Config getConfig();
/** Power meter sensors */
structure Sensors {
sensors.NumericSensor voltage; ///< RMS voltage sensor
sensors.NumericSensor lineFrequency; ///< Line AC frequency sensor
sensors.NumericSensor current; ///< RMS current sensor
sensors.NumericSensor activePower; ///< Active power sensor
sensors.NumericSensor reactivePower; ///< Reactive power sensor
sensors.NumericSensor apparentPower; ///< Apparent power sensor
sensors.NumericSensor powerFactor; ///< Power factor sensor
sensors.NumericSensor phaseAngle; ///< Phase angle sensor
sensors.NumericSensor displacementPowerFactor; ///< Displacement power factor sensor
sensors.NumericSensor activeEnergy; ///< Active energy sensor
sensors.NumericSensor unbalancedCurrent; ///< Current unbalance sensor
sensors.NumericSensor crestFactor; ///< Crest factor sensor
sensors.NumericSensor activePowerDemand; ///< Active power demand
sensors.StateSensor powerQuality; ///< Power quality sensor
};
/**
* Get the power meter sensors.
*
* @return Power meter sensors
*/
Sensors getSensors();
/**
* Get the list of power meter poles.
*
* @return List of power meter poles (A, B, C, N, PE)
*/
vector<Pole> getPoles();
/**
* Get the list of sub controllers for this power meter
*
* @return List of controllers
*/
vector<Controller> getControllers();
/** Power meter settings */
structure Settings {
string name; ///< User-defined name
int currentRating; ///< Current rating in Amps
int phaseCtRating; ///< Phase current transformer rating in Amps (0 for none)
int neutralCtRating; ///< Neutral current transformer rating in Amps (0 for none)
int earthCtRating; ///< P.E. current transformer rating in Amps (0 for none)
int modbusUnitAddress; ///< Modbus unit address (1..255, 0 to disable Modbus for this meter)
};
/** Event: Power meter settings have changed */
valueobject SettingsChangedEvent extends event.UserEvent {
Settings oldSettings; ///< Settings before change
Settings newSettings; ///< Settings after change
};
/**
* Retrieve the power meter settings.
*
* @return Power meter settings
*/
Settings getSettings();
/**
* Change the power meter settings.
*
* @param settings New settings
*
* @return 0 if OK
* @return 1 if any parameters are invalid
* @return 2 if the Modbus unit address is already in use
*/
int setSettings(in Settings settings);
/** Energy LED pulse settings */
structure EnergyPulseSettings {
boolean pulseEnabled; ///< \c true to enable the energy LED pulse
vector<int> poles; ///< Emit pulses for energy counted on any of these poles
int pulsesPerKWh; ///< Number of LED pulses per kWh of energy
};
/** Event: Energy LED pulse settings have changed */
valueobject EnergyPulseSettingsChangedEvent extends event.UserEvent {
EnergyPulseSettings oldSettings;
EnergyPulseSettings newSettings;
};
/**
* Retrieve the energy LED pulse settings.
*
* @return Energy LED pulse settings
*/
EnergyPulseSettings getEnergyPulseSettings();
/**
* Change the energy LED pulse settings.
*
* @param settings New settings
*
* @return 0 if OK
* @return 1 if any parameters are invalid
*/
int setEnergyPulseSettings(in EnergyPulseSettings settings);
};
}
#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::THREE_PHASE
@ THREE_PHASE
Three-phase meter (A, B, C)
Definition PowerMeter.idl:32
pdumodel::PowerMeter::ERR_INVALID_PARAM
constant int ERR_INVALID_PARAM
Invalid parameters.
Definition PowerMeter.idl:25
pdumodel::PowerMeter::getSettings
Settings getSettings()
Retrieve the power meter settings.
pdumodel::PowerMeter::ERR_MODBUS_UNIT_IN_USE
constant int ERR_MODBUS_UNIT_IN_USE
Modbus unit address is already in use.
Definition PowerMeter.idl:26
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 Circuit.idl:16
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