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 */
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__
Status getStatus()
Get port status.
@ OCCUPIED
The port is used, but accepts additional connections.
@ INACCESSIBLE
The port is not allowed to be connected.
@ UNAVAILABLE
The port is not ready for being connected.
@ AVAILABLE
The port is idle.
@ BUSY
The port is used and reached the maximum connection limit.
int setAssociatedOutletPorts(in vector< OutletPort > associations)
Set associated outlet ports.
@ ACTIVE
The port is active and can be connected to.
@ INACTIVE
The port is inactive and can not be connected to.
vector< OutletPort > getAssociatedOutletPorts()
Get associated outlet ports.
int doPowerOperation(in PowerOperation op)
Execute power operation on associated outlet ports.
Basic IDL definitions.
Definition Event.idl:10
Radm Model.
Definition AccessPort.idl:8
Common base for all events.
Definition Event.idl:13
Event: The outlet association has changed.
vector< OutletPort > oldAssociatedOutlets
Associated outlets before change.
vector< OutletPort > newAssociatedOutlets
Associated outlets after change.
Event: The port status have changed.
Status newStatus
Status after change.
Status oldStatus
Status before change.
State state
Port state.
Availability availability
Port availability.