21 #ifndef PLUGINS_ESPNET_ESPNETPACKETS_H_ 22 #define PLUGINS_ESPNET_ESPNETPACKETS_H_ 24 #include <sys/types.h> 27 #include <netinet/in.h> 37 enum { ESPNET_NAME_LENGTH = 10 };
38 enum { ESPNET_DATA_LENGTH = 200 };
44 enum espnet_packet_type_e {
45 ESPNET_POLL =
'E' << 24 |
'S' << 16 |
'P' << 8 |
'P',
46 ESPNET_REPLY =
'E' << 24 |
'S' << 16 |
'P' << 8 |
'R',
47 ESPNET_DMX =
'E' << 24 |
'S' << 16 |
'D' << 8 |
'D',
48 ESPNET_ACK =
'E' << 24 |
'S' << 16 |
'A' << 8 |
'P' 53 } __attribute__((packed));
56 typedef enum espnet_packet_type_e espnet_packet_type_t;
62 struct espnet_poll_s {
67 typedef struct espnet_poll_s espnet_poll_t;
85 struct espnet_poll_reply_s {
87 uint8_t mac[ola::network::MACAddress::LENGTH];
91 uint8_t name[ESPNET_NAME_LENGTH];
95 espnet_node_config_t config;
98 typedef struct espnet_poll_reply_s espnet_poll_reply_t;
104 struct espnet_ack_s {
110 typedef struct espnet_ack_s espnet_ack_t;
116 struct espnet_data_s {
125 typedef struct espnet_data_s espnet_data_t;
136 espnet_poll_reply_t reply;
143 #endif // PLUGINS_ESPNET_ESPNETPACKETS_H_ #define PACK(__Declaration__)
Pack structures.
Definition: Macro.h:170
Constants used throughout OLA.
Definition: EspNetPackets.h:134
Definition: Constants.h:36
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Definition: EspNetPackets.h:73
Represents a MAC Address.