Open Lighting Architecture: ola::BasicOutputPort Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
ola::BasicOutputPort Class Reference

## Detailed Description

An implementation of an OutputPort.

Inheritance diagram for ola::BasicOutputPort:

## Public Member Functions
| BasicOutputPort (AbstractDevice *parent, unsigned int port_id, bool start_rdm_discovery_on_patch=false, bool supports_rdm=false)
| Create a new BasicOutputPort.
unsigned int | PortId () const
| Get the Port ID. This is the index within the device.
AbstractDevice * | GetDevice () const
| Get the device which owns this Port.
bool | SetUniverse (Universe *universe)
| Bind this port to a universe.
Universe * | GetUniverse () const
| Fetch the universe this Port is bound to.
std::string | UniqueId () const
| Return the globally unique id for a Port.
bool | SetPriority (uint8_t priority)
| Set the Priority for this Port.
uint8_t | GetPriority () const
| Get the numeric priority for this Port.
void | SetPriorityMode (port_priority_mode mode)
| Set the Priority Mode for this Port.
port_priority_mode | GetPriorityMode () const
| Get the Priority Mode for this Port.
virtual void | UniverseNameChanged (const std::string &new_name)
| Called if the universe name changes.
port_priority_capability | PriorityCapability () const
| Get the priority capabilities for this port.
virtual void | SendRDMRequest (ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *callback)
| Handle an RDMRequest, subclasses can implement this to support RDM.
virtual void | RunFullDiscovery (ola::rdm::RDMDiscoveryCallback *on_complete)
| This is a noop for ports that don't support RDM.
virtual void | RunIncrementalDiscovery (ola::rdm::RDMDiscoveryCallback *on_complete)
| This is a noop for ports that don't support RDM.
virtual bool | SupportsTimeCode () const
virtual bool | SendTimeCode (const ola::timecode::TimeCode &)
| This is a noop for ports that don't support TimeCode.
virtual bool | PreSetUniverse (Universe *, Universe *)
virtual void | PostSetUniverse (Universe *, Universe *)
virtual bool | SupportsRDM () const
| Check if this Port supports RDM or not.
Public Member Functions inherited from ola::OutputPort
virtual bool | WriteDMX (const DmxBuffer &buffer, uint8_t priority)=0
| Write DMX data to this port.
Public Member Functions inherited from ola::Port
virtual std::string | Description () const =0
| Fetch the string description for a Port.

## Protected Member Functions
virtual bool | SupportsPriorities () const
void | UpdateUIDs (const ola::rdm::UIDSet &uids)
| Called when the discovery triggered by patching completes.

## Member Function Documentation

## ◆ GetDevice()

AbstractDevice * ola::BasicOutputPort::GetDevice | ( |  | ) | const
| inlinevirtual

Get the device which owns this Port.

Returns
  the Device which owns this Port.

Implements ola::Port.

## ◆ GetPriority()

uint8_t ola::BasicOutputPort::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::BasicOutputPort::GetPriorityMode | ( |  | ) | const
| inlinevirtual

Get the Priority Mode for this Port.

Returns
  the Priority Mode.

Implements ola::Port.

## ◆ GetUniverse()

Universe * ola::BasicOutputPort::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.

## ◆ PortId()

unsigned int ola::BasicOutputPort::PortId | ( |  | ) | const
| inlinevirtual

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

Returns
  the id of the Port.

Implements ola::Port.

## ◆ PreSetUniverse()

virtual bool ola::BasicOutputPort::PreSetUniverse | ( | Universe * | ,
|  | Universe * | )
| inlinevirtual

Reimplemented in ola::plugin::osc::OSCOutputPort.

## ◆ PriorityCapability()

port_priority_capability ola::BasicOutputPort::PriorityCapability | ( |  | ) | const
| inlinevirtual

Get the priority capabilities for this port.

Returns
  a port_priority_capability.

Implements ola::Port.

## ◆ RunFullDiscovery()

void ola::BasicOutputPort::RunFullDiscovery | ( | ola::rdm::RDMDiscoveryCallback * | on_complete | ) |
| virtual

This is a noop for ports that don't support RDM.

Implements ola::OutputPort.

Reimplemented in ola::plugin::artnet::ArtNetOutputPort, ola::plugin::dummy::DummyPort, ola::plugin::spi::SPIOutputPort, ola::plugin::usbdmx::JaRuleOutputPort, ola::plugin::usbpro::ArduinoRGBOutputPort, ola::plugin::usbpro::DmxterOutputPort, ola::plugin::usbpro::DmxTriOutputPort, ola::plugin::usbpro::RobeOutputPort, and ola::plugin::usbpro::UsbProOutputPort.

## ◆ RunIncrementalDiscovery()

void ola::BasicOutputPort::RunIncrementalDiscovery | ( | ola::rdm::RDMDiscoveryCallback * | on_complete | ) |
| virtual

This is a noop for ports that don't support RDM.

Implements ola::OutputPort.

Reimplemented in ola::plugin::artnet::ArtNetOutputPort, ola::plugin::dummy::DummyPort, ola::plugin::spi::SPIOutputPort, ola::plugin::usbdmx::JaRuleOutputPort, ola::plugin::usbpro::ArduinoRGBOutputPort, ola::plugin::usbpro::DmxterOutputPort, ola::plugin::usbpro::DmxTriOutputPort, ola::plugin::usbpro::RobeOutputPort, and ola::plugin::usbpro::UsbProOutputPort.

## ◆ SendRDMRequest()

void ola::BasicOutputPort::SendRDMRequest | ( | ola::rdm::RDMRequest * | request,
|  | ola::rdm::RDMCallback * | callback )
| virtual

Handle an RDMRequest, subclasses can implement this to support RDM.

Implements ola::OutputPort.

Reimplemented in ola::plugin::artnet::ArtNetOutputPort, ola::plugin::dummy::DummyPort, ola::plugin::spi::SPIOutputPort, ola::plugin::usbdmx::JaRuleOutputPort, ola::plugin::usbpro::ArduinoRGBOutputPort, ola::plugin::usbpro::DmxterOutputPort, ola::plugin::usbpro::DmxTriOutputPort, ola::plugin::usbpro::RobeOutputPort, and ola::plugin::usbpro::UsbProOutputPort.

## ◆ SendTimeCode()

virtual bool ola::BasicOutputPort::SendTimeCode | ( | const ola::timecode::TimeCode & |  | ) |
| inlinevirtual

This is a noop for ports that don't support TimeCode.

Implements ola::OutputPort.

Reimplemented in ola::plugin::artnet::ArtNetOutputPort.

## ◆ SetPriority()

bool ola::BasicOutputPort::SetPriority | ( | uint8_t | priority | ) |
| virtual

Set the Priority for this Port.

Parameters

  priority | the priority to use.

Implements ola::Port.

## ◆ SetPriorityMode()

void ola::BasicOutputPort::SetPriorityMode | ( | port_priority_mode | mode | ) |
| inlinevirtual

Set the Priority Mode for this Port.

Parameters

  mode | the Priority Mode to use.

Implements ola::Port.

## ◆ SetUniverse()

bool ola::BasicOutputPort::SetUniverse | ( | Universe * | universe | ) |
| virtual

Bind this port to a universe.

Parameters

  universe | the 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::BasicOutputPort::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.

## ◆ SupportsTimeCode()

virtual bool ola::BasicOutputPort::SupportsTimeCode | ( |  | ) | const
| inlinevirtual

Implements ola::OutputPort.

## ◆ UniqueId()

string ola::BasicOutputPort::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.

## ◆ UniverseNameChanged()

virtual void ola::BasicOutputPort::UniverseNameChanged | ( | const std::string & | new_name | ) |
| inlinevirtual

Called if the universe name changes.

Implements ola::OutputPort.

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

- include/olad/Port.h
- olad/plugin_api/Port.cpp