21 #ifndef INCLUDE_OLAD_PORT_H_
22 #define INCLUDE_OLAD_PORT_H_
28 #include <ola/timecode/TimeCode.h>
29 #include <olad/DmxSource.h>
32 #include <olad/Universe.h>
57 virtual unsigned int PortId()
const = 0;
94 virtual std::string
UniqueId()
const = 0;
184 virtual void RunFullDiscovery(
186 virtual void RunIncrementalDiscovery(
190 virtual bool SupportsTimeCode()
const = 0;
205 unsigned int port_id,
207 bool supports_rdm =
false);
209 unsigned int PortId()
const {
return m_port_id; }
213 virtual std::string
UniqueId()
const;
246 virtual const DmxBuffer &ReadDMX()
const = 0;
249 virtual uint8_t InheritedPriority()
const {
254 virtual bool PreSetUniverse(Universe *, Universe *) {
return true; }
256 virtual void PostSetUniverse(Universe *, Universe *) {}
262 virtual bool SupportsPriorities()
const {
return false; }
265 const unsigned int m_port_id;
268 mutable std::string m_port_string;
269 Universe *m_universe;
270 AbstractDevice *m_device;
271 DmxSource m_dmx_source;
272 const PluginAdaptor *m_plugin_adaptor;
288 unsigned int port_id,
289 bool start_rdm_discovery_on_patch =
false,
290 bool supports_rdm =
false);
292 unsigned int PortId()
const {
return m_port_id; }
294 bool SetUniverse(
Universe *universe);
295 Universe *GetUniverse()
const {
return m_universe; }
296 std::string UniqueId()
const;
297 bool SetPriority(uint8_t priority);
298 uint8_t GetPriority()
const {
return m_priority; }
328 virtual bool SupportsTimeCode()
const {
return false; }
339 virtual void PostSetUniverse(Universe *, Universe *) { }
341 virtual bool SupportsRDM()
const {
return m_supports_rdm; }
345 virtual bool SupportsPriorities()
const {
return false; }
353 const unsigned int m_port_id;
354 const bool m_discover_on_patch;
357 mutable std::string m_port_string;
358 Universe *m_universe;
359 AbstractDevice *m_device;
369 template<
class PortClass>
373 bool IsInputPort<OutputPort>();
375 #endif // INCLUDE_OLAD_PORT_H_