Legrand / Raritan Xerus™ JSON-RPC API for Remote Access Devices like KX4-101, KX3G2
Loading...
Searching...
No Matches
DsamDeviceManager.idl
1#ifndef __RADM_DSAM_DEVICE_MANAGER_IDL__
2#define __RADM_DSAM_DEVICE_MANAGER_IDL__
3
4#include <DsamDevice.idl>
5#include <SerialAccessPort.idl>
6#include <UserEvent.idl>
7
8module radm {
9 interface DsamDeviceManager {
10 constant int ERR_INVALID_ARGUMENT = 1;
11
12 /**
13 * %Firmware update history status
14 */
15 enumeration UpdateHistoryStatus {
16 SUCCESSFUL, ///< The update was successfully completed
17 FAILED, ///< The update failed
18 INCOMPLETE ///< The update was not completed
19 };
20
21 /**
22 * DSAM firmware update history entry
23 */
25 int port; ///< Index of port the DSAM was connected to
26 string serialno; ///< DSAM serial number
27 time timestamp; ///< Timestamp when the update was started
28 string oldVersion; ///< Previous firmware version
29 string imageVersion; ///< Firmware version of update image
30 UpdateHistoryStatus status; ///< Update status
31 };
32
33 /**
34 * Get DSAM devices connected to the device
35 *
36 * @return List of connected DSAM devices
37 */
38 vector<DsamDevice> getDsamDevices();
39
40 /**
41 * Get version of the DSAM firmware available for update
42 *
43 * @return Version number string of the available DSAM firmware
44 */
46
47 /**
48 * Fetch the DSAM firmware update history.
49 *
50 * @return DSAM firmware update history entries
51 */
52 vector<UpdateHistoryEntry> getUpdateHistory();
53
54 /**
55 * Start firmware update on the given devices
56 *
57 * @param dsams DSAM devices to update
58 */
59 void startFirmwareUpdate(in vector<DsamDevice> dsams);
60
61 /**
62 * Get serial device keyword mapping
63 *
64 * An alert is sent in the serial protocol whenever a configured
65 * keyword is encountered in the serial port data.
66 *
67 * @return Keyword mapping, using the keywords as map keys and
68 * the serial ports the keyword is configured for as value
69 */
70 map<string, vector<SerialAccessPort>> getKeywordMapping();
71
72 /**
73 * Set serial device keyword mapping
74 *
75 * The following constraints apply:
76 * - There must not be more than 16 keywords per port
77 * - Ports for a given keyword must be unique (no duplicates)
78 *
79 * @param mapping New keyword mapping, using keyword as key and
80 * serial ports the keyword is configured for as value
81 *
82 * @return 0 on success
83 * @return 1 if the mapping is invalid
84 */
85 int setKeywordMapping(in map<string, vector<SerialAccessPort>> mapping);
86
87 /** Event: Connected DSAM devices list has changed */
88 valueobject DeviceChangedEvent extends idl.Event {
89 vector<DsamDevice> dsamList; ///< List of connected DSAM devices after change
90 };
91
92 /** Event: A DSAM device was connected */
94 DsamDevice device; ///< Newly connected DSAM device
95 };
96
97 /** Event: A DSAM device was disconnected */
99 string deviceId; ///< ID of disconnected DSAM
100 string serialNumber; ///< Serial number of disconnected DSAM
101 };
102
103 /** Event: The keyword mapping was changed */
104 valueobject KeywordMappingChangedEvent extends event.UserEvent {
105 map<string, vector<SerialAccessPort>> oldMapping; ///< Mapping before change
106 map<string, vector<SerialAccessPort>> newMapping; ///< Mapping after change
107 };
108 };
109}
110
111#endif // __RADM_DSAM_DEVICE_MANAGER_IDL__
vector< UpdateHistoryEntry > getUpdateHistory()
Fetch the DSAM firmware update history.
void startFirmwareUpdate(in vector< DsamDevice > dsams)
Start firmware update on the given devices.
string getAvailableFirmwareVersion()
Get version of the DSAM firmware available for update.
UpdateHistoryStatus
Firmware update history status
@ FAILED
The update failed.
@ INCOMPLETE
The update was not completed.
@ SUCCESSFUL
The update was successfully completed.
vector< DsamDevice > getDsamDevices()
Get DSAM devices connected to the device.
map< string, vector< SerialAccessPort > > getKeywordMapping()
Get serial device keyword mapping.
int setKeywordMapping(in map< string, vector< SerialAccessPort > > mapping)
Set serial device keyword mapping.
Basic IDL definitions.
Definition Event.idl:10
Radm Model.
Definition AccessPort.idl:8
Common base for all events.
Definition Event.idl:13
Event: A DSAM device was connected.
DsamDevice device
Newly connected DSAM device.
Event: Connected DSAM devices list has changed.
vector< DsamDevice > dsamList
List of connected DSAM devices after change.
Event: A DSAM device was disconnected.
string serialNumber
Serial number of disconnected DSAM.
map< string, vector< SerialAccessPort > > newMapping
Mapping after change.
map< string, vector< SerialAccessPort > > oldMapping
Mapping before change.
DSAM firmware update history entry.
time timestamp
Timestamp when the update was started.
int port
Index of port the DSAM was connected to.
UpdateHistoryStatus status
Update status.
string oldVersion
Previous firmware version.
string imageVersion
Firmware version of update image.