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 */
45 Device getParent();
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 */
54 BasePort getAssociatedAccessPort();
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 */
63 valueobject AssociatedAccessPortChangedEvent extends idl.Event {
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__
radm::BasePort
Definition BasePort.idl:11
radm::Device
Definition Device.idl:7
radm::OutletPort
Definition OutletPort.idl:11
radm::OutletPort::getAssociatedAccessPort
BasePort getAssociatedAccessPort()
Get port this port is associated with.
radm::OutletPort::getParent
Device getParent()
Get parent device of this port.
radm::OutletPort::doPowerOperation
int doPowerOperation(in PowerOperation op)
Change the power state of this port.
radm::OutletPort::getState
PowerState getState()
Get current power state of this port.
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::OutletPort::AssociatedAccessPortChangedEvent
Event: The associated port has changed.
Definition OutletPort.idl:63
radm::OutletPort::AssociatedAccessPortChangedEvent::newAssociatedPort
BasePort newAssociatedPort
Associated port after change.
Definition OutletPort.idl:65
radm::OutletPort::AssociatedAccessPortChangedEvent::oldAssociatedPort
BasePort oldAssociatedPort
Associated port before change.
Definition OutletPort.idl:64
radm::OutletPort::PowerOperationEvent
Event: A power operation was started.
Definition OutletPort.idl:69
radm::OutletPort::PowerOperationEvent::op
PowerOperation op
PowerOperation.
Definition OutletPort.idl:70
radm::OutletPort::PowerStateChangedEvent
Event: The outlet power state has changed.
Definition OutletPort.idl:57
radm::OutletPort::PowerStateChangedEvent::newState
PowerState newState
Power state after change.
Definition OutletPort.idl:59
radm::OutletPort::PowerStateChangedEvent::oldState
PowerState oldState
Power state before change.
Definition OutletPort.idl:58