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