Loading...
Searching...
No Matches
Circuit.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2015 Raritan Inc. All rights reserved.
*/
#ifndef __PDUMODEL_CIRCUIT_IDL__
#define __PDUMODEL_CIRCUIT_IDL__
#include <NumericSensor.idl>
#include <Pole.idl>
#include <UserEvent.idl>
/**
* PDU Model
*/
module pdumodel {
/**
* BCM circuit
*/
interface Circuit {
constant int ERR_INVALID_PARAM = 1; ///< Invalid parameters
constant int ERR_METER_CHANNEL_BUSY = 2; ///< Meter channel already in use
/** Circuit type */
enumeration Type {
ONE_PHASE_LN, ///< One-phase line-neutral
ONE_PHASE_LL, ///< One-phase line-line
ONE_PHASE_LLN, ///< One-phase line-line-neutral
THREE_PHASE ///< Three-phase
};
/** Circuit configuration */
structure Config {
int position; ///< Circuit position of first pole
Type type; ///< Circuit type
};
/**
* Retrieve the circuit configuration.
*
* @return Circuit configuration
*/
Config getConfig();
/** Circuit sensors */
structure Sensors {
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
sensors.NumericSensor activeEnergy; ///< Active energy sensor
sensors.NumericSensor unbalancedCurrent; ///< Current unbalance sensor
sensors.NumericSensor crestFactor; ///< Crest factor sensor
sensors.NumericSensor activePowerDemand; ///< Active power demand
};
/**
* Retrieve the circuit sensors.
*
* @return Circuit sensors
*/
Sensors getSensors();
/**
* Retrieve the list of circuit poles.
*
* @return List of circuit poles
*/
vector<Pole> getPoles();
/** Circuit pole settings */
structure PoleSettings {
pdumodel.PowerLine line; ///< Power line
int meterChannel; ///< Meter channel index; -1 for unmetered poles
};
/** Circuit settings */
structure Settings {
string name; ///< Circuit name
int rating; ///< Circuit current rating
int ctRating; ///< Current transformer rating
vector<PoleSettings> poleSettings; ///< Pole settings (excluding Neutral)
};
/** Event: Circuit settings have changed */
valueobject SettingsChangedEvent extends event.UserEvent {
Settings oldSettings; ///< Settings before change
Settings newSettings; ///< Settings after change
};
/**
* Get the circuit settings.
*
* @return Circuit settings
*/
Settings getSettings();
/**
* Change the circuit settings.
*
* @param settings New circuit settings
*
* @return 0 if OK
* @return 1 if any parameters are invalid
* @return 2 if the requested meter channel is already in used
*/
int setSettings(in Settings settings);
};
}
#endif
pdumodel::Circuit
BCM circuit.
Definition Circuit.idl:21
pdumodel::Circuit::ERR_METER_CHANNEL_BUSY
constant int ERR_METER_CHANNEL_BUSY
Meter channel already in use.
Definition Circuit.idl:24
pdumodel::Circuit::setSettings
int setSettings(in Settings settings)
Change the circuit settings.
pdumodel::Circuit::getPoles
vector< Pole > getPoles()
Retrieve the list of circuit poles.
pdumodel::Circuit::getSensors
Sensors getSensors()
Retrieve the circuit sensors.
pdumodel::Circuit::Type
Type
Circuit type.
Definition Circuit.idl:27
pdumodel::Circuit::ONE_PHASE_LL
@ ONE_PHASE_LL
One-phase line-line.
Definition Circuit.idl:29
pdumodel::Circuit::THREE_PHASE
@ THREE_PHASE
Three-phase.
Definition Circuit.idl:31
pdumodel::Circuit::ONE_PHASE_LLN
@ ONE_PHASE_LLN
One-phase line-line-neutral.
Definition Circuit.idl:30
pdumodel::Circuit::ONE_PHASE_LN
@ ONE_PHASE_LN
One-phase line-neutral.
Definition Circuit.idl:28
pdumodel::Circuit::getSettings
Settings getSettings()
Get the circuit settings.
pdumodel::Circuit::ERR_INVALID_PARAM
constant int ERR_INVALID_PARAM
Invalid parameters.
Definition Circuit.idl:23
pdumodel::Circuit::getConfig
Config getConfig()
Retrieve the circuit configuration.
sensors::NumericSensor
A sensor with numeric readings.
Definition NumericSensor.idl:17
pdumodel
PDU Model.
Definition Circuit.idl:16
sensors
Sensors Model.
Definition AccumulatingNumericSensor.idl:13
pdumodel::Circuit::Config
Circuit configuration.
Definition Circuit.idl:35
pdumodel::Circuit::Config::type
Type type
Circuit type.
Definition Circuit.idl:37
pdumodel::Circuit::Config::position
int position
Circuit position of first pole.
Definition Circuit.idl:36
pdumodel::Circuit::PoleSettings
Circuit pole settings.
Definition Circuit.idl:77
pdumodel::Circuit::PoleSettings::meterChannel
int meterChannel
Meter channel index; -1 for unmetered poles.
Definition Circuit.idl:79
pdumodel::Circuit::PoleSettings::line
pdumodel::PowerLine line
Power line.
Definition Circuit.idl:78
pdumodel::Circuit::Sensors
Circuit sensors.
Definition Circuit.idl:48
pdumodel::Circuit::Sensors::activeEnergy
sensors::NumericSensor activeEnergy
Active energy sensor.
Definition Circuit.idl:56
pdumodel::Circuit::Sensors::powerFactor
sensors::NumericSensor powerFactor
Power factor sensor.
Definition Circuit.idl:53
pdumodel::Circuit::Sensors::crestFactor
sensors::NumericSensor crestFactor
Crest factor sensor.
Definition Circuit.idl:58
pdumodel::Circuit::Sensors::reactivePower
sensors::NumericSensor reactivePower
Reactive power sensor.
Definition Circuit.idl:51
pdumodel::Circuit::Sensors::activePowerDemand
sensors::NumericSensor activePowerDemand
Active power demand.
Definition Circuit.idl:59
pdumodel::Circuit::Sensors::current
sensors::NumericSensor current
RMS current sensor.
Definition Circuit.idl:49
pdumodel::Circuit::Sensors::displacementPowerFactor
sensors::NumericSensor displacementPowerFactor
Displacement power factor.
Definition Circuit.idl:55
pdumodel::Circuit::Sensors::unbalancedCurrent
sensors::NumericSensor unbalancedCurrent
Current unbalance sensor.
Definition Circuit.idl:57
pdumodel::Circuit::Sensors::phaseAngle
sensors::NumericSensor phaseAngle
Phase angle sensor.
Definition Circuit.idl:54
pdumodel::Circuit::Sensors::apparentPower
sensors::NumericSensor apparentPower
Apparent power sensor.
Definition Circuit.idl:52
pdumodel::Circuit::Sensors::activePower
sensors::NumericSensor activePower
Active power sensor.
Definition Circuit.idl:50
pdumodel::Circuit::SettingsChangedEvent
Event: Circuit settings have changed.
Definition Circuit.idl:91
pdumodel::Circuit::SettingsChangedEvent::oldSettings
Settings oldSettings
Settings before change.
Definition Circuit.idl:92
pdumodel::Circuit::SettingsChangedEvent::newSettings
Settings newSettings
Settings after change.
Definition Circuit.idl:93
pdumodel::Circuit::Settings
Circuit settings.
Definition Circuit.idl:83
pdumodel::Circuit::Settings::name
string name
Circuit name.
Definition Circuit.idl:84
pdumodel::Circuit::Settings::poleSettings
vector< PoleSettings > poleSettings
Pole settings (excluding Neutral)
Definition Circuit.idl:87
pdumodel::Circuit::Settings::rating
int rating
Circuit current rating.
Definition Circuit.idl:85
pdumodel::Circuit::Settings::ctRating
int ctRating
Current transformer rating.
Definition Circuit.idl:86