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 */
67 Settings getSettings();
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__
radm::Device
Definition Device.idl:7
radm::PowerDevice
Definition PowerDevice.idl:8
radm::PowerDevice::ERR_SNMP_COMM_FAILURE
constant int ERR_SNMP_COMM_FAILURE
SNMP communication failed.
Definition PowerDevice.idl:13
radm::PowerDevice::SnmpAuthProtocol
SnmpAuthProtocol
Definition PowerDevice.idl:24
radm::PowerDevice::MD5
@ MD5
MD5.
Definition PowerDevice.idl:25
radm::PowerDevice::SHA256
@ SHA256
SHA-256.
Definition PowerDevice.idl:28
radm::PowerDevice::SHA1
@ SHA1
SHA-1.
Definition PowerDevice.idl:26
radm::PowerDevice::SHA224
@ SHA224
SHA-224.
Definition PowerDevice.idl:27
radm::PowerDevice::SHA512
@ SHA512
SHA-512.
Definition PowerDevice.idl:30
radm::PowerDevice::SHA384
@ SHA384
SHA-384.
Definition PowerDevice.idl:29
radm::PowerDevice::SnmpPrivProtocol
SnmpPrivProtocol
Definition PowerDevice.idl:33
radm::PowerDevice::AES192_3DES
@ AES192_3DES
AES-192 with key extension (3DES)
Definition PowerDevice.idl:38
radm::PowerDevice::AES256
@ AES256
AES-256.
Definition PowerDevice.idl:37
radm::PowerDevice::DES
@ DES
DES.
Definition PowerDevice.idl:34
radm::PowerDevice::AES256_3DES
@ AES256_3DES
AES-256 with key extension (3DES)
Definition PowerDevice.idl:39
radm::PowerDevice::AES128
@ AES128
AES-128.
Definition PowerDevice.idl:35
radm::PowerDevice::AES192
@ AES192
AES-192.
Definition PowerDevice.idl:36
radm::PowerDevice::ERR_SNMP_INTERNAL_PROBLEM
constant int ERR_SNMP_INTERNAL_PROBLEM
An internal error was encountered during SNMP communication.
Definition PowerDevice.idl:16
radm::PowerDevice::ERR_READONLY_VALUE
constant int ERR_READONLY_VALUE
A read-only value was changed.
Definition PowerDevice.idl:9
radm::PowerDevice::ERR_SNMP_AUTHORIZATION
constant int ERR_SNMP_AUTHORIZATION
SNMP authorization error.
Definition PowerDevice.idl:15
radm::PowerDevice::SnmpSecurityLevel
SnmpSecurityLevel
Definition PowerDevice.idl:18
radm::PowerDevice::AUTH_NO_PRIV
@ AUTH_NO_PRIV
authentication, no privacy
Definition PowerDevice.idl:20
radm::PowerDevice::AUTH_PRIV
@ AUTH_PRIV
authentication, privacy
Definition PowerDevice.idl:21
radm::PowerDevice::NO_AUTH_NO_PRIV
@ NO_AUTH_NO_PRIV
no authentication, no privacy
Definition PowerDevice.idl:19
radm::PowerDevice::getSettings
Settings getSettings()
Get device settings.
radm::PowerDevice::ERR_SNMP_NOACCESS
constant int ERR_SNMP_NOACCESS
No access to SNMP resource.
Definition PowerDevice.idl:14
radm::PowerDevice::ERR_SNMP_TIMEOUT
constant int ERR_SNMP_TIMEOUT
SNMP response timeout.
Definition PowerDevice.idl:12
radm::PowerDevice::resume
int resume()
Resume communication to this PDU.
radm::PowerDevice::ERR_SNMP_MIB_MISMATCH
constant int ERR_SNMP_MIB_MISMATCH
The PDU's SNMP MIB is incompatible.
Definition PowerDevice.idl:11
radm::PowerDevice::getOutletPorts
vector< OutletPort > getOutletPorts()
Get outlets belonging to this PDU.
radm::PowerDevice::setSettings
int setSettings(in Settings settings)
Set settings for this device.
radm
Radm Model.
Definition AccessPort.idl:8
radm::PowerDevice::SettingsChangedEvent
Event: Device settings have changed.
Definition PowerDevice.idl:101
radm::PowerDevice::SettingsChangedEvent::oldSettings
Settings oldSettings
Settings before change.
Definition PowerDevice.idl:102
radm::PowerDevice::SettingsChangedEvent::newSettings
Settings newSettings
Settings after change.
Definition PowerDevice.idl:103
radm::PowerDevice::Settings
Definition PowerDevice.idl:47
radm::PowerDevice::Settings::name
string name
PDU name.
Definition PowerDevice.idl:49
radm::PowerDevice::Settings::authPass
string authPass
SNMP authentication password (only valid for SNMP v3)
Definition PowerDevice.idl:57
radm::PowerDevice::Settings::privPass
string privPass
SNMP privacy password (only valid for SNMP v3)
Definition PowerDevice.idl:59
radm::PowerDevice::Settings::host
string host
Network host name of PDU, read-only after initial creation.
Definition PowerDevice.idl:50
radm::PowerDevice::Settings::port
int port
SNMP network port.
Definition PowerDevice.idl:51
radm::PowerDevice::Settings::privProtocol
SnmpPrivProtocol privProtocol
SNMP privacy protocol (only valid for SNMP v3)
Definition PowerDevice.idl:58
radm::PowerDevice::Settings::useSnmpV3
boolean useSnmpV3
Whether to use SNMPv3 instead of SNMP v1/2c.
Definition PowerDevice.idl:52
radm::PowerDevice::Settings::type
DeviceType type
Type of PDU.
Definition PowerDevice.idl:48
radm::PowerDevice::Settings::authProtocol
SnmpAuthProtocol authProtocol
SNMP authentication protocol (only valid for SNMP v3)
Definition PowerDevice.idl:56
radm::PowerDevice::Settings::secLevel
SnmpSecurityLevel secLevel
SNMP security level (only valid for SNMP v3)
Definition PowerDevice.idl:55
radm::PowerDevice::Settings::community
string community
SNMP write community string (only valid for SNMP v1/2c)
Definition PowerDevice.idl:53
radm::PowerDevice::Settings::userName
string userName
SNMP v3 user name (only valid for SNMP v3)
Definition PowerDevice.idl:54