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_frame_beacon_t::schedulelist_size
uint8_t schedulelist_size
vTDMA schedule list size.
Definition: hdr.h:90
gnrc_gomach_frame_preamble_ack_t::phase_in_us
uint32_t phase_in_us
Current phase of this node.
Definition: hdr.h:127
gnrc_gomach_frame_broadcast_t
GoMacH broadcast frame.
Definition: hdr.h:133
gnrc_gomach_frame_beacon_t
GoMacH Beacon frame.
Definition: hdr.h:87
ieee802154.h
IEEE 802.15.4 header definitions.
gnrc_gomach_frame_announce_t::subchannel_seq
uint8_t subchannel_seq
Sub-channel sequence of this node.
Definition: hdr.h:109
gnrc_gomach_frame_broadcast_t::seq_nr
uint8_t seq_nr
Broadcast sequence of this node.
Definition: hdr.h:135
gnrc_gomach_frame_data_t::header
gnrc_gomach_hdr_t header
Data frame header type.
Definition: hdr.h:97
gnrc_gomach_frame_preamble_ack_t
GoMacH preamble_ack frame.
Definition: hdr.h:124
gnrc_gomach_frame_beacon_t::sub_channel_seq
uint8_t sub_channel_seq
Sub-channel sequence of this node.
Definition: hdr.h:89
gnrc_gomach_hdr_t::type
uint8_t type
Type of GoMacH frame.
Definition: hdr.h:81
gnrc_gomach_hdr_t
GoMacH frame header.
Definition: hdr.h:80
gnrc_gomach_frame_broadcast_t::header
gnrc_gomach_hdr_t header
Broadcast frame header type.
Definition: hdr.h:134
gnrc_gomach_frame_preamble_ack_t::header
gnrc_gomach_hdr_t header
Preamble-ACK frame header type.
Definition: hdr.h:125
gnrc_gomach_frame_beacon_t::header
gnrc_gomach_hdr_t header
Beacon frame header type.
Definition: hdr.h:88
gnrc_gomach_l2_addr_t
GoMacH internal L2 address structure.
Definition: hdr.h:34
gnrc_gomach_frame_preamble_t
GoMacH preamble frame.
Definition: hdr.h:115
gnrc_gomach_l2_addr_t::len
uint8_t len
Address length.
Definition: hdr.h:36
gnrc_gomach_frame_announce_t
GoMacH sub-channel announce frame.
Definition: hdr.h:107
gnrc_gomach_frame_preamble_ack_t::dst_addr
gnrc_gomach_l2_addr_t dst_addr
Address of this node.
Definition: hdr.h:126
IEEE802154_LONG_ADDRESS_LEN
#define IEEE802154_LONG_ADDRESS_LEN
long address (EUI-64)
Definition: ieee802154.h:44
gnrc_gomach_frame_announce_t::header
gnrc_gomach_hdr_t header
Announce frame header type.
Definition: hdr.h:108
gnrc_gomach_frame_preamble_t::header
gnrc_gomach_hdr_t header
Preamble frame header type.
Definition: hdr.h:116
gnrc_gomach_frame_preamble_t::dst_addr
gnrc_gomach_l2_addr_t dst_addr
Address of this node.
Definition: hdr.h:117
gnrc_gomach_frame_data_t
GoMacH data frame.
Definition: hdr.h:96
gnrc_gomach_frame_data_t::queue_indicator
uint8_t queue_indicator
Queue-length indicator of this node.
Definition: hdr.h:98