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