22 #ifndef LIBS_ACN_E131NODE_H_
23 #define LIBS_ACN_E131NODE_H_
35 #include "ola/io/SelectServerInterface.h"
36 #include "ola/thread/SchedulerInterface.h"
37 #include "ola/network/Interface.h"
38 #include "ola/network/Socket.h"
39 #include "libs/acn/DMPE131Inflator.h"
40 #include "libs/acn/E131DiscoveryInflator.h"
41 #include "libs/acn/E131Inflator.h"
42 #include "libs/acn/E131Sender.h"
43 #include "libs/acn/RootInflator.h"
44 #include "libs/acn/RootSender.h"
45 #include "libs/acn/UDPTransport.h"
77 std::string source_name;
78 std::set<uint16_t> universes;
89 const std::string &ip_address,
109 bool SetSourceName(uint16_t universe,
const std::string &source);
124 uint8_t priority = DEFAULT_PRIORITY);
134 bool SendDMX(uint16_t universe,
136 uint8_t priority = DEFAULT_PRIORITY,
137 bool preview =
false);
155 int8_t sequence_offset,
156 uint8_t priority = DEFAULT_PRIORITY,
157 bool preview =
false);
172 uint8_t priority = DEFAULT_PRIORITY);
216 typedef std::map<uint16_t, tx_universe> ActiveTxUniverses;
217 typedef std::map<acn::CID, class TrackedSource*> TrackedSources;
220 const Options m_options;
221 const std::string m_preferred_ip;
227 RootSender m_root_sender;
228 E131Sender m_e131_sender;
230 RootInflator m_root_inflator;
231 E131Inflator m_e131_inflator;
232 E131InflatorRev2 m_e131_rev2_inflator;
233 DMPE131Inflator m_dmp_inflator;
234 E131DiscoveryInflator m_discovery_inflator;
236 IncomingUDPTransport m_incoming_udp_transport;
237 ActiveTxUniverses m_tx_universes;
238 uint8_t *m_send_buffer;
242 TrackedSources m_discovered_sources;
244 tx_universe *SetupOutgoingSettings(uint16_t universe);
246 bool PerformDiscoveryHousekeeping();
247 void NewDiscoveryPage(
const HeaderSet &headers,
248 const E131DiscoveryInflator::DiscoveryPage &page);
249 void SendDiscoveryPage(
const std::vector<uint16_t> &universes, uint8_t page,
250 uint8_t last_page, uint32_t sequence_number);
252 static const uint16_t DEFAULT_PRIORITY = 100;
253 static const uint16_t UNIVERSE_DISCOVERY_INTERVAL = 10000;
254 static const uint16_t DISCOVERY_UNIVERSE_ID = 64214;
255 static const uint16_t DISCOVERY_PAGE_SIZE = 512;
261 #endif // LIBS_ACN_E131NODE_H_
bool TerminateStream(uint16_t universe, uint8_t priority=DEFAULT_PRIORITY)
Signal that we will no longer send on this particular universe.
Definition: E131Node.cpp:233
bool Stop()
Stop this node.
Definition: E131Node.cpp:202
uint16_t port
Definition: E131Node.h:70
bool RemoveHandler(uint16_t universe)
Remove the handler for a particular universe.
Definition: E131Node.cpp:365
ola::network::UDPSocket * GetSocket()
Return the UDP socket this node is using.
Definition: E131Node.h:200
bool SetSourceName(uint16_t universe, const std::string &source)
Set the name for a universe.
Definition: E131Node.cpp:208
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.
Definition: E131Node.cpp:110
bool SendStreamTerminated(uint16_t universe, const ola::DmxBuffer &buffer=DmxBuffer(), uint8_t priority=DEFAULT_PRIORITY)
Signal termination of the stream for a universe.
Definition: E131Node.cpp:302
bool enable_draft_discovery
Definition: E131Node.h:68
Options for the E131Node.
Definition: E131Node.h:55
Used to hold a single universe of DMX data.
Definition: DmxBuffer.h:49
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.
Definition: E131Node.cpp:346
bool Start()
Start this node.
Definition: E131Node.cpp:162
Constants used throughout OLA.
void GetKnownControllers(std::vector< KnownController > *controllers)
Return a list of known controllers.
Definition: E131Node.cpp:382
std::string source_name
Definition: E131Node.h:71
void * timeout_id
A timeout handle which can later be used to cancel a timeout.
Definition: SchedulerInterface.h:34
The ACN component identifier.
uint8_t dscp
Definition: E131Node.h:69
A class used to hold a single universe of DMX data.
static const char OLA_DEFAULT_INSTANCE_NAME[]
The default instance name for olad.
Definition: Constants.h:73
The ACN component identifier.
Definition: CID.h:47
Represents a IPv4 Address.
Definition: IPV4Address.h:55
bool SendDMX(uint16_t universe, const ola::DmxBuffer &buffer, uint8_t priority=DEFAULT_PRIORITY, bool preview=false)
Send some DMX data.
Definition: E131Node.cpp:242
Definition: Interface.h:35
bool ignore_preview
Definition: E131Node.h:67
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.
Definition: E131Node.cpp:250
Definition: E131Node.h:50
const uint16_t ACN_PORT
The port used for E1.31 & SDT communication.
Definition: ACNPort.h:57
const ola::network::Interface & GetInterface() const
Return the Interface this node is using.
Definition: E131Node.h:195
bool StartStream(uint16_t universe)
Signal that we will start sending on this particular universe. Without sending any DMX data...
Definition: E131Node.cpp:220
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Allows Callbacks to be scheduled to run after a specified interval.
Definition: SchedulerInterface.h:46
static CID Generate()
Generate a new CID.
Definition: CID.cpp:74
bool use_rev2
Definition: E131Node.h:66
Definition: E131Node.h:74
The TCP / UDP Ports used for transporting ACN.