Panel.idl
/* SPDX-License-Identifier: BSD-3-Clause */
/*
* Copyright 2015 Raritan Inc. All rights reserved.
*/
#ifndef __PDUMODEL_PANEL_IDL__
#define __PDUMODEL_PANEL_IDL__
#include <Circuit.idl>
#include <PowerMeter.idl>
/**
* PDU Model
*/
module pdumodel {
/**
* PMC panel.
*
* A panel contains:
* - a three-phase power meter
* - a configurable number of branch meter channels
* - a configurable number of circuit positions
* - configurable logical circuits combining multiple positions
*/
interface Panel_1_1_5 extends PowerMeter_1_1_5 {
/**
* Mapping of physical circuit positions (0-based) to logical labels.
*/
enumeration LabelingScheme {
SEQUENTIAL, ///< Circuit positions 0..2 are labeled 1, 2 and 3
ODD_EVEN ///< Circuit positions 0..2 are labeled 1, 3 and 5 (two columns)
};
/** Panel settings */
structure PanelSettings {
int meterCount; ///< Number of branch meter channels
int panelSize; ///< Panel size (number of circuit positions)
int columns; ///< Display circuit positions in two columns
LabelingScheme labelingScheme; ///< Mapping of physical circuit positions to logical labels
};
/** Event: Panel settings have changed */
valueobject PanelSettingsChangedEvent extends event.UserEvent {
PanelSettings oldSettings; ///< Panel settings before change
PanelSettings newSettings; ///< Panel settings after change
};
/**
* Retrieve the panel settings.
*
* @return Panel settings
*/
PanelSettings getPanelSettings();
/**
* Change the panel settings.
*
* @param settings New panel settings
*
* @return 0 if OK
* @return 1 if any parameters are invalid
*/
int setPanelSettings(in PanelSettings settings);
/**
* Retrieve the list of circuits.
*
* @return Configured circuits by position
*/
map<int, Circuit_1_0_3> getCircuits();
/** Event: A new circuit was added */
valueobject CircuitCreatedEvent extends event.UserEvent {
Circuit_1_0_3 circuit; ///< New circuit
Circuit_1_0_3.Config config; ///< New circuit config
Circuit_1_0_3.Settings settings; ///< New circuit settings
};
/** Event: A circuit was deleted */
valueobject CircuitDeletedEvent extends event.UserEvent {
Circuit_1_0_3.Config config; ///< Old circuit config
Circuit_1_0_3.Settings settings; ///< Old circuit settings
};
/**
* Create a new circuit.
*
* @param circuit Result: Newly created instance
* @param config New circuit config
* @param settings New circuit settings
*
* @return 0 if OK
* @return 1 if the circuit config or settings are invalid
*/
int createCircuit(out Circuit_1_0_3 circuit, in Circuit_1_0_3.Config config, in Circuit_1_0_3.Settings settings);
/**
* Delete a circuit.
*
* @param position Position of circuit to be deleted
*
* @return 0 if OK
* @return 1 if the circuit position is invalid
*/
int deleteCircuit(in int position);
};
}
#endif
pdumodel::PowerMeter_1_1_5
A three-phase power meter (PMC).
Definition: PowerMeter.idl:23
pdumodel::Circuit_1_0_3::Config
Circuit configuration.
Definition: Circuit.idl:35
pdumodel::Panel_1_1_5::PanelSettings
Panel settings.
Definition: Panel.idl:37
pdumodel::Panel_1_1_5::newSettings
PanelSettings newSettings
Panel settings after change.
Definition: Panel.idl:47
pdumodel::Circuit_1_0_3::Settings
Circuit settings.
Definition: Circuit.idl:82
pdumodel::Circuit_1_0_3
BCM circuit.
Definition: Circuit.idl:21
pdumodel::Panel_1_1_5::PanelSettings::meterCount
int meterCount
Number of branch meter channels.
Definition: Panel.idl:38
pdumodel::Panel_1_1_5::config
Circuit_1_0_3::Config config
New circuit config.
Definition: Panel.idl:77
pdumodel::Panel_1_1_5::SEQUENTIAL
Circuit positions 0..2 are labeled 1, 2 and 3.
Definition: Panel.idl:32
pdumodel
PDU Model.
Definition: Ade.idl:12
pdumodel::Panel_1_1_5::LabelingScheme
LabelingScheme
Mapping of physical circuit positions (0-based) to logical labels.
Definition: Panel.idl:31
pdumodel::Panel_1_1_5::PanelSettings::panelSize
int panelSize
Panel size (number of circuit positions)
Definition: Panel.idl:39
pdumodel::Panel_1_1_5
PMC panel.
Definition: Panel.idl:26
pdumodel::Panel_1_1_5::PanelSettings::columns
int columns
Display circuit positions in two columns.
Definition: Panel.idl:40
pdumodel::Panel_1_1_5::PanelSettings::labelingScheme
LabelingScheme labelingScheme
Mapping of physical circuit positions to logical labels.
Definition: Panel.idl:41
pdumodel::Panel_1_1_5::settings
Circuit_1_0_3::Settings settings
New circuit settings.
Definition: Panel.idl:78