21#ifndef PLUGINS_SANDNET_SANDNETPACKETS_H_
22#define PLUGINS_SANDNET_SANDNETPACKETS_H_
27#include <netinet/in.h>
33#include "plugins/sandnet/SandNetCommon.h"
39enum { SANDNET_NAME_LENGTH = 31};
50 SANDNET_ADVERTISEMENT = 0x0100,
51 SANDNET_CONTROL = 0x0200,
53 SANDNET_NAME = 0x0400,
54 SANDNET_IDENTIFY = 0x0500,
55 SANDNET_PROG = 0x0600,
57 SANDNET_COMPRESSED_DMX = 0x0a00,
62} __attribute__((packed));
65typedef enum packet_type_e packet_type_t;
72 SANDNET_SANDNET = 0x02,
73 SANDNET_ARTNET = 0x04,
74 SANDNET_COMPULIGHT = 0x06,
75 SANDNET_SHOWNET = 0x09,
82} __attribute__((packed));
85typedef enum protocol_id_e protocol_id_t;
88struct sandnet_packet_advertisement_port_s {
89 protocol_id_t protocol;
103struct sandnet_advertisement_s {
104 uint8_t mac[ola::network::MACAddress::LENGTH];
106 struct sandnet_packet_advertisement_port_s ports[SANDNET_MAX_PORTS];
108 char name[SANDNET_NAME_LENGTH];
115typedef struct sandnet_advertisement_s sandnet_advertisement;
122struct sandnet_dmx_s {
129typedef struct sandnet_dmx_s sandnet_dmx;
136struct sandnet_port_control_s {
137 uint8_t mac[ola::network::MACAddress::LENGTH];
139 struct sandnet_packet_advertisement_port_s ports[SANDNET_MAX_PORTS];
142typedef struct sandnet_port_control_s sandnet_port_control;
149struct sandnet_name_s {
150 uint8_t mac[ola::network::MACAddress::LENGTH];
152 uint8_t name[SANDNET_NAME_LENGTH];
155typedef struct sandnet_name_s sandnet_name;
163struct sandnet_identify_s {
164 uint8_t mac[ola::network::MACAddress::LENGTH];
167typedef struct sandnet_identify_s sandnet_identify;
175struct sandnet_program_s {
176 uint8_t mac[ola::network::MACAddress::LENGTH];
177 uint8_t ip[ola::network::IPV4Address::LENGTH];
179 uint8_t netmask[ola::network::IPV4Address::LENGTH];
182typedef struct sandnet_program_s sandnet_program;
189struct sandnet_led_s {
190 uint8_t mac[ola::network::MACAddress::LENGTH];
194typedef struct sandnet_led_s sandnet_led;
201struct sandnet_compressed_dmx_s {
211typedef struct sandnet_compressed_dmx_s sandnet_compressed_dmx;
216struct sandnet_packet {
219 sandnet_advertisement advertisement;
220 sandnet_port_control port_control;
224 sandnet_program program;
226 sandnet_compressed_dmx compressed_dmx;
Constants used throughout OLA.
Represents an IPv4 Address.
Represents a MAC Address.
#define PACK(__Declaration__)
Pack structures.
Definition Macro.h:171
The namespace containing all OLA symbols.
Definition Credentials.cpp:44
@ DMX_UNIVERSE_SIZE
Definition Constants.h:36