Open Lighting Architecture: ola::plugin::e131::E131Node Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
ola::plugin::e131::E131Node Class Reference

## Classes
struct | Options
| Options for the E131Node. More...
struct | KnownController

## Public Member Functions
| E131Node (ola::thread::SchedulerInterface *ss, const std::string &ip_address, const Options &options, const ola::acn::CID &cid=ola::acn::CID::Generate())
| Create a new E1.31 node.
bool | Start ()
| Start this node.
bool | Stop ()
| Stop this node.
bool | SetSourceName (uint16_t universe, const std::string &source)
| Set the name for a universe.
bool | StartStream (uint16_t universe)
| Signal that we will start sending on this particular universe. Without sending any DMX data.
bool | TerminateStream (uint16_t universe, uint8_t priority=DEFAULT_PRIORITY)
| Signal that we will no longer send on this particular universe.
bool | SendDMX (uint16_t universe, const ola::DmxBuffer &buffer, uint8_t priority=DEFAULT_PRIORITY, bool preview=false)
| Send some DMX data.
bool | SendDMXWithSequenceOffset (uint16_t universe, const ola::DmxBuffer &buffer, int8_t sequence_offset, uint8_t priority=DEFAULT_PRIORITY, bool preview=false)
| Send some DMX data, allowing finer grained control of parameters.
bool | SendStreamTerminated (uint16_t universe, const ola::DmxBuffer &buffer=DmxBuffer(), uint8_t priority=DEFAULT_PRIORITY)
| Signal termination of the stream for a universe.
bool | SetHandler (uint16_t universe, ola::DmxBuffer *buffer, uint8_t *priority, ola::Callback0< void > *handler)
| Set the Callback to be run when we receive data for this universe.
bool | RemoveHandler (uint16_t universe)
| Remove the handler for a particular universe.
const ola::network::Interface & | GetInterface () const
| Return the Interface this node is using.
ola::network::UDPSocket * | GetSocket ()
| Return the UDP socket this node is using.
void | GetKnownControllers (std::vector< KnownController > *controllers)
| Return a list of known controllers.

## Constructor & Destructor Documentation

## ◆ E131Node()

ola::acn::E131Node::E131Node | ( | ola::thread::SchedulerInterface * | ss,
|  | const std::string & | ip_address,
|  | const Options & | options,
|  | const ola::acn::CID & | cid = ola::acn::CID::Generate() )

Create a new E1.31 node.

Parameters

  ss | the SchedulerInterface to use.
  ip_address | the IP address to prefer to listen on
  options | the Options to use for the node.
  cid | the CID to use, if not provided we generate one.

## Member Function Documentation

## ◆ GetKnownControllers()

void ola::acn::E131Node::GetKnownControllers | ( | std::vector< KnownController > * | controllers | ) |

Return a list of known controllers.

This will return an empty list unless enable_draft_discovery was set in the node Options.

## ◆ RemoveHandler()

bool ola::acn::E131Node::RemoveHandler | ( | uint16_t | universe | ) |

Remove the handler for a particular universe.

Parameters

  universe | the universe handler to remove

Returns
  true if removed, false if it didn't exist

## ◆ SendDMX()

bool ola::acn::E131Node::SendDMX | ( | uint16_t | universe,
|  | const ola::DmxBuffer & | buffer,
|  | uint8_t | priority = DEFAULT_PRIORITY,
|  | bool | preview = false )

Send some DMX data.

Parameters

  universe | the id of the universe to send
  buffer | the DMX data.
  priority | the priority to use
  preview | set to true to turn on the preview bit

Returns
  true if it was sent successfully, false otherwise

## ◆ SendDMXWithSequenceOffset()

bool ola::acn::E131Node::SendDMXWithSequenceOffset | ( | uint16_t | universe,
|  | const ola::DmxBuffer & | buffer,
|  | int8_t | sequence_offset,
|  | uint8_t | priority = DEFAULT_PRIORITY,
|  | bool | preview = false )

Send some DMX data, allowing finer grained control of parameters.

The method is provided for the testing framework. Don't use it in production code!

Parameters

  universe | the id of the universe to send
  buffer | the DMX data
  sequence_offset | used to twiddle the sequence numbers, this doesn't increment the sequence counter.
  priority | the priority to use
  preview | set to true to turn on the preview bit

Returns
  true if it was sent successfully, false otherwise

## ◆ SendStreamTerminated()

bool ola::acn::E131Node::SendStreamTerminated | ( | uint16_t | universe,
|  | const ola::DmxBuffer & | buffer = DmxBuffer(),
|  | uint8_t | priority = DEFAULT_PRIORITY )

Signal termination of the stream for a universe.

Parameters

  universe | the id of the universe to send
  buffer | the last DmxBuffer to send.
  priority | the priority to use, this doesn't actually make a difference.

This does not remove the universe from the list of active TX universes, so it should only be used for testing purposes.

## ◆ SetHandler()

bool ola::acn::E131Node::SetHandler | ( | uint16_t | universe,
|  | ola::DmxBuffer * | buffer,
|  | uint8_t * | priority,
|  | ola::Callback0< void > * | handler )

Set the Callback to be run when we receive data for this universe.

Parameters

  universe | the universe to register the handler for
  buffer | the DmxBuffer to copy the data to.
  priority | the priority to set.
  handler | the Callback to call when there is data for this universe. Ownership is transferred.

## ◆ SetSourceName()

bool ola::acn::E131Node::SetSourceName | ( | uint16_t | universe,
|  | const std::string & | source )

Set the name for a universe.

Parameters

  universe | the id of the universe to send
  source | the new source name.

## ◆ StartStream()

bool ola::acn::E131Node::StartStream | ( | uint16_t | universe | ) |

Signal that we will start sending on this particular universe. Without sending any DMX data.

Parameters

  universe | to start sending on.

## ◆ TerminateStream()

bool ola::acn::E131Node::TerminateStream | ( | uint16_t | universe,
|  | uint8_t | priority = DEFAULT_PRIORITY )

Signal that we will no longer send on this particular universe.

Parameters

  universe | to terminate sending on.
  priority | the priority to use in the stream terminated message.

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

- libs/acn/E131Node.h
- libs/acn/E131Node.cpp