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 */
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 */
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__
MetaData getMetaData()
Retrieve the Power Supply's metadata.
Status getStatus()
Retrieve Power Supply status.
int setSettings(in Settings settings)
Update Power Supply settings.
constant int ERR_AUTODETECT_NOT_SUPPORTED
Auto-detecion is not supported.
Settings getSettings()
Retrieve the Power Supply settings.
Basic IDL definitions.
Definition Event.idl:10
Radm Model.
Definition AccessPort.idl:8
Common base for all events.
Definition Event.idl:13
string label
Power Supply label.
boolean hasAutoDetection
If support auto-detection of Power Supply state.
int idx
Power Supply Index.
Event: Power Supply settings has changed.
Settings newSettings
Power Supply settings after change.
Settings oldSettings
Power Supply settings before change.
boolean autoDetectEnabled
Enable or disable auto-detection.
Event: PowerSupply status has changed.
Status newStatus
Power Supply status after change.
Status oldStatus
Power Supply status before change.