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

Loading...
Searching...
No Matches
AccessPort.idl
1#ifndef __RADM_ACCESS_PORT_IDL__
2#define __RADM_ACCESS_PORT_IDL__
3
4#include <Event.idl>
5#include <OutletPort.idl>
6#include <UserEvent.idl>
7
8module radm {
9
10 interface AccessPort extends BasePort {
11 constant int ERR_PDU_NOT_ACTIVE = 10;
12
13 enumeration Availability {
14 AVAILABLE, ///< The port is idle
15 OCCUPIED, ///< The port is used, but accepts additional connections
16 BUSY, ///< The port is used and reached the maximum connection limit
17 UNAVAILABLE, ///< The port is not ready for being connected
18 INACCESSIBLE ///< The port is not allowed to be connected
19 };
20
21 enumeration State {
22 INACTIVE, ///< The port is inactive and can not be connected to
23 ACTIVE ///< The port is active and can be connected to
24 };
25
26 structure Status {
27 State state; ///< Port state
28 Availability availability; ///< Port availability
29 };
30
31 /**
32 * Get port status
33 *
34 * @return Port status
35 */
36 Status getStatus();
37
38 /**
39 * Get associated outlet ports
40 *
41 * @return List of associated outlet instances
42 */
43 vector<OutletPort> getAssociatedOutletPorts();
44
45 /**
46 * Set associated outlet ports
47 *
48 * @param associations New list of associated outlets (must be unique, and at most 4 outlets are supported)
49 *
50 * @return 0 on success
51 * @return 1 if any of the outlet references is invalid
52 */
53 int setAssociatedOutletPorts(in vector<OutletPort> associations);
54
55 /**
56 * Execute power operation on associated outlet ports
57 *
58 * @param op Operation to execute
59 *
60 * @return 0 on success
61 * @return 10 if any outlet port is not ready
62 */
63 int doPowerOperation(in PowerOperation op);
64
65 /** Event: The port status have changed */
66 valueobject StatusChangedEvent extends idl.Event {
67 Status oldStatus; ///< Status before change
68 Status newStatus; ///< Status after change
69 };
70
71 /** Event: The outlet association has changed */
72 valueobject AssociatedOutletsChangedEvent extends event.UserEvent {
73 vector<OutletPort> oldAssociatedOutlets; ///< Associated outlets before change
74 vector<OutletPort> newAssociatedOutlets; ///< Associated outlets after change
75 };
76 };
77}
78
79#endif //__RADM_ACCESS_PORT_IDL__
radm::AccessPort
Definition AccessPort.idl:10
radm::AccessPort::getStatus
Status getStatus()
Get port status.
radm::AccessPort::Availability
Availability
Definition AccessPort.idl:13
radm::AccessPort::OCCUPIED
@ OCCUPIED
The port is used, but accepts additional connections.
Definition AccessPort.idl:15
radm::AccessPort::INACCESSIBLE
@ INACCESSIBLE
The port is not allowed to be connected.
Definition AccessPort.idl:18
radm::AccessPort::UNAVAILABLE
@ UNAVAILABLE
The port is not ready for being connected.
Definition AccessPort.idl:17
radm::AccessPort::AVAILABLE
@ AVAILABLE
The port is idle.
Definition AccessPort.idl:14
radm::AccessPort::BUSY
@ BUSY
The port is used and reached the maximum connection limit.
Definition AccessPort.idl:16
radm::AccessPort::setAssociatedOutletPorts
int setAssociatedOutletPorts(in vector< OutletPort > associations)
Set associated outlet ports.
radm::AccessPort::State
State
Definition AccessPort.idl:21
radm::AccessPort::ACTIVE
@ ACTIVE
The port is active and can be connected to.
Definition AccessPort.idl:23
radm::AccessPort::INACTIVE
@ INACTIVE
The port is inactive and can not be connected to.
Definition AccessPort.idl:22
radm::AccessPort::getAssociatedOutletPorts
vector< OutletPort > getAssociatedOutletPorts()
Get associated outlet ports.
radm::AccessPort::doPowerOperation
int doPowerOperation(in PowerOperation op)
Execute power operation on associated outlet ports.
radm::BasePort
Definition BasePort.idl:11
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::AccessPort::AssociatedOutletsChangedEvent
Event: The outlet association has changed.
Definition AccessPort.idl:72
radm::AccessPort::AssociatedOutletsChangedEvent::oldAssociatedOutlets
vector< OutletPort > oldAssociatedOutlets
Associated outlets before change.
Definition AccessPort.idl:73
radm::AccessPort::AssociatedOutletsChangedEvent::newAssociatedOutlets
vector< OutletPort > newAssociatedOutlets
Associated outlets after change.
Definition AccessPort.idl:74
radm::AccessPort::StatusChangedEvent
Event: The port status have changed.
Definition AccessPort.idl:66
radm::AccessPort::StatusChangedEvent::newStatus
Status newStatus
Status after change.
Definition AccessPort.idl:68
radm::AccessPort::StatusChangedEvent::oldStatus
Status oldStatus
Status before change.
Definition AccessPort.idl:67
radm::AccessPort::Status
Definition AccessPort.idl:26
radm::AccessPort::Status::state
State state
Port state.
Definition AccessPort.idl:27
radm::AccessPort::Status::availability
Availability availability
Port availability.
Definition AccessPort.idl:28