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" 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;
221 const std::string m_preferred_ip;
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,
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_ Definition: E131Sender.h:37
bool TerminateStream(uint16_t universe, uint8_t priority=DEFAULT_PRIORITY)
Signal that we will no longer send on this particular universe.
Definition: E131Node.cpp:235
bool Stop()
Stop this node.
Definition: E131Node.cpp:204
uint16_t port
Definition: E131Node.h:70
bool RemoveHandler(uint16_t universe)
Remove the handler for a particular universe.
Definition: E131Node.cpp:367
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
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:210
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:304
bool enable_draft_discovery
Definition: E131Node.h:68
const ola::network::Interface & GetInterface() const
Return the Interface this node is using.
Definition: E131Node.h:195
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:348
bool Start()
Start this node.
Definition: E131Node.cpp:162
Definition: E131Inflator.h:34
Constants used throughout OLA.
void GetKnownControllers(std::vector< KnownController > *controllers)
Return a list of known controllers.
Definition: E131Node.cpp:384
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
Definition: E131DiscoveryInflator.h:33
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:244
Definition: Interface.h:35
bool ignore_preview
Definition: E131Node.h:67
Definition: RootInflator.h:48
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:252
Definition: E131Inflator.h:63
Definition: RootSender.h:33
Definition: E131Node.h:50
Definition: UDPTransport.h:94
const uint16_t ACN_PORT
The port used for E1.31 & SDT communication.
Definition: ACNPort.h:57
bool StartStream(uint16_t universe)
Signal that we will start sending on this particular universe. Without sending any DMX data...
Definition: E131Node.cpp:222
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Definition: E131DiscoveryInflator.h:35
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: DMPE131Inflator.h:35
Definition: E131Node.h:74
The TCP / UDP Ports used for transporting ACN.