Raritan PX2/PX3 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_2_0_5 {
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
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_1_0_1.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 was started or has finished */
173 valueobject FirmwareUpdateStateChangedEvent extends idl.Event {
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_1_0_1.Orientation oldOrientation; ///< Strip orientation before change
186 AssetStripConfig_1_0_1.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 */
200 State getState();
201
202 /**
203 * Get static (hardware and firmware) information
204 *
205 * @return Result: hardware and firmware information
206 */
207 DeviceInfo getDeviceInfo();
208
209 /**
210 * Get dynamic (number of tags) information
211 *
212 * @return Result: tag related information
213 */
214 StripInfo getStripInfo();
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
313 *
314 * @return asset strip firmware update state
315 */
316 FirmwareUpdateState getFirmwareUpdateState();
317 };
318 }
319
320 #endif /* __ASSETMGRMODEL_ASSETSTRIP_IDL__ */
assetmgrmodel::AssetStrip_2_0_5::DeviceInfo::deviceId
int deviceId
Device type (indicated a certain hardware)
Definition: AssetStrip.idl:71
assetmgrmodel::AssetStrip_2_0_5::allTags
vector< TagInfo > allTags
New list of detected tags after change.
Definition: AssetStrip.idl:157
assetmgrmodel::AssetStrip_2_0_5::TagChangeInfo::slotPosition
int slotPosition
Blade slot position of the tag, 0 if the tag is not an extension tag.
Definition: AssetStrip.idl:150
assetmgrmodel::AssetStrip_2_0_5::EXTENSION
blade server extension, only possible on the main strip
Definition: AssetStrip.idl:54
assetmgrmodel::AssetStripConfig_1_0_1
Asset Strip Config interface.
Definition: AssetStripConfig.idl:17
assetmgrmodel::AssetStrip_2_0_5::TagInfo
Information for a single tag.
Definition: AssetStrip.idl:98
assetmgrmodel::AssetStrip_2_0_5::RackUnitInfo::rackUnitNumber
int rackUnitNumber
rack unit for the settings, range 0..rackUnitCount-1
Definition: AssetStrip.idl:112
assetmgrmodel::AssetStripConfig_1_0_1::Orientation
Orientation
AssetStripConfig orientation
Definition: AssetStripConfig.idl:56
assetmgrmodel::AssetStrip_2_0_5::DeviceInfo::orientationSensAvailable
boolean orientationSensAvailable
Indicates whether the strip has an orientation sensor.
Definition: AssetStrip.idl:76
assetmgrmodel::AssetStrip_2_0_5::StripInfo::rackUnitCount
int rackUnitCount
Rack unit count, i.e. number of tags connectable.
Definition: AssetStrip.idl:90
assetmgrmodel::AssetStrip_2_0_5::CascadeState
CascadeState
For composite asset strips CascadeState shows additional information about the state of the complete ...
Definition: AssetStrip.idl:62
assetmgrmodel::AssetStrip_2_0_5::DeviceInfo::rackUnitCountConfigurable
boolean rackUnitCountConfigurable
Rack unit count has to be configured, i.e. is not auto detected.
Definition: AssetStrip.idl:78
assetmgrmodel::AssetStrip_2_0_5::StripInfo::bladeTagCount
int bladeTagCount
Current number of tags on all blade extensions.
Definition: AssetStrip.idl:88
assetmgrmodel::AssetStrip_2_0_5::SINGLE
single asset tag connected to main strip or an extension
Definition: AssetStrip.idl:53
assetmgrmodel::AssetStrip_2_0_5::rackUnit
RackUnitInfo rackUnit
New rack unit information.
Definition: AssetStrip.idl:139
assetmgrmodel::AssetStrip_2_0_5::StripType
StripType
Type of the connected asset strip.
Definition: AssetStrip.idl:44
assetmgrmodel::AssetStrip_2_0_5::DeviceInfo::protocolVersion
int protocolVersion
Protocol version the strip is supporting.
Definition: AssetStrip.idl:73
assetmgrmodel::AssetStrip_2_0_5
Asset Management Strip interface.
Definition: AssetStrip.idl:17
assetmgrmodel::AssetStrip_2_0_5::TagChangeInfo::tag
TagInfo tag
Tag which was attached or detached.
Definition: AssetStrip.idl:146
assetmgrmodel::AssetStrip_2_0_5::newComponentCount
int newComponentCount
Component count after change.
Definition: AssetStrip.idl:192
assetmgrmodel::AssetStrip_2_0_5::DeviceInfo::bootVersion
int bootVersion
Bootcode software version.
Definition: AssetStrip.idl:74
assetmgrmodel::AssetStrip_2_0_5::RackUnitInfo::assetStripCascadePosition
int assetStripCascadePosition
number of strip in cascade
Definition: AssetStrip.idl:117
assetmgrmodel::AssetStrip_2_0_5::StripInfo::mainTagCount
int mainTagCount
Current number of tags on the main asset strip.
Definition: AssetStrip.idl:87
assetmgrmodel::AssetStrip_2_0_5::TagChangeInfo
Information describing a tag change.
Definition: AssetStrip.idl:145
assetmgrmodel::AssetStrip_2_0_5::RackUnitInfo::size
int size
blade extension size (4,8,16), 1 for single tags or 0 if nothing connected
Definition: AssetStrip.idl:115
assetmgrmodel::AssetStrip_2_0_5::deviceInfo
DeviceInfo deviceInfo
Information about connected strip, only valid if newState is AVAILABLE.
Definition: AssetStrip.idl:132
assetmgrmodel::AssetStrip_2_0_5::TagInfo::slotNumber
int slotNumber
Blade slot this tag is connected to, 0 is the main strip, >0 for blades.
Definition: AssetStrip.idl:100
assetmgrmodel::AssetStrip_2_0_5::DISCONNECTED
No strip connected.
Definition: AssetStrip.idl:35
assetmgrmodel::AssetStrip_2_0_5::StripInfo::componentCount
int componentCount
Number of components.
Definition: AssetStrip.idl:91
assetmgrmodel::AssetStrip_2_0_5::TagType
TagType
Type of an asset tag connected to a rack unit.
Definition: AssetStrip.idl:52
assetmgrmodel::AssetStrip_2_0_5::StripInfo::cascadeState
CascadeState cascadeState
State of the cascade (only for composite strips)
Definition: AssetStrip.idl:92
assetmgrmodel::AssetStrip_2_0_5::RackUnitInfo::assetStripNumberOfRackUnits
int assetStripNumberOfRackUnits
number of rack units in strip that this rack unit belongs to
Definition: AssetStrip.idl:119
assetmgrmodel::AssetStrip_2_0_5::newState
State newState
State after change.
Definition: AssetStrip.idl:131
assetmgrmodel::AssetStrip_2_0_5::StripInfo::bladeOverflow
boolean bladeOverflow
Out of space for new blade extension tags, read-only.
Definition: AssetStrip.idl:89
assetmgrmodel::AssetStrip_2_0_5::TagInfo::rackUnitNumber
int rackUnitNumber
The rack unit this tag is connected to, range 0..rackUnitCount-1.
Definition: AssetStrip.idl:99
idl
Basic IDL definitions.
Definition: Event.idl:10
assetmgrmodel::AssetStrip_2_0_5::RackUnitInfo::rackUnitPosition
int rackUnitPosition
resulting rack unit position (display number)
Definition: AssetStrip.idl:113
assetmgrmodel::AssetStrip_2_0_5::RackUnitInfo::type
TagType type
type of the asset tag (single, extension, none or unknown)
Definition: AssetStrip.idl:114
assetmgrmodel::AssetStrip_2_0_5::UNSUPPORTED
Connected asset strip is unsupported.
Definition: AssetStrip.idl:37
assetmgrmodel::AssetStrip_2_0_5::RackUnitInfo
Infos for a single rack unit.
Definition: AssetStrip.idl:111
assetmgrmodel::AssetStrip_2_0_5::newInfo
StripInfo newInfo
Information after change.
Definition: AssetStrip.idl:125
assetmgrmodel::AssetStrip_2_0_5::TagChangeInfo::parentBladeTagId
string parentBladeTagId
Asset tag ID of the parent blade tag, empty if the tag is not an extension tag.
Definition: AssetStrip.idl:148
assetmgrmodel::AssetStrip_2_0_5::FirmwareUpdateState
FirmwareUpdateState
Enumeration: State of firmware update.
Definition: AssetStrip.idl:166
assetmgrmodel::AssetStrip_2_0_5::RackUnitInfo::rackUnitRelativePosition
int rackUnitRelativePosition
relative position to strip
Definition: AssetStrip.idl:118
assetmgrmodel::AssetStrip_2_0_5::CASCADE_ACTIVE
cascade is up and running
Definition: AssetStrip.idl:63
assetmgrmodel::AssetStrip_2_0_5::DeviceInfo::appVersion
int appVersion
Application code software version.
Definition: AssetStrip.idl:75
assetmgrmodel::AssetStrip_2_0_5::StripInfo::maxMainTagCount
int maxMainTagCount
Maximum number of tags supported on the main strip.
Definition: AssetStrip.idl:85
assetmgrmodel::AssetStrip_2_0_5::TagInfo::familyDesc
string familyDesc
Tag family description, indicating different tag hardware.
Definition: AssetStrip.idl:101
assetmgrmodel::AssetStrip_2_0_5::StripInfo
Dynamic (may change with a connected strip) information for an AssetStrip.
Definition: AssetStrip.idl:84
assetmgrmodel::AssetStrip_2_0_5::newOrientation
AssetStripConfig_1_0_1::Orientation newOrientation
Strip orientation after change.
Definition: AssetStrip.idl:186
assetmgrmodel::AssetStrip_2_0_5::UPDATE_STARTED
Update is running.
Definition: AssetStrip.idl:167
assetmgrmodel::AssetStrip_2_0_5::StripInfo::maxBladeTagCount
int maxBladeTagCount
Maximum number of tags supported on blade extensions.
Definition: AssetStrip.idl:86
assetmgrmodel
Asset Management Model.
Definition: AssetStrip.idl:15
assetmgrmodel::AssetStrip_2_0_5::FIRMWARE_UPDATE
Firmware update in progress.
Definition: AssetStrip.idl:36
assetmgrmodel::AssetStrip_2_0_5::UPDATE_SUCCESSFUL
Update was completed successfully.
Definition: AssetStrip.idl:168
assetmgrmodel::AssetStrip_2_0_5::DeviceInfo::hardwareId
int hardwareId
Hardware ID, revision.
Definition: AssetStrip.idl:72
assetmgrmodel::AssetStrip_2_0_5::SIMPLE
single, monolitic strip
Definition: AssetStrip.idl:45
assetmgrmodel::AssetStrip_2_0_5::TagInfo::programmable
boolean programmable
Is the asset tag ID programmable?
Definition: AssetStrip.idl:103
assetmgrmodel::AssetStrip_2_0_5::TagChangeInfo::info
RackUnitInfo info
Rack unit the tag was/is connected to.
Definition: AssetStrip.idl:147
assetmgrmodel::AssetStrip_2_0_5::TagInfo::rawId
string rawId
The asset tag ID (6 byte hexadecimal string &#39;AABBCCDDEEFF&#39;)
Definition: AssetStrip.idl:102
assetmgrmodel::AssetStrip_2_0_5::DeviceInfo::isCascadable
boolean isCascadable
The asset strip type.
Definition: AssetStrip.idl:77
assetmgrmodel::AssetStrip_2_0_5::State
State
AssetStrip state
Definition: AssetStrip.idl:34
assetmgrmodel::AssetStrip_2_0_5::DeviceInfo
Static (type, version) information for an AssetStrip.
Definition: AssetStrip.idl:70
assetmgrmodel::AssetStrip_2_0_5::RackUnitInfo::settings
AssetStripConfig_1_0_1::RackUnitSettings settings
settings for a single rack unit
Definition: AssetStrip.idl:116
assetmgrmodel::AssetStripConfig_1_0_1::RackUnitSettings
Settings for a single rack unit (LED state)
Definition: AssetStripConfig.idl:111