Open Lighting Architecture  0.9.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
ola::Port Class Reference

Detailed Description

The base port class.

Ports represent a single universe of DMX512. They are either input (receive DMX) or output (send DMX) but not both.

Every port is part of a Device. Ports can be associated (patched) to a universe.

Inheritance diagram for ola::Port:
ola::InputPort ola::OutputPort ola::BasicInputPort ola::BasicOutputPort ola::plugin::artnet::ArtNetInputPort ola::plugin::dmx4linux::Dmx4LinuxInputPort ola::plugin::e131::E131InputPort ola::plugin::espnet::EspNetInputPort ola::plugin::openpixelcontrol::OPCInputPort ola::plugin::osc::OSCInputPort ola::plugin::pathport::PathportInputPort ola::plugin::sandnet::SandNetInputPort ola::plugin::shownet::ShowNetInputPort ola::plugin::usbpro::RobeInputPort ola::plugin::usbpro::UltraDMXProInputPort ola::plugin::usbpro::UsbProInputPort ola::plugin::artnet::ArtNetOutputPort ola::plugin::dmx4linux::Dmx4LinuxOutputPort ola::plugin::dummy::DummyPort ola::plugin::e131::E131OutputPort ola::plugin::espnet::EspNetOutputPort ola::plugin::ftdidmx::FtdiDmxOutputPort ola::plugin::gpio::GPIOOutputPort ola::plugin::karate::KarateOutputPort ola::plugin::kinet::KiNetOutputPort ola::plugin::milinst::MilInstOutputPort ola::plugin::opendmx::OpenDmxOutputPort ola::plugin::openpixelcontrol::OPCOutputPort ola::plugin::osc::OSCOutputPort ola::plugin::pathport::PathportOutputPort ola::plugin::renard::RenardOutputPort ola::plugin::sandnet::SandNetOutputPort ola::plugin::shownet::ShowNetOutputPort ola::plugin::spi::SPIOutputPort ola::plugin::stageprofi::StageProfiOutputPort ola::plugin::uartdmx::UartDmxOutputPort ola::plugin::usbdmx::GenericOutputPort ola::plugin::usbpro::ArduinoRGBOutputPort ola::plugin::usbpro::DmxterOutputPort ola::plugin::usbpro::DmxTriOutputPort ola::plugin::usbpro::RobeOutputPort ola::plugin::usbpro::UltraDMXProOutputPort ola::plugin::usbpro::UsbProOutputPort

Public Member Functions

virtual unsigned int PortId () const =0
 Get the Port ID. This is the index within the device.
virtual AbstractDeviceGetDevice () const =0
 Get the device which owns this Port.
virtual std::string Description () const =0
 Fetch the string description for a Port.
virtual bool SetUniverse (Universe *universe)=0
 Bind this port to a universe.
virtual UniverseGetUniverse () const =0
 Fetch the universe this Port is bound to.
virtual std::string UniqueId () const =0
 Return the globally unique id for a Port.
virtual port_priority_capability PriorityCapability () const =0
 Get the priority capabilities for this port.
virtual bool SetPriority (uint8_t priority)=0
 Set the Priority for this Port.
virtual uint8_t GetPriority () const =0
 Get the numeric priority for this Port.
virtual void SetPriorityMode (port_priority_mode mode)=0
 Set the Priority Mode for this Port.
virtual port_priority_mode GetPriorityMode () const =0
 Get the Priority Mode for this Port.
virtual bool SupportsRDM () const =0
 Check if this Port supports RDM or not.

Member Function Documentation

virtual std::string ola::Port::Description ( ) const
pure virtual
virtual AbstractDevice* ola::Port::GetDevice ( ) const
pure virtual

Get the device which owns this Port.

Returns
the Device which owns this Port.

Implemented in ola::BasicInputPort.

virtual uint8_t ola::Port::GetPriority ( ) const
pure virtual

Get the numeric priority for this Port.

Returns
the priority, higher numbers take precedence.

Implemented in ola::BasicInputPort.

virtual port_priority_mode ola::Port::GetPriorityMode ( ) const
pure virtual

Get the Priority Mode for this Port.

Returns
the Priority Mode.

Implemented in ola::BasicInputPort.

virtual Universe* ola::Port::GetUniverse ( ) const
pure virtual

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.

Implemented in ola::BasicInputPort.

virtual unsigned int ola::Port::PortId ( ) const
pure virtual

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

Returns
the id of the Port.

Implemented in ola::BasicInputPort.

virtual port_priority_capability ola::Port::PriorityCapability ( ) const
pure virtual

Get the priority capabilities for this port.

Returns
a port_priority_capability.

Implemented in ola::BasicInputPort.

virtual bool ola::Port::SetPriority ( uint8_t  priority)
pure virtual

Set the Priority for this Port.

Parameters
prioritythe priority to use.

Implemented in ola::BasicInputPort.

virtual void ola::Port::SetPriorityMode ( port_priority_mode  mode)
pure virtual

Set the Priority Mode for this Port.

Parameters
modethe Priority Mode to use.

Implemented in ola::BasicInputPort.

virtual bool ola::Port::SetUniverse ( Universe universe)
pure 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.

Implemented in ola::BasicInputPort.

virtual bool ola::Port::SupportsRDM ( ) const
pure virtual

Check if this Port supports RDM or not.

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

Implemented in ola::BasicInputPort.

virtual std::string ola::Port::UniqueId ( ) const
pure 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.

Implemented in ola::BasicInputPort.


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