Raritan PX2/PX3 JSON-RPC API: pdu-json-rpc-api/idl/PeripheralDeviceManager.idl Source File

Raritan PX2/PX3 JSON-RPC API

PeripheralDeviceManager.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3 * Copyright 2012 Raritan Inc. All rights reserved.
4 */
5
6 #ifndef __PERIPHERAL_DEVICE_MANAGER_IDL__
7 #define __PERIPHERAL_DEVICE_MANAGER_IDL__
8
9 #include <PeripheralDeviceSlot.idl>
10 #include <PeripheralDevicePackage.idl>
11 #include <PortFuse.idl>
12 #include <NumericSensor.idl>
13 #include <Sensor.idl>
14 #include <UserEvent.idl>
15
16 /** Peripheral Devices */
17 module peripheral {
18
19 /** Peripheral Device Manager */
20 interface DeviceManager_3_0_2 {
21
22 constant int ERR_INVALID_PARAMS = 1; ///< Invalid parameters
23
24 /** Z Coordinate Mode identifier */
25 enumeration ZCoordMode {
26 RACKUNITS, ///< Z coordinate of slot settings is in rack units
27 FREEFORM ///< Z coordinate of slot settings is free form text
28 };
29
30 /** peripheral DeviceManager's s settings */
31 structure Settings {
32 ZCoordMode zCoordMode; ///< Z coordinate semantics
33 boolean autoManageNewDevices; ///< Automatically manage newly detected devices
34 float deviceAltitude; ///< Altitude of device in meters
35 int presenceDetectionTimeout; ///< Timeout for presence detection (sec)
36 map<string, sensors.NumericSensor_4_0_3.Thresholds> defaultThresholdsMap; ///< Default thresholds by peripheral device type
37 int maxActivePoweredDryContacts; ///< The maximum number of concurrently active powered dry contacts
38 };
39
40 /** Peripheral DeviceManager's metadata */
41 structure MetaData {
42 int oneWirePortCount; ///< Number of 1-wire ports
43 int onboardDeviceCount; ///< Number of onboard peripheral devices
44 };
45
46 /** Peripheral device type info */
47 structure DeviceTypeInfo {
48 sensors.Sensor_4_0_3.TypeSpec type; ///< Device (sensor) type
49 boolean isActuator; ///< Is actuator or not
50 string identifier; ///< Device type identifier
51 string name; ///< Device type display name
52 sensors.NumericSensor_4_0_3.Range defaultRange; ///< Default sensor range (numeric sensors only)
53 int defaultDecDigits; ///< Default sensor precision (numeric sensors only)
54 };
55
56 /** Firmware update status */
57 structure FirmwareUpdateState {
58 boolean active; ///< \c true if any peripheral device is currently updated
59 int remaining; ///< Number of peripheral devices that are still pending to be updated
60 };
61
62 /** Event: Peripheral device manager's settings have been changed */
63 valueobject SettingsChangedEvent extends event.UserEvent {
64 Settings oldSettings; ///< Settings before change
65 Settings newSettings; ///< Settings after change
66 };
67
68 /** Event: A peripheral device was added or removed */
69 valueobject DeviceEvent_2_0_0 extends idl.Event {
70 vector<Device_3_0_2> devices; ///< Affected devices
71 vector<Device_3_0_2> allDevices; ///< New list of discovered devices after change
72 };
73
74 /** Event: A peripheral device was added */
75 valueobject DeviceAddedEvent_2_0_0 extends DeviceEvent_2_0_0 { };
76
77 /** Event: A peripheral device was removed */
78 valueobject DeviceRemovedEvent_2_0_0 extends DeviceEvent_2_0_0 { };
79
80 /** Event: An unknown device was attached */
81 valueobject UnknownDeviceAttachedEvent extends idl.Event {
82 string romCode; ///< Device ROM code
83 vector<PosElement> position; ///< Device position in the chain
84 };
85
86 /** Enumeration: State of device firmware update */
87 enumeration DeviceFirmwareUpdateState {
88 UPDATE_STARTED, ///< Update is running
89 UPDATE_SUCCESSFUL, ///< Update has finished successfully
90 UPDATE_FAILED ///< Update has failed
91 };
92
93 /** Event: Firmware update on a device was started or has finished */
94 valueobject DeviceFirmwareUpdateStateChangedEvent extends idl.Event {
95 string oldVersion; ///< Firmware version before update
96 string newVersion; ///< Firmware version to be updated to
97 string serial; ///< Serial number of device
98 DeviceFirmwareUpdateState state; ///< Update state
99 };
100
101 /** Event: Firmware update state has changed
102 * This event will be sent to enclose one of more {@link DeviceFirmwareUpdateStateChangedEvent}.
103 * That is, it will be sent before a series of firmware updates is started and after the
104 * firmware update series has ended. */
105 valueobject FirmwareUpdateStateChangedEvent extends idl.Event {
106 FirmwareUpdateState newState; ///< New update state
107 };
108
109 /** Event: A peripheral device package was added or removed */
110 valueobject PackageEvent_2_0_0 extends idl.Event {
111 vector<PackageInfo_2_0_1> packageInfos; ///< Information about affected packages
112 vector<PackageInfo_2_0_1> allPackages; ///< New list of discovered packages after change
113 };
114
115 /** Event: A peripheral device package was added */
116 valueobject PackageAddedEvent_2_0_0 extends PackageEvent_2_0_0 { };
117 /** Event: A peripheral device package was removed */
118 valueobject PackageRemovedEvent_2_0_0 extends PackageEvent_2_0_0 { };
119
120 /** Peripheral device statistics */
121 structure Statistics {
122 int cSumErrCnt; ///< CRC / checksum error counter
123 };
124
125 /**
126 * Get the list of peripheral device slots.
127 *
128 * @return List of peripheral device slots
129 */
130 vector<DeviceSlot_2_0_3> getDeviceSlots();
131
132 /**
133 * Get a DeviceSlot by its index
134 *
135 * @param idx index of the slot to get
136 * @return the requested slot
137 */
138 DeviceSlot_2_0_3 getDeviceSlot(in int idx);
139
140 /**
141 * Get the list of currently attached peripheral devices
142 *
143 * @return List of all discovered peripheral devices
144 */
145 vector<Device_3_0_2> getDiscoveredDevices();
146
147 /**
148 * Get the list of currently attached peripheral device packages
149 *
150 * @return List of all discovered peripheral device packages
151 */
152 vector<PackageInfo_2_0_1> getDiscoveredPackageInfos();
153
154 /**
155 * Retrieve the peripheral DeviceManager's settings.
156 *
157 * @return peripheral DeviceManager's settings
158 */
159 Settings getSettings();
160
161 /**
162 * Change the peripheral DeviceManager's settings.
163 *
164 * @param settings New peripheral DeviceManager's settings
165 *
166 * @return 0 if OK
167 * @return ERR_INVALID_PARAMS if any parameters are invalid
168 */
169 int setSettings(in Settings settings);
170
171 /**
172 * Retreive the Peripheral DeviceManager's metadata.
173 *
174 * @return Peripheral DeviceManager's metadata
175 */
176 MetaData getMetaData();
177
178 /**
179 * Get the list of all peripheral device type infos
180 *
181 * @return List of all peripheral device type infos
182 */
183 vector<DeviceTypeInfo> getDeviceTypeInfos();
184
185 /**
186 * Return the state of device firmware updates running
187 * on devices connected to this device manager
188 *
189 * @return Firmware update state
190 */
191 FirmwareUpdateState getFirmwareUpdateState();
192
193 /**
194 * Retrieve statistics
195 *
196 * @return peripheral device statistics
197 */
198 Statistics getStatistics();
199
200 /**
201 * Get the list of currently attached peripheral device packages
202 *
203 * @return List of all discovered peripheral device packages
204 */
205 vector<Package_1_0_1> getDiscoveredPackages();
206
207 /**
208 * Get the fuse for the sensor port
209 *
210 * @return A fuse instance, if available
211 */
212 portsmodel.PortFuse getPortFuse();
213 };
214 }
215
216 #endif /* !__PERIPHERAL_DEVICE_MANAGER_IDL__ */
peripheral::DeviceManager_3_0_2::UPDATE_STARTED
Update is running.
Definition: PeripheralDeviceManager.idl:88
peripheral::DeviceManager_3_0_2::MetaData::onboardDeviceCount
int onboardDeviceCount
Number of onboard peripheral devices.
Definition: PeripheralDeviceManager.idl:43
peripheral::DeviceManager_3_0_2::newSettings
Settings newSettings
Settings after change.
Definition: PeripheralDeviceManager.idl:65
sensors::NumericSensor_4_0_3::Range
Range of possible sensor readings.
Definition: NumericSensor.idl:24
peripheral::DeviceManager_3_0_2::UPDATE_SUCCESSFUL
Update has finished successfully.
Definition: PeripheralDeviceManager.idl:89
peripheral::DeviceManager_3_0_2::Settings::presenceDetectionTimeout
int presenceDetectionTimeout
Timeout for presence detection (sec)
Definition: PeripheralDeviceManager.idl:35
peripheral::DeviceManager_3_0_2::newVersion
string newVersion
Firmware version to be updated to.
Definition: PeripheralDeviceManager.idl:96
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::name
string name
Device type display name.
Definition: PeripheralDeviceManager.idl:51
peripheral::DeviceManager_3_0_2::Settings::zCoordMode
ZCoordMode zCoordMode
Z coordinate semantics.
Definition: PeripheralDeviceManager.idl:32
peripheral::DeviceManager_3_0_2::FirmwareUpdateState
Firmware update status.
Definition: PeripheralDeviceManager.idl:57
peripheral::DeviceManager_3_0_2::DeviceFirmwareUpdateState
DeviceFirmwareUpdateState
Enumeration: State of device firmware update.
Definition: PeripheralDeviceManager.idl:87
peripheral
Peripheral Devices.
Definition: PeripheralDeviceManager.idl:17
peripheral::DeviceManager_3_0_2::FirmwareUpdateState::active
boolean active
true if any peripheral device is currently updated
Definition: PeripheralDeviceManager.idl:58
peripheral::DeviceManager_3_0_2::Statistics
Peripheral device statistics.
Definition: PeripheralDeviceManager.idl:121
peripheral::DeviceManager_3_0_2::MetaData
Peripheral DeviceManager&#39;s metadata.
Definition: PeripheralDeviceManager.idl:41
peripheral::DeviceManager_3_0_2::ZCoordMode
ZCoordMode
Z Coordinate Mode identifier.
Definition: PeripheralDeviceManager.idl:25
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::defaultRange
sensors::NumericSensor_4_0_3 Range defaultRange
Default sensor range (numeric sensors only)
Definition: PeripheralDeviceManager.idl:52
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::identifier
string identifier
Device type identifier.
Definition: PeripheralDeviceManager.idl:50
idl
Basic IDL definitions.
Definition: Event.idl:10
peripheral::DeviceManager_3_0_2::MetaData::oneWirePortCount
int oneWirePortCount
Number of 1-wire ports.
Definition: PeripheralDeviceManager.idl:42
peripheral::DeviceManager_3_0_2::allPackages
vector< PackageInfo_2_0_1 > allPackages
New list of discovered packages after change.
Definition: PeripheralDeviceManager.idl:112
peripheral::DeviceManager_3_0_2::allDevices
vector< Device_3_0_2 > allDevices
New list of discovered devices after change.
Definition: PeripheralDeviceManager.idl:71
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::type
sensors::Sensor_4_0_3 TypeSpec type
Device (sensor) type.
Definition: PeripheralDeviceManager.idl:48
peripheral::DeviceManager_3_0_2::Statistics::cSumErrCnt
int cSumErrCnt
CRC / checksum error counter.
Definition: PeripheralDeviceManager.idl:122
peripheral::DeviceManager_3_0_2::state
DeviceFirmwareUpdateState state
Update state.
Definition: PeripheralDeviceManager.idl:98
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::isActuator
boolean isActuator
Is actuator or not.
Definition: PeripheralDeviceManager.idl:49
sensors::NumericSensor_4_0_3::Thresholds
Numeric sensor thresholds.
Definition: NumericSensor.idl:111
sensors::Sensor_4_0_3
Sensor interface
Definition: Sensor.idl:15
portsmodel
Ports.
Definition: Port.idl:15
peripheral::DeviceSlot_2_0_3
Peripheral Device Slot.
Definition: PeripheralDeviceSlot.idl:60
peripheral::DeviceManager_3_0_2::RACKUNITS
Z coordinate of slot settings is in rack units.
Definition: PeripheralDeviceManager.idl:26
peripheral::DeviceManager_3_0_2::DeviceTypeInfo::defaultDecDigits
int defaultDecDigits
Default sensor precision (numeric sensors only)
Definition: PeripheralDeviceManager.idl:53
sensors
Sensors Model.
Definition: AccumulatingNumericSensor.idl:13
peripheral::DeviceManager_3_0_2::position
vector< PosElement > position
Device position in the chain.
Definition: PeripheralDeviceManager.idl:83
sensors::Sensor_4_0_3::TypeSpec
Complete sensor type specification.
Definition: Sensor.idl:160
portsmodel::PortFuse
Interface describing a controllable fuse for a device port.
Definition: PortFuse.idl:17
peripheral::DeviceManager_3_0_2::DeviceTypeInfo
Peripheral device type info.
Definition: PeripheralDeviceManager.idl:47
peripheral::DeviceManager_3_0_2::Settings::autoManageNewDevices
boolean autoManageNewDevices
Automatically manage newly detected devices.
Definition: PeripheralDeviceManager.idl:33
sensors::NumericSensor_4_0_3
A sensor with numeric readings.
Definition: NumericSensor.idl:17
peripheral::DeviceManager_3_0_2::Settings::maxActivePoweredDryContacts
int maxActivePoweredDryContacts
The maximum number of concurrently active powered dry contacts.
Definition: PeripheralDeviceManager.idl:37
peripheral::DeviceManager_3_0_2::Settings
peripheral DeviceManager&#39;s s settings
Definition: PeripheralDeviceManager.idl:31
peripheral::DeviceManager_3_0_2::Settings::deviceAltitude
float deviceAltitude
Altitude of device in meters.
Definition: PeripheralDeviceManager.idl:34
peripheral::DeviceManager_3_0_2::serial
string serial
Serial number of device.
Definition: PeripheralDeviceManager.idl:97
peripheral::DeviceManager_3_0_2::Settings::defaultThresholdsMap
map< string, sensors::NumericSensor_4_0_3.Thresholds > defaultThresholdsMap
Default thresholds by peripheral device type.
Definition: PeripheralDeviceManager.idl:36
peripheral::DeviceManager_3_0_2::FirmwareUpdateState::remaining
int remaining
Number of peripheral devices that are still pending to be updated.
Definition: PeripheralDeviceManager.idl:59
peripheral::DeviceManager_3_0_2
Peripheral Device Manager.
Definition: PeripheralDeviceManager.idl:20