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 */
34 State getState();
35
36 /**
37 * Get device meta data
38 *
39 * @return Device meta data
40 */
41 Metadata getMetadata();
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__
radm::Device
Definition Device.idl:7
radm::Device::getMetadata
Metadata getMetadata()
Get device meta data.
radm::Device::State
State
Definition Device.idl:11
radm::Device::UNKNOWN
@ UNKNOWN
Device state was not yet determined.
Definition Device.idl:12
radm::Device::INACTIVE
@ INACTIVE
Device is inactive / not connected.
Definition Device.idl:13
radm::Device::ACTIVE
@ ACTIVE
Device is active / connected.
Definition Device.idl:14
radm::Device::getState
State getState()
Get device state.
radm::Device::getName
string getName()
Get device name.
radm::Device::setName
int setName(in string name)
Set device name.
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::Device::Metadata
Definition Device.idl:17
radm::Device::Metadata::model
string model
Device model.
Definition Device.idl:20
radm::Device::Metadata::product
string product
Device product family.
Definition Device.idl:19
radm::Device::Metadata::serialNumber
string serialNumber
Device serial number.
Definition Device.idl:18
radm::Device::Metadata::fwVersion
string fwVersion
Device firmware version (if applicable)
Definition Device.idl:21
radm::Device::Metadata::idx
int idx
Index of the device in its respective list.
Definition Device.idl:26
radm::Device::Metadata::privilegeArg
string privilegeArg
Privilege argument for this device in case a privilege is required to access it.
Definition Device.idl:24
radm::Device::Metadata::hwVersion
string hwVersion
Device hardware version (if applicable)
Definition Device.idl:22
radm::Device::Metadata::uid
string uid
Unique identifier for this device.
Definition Device.idl:25
radm::Device::Metadata::macAddress
string macAddress
Device MAC address (if applicable)
Definition Device.idl:23
radm::Device::NameChangedEvent
Event: The device name has changed.
Definition Device.idl:62
radm::Device::NameChangedEvent::oldName
string oldName
Name before change.
Definition Device.idl:63
radm::Device::NameChangedEvent::newName
string newName
Name after change.
Definition Device.idl:64
radm::Device::StateChangedEvent
Event: The device state has changed.
Definition Device.idl:68
radm::Device::StateChangedEvent::newState
State newState
State after change.
Definition Device.idl:70
radm::Device::StateChangedEvent::oldState
State oldState
State before change.
Definition Device.idl:69