21 #ifndef PLUGINS_ARTNET_ARTNETPACKETS_H_
22 #define PLUGINS_ARTNET_ARTNETPACKETS_H_
26 #include "ola/network/IPV4Address.h"
27 #include "ola/network/Interface.h"
30 #ifndef ARTNET_PORT_COUNT
31 #define ARTNET_PORT_COUNT 4
39 enum { ARTNET_LONG_NAME_LENGTH = 64 };
40 enum { ARTNET_MAX_PORTS = ARTNET_PORT_COUNT };
41 enum { ARTNET_MAX_RDM_ADDRESS_COUNT = 32 };
44 enum { ARTNET_MAX_RDM_DATA = 512 };
45 enum { ARTNET_MAX_UID_COUNT = 200 };
46 enum { ARTNET_REPORT_LENGTH = 64 };
47 enum { ARTNET_SHORT_NAME_LENGTH = 18 };
53 typedef enum artnet_packet_type_e {
55 ARTNET_REPLY = 0x2100,
57 ARTNET_TODREQUEST = 0x8000,
58 ARTNET_TODDATA = 0x8100,
59 ARTNET_TODCONTROL = 0x8200,
61 ARTNET_RDM_SUB = 0x8400,
62 ARTNET_TIME_CODE = 0x9700,
63 ARTNET_IP_PROGRAM = 0xf800,
64 ARTNET_IP_PROGRAM_REPLY = 0xf900,
72 } __attribute__((packed));
77 uint8_t ip[ola::network::IPV4Address::LENGTH];
81 uint8_t subnet_address;
86 char short_name[ARTNET_SHORT_NAME_LENGTH];
87 char long_name[ARTNET_LONG_NAME_LENGTH];
88 char node_report[ARTNET_REPORT_LENGTH];
89 uint8_t number_ports[2];
90 uint8_t port_types[ARTNET_MAX_PORTS];
91 uint8_t good_input[ARTNET_MAX_PORTS];
92 uint8_t good_output[ARTNET_MAX_PORTS];
93 uint8_t sw_in[ARTNET_MAX_PORTS];
94 uint8_t sw_out[ARTNET_MAX_PORTS];
102 uint8_t mac[ola::network::MAC_LENGTH];
103 uint8_t bind_ip[ola::network::IPV4Address::LENGTH];
107 } __attribute__((packed));
121 } __attribute__((packed));
133 } __attribute__((packed));
151 uint8_t address_count;
152 uint8_t addresses[ARTNET_MAX_RDM_ADDRESS_COUNT];
153 } __attribute__((packed));
170 uint8_t command_response;
176 } __attribute__((packed));
194 } __attribute__((packed));
212 uint8_t data[ARTNET_MAX_RDM_DATA];
213 } __attribute__((packed));
222 uint8_t ip[ola::network::IPV4Address::LENGTH];
223 uint8_t subnet[ola::network::IPV4Address::LENGTH];
226 } __attribute__((packed));
235 uint8_t ip[ola::network::IPV4Address::LENGTH];
236 uint8_t subnet[ola::network::IPV4Address::LENGTH];
239 } __attribute__((packed));
263 #endif // PLUGINS_ARTNET_ARTNETPACKETS_H_