Legrand / Raritan Xerus™ JSON-RPC API for Remote Access Devices like KX4-101, KX3G2
Loading...
Searching...
No Matches
Device.idl
1#ifndef __RADM_DEVICE_IDL__
2#define __RADM_DEVICE_IDL__
3
4#include <UserEvent.idl>
5
6module radm {
7 interface Device {
8 constant int ERR_INVALID_ARGUMENT = 1;
9 constant int ERR_NOT_SUPPORTED = 2;
10
11 enumeration State {
12 UNKNOWN, ///< Device state was not yet determined
13 INACTIVE, ///< Device is inactive / not connected
14 ACTIVE ///< Device is active / connected
15 };
16
17 structure Metadata {
18 string serialNumber; ///< Device serial number
19 string product; ///< Device product family
20 string model; ///< Device model
21 string fwVersion; ///< Device firmware version (if applicable)
22 string hwVersion; ///< Device hardware version (if applicable)
23 string macAddress; ///< Device MAC address (if applicable)
24 string privilegeArg; ///< Privilege argument for this device in case a privilege is required to access it
25 string uid; ///< Unique identifier for this device
26 int idx; ///< Index of the device in its respective list
27 };
28
29 /**
30 * Get device state
31 *
32 * @return Device state
33 */
35
36 /**
37 * Get device meta data
38 *
39 * @return Device meta data
40 */
42
43 /**
44 * Get device name
45 *
46 * @return Device name
47 */
48 string getName();
49
50 /**
51 * Set device name
52 *
53 * @param name New name
54 *
55 * @return 0 on success
56 * @return 1 if the given name is invalid
57 * @return 2 if the device name can not be changed
58 */
59 int setName(in string name);
60
61 /** Event: The device name has changed */
62 valueobject NameChangedEvent extends event.UserEvent {
63 string oldName; ///< Name before change
64 string newName; ///< Name after change
65 };
66
67 /** Event: The device state has changed */
68 valueobject StateChangedEvent extends idl.Event {
69 State oldState; ///< State before change
70 State newState; ///< State after change
71 string name;
72 };
73 };
74
75}
76
77#endif //__RADM_DEVICE_IDL__
Metadata getMetadata()
Get device meta data.
@ UNKNOWN
Device state was not yet determined.
Definition Device.idl:12
@ INACTIVE
Device is inactive / not connected.
Definition Device.idl:13
@ ACTIVE
Device is active / connected.
Definition Device.idl:14
State getState()
Get device state.
string getName()
Get device name.
int setName(in string name)
Set device name.
Basic IDL definitions.
Definition Event.idl:10
Radm Model.
Definition AccessPort.idl:8
Common base for all events.
Definition Event.idl:13
string model
Device model.
Definition Device.idl:20
string product
Device product family.
Definition Device.idl:19
string serialNumber
Device serial number.
Definition Device.idl:18
string fwVersion
Device firmware version (if applicable)
Definition Device.idl:21
int idx
Index of the device in its respective list.
Definition Device.idl:26
string privilegeArg
Privilege argument for this device in case a privilege is required to access it.
Definition Device.idl:24
string hwVersion
Device hardware version (if applicable)
Definition Device.idl:22
string uid
Unique identifier for this device.
Definition Device.idl:25
string macAddress
Device MAC address (if applicable)
Definition Device.idl:23
Event: The device name has changed.
Definition Device.idl:62
string oldName
Name before change.
Definition Device.idl:63
string newName
Name after change.
Definition Device.idl:64
Event: The device state has changed.
Definition Device.idl:68
State newState
State after change.
Definition Device.idl:70
State oldState
State before change.
Definition Device.idl:69