Legrand / Raritan / Server Technology Xerus™ JSON-RPC API
Loading...
Searching...
No Matches
AssetStrip.idl
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright 2010 Raritan Inc. All rights reserved.
4 */
5
6#ifndef __ASSETMGRMODEL_ASSETSTRIP_IDL__
7#define __ASSETMGRMODEL_ASSETSTRIP_IDL__
8
9#include <AssetStripConfig.idl>
10#include <UserEvent.idl>
11
12/**
13 * Asset Management Model
14 */
16 /** Asset Management Strip interface */
17 interface AssetStrip {
18
19 /**
20 * Error codes
21 */
22 constant int NO_ERROR = 0; ///< Operation successful, no error
23 constant int ERR_INVALID_PARAM = 1; ///< Invalid parameter for an operation
24 constant int ERR_NO_SUCH_OBJECT = 2; ///< Requested object does not exist
25 constant int ERR_NOT_SUPPORTED = 3; ///< Requested operation is not supported
26 constant int ERR_OPERATION_FAILED = 4; ///< Operation did not succeed
27
28 /**
29 * Constants
30 */
31 constant int MAIN_STRIP_COLUMN = 0;
32
33 /** %AssetStrip state */
34 enumeration State {
35 DISCONNECTED, ///< No strip connected
36 FIRMWARE_UPDATE, ///< Firmware update in progress on main strip
37 UNSUPPORTED, ///< Connected asset strip is unsupported
38 AVAILABLE ///< Asset strip is up and running normally
39 };
40
41 /**
42 * Type of an asset tag connected to a rack unit
43 */
44 enumeration TagType {
45 SINGLE, ///< single asset tag connected to main strip or an extension
46 EXTENSION, ///< blade server extension, only possible on the main strip
47 NONE ///< no asset tag connected to main strip or an extension
48 };
49
50 /**
51 * For composite asset strips CascadeState shows additional information
52 * about the state of the complete cascade
53 */
54 enumeration CascadeState {
55 CASCADE_ACTIVE, ///< cascade is up and running
56 CASCADE_FIRMWARE_UPDATE ///< a device in the cascade receives a firmware update
57 };
58
59 /**
60 * Static (type, version) information for an %AssetStrip.
61 */
62 structure DeviceInfo {
63 int deviceId; ///< Device type (indicated a certain hardware)
64 int hardwareId; ///< Hardware ID, revision
65 int protocolVersion; ///< Protocol version the strip is supporting
66 int bootVersion; ///< Bootcode software version
67 int appVersion; ///< Application code software version
68 boolean orientationSensAvailable; ///< Indicates whether the strip has an orientation sensor
69 boolean isCascadable; ///< The asset strip type
70 boolean rackUnitCountConfigurable; ///< Rack unit count has to be configured, i.e. is not auto detected
71 };
72
73 /**
74 * Dynamic (may change with a connected strip) information for an %AssetStrip.
75 */
76 structure StripInfo {
77 int maxMainTagCount; ///< Maximum number of tags supported on the main strip
78 int maxBladeTagCount; ///< Maximum number of tags supported on blade extensions
79 int mainTagCount; ///< Current number of tags on the main asset strip
80 int bladeTagCount; ///< Current number of tags on all blade extensions
81 boolean bladeOverflow; ///< Out of space for new blade extension tags, read-only
82 int rackUnitCount; ///< Rack unit count, i.e. number of tags connectable
83 int componentCount; ///< Number of components
84 CascadeState cascadeState; ///< State of the cascade (only for composite strips)
85 };
86
87 /**
88 * Information for a single tag
89 */
90 structure TagInfo {
91 int rackUnitNumber; ///< The rack unit index this tag is connected to, range 0..rackUnitCount-1
92 int slotNumber; ///< Blade slot this tag is connected to, 0 is the main strip, >0 for blades
93 string familyDesc; ///< Tag family description, indicating different tag hardware
94 string rawId; ///< The asset tag ID (6 byte hexadecimal string 'AABBCCDDEEFF')
95 boolean programmable; ///< Is the asset tag ID programmable?
96 };
97
98 /**
99 * Infos for a single rack unit
100 *
101 * In case no asset strip is connected, type defaults to single and size defaults to 1
102 */
103 structure RackUnitInfo {
104 int rackUnitNumber; ///< The rack unit index for the settings, range 0..rackUnitCount-1
105 int rackUnitPosition; ///< resulting rack unit position (display number)
106 TagType type; ///< type of the asset tag (single, extension, none or unknown)
107 int size; ///< blade extension size (4,8,16), 1 for single tags or 0 if nothing connected
108 AssetStripConfig.RackUnitSettings settings; ///< settings for a single rack unit
109 int assetStripCascadePosition; ///< number of strip in cascade
110 int rackUnitRelativePosition; ///< relative position to strip
111 int assetStripNumberOfRackUnits; ///< number of rack units in strip that this rack unit belongs to
112 };
113
114 /** Event: Asset strip dynamic information has changed */
115 valueobject StripInfoChangedEvent extends idl.Event {
116 StripInfo oldInfo; ///< Information before change
117 StripInfo newInfo; ///< Information after change
118 };
119
120 /** Event: Asset strip state has changed */
121 valueobject StateChangedEvent extends idl.Event {
122 State oldState; ///< State before change
123 State newState; ///< State after change
124 DeviceInfo deviceInfo; ///< Information about connected strip, only valid
125 ///< if newState is AVAILABLE
126 };
127
128 /** Event: A rack unit has changed */
129 valueobject RackUnitChangedEvent extends event.UserEvent {
130 int rackUnitNumber; ///< Affected rack unit index
131 RackUnitInfo rackUnit; ///< New rack unit information
132 };
133
134 /**
135 * Information describing a tag change
136 */
137 structure TagChangeInfo {
138 TagInfo tag; ///< Tag which was attached or detached
139 RackUnitInfo info; ///< Rack unit the tag was/is connected to
140 string parentBladeTagId; ///< Asset tag ID of the parent blade tag,
141 ///< empty if the tag is not an extension tag
142 int slotPosition; ///< Blade slot position of the tag,
143 ///< 0 if the tag is not an extension tag
144 };
145
146 /** Event: A tag was added or removed */
147 valueobject TagEvent extends idl.Event {
148 vector<TagChangeInfo> tags; ///< Affected tags
149 vector<TagInfo> allTags; ///< New list of detected tags after change
150 };
151
152 /** Event: A tag was added */
153 valueobject TagAddedEvent extends TagEvent { };
154 /** Event: A tag was removed */
155 valueobject TagRemovedEvent extends TagEvent { };
156
157 /** Enumeration: State of firmware update */
159 UPDATE_STARTED, ///< Update is running
160 UPDATE_SUCCESSFUL, ///< Update was completed successfully
161 UPDATE_FAILED ///< Update has failed
162 };
163
164 /** Event: Firmware update on main strip was started or has finished */
166 FirmwareUpdateState state; ///< Update state
167 };
168
169 /** Event: Tag overflow */
170 valueobject BladeOverflowChangedEvent extends idl.Event {
171 boolean overflow; ///< Whether the strip is out of space
172 ///< for new blade extension tags
173 };
174
175 /** Event: Detected strip orientation has changed */
176 valueobject OrientationChangedEvent extends idl.Event {
177 AssetStripConfig.Orientation oldOrientation; ///< Strip orientation before change
178 AssetStripConfig.Orientation newOrientation; ///< Strip orientation after change
179 };
180
181 /** Event: Strip composition has changed */
182 valueobject CompositionChangedEvent extends idl.Event {
183 int oldComponentCount; ///< Component count before change
184 int newComponentCount; ///< Component count after change
185 };
186
187 /**
188 * Get the current state of the %AssetStrip
189 *
190 * @return State of the Asset Strip
191 */
193
194 /**
195 * Get static (hardware and firmware) information
196 *
197 * @return Result: hardware and firmware information
198 */
200
201 /**
202 * Get dynamic (number of tags) information
203 *
204 * @return Result: tag related information
205 */
207
208 /**
209 * Get info with all settings of a rack unit at once
210 *
211 * @param rackUnitNumber rack unit index to get the info for, range 0..rackUnitCount-1
212 * @param info Result: info for this rack unit
213 * @return NO_ERROR on success
214 * @return ERR_INVALID_PARAM rack unit count exceeded
215 */
216 int getRackUnitInfo(in int rackUnitNumber, out RackUnitInfo info);
217
218 /**
219 * Get infos with settings for all rack units
220 *
221 * @return Result: the rack unit infos with settings
222 */
223 vector<RackUnitInfo> getAllRackUnitInfos();
224
225 /**
226 * Get the asset tag for a rack unit
227 *
228 * @param rackUnitNumber rack unit index to read the asset tag for, range 0..rackUnitCount-1
229 * @param slotNumber slot to read the asset tag for, 0 for the main strip, >0 for blades
230 * @param tagInfo Result: asset tag information
231 * @return NO_ERROR on success
232 * @return ERR_INVALID_PARAM rack unit count exceeded or colum not existing
233 * @return ERR_NO_SUCH_OBJECT no tag connected to this rack unit
234 */
235 int getTag(in int rackUnitNumber, in int slotNumber, out TagInfo tagInfo);
236
237 /**
238 * Get all asset tags of the strip
239 *
240 * Please note that in case there is not a single tag connected to the
241 * strip the resulting list will be empty, only connected tag info
242 * structures are returned
243 * It is guaranteed that extensions on the main strip are returned
244 * before any tag on an extension itself.
245 *
246 * @return Result: list asset tag infos
247 */
248 vector<TagInfo> getAllTags();
249
250 /**
251 * Get all asset tags on the main strip
252 *
253 * Same as getAllTags, but only consider tags connected to the main
254 * asset strip and not on any connected extension.
255 * Extensions on the main strip themselves are returned.
256 *
257 * @return Result: list asset tag infos
258 */
259 vector<TagInfo> getMainTags();
260
261 /**
262 * Get all asset tags on an extension
263 *
264 * Gets all tags on a single extension for a certain rack unit.
265 * List will be empty if there are no tags connected
266 *
267 * @param rackUnitNumber rack unit index to get the extension tags for, range 0..rackUnitCount-1
268 * @param tags Result: list asset tag infos
269 * @return NO_ERROR on success
270 * @return ERR_INVALID_PARAM rack unit count exceeded or rack unit
271 * does not contain an extension
272 */
273 int getExtensionTags(in int rackUnitNumber, out vector<TagInfo> tags);
274
275 /**
276 * Trigger a powercycle of either the whole asset strip port or the
277 * LED part power supply on the asset strip
278 *
279 * Note: This method is not supported by any supported AMS hardware.
280 *
281 * @param hard true=whole port, false=LEDs only
282 */
283 [deprecated]
284 void triggerPowercycle(in boolean hard);
285
286 /**
287 * Program custom tag IDs
288 *
289 * Asset tags of type AMT-P may be programmed by user (custom ID). This method
290 * takes a list of (rack unit index, slot number, id) tuples that determine
291 * which connected tag should be programmed with which ID.
292 * TagInfo::rawId specifies the ID. An empty string erases the current
293 * custom ID which brings back the original 1-wire ID.
294 * Set TagInfo::slotNumber to 0 for tags on main strip and > 0 for blades.
295 * TagInfo::familyDesc and TagInfo::programmable are ignored.
296 *
297 * @param tagInfos vector of tag information that will be programmed
298 * @return NO_ERROR on success
299 * @return ERR_INVALID_PARAM rack unit out of bounds or custom ID too long
300 * @return ERR_NO_SUCH_OBJECT rack unit does not exist or has no tag
301 * @return ERR_NOT_SUPPORTED tag is not programmable
302 * @return ERR_OPERATION_FAILED programming failed
303 */
304 int programTagIDs(in vector<TagInfo> tagInfos);
305
306 /**
307 * Retrieve state of firmware update on main strip
308 *
309 * @return asset strip firmware update state
310 */
312 };
313}
314
315#endif /* __ASSETMGRMODEL_ASSETSTRIP_IDL__ */
Asset Strip Config interface.
Orientation
AssetStripConfig orientation
Asset Management Strip interface.
Definition: AssetStrip.idl:17
State
AssetStrip state
Definition: AssetStrip.idl:34
@ FIRMWARE_UPDATE
Firmware update in progress on main strip.
Definition: AssetStrip.idl:36
@ UNSUPPORTED
Connected asset strip is unsupported.
Definition: AssetStrip.idl:37
@ DISCONNECTED
No strip connected.
Definition: AssetStrip.idl:35
int getExtensionTags(in int rackUnitNumber, out vector< TagInfo > tags)
Get all asset tags on an extension.
int getTag(in int rackUnitNumber, in int slotNumber, out TagInfo tagInfo)
Get the asset tag for a rack unit.
StripInfo getStripInfo()
Get dynamic (number of tags) information.
void triggerPowercycle(in boolean hard)
Trigger a powercycle of either the whole asset strip port or the LED part power supply on the asset s...
vector< TagInfo > getMainTags()
Get all asset tags on the main strip.
DeviceInfo getDeviceInfo()
Get static (hardware and firmware) information.
int getRackUnitInfo(in int rackUnitNumber, out RackUnitInfo info)
Get info with all settings of a rack unit at once.
vector< TagInfo > getAllTags()
Get all asset tags of the strip.
FirmwareUpdateState
Enumeration: State of firmware update.
Definition: AssetStrip.idl:158
@ UPDATE_SUCCESSFUL
Update was completed successfully.
Definition: AssetStrip.idl:160
@ UPDATE_STARTED
Update is running.
Definition: AssetStrip.idl:159
FirmwareUpdateState getFirmwareUpdateState()
Retrieve state of firmware update on main strip.
int programTagIDs(in vector< TagInfo > tagInfos)
Program custom tag IDs.
State getState()
Get the current state of the AssetStrip.
TagType
Type of an asset tag connected to a rack unit.
Definition: AssetStrip.idl:44
@ EXTENSION
blade server extension, only possible on the main strip
Definition: AssetStrip.idl:46
@ SINGLE
single asset tag connected to main strip or an extension
Definition: AssetStrip.idl:45
vector< RackUnitInfo > getAllRackUnitInfos()
Get infos with settings for all rack units.
CascadeState
For composite asset strips CascadeState shows additional information about the state of the complete ...
Definition: AssetStrip.idl:54
@ CASCADE_ACTIVE
cascade is up and running
Definition: AssetStrip.idl:55
Asset Management Model.
Definition: AssetStrip.idl:15
Basic IDL definitions.
Definition: Event.idl:10
Settings for a single rack unit (LED state)
boolean overflow
Whether the strip is out of space for new blade extension tags.
Definition: AssetStrip.idl:171
Event: Strip composition has changed.
Definition: AssetStrip.idl:182
int oldComponentCount
Component count before change.
Definition: AssetStrip.idl:183
int newComponentCount
Component count after change.
Definition: AssetStrip.idl:184
Static (type, version) information for an AssetStrip.
Definition: AssetStrip.idl:62
int deviceId
Device type (indicated a certain hardware)
Definition: AssetStrip.idl:63
boolean orientationSensAvailable
Indicates whether the strip has an orientation sensor.
Definition: AssetStrip.idl:68
int bootVersion
Bootcode software version.
Definition: AssetStrip.idl:66
int appVersion
Application code software version.
Definition: AssetStrip.idl:67
boolean isCascadable
The asset strip type.
Definition: AssetStrip.idl:69
int protocolVersion
Protocol version the strip is supporting.
Definition: AssetStrip.idl:65
int hardwareId
Hardware ID, revision.
Definition: AssetStrip.idl:64
boolean rackUnitCountConfigurable
Rack unit count has to be configured, i.e. is not auto detected.
Definition: AssetStrip.idl:70
Event: Firmware update on main strip was started or has finished.
Definition: AssetStrip.idl:165
Event: Detected strip orientation has changed.
Definition: AssetStrip.idl:176
AssetStripConfig::Orientation oldOrientation
Strip orientation before change.
Definition: AssetStrip.idl:177
AssetStripConfig::Orientation newOrientation
Strip orientation after change.
Definition: AssetStrip.idl:178
RackUnitInfo rackUnit
New rack unit information.
Definition: AssetStrip.idl:131
int rackUnitNumber
Affected rack unit index.
Definition: AssetStrip.idl:130
Infos for a single rack unit.
Definition: AssetStrip.idl:103
int rackUnitPosition
resulting rack unit position (display number)
Definition: AssetStrip.idl:105
AssetStripConfig::RackUnitSettings settings
settings for a single rack unit
Definition: AssetStrip.idl:108
TagType type
type of the asset tag (single, extension, none or unknown)
Definition: AssetStrip.idl:106
int rackUnitNumber
The rack unit index for the settings, range 0..rackUnitCount-1.
Definition: AssetStrip.idl:104
int assetStripNumberOfRackUnits
number of rack units in strip that this rack unit belongs to
Definition: AssetStrip.idl:111
int assetStripCascadePosition
number of strip in cascade
Definition: AssetStrip.idl:109
int size
blade extension size (4,8,16), 1 for single tags or 0 if nothing connected
Definition: AssetStrip.idl:107
int rackUnitRelativePosition
relative position to strip
Definition: AssetStrip.idl:110
Event: Asset strip state has changed.
Definition: AssetStrip.idl:121
DeviceInfo deviceInfo
Information about connected strip, only valid if newState is AVAILABLE.
Definition: AssetStrip.idl:124
Event: Asset strip dynamic information has changed.
Definition: AssetStrip.idl:115
StripInfo newInfo
Information after change.
Definition: AssetStrip.idl:117
StripInfo oldInfo
Information before change.
Definition: AssetStrip.idl:116
Dynamic (may change with a connected strip) information for an AssetStrip.
Definition: AssetStrip.idl:76
int maxBladeTagCount
Maximum number of tags supported on blade extensions.
Definition: AssetStrip.idl:78
int maxMainTagCount
Maximum number of tags supported on the main strip.
Definition: AssetStrip.idl:77
int bladeTagCount
Current number of tags on all blade extensions.
Definition: AssetStrip.idl:80
int mainTagCount
Current number of tags on the main asset strip.
Definition: AssetStrip.idl:79
CascadeState cascadeState
State of the cascade (only for composite strips)
Definition: AssetStrip.idl:84
int componentCount
Number of components.
Definition: AssetStrip.idl:83
int rackUnitCount
Rack unit count, i.e. number of tags connectable.
Definition: AssetStrip.idl:82
boolean bladeOverflow
Out of space for new blade extension tags, read-only.
Definition: AssetStrip.idl:81
Information describing a tag change.
Definition: AssetStrip.idl:137
TagInfo tag
Tag which was attached or detached.
Definition: AssetStrip.idl:138
string parentBladeTagId
Asset tag ID of the parent blade tag, empty if the tag is not an extension tag.
Definition: AssetStrip.idl:140
RackUnitInfo info
Rack unit the tag was/is connected to.
Definition: AssetStrip.idl:139
int slotPosition
Blade slot position of the tag, 0 if the tag is not an extension tag.
Definition: AssetStrip.idl:142
Event: A tag was added or removed.
Definition: AssetStrip.idl:147
vector< TagInfo > allTags
New list of detected tags after change.
Definition: AssetStrip.idl:149
vector< TagChangeInfo > tags
Affected tags.
Definition: AssetStrip.idl:148
Information for a single tag.
Definition: AssetStrip.idl:90
int slotNumber
Blade slot this tag is connected to, 0 is the main strip, >0 for blades.
Definition: AssetStrip.idl:92
boolean programmable
Is the asset tag ID programmable?
Definition: AssetStrip.idl:95
string rawId
The asset tag ID (6 byte hexadecimal string 'AABBCCDDEEFF')
Definition: AssetStrip.idl:94
string familyDesc
Tag family description, indicating different tag hardware.
Definition: AssetStrip.idl:93
int rackUnitNumber
The rack unit index this tag is connected to, range 0..rackUnitCount-1.
Definition: AssetStrip.idl:91
Common base for all events.
Definition: Event.idl:13