netif/mac.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Freie Universit├Ąt Berlin
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 
18 #ifndef NET_GNRC_NETIF_MAC_H
19 #define NET_GNRC_NETIF_MAC_H
20 
21 #include "net/gnrc/mac/types.h"
22 #include "net/csma_sender.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 #define GNRC_NETIF_MAC_INFO_TX_FEEDBACK_MASK (0x0003U)
32 
37 #define GNRC_NETIF_MAC_INFO_RX_STARTED (0x0004U)
38 
46 #define GNRC_NETIF_MAC_INFO_CSMA_ENABLED (0x0100U)
47 
48 #if defined(MODULE_GNRC_LWMAC) || defined(MODULE_GNRC_GOMACH)
49 
52 typedef union {
53 #ifdef MODULE_GNRC_LWMAC
54 
58 #endif
59 
60 #ifdef MODULE_GNRC_GOMACH
61 
65 #endif
66 } gnrc_mac_prot_t;
67 #endif
68 
72 typedef struct {
76  uint16_t mac_info;
77 
82 
83 #if ((GNRC_MAC_RX_QUEUE_SIZE != 0) || (GNRC_MAC_DISPATCH_BUFFER_SIZE != 0)) || DOXYGEN
84 
92 #endif /* ((GNRC_MAC_RX_QUEUE_SIZE != 0) || (GNRC_MAC_DISPATCH_BUFFER_SIZE != 0)) || DOXYGEN */
93 #if ((GNRC_MAC_TX_QUEUE_SIZE != 0) || (GNRC_MAC_NEIGHBOR_COUNT != 0)) || DOXYGEN
94 
102 #endif /* ((GNRC_MAC_TX_QUEUE_SIZE != 0) || (GNRC_MAC_NEIGHBOR_COUNT == 0)) || DOXYGEN */
103 
104 #if defined(MODULE_GNRC_LWMAC) || defined(MODULE_GNRC_GOMACH)
105  gnrc_mac_prot_t prot;
106 #endif
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif /* NET_GNRC_NETIF_MAC_H */
114 
Interface definition for the CSMA/CA helper.
Common MAC module component of gnrc_netif_mac_t
Definition: netif/mac.h:72
gnrc_mac_rx_t rx
MAC internal object which stores reception parameters, queues, and state machines.
Definition: netif/mac.h:91
Configuration type for backoff.
Definition: csma_sender.h:69
GoMacH's specific structure for storing internal states.
Definition: gomach/types.h:286
gnrc_mac_tx_t tx
MAC internal object which stores transmission parameters, queues, and state machines.
Definition: netif/mac.h:101
MAC internal type for storing reception state parameters and state machines.
Definition: mac/types.h:66
Internal data types used by GNRC_MAC.
csma_sender_conf_t csma_conf
device's software CSMA configuration
Definition: netif/mac.h:81
LWMAC specific structure for storing internal states.
Definition: lwmac/types.h:201
uint16_t mac_info
general information for the MAC protocol
Definition: netif/mac.h:76
MAC internal type for storing transmission state parameters and state machines.
Definition: mac/types.h:168