21 #ifndef PLUGINS_SANDNET_SANDNETNODE_H_
22 #define PLUGINS_SANDNET_SANDNETNODE_H_
30 #include "ola/network/IPV4Address.h"
31 #include "ola/network/InterfacePicker.h"
32 #include "ola/network/Socket.h"
34 #include "plugins/sandnet/SandNetPackets.h"
46 SANDNET_PORT_MODE_DISABLED,
47 SANDNET_PORT_MODE_OUT,
49 SANDNET_PORT_MODE_MOUT,
60 void SetName(
const string &name) {
65 std::vector<UDPSocket*> GetSockets();
68 bool SetHandler(uint8_t group,
72 bool RemoveHandler(uint8_t group, uint8_t universe);
74 bool SetPortParameters(uint8_t port_id, sandnet_port_type type,
75 uint8_t group, uint8_t universe);
76 bool SendAdvertisement();
77 bool SendDMX(uint8_t port_id,
const DmxBuffer &buffer);
83 sandnet_port_type type;
91 typedef std::pair<uint8_t, uint8_t> group_universe_pair;
92 typedef std::map<group_universe_pair, universe_handler> universe_handlers;
101 bool SendUncompressedDMX(uint8_t port_id,
const DmxBuffer &buffer);
104 bool is_control =
false);
108 string m_preferred_ip;
110 sandnet_port m_ports[SANDNET_MAX_PORTS];
111 universe_handlers m_handlers;
119 static const uint16_t CONTROL_PORT;
120 static const uint16_t DATA_PORT;
121 static const char CONTROL_ADDRESS[];
122 static const char DATA_ADDRESS[];
123 static const char DEFAULT_NODE_NAME[];
124 static const uint32_t FIRMWARE_VERSION = 0x00050501;
129 #endif // PLUGINS_SANDNET_SANDNETNODE_H_