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