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;
144 virtual void DmxChanged() = 0;
149 virtual const DmxSource &SourceData()
const = 0;
173 virtual bool WriteDMX(
const DmxBuffer &buffer, uint8_t priority) = 0;
178 virtual void UniverseNameChanged(
const std::string &new_name) = 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 {
262 virtual bool SupportsPriorities()
const {
return false; }
265 const unsigned int m_port_id;
268 mutable std::string m_port_string;
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; }
324 virtual void RunIncrementalDiscovery(
328 virtual bool SupportsTimeCode()
const {
return false; }
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;
369 template<
class PortClass>
373 bool IsInputPort<OutputPort>();
375 #endif // INCLUDE_OLAD_PORT_H_ Represents a set of RDM UIDs.
Definition: UIDSet.h:48
Definitions and Interfaces to implement an RDMController that sends a single message at a time...
Definition: DmxSource.h:36
Definition: Universe.h:46
port_priority_mode GetPriorityMode() const
Get the Priority Mode for this Port.
Definition: Port.h:300
Provides a wrapper for the DeviceManager and SelectServer objects so that the plugins can register de...
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
unsigned int PortId() const
Get the Port ID. This is the index within the device.
Definition: Port.h:292
virtual uint8_t GetPriority() const =0
Get the numeric priority for this Port.
virtual bool SetPriority(uint8_t priority)=0
Set the Priority for this Port.
port_priority_capability PriorityCapability() const
Get the priority capabilities for this port.
Definition: Port.h:306
virtual bool SetUniverse(Universe *universe)=0
Bind this port to a universe.
The interface that can send RDM commands, as well as perform discovery operations.
Definition: RDMControllerInterface.h:104
Definition: PortConstants.h:62
RDM Commands that represent requests (GET, SET or DISCOVER).
Definition: RDMCommand.h:234
Used to hold a single universe of DMX data.
Definition: DmxBuffer.h:49
port_priority_mode
Defines the different priority modes that OLA supports.
Definition: PortConstants.h:44
virtual bool SupportsRDM() const
Check if this Port supports RDM or not.
Definition: Port.h:341
A port that sends DMX512 data.
Definition: Port.h:163
port_priority_capability
Defines the priority capability of a Port.
Definition: PortConstants.h:58
AbstractDevice * GetDevice() const
Get the device which owns this Port.
Definition: Port.h:293
virtual std::string Description() const =0
Fetch the string description for a Port.
The interface for a Device.
Definition: Device.h:44
A class used to hold a single universe of DMX data.
virtual port_priority_capability PriorityCapability() const =0
Get the priority capabilities for this port.
virtual unsigned int PortId() const =0
Get the Port ID. This is the index within the device.
void SetPriorityMode(port_priority_mode mode)
Set the Priority Mode for this Port.
Definition: Port.h:299
Definition: TimeCode.h:33
virtual bool SendTimeCode(const ola::timecode::TimeCode &)
This is a noop for ports that don't support TimeCode.
Definition: Port.h:333
Definition: PluginAdaptor.h:41
bool IsInputPort()
This allows switching based on Port type.
Definition: Port.cpp:201
virtual void UniverseNameChanged(const std::string &new_name)
Called if the universe name changes.
Definition: Port.h:302
virtual Universe * GetUniverse() const =0
Fetch the universe this Port is bound to.
virtual port_priority_mode GetPriorityMode() const =0
Get the Priority Mode for this Port.
static const uint8_t SOURCE_PRIORITY_MIN
The minimum priority for a source.
Definition: SourcePriorities.h:36
Different priority modes and priority capabilities. Please make sure to visit Merging Algorithms for ...
The base class for all 1 argument callbacks.
Definition: Callback.h:982
virtual AbstractDevice * GetDevice() const =0
Get the device which owns this Port.
virtual std::string UniqueId() const =0
Return the globally unique id for a Port.
Definition: PortConstants.h:60
virtual void SetPriorityMode(port_priority_mode mode)=0
Set the Priority Mode for this Port.
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
uint8_t GetPriority() const
Get the numeric priority for this Port.
Definition: Port.h:298
The base port class.
Definition: Port.h:49
virtual bool SupportsRDM() const =0
Check if this Port supports RDM or not.
Definition: PortConstants.h:64
Universe * GetUniverse() const
Fetch the universe this Port is bound to.
Definition: Port.h:295
Classes that represent RDM commands.