Open Lighting Architecture  Latest Git
Public Member Functions | Protected Member Functions | List of all members
ola::BasicInputPort Class Referenceabstract

Detailed Description

An implementation of InputPort, provides the basic functionality which saves the plugin implementations from having to do it.

Inheritance diagram for ola::BasicInputPort:
Inheritance graph
[legend]
Collaboration diagram for ola::BasicInputPort:
Collaboration graph
[legend]

Public Member Functions

 BasicInputPort (AbstractDevice *parent, unsigned int port_id, const PluginAdaptor *plugin_adaptor, bool supports_rdm=false)
 Create a new basic input port.
 
unsigned int PortId () const
 Get the Port ID. This is the index within the device. More...
 
AbstractDeviceGetDevice () const
 Get the device which owns this Port. More...
 
bool SetUniverse (Universe *universe)
 Bind this port to a universe. More...
 
UniverseGetUniverse () const
 Fetch the universe this Port is bound to. More...
 
virtual std::string UniqueId () const
 Return the globally unique id for a Port. More...
 
bool SetPriority (uint8_t priority)
 Set the Priority for this Port. More...
 
uint8_t GetPriority () const
 Get the numeric priority for this Port. More...
 
void SetPriorityMode (port_priority_mode mode)
 Set the Priority Mode for this Port. More...
 
port_priority_mode GetPriorityMode () const
 Get the Priority Mode for this Port. More...
 
void DmxChanged ()
 Called when there is new data for this port.
 
const DmxSourceSourceData () const
 Get the current DMX data.
 
void HandleRDMRequest (ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *callback)
 Handle an RDM Request on this port. More...
 
void TriggerRDMDiscovery (ola::rdm::RDMDiscoveryCallback *on_complete, bool full=true)
 Trigger the RDM Discovery procedure for this universe.
 
port_priority_capability PriorityCapability () const
 Get the priority capabilities for this port. More...
 
virtual const DmxBufferReadDMX () const =0
 
virtual uint8_t InheritedPriority () const
 
virtual bool PreSetUniverse (Universe *, Universe *)
 
virtual void PostSetUniverse (Universe *, Universe *)
 
virtual bool SupportsRDM () const
 Check if this Port supports RDM or not. More...
 
- Public Member Functions inherited from ola::Port
virtual std::string Description () const =0
 Fetch the string description for a Port. More...
 

Protected Member Functions

virtual bool SupportsPriorities () const
 

Member Function Documentation

◆ GetDevice()

AbstractDevice* ola::BasicInputPort::GetDevice ( ) const
inlinevirtual

Get the device which owns this Port.

Returns
the Device which owns this Port.

Implements ola::Port.

◆ GetPriority()

uint8_t ola::BasicInputPort::GetPriority ( ) const
inlinevirtual

Get the numeric priority for this Port.

Returns
the priority, higher numbers take precedence.

Implements ola::Port.

◆ GetPriorityMode()

port_priority_mode ola::BasicInputPort::GetPriorityMode ( ) const
inlinevirtual

Get the Priority Mode for this Port.

Returns
the Priority Mode.

Implements ola::Port.

◆ GetUniverse()

Universe* ola::BasicInputPort::GetUniverse ( ) const
inlinevirtual

Fetch the universe this Port is bound to.

Returns
the Universe that this Port is bound to or NULL if the Port isn't patched.

Implements ola::Port.

◆ HandleRDMRequest()

void ola::BasicInputPort::HandleRDMRequest ( ola::rdm::RDMRequest request,
ola::rdm::RDMCallback callback 
)
virtual

Handle an RDM Request on this port.

Parameters
requestthe RDMRequest object, ownership is transferred to us
callbackthe callback to run

Implements ola::InputPort.

◆ PortId()

unsigned int ola::BasicInputPort::PortId ( ) const
inlinevirtual

Get the Port ID. This is the index within the device.

Returns
the id of the Port.

Implements ola::Port.

◆ PriorityCapability()

port_priority_capability ola::BasicInputPort::PriorityCapability ( ) const
inlinevirtual

Get the priority capabilities for this port.

Returns
a port_priority_capability.

Implements ola::Port.

◆ SetPriority()

bool ola::BasicInputPort::SetPriority ( uint8_t  priority)
virtual

Set the Priority for this Port.

Parameters
prioritythe priority to use.

Implements ola::Port.

◆ SetPriorityMode()

void ola::BasicInputPort::SetPriorityMode ( port_priority_mode  mode)
inlinevirtual

Set the Priority Mode for this Port.

Parameters
modethe Priority Mode to use.

Implements ola::Port.

◆ SetUniverse()

bool ola::BasicInputPort::SetUniverse ( Universe universe)
virtual

Bind this port to a universe.

Parameters
universethe Universe to bind to.
Returns
true if the patch succeeded, false otherwise.

This shouldn't be called directly. Instead use PortManager::PatchPort() which takes care of everything for you.

Implements ola::Port.

◆ SupportsRDM()

virtual bool ola::BasicInputPort::SupportsRDM ( ) const
inlinevirtual

Check if this Port supports RDM or not.

Returns
true if RDM is supported for this Port, false otherwise.

Implements ola::Port.

◆ UniqueId()

string ola::BasicInputPort::UniqueId ( ) const
virtual

Return the globally unique id for a Port.

This is used to preserve port universe bindings. An empty string means we don't preserve settings.

Implements ola::Port.


The documentation for this class was generated from the following files: