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

Loading...
Searching...
No Matches
AssetStripConfig.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2011 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __ASSETMGRMODEL_ASSETSTRIP_CONFIG_IDL__
7#define __ASSETMGRMODEL_ASSETSTRIP_CONFIG_IDL__
8
9#include <Event.idl>
10#include <UserEvent.idl>
11
12/**
13 * Asset Management Model
14 */
15module assetmgrmodel {
16 /** Asset Strip Config interface */
17 interface AssetStripConfig {
18
19 /**
20 * %AssetStripConfig scan mode is active
21 *
22 * This is a demonstration feature providing a 'running lights' kind of effect
23 * where not all LEDs are lit statically (depending on their mode) but
24 * only a few LED which change all the time.
25 */
26 enumeration ScanMode {
27 SCANMODE_DISABLED, ///< LED scanmode is disabled, all LEDs are lit up statically
28 SCANMODE_BOTH ///< LED scanmode is enabled providing a 'running light' effect
29 };
30
31 /**
32 * %AssetStripConfig rack unit numbering mode
33 *
34 * Indicates the way the rack unit positions are defined.
35 * Basically this determines what number are 'written/printed' at a specific rack unit
36 * on the rack.
37 *
38 * An additional numberingOffset may be specified in the settings if the numbering
39 * does not start at the default 1.
40 */
41 enumeration NumberingMode {
42 TOP_DOWN, ///< numbering goes from top to bottom, top is the smallest number
43 BOTTOM_UP ///< numbering goes from bottom to top, bottom is the smallest number
44 };
45
46 /**
47 * %AssetStripConfig orientation
48 *
49 * The asset strip may be mounted in a rack
50 * a) with its cable connector on top, growing top->bottom
51 * b) with its cable connector on bottom, growing bottom->top
52 *
53 * This enumeration indicates the mounting option.
54 * It is detected automatically and writes to the setting are ignored.
55 */
56 enumeration Orientation {
57 TOP_CONNECTOR, ///< cable connector on top, strip growing top->bottom
58 BOTTOM_CONNECTOR ///< cable connector on top, strip growing bottom->top
59 };
60
61 /**
62 * Operation mode for the LED of a single rack unit.
63 *
64 * The LED may either be manually controlled or its color
65 * may be chosen automatically depending on whether an asset tag
66 * is connected or not. In automatic mode the LED is always on.
67 */
68 enumeration LEDOperationMode {
69 LED_OPERATION_MANUAL, ///< LED color and mode is manually controlled
70 LED_OPERATION_AUTO ///< LED color controlled automatically, LED always on
71 };
72
73 /**
74 * Mode for the LED of a single rack unit
75 */
76 enumeration LEDMode {
77 LED_MODE_ON, ///< LED on
78 LED_MODE_OFF, ///< LED off
79 LED_MODE_BLINK_FAST, ///< LED is blinking (fast)
80 LED_MODE_BLINK_SLOW ///< LED is blinking (slow)
81 };
82
83 /**
84 * The LED color in RGB format, 8 bit per channel
85 *
86 * Supported range is 0-255
87 */
88 structure LEDColor {
89 int r; ///< red channel of the LED
90 int g; ///< green channel of the LED
91 int b; ///< blue channel of the LED
92 };
93
94 /**
95 * Settings for this Asset Strip
96 */
97 structure StripSettings {
98 int rackUnitCount; ///< rack unit count, number of rack units (range: 8..64), will be ignored on strips that auto-detect their rack unit count
99 string name; ///< user defined name (up to 64 alphanumeric characters)
100 ScanMode scanMode; ///< LED scan (demo) mode
101 LEDColor defaultColorConnected; ///< auto color for rack units with an asset tag connected
102 LEDColor defaultColorDisconnected; ///< auto color for rack units without an asset tag connected
103 NumberingMode numberingMode; ///< rack unit numbering mode (top down, bottom up)
104 int numberingOffset; ///< rack unit numbering starting offset (default is 1)
105 Orientation orientation; ///< orientation. If orientationSensAvailable, writes are ignored
106 };
107
108 /**
109 * Settings for a single rack unit (LED state)
110 */
111 structure RackUnitSettings {
112 LEDOperationMode opmode; ///< Operation mode for this rack unit
113 LEDMode mode; ///< LED mode (on,off,blinking)
114 LEDColor color; ///< Color of the LED at this rack unit
115 string name; ///< user defined name (up to 64 alphanumeric characters)
116 };
117
118 /** Event: Asset strip settings were changed */
119 valueobject StripSettingsChangedEvent extends event.UserEvent {
120 StripSettings oldSettings; ///< Settings before change
121 StripSettings newSettings; ///< Settings after change
122 };
123
124 /** Event: A rack unit's settings were changed */
125 valueobject RackUnitSettingsChangedEvent extends event.UserEvent {
126 int rackUnitNumber; ///< Affected rack unit position
127 RackUnitSettings oldSettings; ///< Settings before change
128 RackUnitSettings newSettings; ///< Settings after change
129 };
130
131 /**
132 * Get the asset strip settings which are not rack unit specific
133 *
134 * @return settings settings for this asset strip
135 */
136 StripSettings getStripSettings();
137
138 /**
139 * Set the asset strip settings which are not rack unit specific
140 *
141 * @param settings Settings for this asset strip
142 * @return NO_ERROR on success
143 * @return ERR_INVALID_PARAM one or more of the settings is invalid
144 */
145 int setStripSettings(in StripSettings settings);
146
147 /**
148 * Get settings of a rack unit at once
149 *
150 * @param rackUnitNumber rack unit to get the settings for, range 0..rackUnitCount-1
151 * @param settings settings for this rack unit
152 * @return NO_ERROR on success
153 * @return ERR_INVALID_PARAM rack unit count exceeded
154 */
155 int getRackUnitSettings(in int rackUnitNumber, out RackUnitSettings settings);
156
157 /**
158 * Get settings for all rack units
159 *
160 * @return Result: the rack unit settings
161 */
162 vector<RackUnitSettings> getAllRackUnitSettings();
163
164 /**
165 * Set all settings of the specified rack unit at once
166 *
167 * The addressed rack unit is part of the parameter
168 *
169 * @param rackUnitNumber rack unit to set the settings for, range 0..rackUnitCount-1
170 * @param settings settings for this rack unit
171 * @return NO_ERROR on success
172 * @return ERR_INVALID_PARAM one or more of the settings is invalid
173 */
174 int setRackUnitSettings(in int rackUnitNumber, in RackUnitSettings settings);
175
176 /**
177 * Set all settings of multiple rack units at once
178 *
179 * @param settings map of rack units and their settings
180 * @return NO_ERROR on success
181 * @return ERR_INVALID_PARAM one or more of the settings is invalid
182 * (rack unit count exceeded or color/mode not supported,
183 * rack unit count and setting count differ...)
184 */
185 int setMultipleRackUnitSettings(in map<int, RackUnitSettings> settings);
186 };
187}
188
189#endif /* __ASSETMGRMODEL_ASSETSTRIP_CONFIG_IDL__ */
assetmgrmodel::AssetStripConfig
Asset Strip Config interface.
Definition AssetStripConfig.idl:17
assetmgrmodel::AssetStripConfig::setMultipleRackUnitSettings
int setMultipleRackUnitSettings(in map< int, RackUnitSettings > settings)
Set all settings of multiple rack units at once.
assetmgrmodel::AssetStripConfig::setStripSettings
int setStripSettings(in StripSettings settings)
Set the asset strip settings which are not rack unit specific.
assetmgrmodel::AssetStripConfig::setRackUnitSettings
int setRackUnitSettings(in int rackUnitNumber, in RackUnitSettings settings)
Set all settings of the specified rack unit at once.
assetmgrmodel::AssetStripConfig::getRackUnitSettings
int getRackUnitSettings(in int rackUnitNumber, out RackUnitSettings settings)
Get settings of a rack unit at once.
assetmgrmodel::AssetStripConfig::LEDMode
LEDMode
Mode for the LED of a single rack unit.
Definition AssetStripConfig.idl:76
assetmgrmodel::AssetStripConfig::LED_MODE_ON
@ LED_MODE_ON
LED on.
Definition AssetStripConfig.idl:77
assetmgrmodel::AssetStripConfig::LED_MODE_BLINK_FAST
@ LED_MODE_BLINK_FAST
LED is blinking (fast)
Definition AssetStripConfig.idl:79
assetmgrmodel::AssetStripConfig::LED_MODE_OFF
@ LED_MODE_OFF
LED off.
Definition AssetStripConfig.idl:78
assetmgrmodel::AssetStripConfig::LEDOperationMode
LEDOperationMode
Operation mode for the LED of a single rack unit.
Definition AssetStripConfig.idl:68
assetmgrmodel::AssetStripConfig::LED_OPERATION_MANUAL
@ LED_OPERATION_MANUAL
LED color and mode is manually controlled.
Definition AssetStripConfig.idl:69
assetmgrmodel::AssetStripConfig::getStripSettings
StripSettings getStripSettings()
Get the asset strip settings which are not rack unit specific.
assetmgrmodel::AssetStripConfig::getAllRackUnitSettings
vector< RackUnitSettings > getAllRackUnitSettings()
Get settings for all rack units.
assetmgrmodel::AssetStripConfig::Orientation
Orientation
AssetStripConfig orientation
Definition AssetStripConfig.idl:56
assetmgrmodel::AssetStripConfig::TOP_CONNECTOR
@ TOP_CONNECTOR
cable connector on top, strip growing top->bottom
Definition AssetStripConfig.idl:57
assetmgrmodel::AssetStripConfig::NumberingMode
NumberingMode
AssetStripConfig rack unit numbering mode
Definition AssetStripConfig.idl:41
assetmgrmodel::AssetStripConfig::TOP_DOWN
@ TOP_DOWN
numbering goes from top to bottom, top is the smallest number
Definition AssetStripConfig.idl:42
assetmgrmodel::AssetStripConfig::ScanMode
ScanMode
AssetStripConfig scan mode is active
Definition AssetStripConfig.idl:26
assetmgrmodel::AssetStripConfig::SCANMODE_DISABLED
@ SCANMODE_DISABLED
LED scanmode is disabled, all LEDs are lit up statically.
Definition AssetStripConfig.idl:27
assetmgrmodel
Asset Management Model.
Definition AssetStrip.idl:15
assetmgrmodel::AssetStripConfig::LEDColor
The LED color in RGB format, 8 bit per channel.
Definition AssetStripConfig.idl:88
assetmgrmodel::AssetStripConfig::LEDColor::g
int g
green channel of the LED
Definition AssetStripConfig.idl:90
assetmgrmodel::AssetStripConfig::LEDColor::b
int b
blue channel of the LED
Definition AssetStripConfig.idl:91
assetmgrmodel::AssetStripConfig::LEDColor::r
int r
red channel of the LED
Definition AssetStripConfig.idl:89
assetmgrmodel::AssetStripConfig::RackUnitSettingsChangedEvent
Event: A rack unit's settings were changed.
Definition AssetStripConfig.idl:125
assetmgrmodel::AssetStripConfig::RackUnitSettingsChangedEvent::oldSettings
RackUnitSettings oldSettings
Settings before change.
Definition AssetStripConfig.idl:127
assetmgrmodel::AssetStripConfig::RackUnitSettingsChangedEvent::rackUnitNumber
int rackUnitNumber
Affected rack unit position.
Definition AssetStripConfig.idl:126
assetmgrmodel::AssetStripConfig::RackUnitSettingsChangedEvent::newSettings
RackUnitSettings newSettings
Settings after change.
Definition AssetStripConfig.idl:128
assetmgrmodel::AssetStripConfig::RackUnitSettings
Settings for a single rack unit (LED state)
Definition AssetStripConfig.idl:111
assetmgrmodel::AssetStripConfig::RackUnitSettings::mode
LEDMode mode
LED mode (on,off,blinking)
Definition AssetStripConfig.idl:113
assetmgrmodel::AssetStripConfig::RackUnitSettings::name
string name
user defined name (up to 64 alphanumeric characters)
Definition AssetStripConfig.idl:115
assetmgrmodel::AssetStripConfig::RackUnitSettings::color
LEDColor color
Color of the LED at this rack unit.
Definition AssetStripConfig.idl:114
assetmgrmodel::AssetStripConfig::RackUnitSettings::opmode
LEDOperationMode opmode
Operation mode for this rack unit.
Definition AssetStripConfig.idl:112
assetmgrmodel::AssetStripConfig::StripSettingsChangedEvent
Event: Asset strip settings were changed.
Definition AssetStripConfig.idl:119
assetmgrmodel::AssetStripConfig::StripSettingsChangedEvent::newSettings
StripSettings newSettings
Settings after change.
Definition AssetStripConfig.idl:121
assetmgrmodel::AssetStripConfig::StripSettingsChangedEvent::oldSettings
StripSettings oldSettings
Settings before change.
Definition AssetStripConfig.idl:120
assetmgrmodel::AssetStripConfig::StripSettings
Settings for this Asset Strip.
Definition AssetStripConfig.idl:97
assetmgrmodel::AssetStripConfig::StripSettings::rackUnitCount
int rackUnitCount
rack unit count, number of rack units (range: 8..64), will be ignored on strips that auto-detect thei...
Definition AssetStripConfig.idl:98
assetmgrmodel::AssetStripConfig::StripSettings::scanMode
ScanMode scanMode
LED scan (demo) mode.
Definition AssetStripConfig.idl:100
assetmgrmodel::AssetStripConfig::StripSettings::orientation
Orientation orientation
orientation. If orientationSensAvailable, writes are ignored
Definition AssetStripConfig.idl:105
assetmgrmodel::AssetStripConfig::StripSettings::defaultColorDisconnected
LEDColor defaultColorDisconnected
auto color for rack units without an asset tag connected
Definition AssetStripConfig.idl:102
assetmgrmodel::AssetStripConfig::StripSettings::numberingMode
NumberingMode numberingMode
rack unit numbering mode (top down, bottom up)
Definition AssetStripConfig.idl:103
assetmgrmodel::AssetStripConfig::StripSettings::name
string name
user defined name (up to 64 alphanumeric characters)
Definition AssetStripConfig.idl:99
assetmgrmodel::AssetStripConfig::StripSettings::defaultColorConnected
LEDColor defaultColorConnected
auto color for rack units with an asset tag connected
Definition AssetStripConfig.idl:101
assetmgrmodel::AssetStripConfig::StripSettings::numberingOffset
int numberingOffset
rack unit numbering starting offset (default is 1)
Definition AssetStripConfig.idl:104