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 */
24 structure UpdateHistoryEntry {
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 */
45 string getAvailableFirmwareVersion();
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 */
93 valueobject DeviceAttachedEvent extends DeviceChangedEvent {
94 DsamDevice device; ///< Newly connected DSAM device
95 };
96
97 /** Event: A DSAM device was disconnected */
98 valueobject DeviceRemovedEvent extends DeviceChangedEvent {
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__
radm::DsamDeviceManager
Definition DsamDeviceManager.idl:9
radm::DsamDeviceManager::getUpdateHistory
vector< UpdateHistoryEntry > getUpdateHistory()
Fetch the DSAM firmware update history.
radm::DsamDeviceManager::startFirmwareUpdate
void startFirmwareUpdate(in vector< DsamDevice > dsams)
Start firmware update on the given devices.
radm::DsamDeviceManager::getAvailableFirmwareVersion
string getAvailableFirmwareVersion()
Get version of the DSAM firmware available for update.
radm::DsamDeviceManager::UpdateHistoryStatus
UpdateHistoryStatus
Firmware update history status
Definition DsamDeviceManager.idl:15
radm::DsamDeviceManager::FAILED
@ FAILED
The update failed.
Definition DsamDeviceManager.idl:17
radm::DsamDeviceManager::INCOMPLETE
@ INCOMPLETE
The update was not completed.
Definition DsamDeviceManager.idl:18
radm::DsamDeviceManager::SUCCESSFUL
@ SUCCESSFUL
The update was successfully completed.
Definition DsamDeviceManager.idl:16
radm::DsamDeviceManager::getDsamDevices
vector< DsamDevice > getDsamDevices()
Get DSAM devices connected to the device.
radm::DsamDeviceManager::getKeywordMapping
map< string, vector< SerialAccessPort > > getKeywordMapping()
Get serial device keyword mapping.
radm::DsamDeviceManager::setKeywordMapping
int setKeywordMapping(in map< string, vector< SerialAccessPort > > mapping)
Set serial device keyword mapping.
radm::DsamDevice
Definition DsamDevice.idl:9
idl
Basic IDL definitions.
Definition Event.idl:10
radm
Radm Model.
Definition AccessPort.idl:8
idl::Event
Common base for all events.
Definition Event.idl:13
radm::DsamDeviceManager::DeviceAttachedEvent
Event: A DSAM device was connected.
Definition DsamDeviceManager.idl:93
radm::DsamDeviceManager::DeviceAttachedEvent::device
DsamDevice device
Newly connected DSAM device.
Definition DsamDeviceManager.idl:94
radm::DsamDeviceManager::DeviceChangedEvent
Event: Connected DSAM devices list has changed.
Definition DsamDeviceManager.idl:88
radm::DsamDeviceManager::DeviceChangedEvent::dsamList
vector< DsamDevice > dsamList
List of connected DSAM devices after change.
Definition DsamDeviceManager.idl:89
radm::DsamDeviceManager::DeviceRemovedEvent
Event: A DSAM device was disconnected.
Definition DsamDeviceManager.idl:98
radm::DsamDeviceManager::DeviceRemovedEvent::deviceId
string deviceId
ID of disconnected DSAM.
Definition DsamDeviceManager.idl:99
radm::DsamDeviceManager::DeviceRemovedEvent::serialNumber
string serialNumber
Serial number of disconnected DSAM.
Definition DsamDeviceManager.idl:100
radm::DsamDeviceManager::KeywordMappingChangedEvent
Event: The keyword mapping was changed.
Definition DsamDeviceManager.idl:104
radm::DsamDeviceManager::KeywordMappingChangedEvent::newMapping
map< string, vector< SerialAccessPort > > newMapping
Mapping after change.
Definition DsamDeviceManager.idl:106
radm::DsamDeviceManager::KeywordMappingChangedEvent::oldMapping
map< string, vector< SerialAccessPort > > oldMapping
Mapping before change.
Definition DsamDeviceManager.idl:105
radm::DsamDeviceManager::UpdateHistoryEntry
DSAM firmware update history entry.
Definition DsamDeviceManager.idl:24
radm::DsamDeviceManager::UpdateHistoryEntry::timestamp
time timestamp
Timestamp when the update was started.
Definition DsamDeviceManager.idl:27
radm::DsamDeviceManager::UpdateHistoryEntry::port
int port
Index of port the DSAM was connected to.
Definition DsamDeviceManager.idl:25
radm::DsamDeviceManager::UpdateHistoryEntry::status
UpdateHistoryStatus status
Update status.
Definition DsamDeviceManager.idl:30
radm::DsamDeviceManager::UpdateHistoryEntry::serialno
string serialno
DSAM serial number.
Definition DsamDeviceManager.idl:26
radm::DsamDeviceManager::UpdateHistoryEntry::oldVersion
string oldVersion
Previous firmware version.
Definition DsamDeviceManager.idl:28
radm::DsamDeviceManager::UpdateHistoryEntry::imageVersion
string imageVersion
Firmware version of update image.
Definition DsamDeviceManager.idl:29