gnrc/gomach/hdr.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 INRIA
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef NET_GNRC_GOMACH_HDR_H
20 #define NET_GNRC_GOMACH_HDR_H
21 
22 #include <stdint.h>
23 #include <stdbool.h>
24 
25 #include "net/ieee802154.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
34 typedef struct {
36  uint8_t len;
38 
42 #define GNRC_GOMACH_L2_ADDR_INIT { { 0 }, 0 }
43 
47 #define GNRC_GOMACH_FRAME_BEACON (0x01U)
48 
52 #define GNRC_GOMACH_FRAME_DATA (0x02U)
53 
57 #define GNRC_GOMACH_FRAME_PREAMBLE (0x03U)
58 
62 #define GNRC_GOMACH_FRAME_PREAMBLE_ACK (0x04U)
63 
67 #define GNRC_GOMACH_FRAME_BROADCAST (0x05U)
68 
75 #define GNRC_GOMACH_FRAME_ANNOUNCE (0x06U)
76 
80 typedef struct {
81  uint8_t type;
83 
87 typedef struct __attribute__((packed)) {
89  uint8_t sub_channel_seq;
92 
96 typedef struct __attribute__((packed)) {
98  uint8_t queue_indicator;
100 
107 typedef struct __attribute__((packed)) {
109  uint8_t subchannel_seq;
111 
115 typedef struct __attribute__((packed)) {
119 
120 
124 typedef struct __attribute__((packed)) {
127  uint32_t phase_in_us;
129 
133 typedef struct __attribute__((packed)) {
135  uint8_t seq_nr;
137 
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif /* NET_GNRC_GOMACH_HDR_H */
143 
gnrc_gomach_l2_addr_t dst_addr
Address of this node.
uint8_t len
Address length.
GoMacH data frame.
GoMacH preamble_ack frame.
gnrc_gomach_hdr_t header
Beacon frame header type.
uint8_t type
Type of GoMacH frame.
uint8_t subchannel_seq
Sub-channel sequence of this node.
IEEE 802.15.4 header definitions.
gnrc_gomach_hdr_t header
Preamble-ACK frame header type.
uint8_t sub_channel_seq
Sub-channel sequence of this node.
gnrc_gomach_hdr_t header
Data frame header type.
GoMacH Beacon frame.
GoMacH frame header.
uint8_t schedulelist_size
vTDMA schedule list size.
GoMacH sub-channel announce frame.
GoMacH broadcast frame.
gnrc_gomach_hdr_t header
Announce frame header type.
uint32_t phase_in_us
Current phase of this node.
uint8_t queue_indicator
Queue-length indicator of this node.
uint8_t seq_nr
Broadcast sequence of this node.
GoMacH preamble frame.
gnrc_gomach_hdr_t header
Broadcast frame header type.
gnrc_gomach_l2_addr_t dst_addr
Address of this node.
gnrc_gomach_hdr_t header
Preamble frame header type.
#define IEEE802154_LONG_ADDRESS_LEN
long address (EUI-64)
GoMacH internal L2 address structure.