Raritan PX2/PX3 JSON-RPC API
Port.idl
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /*
3  * Copyright 2011 Raritan Inc. All rights reserved.
4  */
5 
6 #ifndef __PORTSMODEL_PORT_IDL__
7 #define __PORTSMODEL_PORT_IDL__
8 
9 #include <Event.idl>
10 #include <PortFuse.idl>
11 
12 /**
13  * Ports
14  */
15 module portsmodel {
16 
17  /** Port interface */
18  interface Port_2_0_2 {
19 
20  /** Error codes */
21  constant int NO_ERROR = 0; ///< operation successful, no error
22  constant int ERR_INVALID_PARAM = 1; ///< invalid parameter for an operation
23  constant int ERR_DEVICE_BUSY = 2; ///< operation fails because connected device is busy
24 
25  /** Port detection type */
26  enumeration DetectionType {
27  AUTO, ///< auto detection of connected devices
28  PINNED, ///< port is pinned to a specific device type
29  DISABLED ///< port is disabled and will not detect any device connected
30  };
31 
32  /** Port detection mode */
33  structure DetectionMode {
34  DetectionType type; ///< detection type: auto or pinned
35  string pinnedDeviceType; ///< contains specific device type in pinned mode, not used for auto
36  };
37 
38  /** Port properties */
39  structure Properties {
40  string name; ///< user defineable name - NOT USED RIGHT NOW!
41  string label; ///< label on device
42  DetectionMode mode; ///< detection mode
43  string detectedDeviceType; ///< detected device type or empty if nothing connected
44  string detectedDeviceName; ///< detected device name or empty if nothing connected
45  };
46 
47  /** Event: The port properties have changed */
48  valueobject PropertiesChangedEvent extends idl.Event {
49  Properties oldProperties; ///< Properties before change
50  Properties newProperties; ///< Properties after change
51  };
52 
53  /** Event: The device connected to the port has changed */
54  valueobject DeviceChangedEvent extends idl.Event {
55  Object oldDevice; ///< Connected device before change
56  Object newDevice; ///< Connected device after change
57  };
58 
59  /**
60  * Get the current properties of the port
61  *
62  * @return Properties of the Port
63  */
65 
66  /**
67  * NOT USED RIGHT NOW!
68  *
69  * Set the port name
70  *
71  * @param name new port name
72  */
73  void setName(in string name);
74 
75  /**
76  * Set the detection mode for the port
77  *
78  * @param mode new detection mode
79  * @return NO_ERROR on success
80  * @return ERR_INVALID_PARAM invalid parameter
81  * @return ERR_DEVICE_BUSY device busy (e.g. Asset Strip Firmware Update)
82  */
84 
85  /**
86  * Get all detectable devices of this port
87  *
88  * @return List of all registered detectable Devices
89  */
90  vector<string> getDetectableDevices();
91 
92  /**
93  * Get the connected device of the port
94  *
95  * @return Device connected to Port
96  */
97  Object getDevice();
98 
99  /**
100  * Get device type specific configuration interface.
101  *
102  * @param deviceType Device type to get configuration interface for
103  *
104  * @return Device configuration interface
105  */
106  Object getDeviceConfig(in string deviceType);
107 
108  /**
109  * Get the fuse for this port
110  *
111  * @return A fuse instance, if available
112  */
114  };
115 }
116 
117 #endif /* __PORTSMODEL_PORT_IDL__ */
portsmodel::Port_2_0_2::Properties::detectedDeviceType
string detectedDeviceType
detected device type or empty if nothing connected
Definition: Port.idl:43
portsmodel::Port_2_0_2::Properties::name
string name
user defineable name - NOT USED RIGHT NOW!
Definition: Port.idl:40
portsmodel::Port_2_0_2::setName
void setName(in string name)
NOT USED RIGHT NOW!
portsmodel::Port_2_0_2::newDevice
Object newDevice
Connected device after change.
Definition: Port.idl:56
portsmodel::Port_2_0_2::Properties::detectedDeviceName
string detectedDeviceName
detected device name or empty if nothing connected
Definition: Port.idl:44
portsmodel::Port_2_0_2::DetectionMode
Port detection mode.
Definition: Port.idl:33
portsmodel::Port_2_0_2::Properties::mode
DetectionMode mode
detection mode
Definition: Port.idl:42
portsmodel::Port_2_0_2::Properties::label
string label
label on device
Definition: Port.idl:41
portsmodel::Port_2_0_2::AUTO
@ AUTO
auto detection of connected devices
Definition: Port.idl:27
portsmodel::Port_2_0_2::PINNED
@ PINNED
port is pinned to a specific device type
Definition: Port.idl:28
portsmodel::Port_2_0_2
Port interface.
Definition: Port.idl:18
portsmodel::Port_2_0_2::getDeviceConfig
Object getDeviceConfig(in string deviceType)
Get device type specific configuration interface.
portsmodel::Port_2_0_2::newProperties
Properties newProperties
Properties after change.
Definition: Port.idl:50
idl
Basic IDL definitions.
Definition: Event.idl:10
portsmodel::Port_2_0_2::DetectionType
DetectionType
Port detection type.
Definition: Port.idl:26
portsmodel
Ports.
Definition: Port.idl:15
portsmodel::Port_2_0_2::DetectionMode::type
DetectionType type
detection type: auto or pinned
Definition: Port.idl:34
portsmodel::PortFuse
Interface describing a controllable fuse for a device port.
Definition: PortFuse.idl:17
portsmodel::Port_2_0_2::setDetectionMode
int setDetectionMode(in DetectionMode mode)
Set the detection mode for the port.
portsmodel::Port_2_0_2::Properties
Port properties.
Definition: Port.idl:39
portsmodel::Port_2_0_2::DetectionMode::pinnedDeviceType
string pinnedDeviceType
contains specific device type in pinned mode, not used for auto
Definition: Port.idl:35
portsmodel::Port_2_0_2::getFuse
PortFuse getFuse()
Get the fuse for this port.
portsmodel::Port_2_0_2::getProperties
Properties getProperties()
Get the current properties of the port.
portsmodel::Port_2_0_2::getDevice
Object getDevice()
Get the connected device of the port.
portsmodel::Port_2_0_2::getDetectableDevices
vector< string > getDetectableDevices()
Get all detectable devices of this port.