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