Legrand / Raritan Xerus™ JSON-RPC API for Remote Access Devices like KX4-101, KX3G2
Loading...
Searching...
No Matches
PowerDevice.idl
1#ifndef __RADM_POWER_DEVICE_IDL__
2#define __RADM_POWER_DEVICE_IDL__
3
4#include <Device.idl>
5#include <OutletPort.idl>
6
7module radm {
8 interface PowerDevice extends Device {
9 constant int ERR_READONLY_VALUE = 10; ///< A read-only value was changed
10
11 constant int ERR_SNMP_MIB_MISMATCH = 101; ///< The PDU's SNMP MIB is incompatible
12 constant int ERR_SNMP_TIMEOUT = 102; ///< SNMP response timeout
13 constant int ERR_SNMP_COMM_FAILURE = 103; ///< SNMP communication failed
14 constant int ERR_SNMP_NOACCESS = 104; ///< No access to SNMP resource
15 constant int ERR_SNMP_AUTHORIZATION = 105; ///< SNMP authorization error
16 constant int ERR_SNMP_INTERNAL_PROBLEM = 106; ///< An internal error was encountered during SNMP communication
17
18 enumeration SnmpSecurityLevel {
19 NO_AUTH_NO_PRIV, ///< no authentication, no privacy
20 AUTH_NO_PRIV, ///< authentication, no privacy
21 AUTH_PRIV ///< authentication, privacy
22 };
23
24 enumeration SnmpAuthProtocol {
25 MD5, ///< MD5
26 SHA1, ///< SHA-1
27 SHA224, ///< SHA-224
28 SHA256, ///< SHA-256
29 SHA384, ///< SHA-384
30 SHA512 ///< SHA-512
31 };
32
33 enumeration SnmpPrivProtocol {
34 DES, ///< DES
35 AES128, ///< AES-128
36 AES192, ///< AES-192
37 AES256, ///< AES-256
38 AES192_3DES, ///< AES-192 with key extension (3DES)
39 AES256_3DES ///< AES-256 with key extension (3DES)
40 };
41
42 enumeration DeviceType {
43 RARITAN,
44 SERVER_TECHNOLOGY
45 };
46
47 structure Settings {
48 DeviceType type; ///< Type of PDU
49 string name; ///< PDU name
50 string host; ///< Network host name of PDU, read-only after initial creation
51 int port; ///< SNMP network port
52 boolean useSnmpV3; ///< Whether to use SNMPv3 instead of SNMP v1/2c
53 string community; ///< SNMP write community string (only valid for SNMP v1/2c)
54 string userName; ///< SNMP v3 user name (only valid for SNMP v3)
55 SnmpSecurityLevel secLevel; ///< SNMP security level (only valid for SNMP v3)
56 SnmpAuthProtocol authProtocol; ///< SNMP authentication protocol (only valid for SNMP v3)
57 string authPass; ///< SNMP authentication password (only valid for SNMP v3)
58 SnmpPrivProtocol privProtocol; ///< SNMP privacy protocol (only valid for SNMP v3)
59 string privPass; ///< SNMP privacy password (only valid for SNMP v3)
60 };
61
62 /**
63 * Get device settings
64 *
65 * @return Device settings
66 */
68
69 /**
70 * Set settings for this device
71 *
72 * @param settings New settings to set
73 *
74 * @return 0 on success
75 * @return 1 if any argument is invalid
76 * @return 10 when changing any read-only value
77 */
78 int setSettings(in Settings settings);
79
80 /**
81 * Resume communication to this PDU
82 *
83 * @return 0 on success
84 * @return 101 if the given host name was not found
85 * @return 102 if the SNMP communication timed out
86 * @return 103 if there was any other failure during SNMP communication
87 * @return 104 if the PDU responded with 'no access'
88 * @return 105 if the SNMP authorization failed
89 * @return 106 if there was an internal problem during SNMP communication
90 */
91 int resume();
92
93 /**
94 * Get outlets belonging to this PDU
95 *
96 * @return List of outlet ports
97 */
98 vector<OutletPort> getOutletPorts();
99
100 /** Event: Device settings have changed */
101 valueobject SettingsChangedEvent extends event.UserEvent {
102 Settings oldSettings; ///< Settings before change
103 Settings newSettings; ///< Settings after change
104 };
105 };
106}
107
108#endif // __RADM_POWER_DEVICE_IDL__
constant int ERR_SNMP_COMM_FAILURE
SNMP communication failed.
@ AES192_3DES
AES-192 with key extension (3DES)
@ AES256_3DES
AES-256 with key extension (3DES)
constant int ERR_SNMP_INTERNAL_PROBLEM
An internal error was encountered during SNMP communication.
constant int ERR_READONLY_VALUE
A read-only value was changed.
constant int ERR_SNMP_AUTHORIZATION
SNMP authorization error.
@ AUTH_NO_PRIV
authentication, no privacy
@ AUTH_PRIV
authentication, privacy
@ NO_AUTH_NO_PRIV
no authentication, no privacy
Settings getSettings()
Get device settings.
constant int ERR_SNMP_NOACCESS
No access to SNMP resource.
constant int ERR_SNMP_TIMEOUT
SNMP response timeout.
int resume()
Resume communication to this PDU.
constant int ERR_SNMP_MIB_MISMATCH
The PDU's SNMP MIB is incompatible.
vector< OutletPort > getOutletPorts()
Get outlets belonging to this PDU.
int setSettings(in Settings settings)
Set settings for this device.
Radm Model.
Definition AccessPort.idl:8
Event: Device settings have changed.
Settings oldSettings
Settings before change.
Settings newSettings
Settings after change.
string authPass
SNMP authentication password (only valid for SNMP v3)
string privPass
SNMP privacy password (only valid for SNMP v3)
string host
Network host name of PDU, read-only after initial creation.
int port
SNMP network port.
SnmpPrivProtocol privProtocol
SNMP privacy protocol (only valid for SNMP v3)
boolean useSnmpV3
Whether to use SNMPv3 instead of SNMP v1/2c.
DeviceType type
Type of PDU.
SnmpAuthProtocol authProtocol
SNMP authentication protocol (only valid for SNMP v3)
SnmpSecurityLevel secLevel
SNMP security level (only valid for SNMP v3)
string community
SNMP write community string (only valid for SNMP v1/2c)
string userName
SNMP v3 user name (only valid for SNMP v3)