gnrc/lwmac/hdr.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Daniel Krebs
3  * 2016 INRIA
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
21 #ifndef NET_GNRC_LWMAC_HDR_H
22 #define NET_GNRC_LWMAC_HDR_H
23 
24 #include <stdint.h>
25 #include <stdbool.h>
26 
27 #include "net/ieee802154.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
36 #define GNRC_LWMAC_FRAMETYPE_WR (0x01U)
37 
41 #define GNRC_LWMAC_FRAMETYPE_WA (0x02U)
42 
46 #define GNRC_LWMAC_FRAMETYPE_DATA (0x03U)
47 
51 #define GNRC_LWMAC_FRAMETYPE_DATA_PENDING (0x04U)
52 
56 #define GNRC_LWMAC_FRAMETYPE_BROADCAST (0x05U)
57 
61 typedef struct {
63  uint8_t len;
65 
69 #define GNRC_LWMAC_L2_ADDR_INITIAL { { 0 }, 0 }
70 
74 typedef struct {
75  uint8_t type;
77 
81 typedef struct __attribute__((packed)) {
85 
89 typedef struct __attribute__((packed)) {
92  uint32_t current_phase;
94 
98 typedef struct __attribute__((packed)) {
100  uint8_t seq_nr;
102 
106 typedef struct __attribute__((packed)) {
109 
110 #ifdef __cplusplus
111 }
112 #endif
113 
114 #endif /* NET_GNRC_LWMAC_HDR_H */
115 
uint8_t seq_nr
Broadcast sequence.
LWMAC WA (wake-up answer packet, i.e., preamble-ACK packet) frame.
uint8_t type
type of frame
gnrc_lwmac_hdr_t header
Broadcast packet header type.
LWMAC broadcast data frame.
IEEE 802.15.4 header definitions.
LWMAC WR (wake-up request packet, i.e., preamble packet) frame.
gnrc_lwmac_hdr_t header
WR packet header type.
gnrc_lwmac_hdr_t header
Data packet header type.
LWMAC internal L2 address structure.
uint8_t len
address
uint32_t current_phase
Node&#39;s current phase value.
LWMAC header.
gnrc_lwmac_hdr_t header
WA packet header type.
LWMAC unicast data frame.
gnrc_lwmac_l2_addr_t dst_addr
WR is broadcast, so destination address needed.
#define IEEE802154_LONG_ADDRESS_LEN
long address (EUI-64)
gnrc_lwmac_l2_addr_t dst_addr
WA is broadcast, so destination address needed.