21 #ifndef PLUGINS_SHOWNET_SHOWNETNODE_H_
22 #define PLUGINS_SHOWNET_SHOWNETNODE_H_
29 #include "ola/network/InterfacePicker.h"
30 #include "ola/network/Socket.h"
31 #include "plugins/shownet/ShowNetPackets.h"
46 void SetName(
const string &name);
49 bool SetHandler(
unsigned int universe,
52 bool RemoveHandler(
unsigned int universe);
61 static const uint16_t SHOWNET_MAX_UNIVERSES = 8;
63 friend class ShowNetNodeTest;
72 uint16_t m_packet_count;
74 string m_preferred_ip;
75 std::map<unsigned int, universe_handler> m_handlers;
84 unsigned int universe,
87 inline uint8_t ShortGetHigh(uint16_t x)
const {
return (0xff00 & x) >> 8; }
88 inline uint8_t ShortGetLow(uint16_t x)
const {
return 0x00ff & x; }
90 static const uint16_t SHOWNET_PORT = 2501;
91 static const uint8_t SHOWNET_ID_HIGH = 0x80;
92 static const uint8_t SHOWNET_ID_LOW = 0x8f;
93 static const int MAGIC_INDEX_OFFSET = 11;
98 #endif // PLUGINS_SHOWNET_SHOWNETNODE_H_