21 #ifndef PLUGINS_SHOWNET_SHOWNETNODE_H_
22 #define PLUGINS_SHOWNET_SHOWNETNODE_H_
30 #include "ola/network/InterfacePicker.h"
31 #include "ola/network/Socket.h"
32 #include "plugins/shownet/ShowNetPackets.h"
40 explicit ShowNetNode(
const std::string &ip_address);
45 void SetName(
const std::string &name);
48 bool SetHandler(
unsigned int universe,
51 bool RemoveHandler(
unsigned int universe);
60 static const uint16_t SHOWNET_MAX_UNIVERSES = 8;
62 friend class ShowNetNodeTest;
71 uint16_t m_packet_count;
72 std::string m_node_name;
73 std::string m_preferred_ip;
74 std::map<unsigned int, universe_handler> m_handlers;
79 bool HandlePacket(
const shownet_packet *packet,
unsigned int size);
80 bool HandleCompressedPacket(
const shownet_compressed_dmx *packet,
81 unsigned int packet_size);
83 unsigned int universe,
87 static const uint16_t SHOWNET_PORT = 2501;
91 static const int MAGIC_INDEX_OFFSET = 11;
98 #endif // PLUGINS_SHOWNET_SHOWNETNODE_H_