Legrand / Raritan Xerus™ JSON-RPC API for Remote Access Devices like KX4-101, KX3G2
Loading...
Searching...
No Matches
OutletPort.idl
1#ifndef __RADM_OUTLET_IDL__
2#define __RADM_OUTLET_IDL__
3
4#include <Event.idl>
5#include <UserEvent.idl>
6#include <BasePort.idl>
7#include <Device.idl>
8
9module radm {
10
11 interface OutletPort extends BasePort {
12 constant int ERR_PDU_NOT_ACTIVE = 10;
13
14 enumeration PowerState {
15 UNKNOWN,
16 OFF,
17 ON
18 };
19
20 /**
21 * Get current power state of this port
22 *
23 * @return Power state
24 */
25 PowerState getState();
26
27 /**
28 * Change the power state of this port
29 *
30 * @param op Operation to execute
31 *
32 * @return 0 on success
33 * @return 10 if PDU is not active
34 * @return 101..106 if SNMP communication failed (see constants in {@link PowerDevice})
35 */
36 int doPowerOperation(in PowerOperation op);
37
38 /**
39 * Get parent device of this port
40 *
41 * Note: In practice a {@link PowerDevice} instance will be returned.
42 *
43 * @return Parent device
44 */
46
47 /**
48 * Get port this port is associated with
49 *
50 * Note: In practice a {@link AccessPort} instance will be returned if an association is present.
51 *
52 * @return associated port
53 */
55
56 /** Event: The outlet power state has changed */
57 valueobject PowerStateChangedEvent extends event.UserEvent {
58 PowerState oldState; ///< Power state before change
59 PowerState newState; ///< Power state after change
60 };
61
62 /** Event: The associated port has changed */
64 BasePort oldAssociatedPort; ///< Associated port before change
65 BasePort newAssociatedPort; ///< Associated port after change
66 };
67
68 /** Event: A power operation was started */
69 valueobject PowerOperationEvent extends event.UserEvent {
70 PowerOperation op; ///< PowerOperation
71 };
72 };
73}
74
75#endif //__RADM_OUTLET_IDL__
BasePort getAssociatedAccessPort()
Get port this port is associated with.
Device getParent()
Get parent device of this port.
int doPowerOperation(in PowerOperation op)
Change the power state of this port.
PowerState getState()
Get current power state of this port.
Basic IDL definitions.
Definition Event.idl:10
Radm Model.
Definition AccessPort.idl:8
Common base for all events.
Definition Event.idl:13
Event: The associated port has changed.
BasePort newAssociatedPort
Associated port after change.
BasePort oldAssociatedPort
Associated port before change.
Event: A power operation was started.
PowerOperation op
PowerOperation.
Event: The outlet power state has changed.
PowerState newState
Power state after change.
PowerState oldState
Power state before change.