Legrand / Raritan Xerus™ JSON-RPC API for Remote Access Devices like KX4-101, KX3G2

Loading...
Searching...
No Matches
PowerSupply.idl
1#ifndef __RADM_POWERSUPPLY_IDL__
2#define __RADM_POWERSUPPLY_IDL__
3
4#include <Event.idl>
5#include <UserEvent.idl>
6
7module radm {
8
9 interface PowerSupply {
10
11 constant int ERR_AUTODETECT_NOT_SUPPORTED = 1; ///< Auto-detecion is not supported.
12
13 structure MetaData {
14 string label; ///< Power Supply label
15 int idx; ///< Power Supply Index
16 boolean hasAutoDetection; ///< If support auto-detection of Power Supply state.
17 };
18
19 structure Settings {
20 boolean autoDetectEnabled; ///< Enable or disable auto-detection
21 };
22
23 [unknown_fallback("UNKNOWN")]
24 enumeration Status {
25 UNKNOWN,
26 NO_POWER,
27 POWERED
28 };
29
30 /**
31 * Retrieve the Power Supply's metadata.
32 *
33 * @return Power Supply's metadata
34 */
35 MetaData getMetaData();
36
37 /**
38 * Retrieve Power Supply status.
39 *
40 * @return Power Supply status
41 */
42 Status getStatus();
43
44 /**
45 * Retrieve the Power Supply settings.
46 *
47 * @return Settings for Power Supply
48 */
49 Settings getSettings();
50
51 /**
52 * Update Power Supply settings.
53 *
54 * @param settings New settings
55 *
56 * @return 0 if OK
57 * @return non-zero in case of error (see error constants above)
58 */
59 int setSettings(in Settings settings);
60
61 /** Event: PowerSupply status has changed */
62 valueobject StatusChangedEvent extends idl.Event {
63 Status oldStatus; ///< Power Supply status before change
64 Status newStatus; ///< Power Supply status after change
65 };
66
67 /** Event: Power Supply settings has changed */
68 valueobject SettingsChangedEvent extends event.UserEvent {
69 Settings oldSettings; ///< Power Supply settings before change
70 Settings newSettings; ///< Power Supply settings after change
71 };
72 };
73}
74
75#endif //__RADM_POWERSUPPLY_IDL__
radm::PowerSupply
Definition PowerSupply.idl:9
radm::PowerSupply::getMetaData
MetaData getMetaData()
Retrieve the Power Supply's metadata.
radm::PowerSupply::getStatus
Status getStatus()
Retrieve Power Supply status.
radm::PowerSupply::setSettings
int setSettings(in Settings settings)
Update Power Supply settings.
radm::PowerSupply::ERR_AUTODETECT_NOT_SUPPORTED
constant int ERR_AUTODETECT_NOT_SUPPORTED
Auto-detecion is not supported.
Definition PowerSupply.idl:11
radm::PowerSupply::getSettings
Settings getSettings()
Retrieve the Power Supply settings.
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::PowerSupply::MetaData
Definition PowerSupply.idl:13
radm::PowerSupply::MetaData::label
string label
Power Supply label.
Definition PowerSupply.idl:14
radm::PowerSupply::MetaData::hasAutoDetection
boolean hasAutoDetection
If support auto-detection of Power Supply state.
Definition PowerSupply.idl:16
radm::PowerSupply::MetaData::idx
int idx
Power Supply Index.
Definition PowerSupply.idl:15
radm::PowerSupply::SettingsChangedEvent
Event: Power Supply settings has changed.
Definition PowerSupply.idl:68
radm::PowerSupply::SettingsChangedEvent::newSettings
Settings newSettings
Power Supply settings after change.
Definition PowerSupply.idl:70
radm::PowerSupply::SettingsChangedEvent::oldSettings
Settings oldSettings
Power Supply settings before change.
Definition PowerSupply.idl:69
radm::PowerSupply::Settings
Definition PowerSupply.idl:19
radm::PowerSupply::Settings::autoDetectEnabled
boolean autoDetectEnabled
Enable or disable auto-detection.
Definition PowerSupply.idl:20
radm::PowerSupply::StatusChangedEvent
Event: PowerSupply status has changed.
Definition PowerSupply.idl:62
radm::PowerSupply::StatusChangedEvent::newStatus
Status newStatus
Power Supply status after change.
Definition PowerSupply.idl:64
radm::PowerSupply::StatusChangedEvent::oldStatus
Status oldStatus
Power Supply status before change.
Definition PowerSupply.idl:63