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 
9 #pragma once
10 
21 #include <stdint.h>
22 #include <stdbool.h>
23 
24 #include "net/ieee802154.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
33 typedef struct {
35  uint8_t len;
37 
41 #define GNRC_GOMACH_L2_ADDR_INIT { { 0 }, 0 }
42 
46 #define GNRC_GOMACH_FRAME_BEACON (0x01U)
47 
51 #define GNRC_GOMACH_FRAME_DATA (0x02U)
52 
56 #define GNRC_GOMACH_FRAME_PREAMBLE (0x03U)
57 
61 #define GNRC_GOMACH_FRAME_PREAMBLE_ACK (0x04U)
62 
66 #define GNRC_GOMACH_FRAME_BROADCAST (0x05U)
67 
74 #define GNRC_GOMACH_FRAME_ANNOUNCE (0x06U)
75 
79 typedef struct {
80  uint8_t type;
82 
86 typedef struct __attribute__((packed)) {
88  uint8_t sub_channel_seq;
91 
95 typedef struct __attribute__((packed)) {
97  uint8_t queue_indicator;
99 
106 typedef struct __attribute__((packed)) {
108  uint8_t subchannel_seq;
110 
114 typedef struct __attribute__((packed)) {
118 
122 typedef struct __attribute__((packed)) {
125  uint32_t phase_in_us;
127 
131 typedef struct __attribute__((packed)) {
133  uint8_t seq_nr;
135 
136 #ifdef __cplusplus
137 }
138 #endif
139 
#define IEEE802154_LONG_ADDRESS_LEN
long address (EUI-64)
Definition: ieee802154.h:45
GoMacH sub-channel announce frame.
Definition: hdr.h:106
uint8_t subchannel_seq
Sub-channel sequence of this node.
Definition: hdr.h:108
gnrc_gomach_hdr_t header
Announce frame header type.
Definition: hdr.h:107
GoMacH Beacon frame.
Definition: hdr.h:86
uint8_t sub_channel_seq
Sub-channel sequence of this node.
Definition: hdr.h:88
uint8_t schedulelist_size
vTDMA schedule list size.
Definition: hdr.h:89
gnrc_gomach_hdr_t header
Beacon frame header type.
Definition: hdr.h:87
GoMacH broadcast frame.
Definition: hdr.h:131
uint8_t seq_nr
Broadcast sequence of this node.
Definition: hdr.h:133
gnrc_gomach_hdr_t header
Broadcast frame header type.
Definition: hdr.h:132
GoMacH data frame.
Definition: hdr.h:95
gnrc_gomach_hdr_t header
Data frame header type.
Definition: hdr.h:96
uint8_t queue_indicator
Queue-length indicator of this node.
Definition: hdr.h:97
GoMacH preamble_ack frame.
Definition: hdr.h:122
gnrc_gomach_l2_addr_t dst_addr
Address of this node.
Definition: hdr.h:124
uint32_t phase_in_us
Current phase of this node.
Definition: hdr.h:125
gnrc_gomach_hdr_t header
Preamble-ACK frame header type.
Definition: hdr.h:123
GoMacH preamble frame.
Definition: hdr.h:114
gnrc_gomach_hdr_t header
Preamble frame header type.
Definition: hdr.h:115
gnrc_gomach_l2_addr_t dst_addr
Address of this node.
Definition: hdr.h:116
GoMacH frame header.
Definition: hdr.h:79
uint8_t type
Type of GoMacH frame.
Definition: hdr.h:80
GoMacH internal L2 address structure.
Definition: hdr.h:33
uint8_t len
Address length.
Definition: hdr.h:35
IEEE 802.15.4 header definitions.