21 #ifndef PLUGINS_ARTNET_ARTNETPACKETS_H_
22 #define PLUGINS_ARTNET_ARTNETPACKETS_H_
28 #include "ola/network/Interface.h"
31 #ifndef ARTNET_PORT_COUNT
32 #define ARTNET_PORT_COUNT 4
40 enum { ARTNET_LONG_NAME_LENGTH = 64 };
41 enum { ARTNET_MAX_PORTS = ARTNET_PORT_COUNT };
42 enum { ARTNET_MAX_RDM_ADDRESS_COUNT = 32 };
45 enum { ARTNET_MAX_RDM_DATA = 512 };
46 enum { ARTNET_MAX_UID_COUNT = 200 };
47 enum { ARTNET_REPORT_LENGTH = 64 };
48 enum { ARTNET_SHORT_NAME_LENGTH = 18 };
54 typedef enum artnet_packet_type_e {
56 ARTNET_REPLY = 0x2100,
58 ARTNET_TODREQUEST = 0x8000,
59 ARTNET_TODDATA = 0x8100,
60 ARTNET_TODCONTROL = 0x8200,
62 ARTNET_RDM_SUB = 0x8400,
63 ARTNET_TIME_CODE = 0x9700,
64 ARTNET_IP_PROGRAM = 0xf800,
65 ARTNET_IP_PROGRAM_REPLY = 0xf900,
73 } __attribute__((packed));
78 uint8_t ip[ola::network::IPV4Address::LENGTH];
82 uint8_t subnet_address;
87 char short_name[ARTNET_SHORT_NAME_LENGTH];
88 char long_name[ARTNET_LONG_NAME_LENGTH];
89 char node_report[ARTNET_REPORT_LENGTH];
90 uint8_t number_ports[2];
91 uint8_t port_types[ARTNET_MAX_PORTS];
92 uint8_t good_input[ARTNET_MAX_PORTS];
93 uint8_t good_output[ARTNET_MAX_PORTS];
94 uint8_t sw_in[ARTNET_MAX_PORTS];
95 uint8_t sw_out[ARTNET_MAX_PORTS];
103 uint8_t mac[ola::network::MACAddress::LENGTH];
104 uint8_t bind_ip[ola::network::IPV4Address::LENGTH];
108 } __attribute__((packed));
122 } __attribute__((packed));
134 } __attribute__((packed));
152 uint8_t address_count;
153 uint8_t addresses[ARTNET_MAX_RDM_ADDRESS_COUNT];
154 } __attribute__((packed));
171 uint8_t command_response;
177 } __attribute__((packed));
195 } __attribute__((packed));
213 uint8_t data[ARTNET_MAX_RDM_DATA];
214 } __attribute__((packed));
223 uint8_t ip[ola::network::IPV4Address::LENGTH];
224 uint8_t subnet[ola::network::IPV4Address::LENGTH];
227 } __attribute__((packed));
236 uint8_t ip[ola::network::IPV4Address::LENGTH];
237 uint8_t subnet[ola::network::IPV4Address::LENGTH];
240 } __attribute__((packed));
264 #endif // PLUGINS_ARTNET_ARTNETPACKETS_H_