21 #ifndef OLA_OLADEVICE_H_
22 #define OLA_OLADEVICE_H_
24 #include <olad/PortConstants.h>
34 enum PatchAction {PATCH, UNPATCH};
35 enum RegisterAction {REGISTER, UNREGISTER};
36 enum PortDirection {INPUT_PORT, OUTPUT_PORT};
44 OlaPlugin(
unsigned int id,
const string &name,
bool active):
50 unsigned int Id()
const {
return m_id; }
51 string Name()
const {
return m_name; }
52 bool IsActive()
const {
return m_active; }
54 bool operator<(
const OlaPlugin &other)
const {
55 return m_id < other.m_id;
70 unsigned int universe,
72 const string &description,
73 port_priority_capability capability,
74 port_priority_mode mode,
80 m_description(description),
81 m_priority_capability(capability),
82 m_priority_mode(mode),
84 m_supports_rdm(supports_rdm) {}
87 unsigned int Id()
const {
return m_id; }
89 unsigned int Universe()
const {
return m_universe; }
90 bool IsActive()
const {
return m_active; }
91 string Description()
const {
return m_description; }
93 port_priority_capability PriorityCapability()
const {
94 return m_priority_capability;
96 port_priority_mode PriorityMode()
const {
97 return m_priority_mode;
99 uint8_t Priority()
const {
return m_priority; }
101 bool SupportsRDM()
const {
return m_supports_rdm; }
105 unsigned int m_universe;
107 string m_description;
108 port_priority_capability m_priority_capability;
109 port_priority_mode m_priority_mode;
118 unsigned int universe,
120 const string &description,
121 port_priority_capability capability,
122 port_priority_mode mode,
125 OlaPort(port_id, universe, active, description,
126 capability, mode, priority, supports_rdm) {
134 unsigned int universe,
136 const string &description,
137 port_priority_capability capability,
138 port_priority_mode mode,
141 OlaPort(port_id, universe, active, description,
142 capability, mode, priority, supports_rdm) {
156 const vector<OlaInputPort> &input_ports,
157 const vector<OlaOutputPort> &output_ports):
161 m_plugin_id(plugin_id),
162 m_input_ports(input_ports),
163 m_output_ports(output_ports) {}
166 string Id()
const {
return m_id; }
167 unsigned int Alias()
const {
return m_alias; }
168 string Name()
const {
return m_name; }
169 int PluginId()
const {
return m_plugin_id; }
171 const vector<OlaInputPort> &InputPorts()
const {
return m_input_ports; }
172 const vector<OlaOutputPort> &OutputPorts()
const {
return m_output_ports; }
174 bool operator<(
const OlaDevice &other)
const {
175 return m_alias < other.m_alias;
180 unsigned int m_alias;
183 std::vector<OlaInputPort> m_input_ports;
184 std::vector<OlaOutputPort> m_output_ports;
201 unsigned int input_port_count,
202 unsigned int output_port_count,
203 unsigned int rdm_device_count):
207 m_input_port_count(input_port_count),
208 m_output_port_count(output_port_count),
209 m_rdm_device_count(rdm_device_count) {}
212 unsigned int Id()
const {
return m_id;}
213 merge_mode MergeMode()
const {
return m_merge_mode; }
214 string Name()
const {
return m_name;}
215 unsigned int InputPortCount()
const {
return m_input_port_count; }
216 unsigned int OutputPortCount()
const {
return m_output_port_count; }
217 unsigned int RDMDeviceCount()
const {
return m_rdm_device_count; }
221 merge_mode m_merge_mode;
223 unsigned int m_input_port_count;
224 unsigned int m_output_port_count;
225 unsigned int m_rdm_device_count;
228 #endif // OLA_OLADEVICE_H_