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

Classes

struct  KnownController
struct  Options
 Options for the E131Node. More...
struct  tx_universe

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::InterfaceGetInterface () const
 Return the Interface this node is using.
ola::network::UDPSocketGetSocket ()
 Return the UDP socket this node is using.
void GetKnownControllers (std::vector< KnownController > *controllers)
 Return a list of known controllers.

Constructor & Destructor Documentation

ola::plugin::e131::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
ssthe SchedulerInterface to use.
ip_addressthe IP address to prefer to listen on
optionsthe Options to use for the node.
cidthe CID to use, if not provided we generate one.

Member Function Documentation

void ola::plugin::e131::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.

bool ola::plugin::e131::E131Node::RemoveHandler ( uint16_t  universe)

Remove the handler for a particular universe.

Parameters
universethe universe handler to remove
Returns
true if removed, false if it didn't exist
bool ola::plugin::e131::E131Node::SendDMX ( uint16_t  universe,
const ola::DmxBuffer buffer,
uint8_t  priority = DEFAULT_PRIORITY,
bool  preview = false 
)

Send some DMX data.

Parameters
universethe id of the universe to send
bufferthe DMX data.
prioritythe priority to use
previewset to true to turn on the preview bit
Returns
true if it was sent successfully, false otherwise
bool ola::plugin::e131::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
universethe id of the universe to send
bufferthe DMX data
sequence_offsetused to twiddle the sequence numbers, this doesn't increment the sequence counter.
prioritythe priority to use
previewset to true to turn on the preview bit
Returns
true if it was sent successfully, false otherwise
bool ola::plugin::e131::E131Node::SendStreamTerminated ( uint16_t  universe,
const ola::DmxBuffer buffer = DmxBuffer(),
uint8_t  priority = DEFAULT_PRIORITY 
)

Signal termination of the stream for a universe.

Parameters
universethe id of the universe to send
bufferthe last DmxBuffer to send.
prioritythe 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.

bool ola::plugin::e131::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
universethe universe to register the handler for
bufferthe DmxBuffer to copy the data to.
prioritythe priority to set.
handlerthe Callback to call when there is data for this universe. Ownership is transferred.
bool ola::plugin::e131::E131Node::SetSourceName ( uint16_t  universe,
const std::string &  source 
)

Set the name for a universe.

Parameters
universethe id of the universe to send
sourcethe new source name.
bool ola::plugin::e131::E131Node::StartStream ( uint16_t  universe)

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

Parameters
universeto start sending on.
bool ola::plugin::e131::E131Node::TerminateStream ( uint16_t  universe,
uint8_t  priority = DEFAULT_PRIORITY 
)

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

Parameters
universeto terminate sending on.
prioritythe priority to use in the stream terminated message.

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