Loading...
Searching...
No Matches
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 extends PowerMeter {
/**
* 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> getCircuits();
/** Event: A new circuit was added */
valueobject CircuitCreatedEvent extends event.UserEvent {
Circuit circuit; ///< New circuit
Circuit.Config config; ///< New circuit config
Circuit.Settings settings; ///< New circuit settings
};
/** Event: A circuit was deleted */
valueobject CircuitDeletedEvent extends event.UserEvent {
Circuit.Config config; ///< Old circuit config
Circuit.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 circuit, in Circuit.Config config, in Circuit.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::Circuit
BCM circuit.
Definition Circuit.idl:21
pdumodel::Panel
PMC panel.
Definition Panel.idl:26
pdumodel::Panel::createCircuit
int createCircuit(out Circuit circuit, in Circuit::Config config, in Circuit.Settings settings)
Create a new circuit.
pdumodel::Panel::setPanelSettings
int setPanelSettings(in PanelSettings settings)
Change the panel settings.
pdumodel::Panel::deleteCircuit
int deleteCircuit(in int position)
Delete a circuit.
pdumodel::Panel::LabelingScheme
LabelingScheme
Mapping of physical circuit positions (0-based) to logical labels.
Definition Panel.idl:31
pdumodel::Panel::SEQUENTIAL
@ SEQUENTIAL
Circuit positions 0..2 are labeled 1, 2 and 3.
Definition Panel.idl:32
pdumodel::Panel::ODD_EVEN
@ ODD_EVEN
Circuit positions 0..2 are labeled 1, 3 and 5 (two columns)
Definition Panel.idl:33
pdumodel::Panel::getCircuits
map< int, Circuit > getCircuits()
Retrieve the list of circuits.
pdumodel::Panel::getPanelSettings
PanelSettings getPanelSettings()
Retrieve the panel settings.
pdumodel::PowerMeter
A three-phase power meter (PMC).
Definition PowerMeter.idl:23
pdumodel
PDU Model.
Definition Circuit.idl:16
pdumodel::Circuit::Config
Circuit configuration.
Definition Circuit.idl:35
pdumodel::Circuit::Settings
Circuit settings.
Definition Circuit.idl:83
pdumodel::Panel::CircuitCreatedEvent
Event: A new circuit was added.
Definition Panel.idl:75
pdumodel::Panel::CircuitCreatedEvent::config
Circuit::Config config
New circuit config.
Definition Panel.idl:77
pdumodel::Panel::CircuitCreatedEvent::circuit
Circuit circuit
New circuit.
Definition Panel.idl:76
pdumodel::Panel::CircuitCreatedEvent::settings
Circuit::Settings settings
New circuit settings.
Definition Panel.idl:78
pdumodel::Panel::CircuitDeletedEvent
Event: A circuit was deleted.
Definition Panel.idl:82
pdumodel::Panel::CircuitDeletedEvent::config
Circuit::Config config
Old circuit config.
Definition Panel.idl:83
pdumodel::Panel::CircuitDeletedEvent::settings
Circuit::Settings settings
Old circuit settings.
Definition Panel.idl:84
pdumodel::Panel::PanelSettingsChangedEvent
Event: Panel settings have changed.
Definition Panel.idl:45
pdumodel::Panel::PanelSettingsChangedEvent::newSettings
PanelSettings newSettings
Panel settings after change.
Definition Panel.idl:47
pdumodel::Panel::PanelSettingsChangedEvent::oldSettings
PanelSettings oldSettings
Panel settings before change.
Definition Panel.idl:46
pdumodel::Panel::PanelSettings
Panel settings.
Definition Panel.idl:37
pdumodel::Panel::PanelSettings::labelingScheme
LabelingScheme labelingScheme
Mapping of physical circuit positions to logical labels.
Definition Panel.idl:41
pdumodel::Panel::PanelSettings::columns
int columns
Display circuit positions in two columns.
Definition Panel.idl:40
pdumodel::Panel::PanelSettings::panelSize
int panelSize
Panel size (number of circuit positions)
Definition Panel.idl:39
pdumodel::Panel::PanelSettings::meterCount
int meterCount
Number of branch meter channels.
Definition Panel.idl:38