Legrand / Raritan / Server Technology Xerus™ JSON-RPC API

Loading...
Searching...
No Matches
Panel.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2015 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __PDUMODEL_PANEL_IDL__
7#define __PDUMODEL_PANEL_IDL__
8
9#include <Circuit.idl>
10#include <PowerMeter.idl>
11
12/**
13 * PDU Model
14 */
15module pdumodel {
16
17 /**
18 * PMC panel.
19 *
20 * A panel contains:
21 * - a three-phase power meter
22 * - a configurable number of branch meter channels
23 * - a configurable number of circuit positions
24 * - configurable logical circuits combining multiple positions
25 */
26 interface Panel extends PowerMeter {
27
28 /**
29 * Mapping of physical circuit positions (0-based) to logical labels.
30 */
31 enumeration LabelingScheme {
32 SEQUENTIAL, ///< Circuit positions 0..2 are labeled 1, 2 and 3
33 ODD_EVEN ///< Circuit positions 0..2 are labeled 1, 3 and 5 (two columns)
34 };
35
36 /** Panel settings */
37 structure PanelSettings {
38 int meterCount; ///< Number of branch meter channels
39 int panelSize; ///< Panel size (number of circuit positions)
40 int columns; ///< Display circuit positions in two columns
41 LabelingScheme labelingScheme; ///< Mapping of physical circuit positions to logical labels
42 };
43
44 /** Event: Panel settings have changed */
45 valueobject PanelSettingsChangedEvent extends event.UserEvent {
46 PanelSettings oldSettings; ///< Panel settings before change
47 PanelSettings newSettings; ///< Panel settings after change
48 };
49
50 /**
51 * Retrieve the panel settings.
52 *
53 * @return Panel settings
54 */
55 PanelSettings getPanelSettings();
56
57 /**
58 * Change the panel settings.
59 *
60 * @param settings New panel settings
61 *
62 * @return 0 if OK
63 * @return 1 if any parameters are invalid
64 */
65 int setPanelSettings(in PanelSettings settings);
66
67 /**
68 * Retrieve the list of circuits.
69 *
70 * @return Configured circuits by position
71 */
72 map<int, Circuit> getCircuits();
73
74 /** Event: A new circuit was added */
75 valueobject CircuitCreatedEvent extends event.UserEvent {
76 Circuit circuit; ///< New circuit
77 Circuit.Config config; ///< New circuit config
78 Circuit.Settings settings; ///< New circuit settings
79 };
80
81 /** Event: A circuit was deleted */
82 valueobject CircuitDeletedEvent extends event.UserEvent {
83 Circuit.Config config; ///< Old circuit config
84 Circuit.Settings settings; ///< Old circuit settings
85 };
86
87 /**
88 * Create a new circuit.
89 *
90 * @param circuit Result: Newly created instance
91 * @param config New circuit config
92 * @param settings New circuit settings
93 *
94 * @return 0 if OK
95 * @return 1 if the circuit config or settings are invalid
96 */
97 int createCircuit(out Circuit circuit, in Circuit.Config config, in Circuit.Settings settings);
98
99 /**
100 * Delete a circuit.
101 *
102 * @param position Position of circuit to be deleted
103 *
104 * @return 0 if OK
105 * @return 1 if the circuit position is invalid
106 */
107 int deleteCircuit(in int position);
108
109 };
110
111}
112
113#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