Loading...
Searching...
No Matches
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
25extern "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)
52typedef union {
53#ifdef MODULE_GNRC_LWMAC
58#endif
59
60#ifdef MODULE_GNRC_GOMACH
65#endif
66} gnrc_mac_prot_t;
67#endif
68
72typedef struct {
76 uint16_t mac_info;
77
82
83#if ((GNRC_MAC_RX_QUEUE_SIZE != 0) || (GNRC_MAC_DISPATCH_BUFFER_SIZE != 0)) || DOXYGEN
92#endif /* ((GNRC_MAC_RX_QUEUE_SIZE != 0) || (GNRC_MAC_DISPATCH_BUFFER_SIZE != 0)) || DOXYGEN */
93#if ((GNRC_MAC_TX_QUEUE_SIZE != 0) || (CONFIG_GNRC_MAC_NEIGHBOR_COUNT != 0)) || DOXYGEN
102#endif /* ((GNRC_MAC_TX_QUEUE_SIZE != 0) || (CONFIG_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 */
Interface definition for the CSMA/CA helper.
Configuration type for backoff.
Definition csma_sender.h:74
MAC internal type for storing reception state parameters and state machines.
Definition types.h:70
MAC internal type for storing transmission state parameters and state machines.
Definition types.h:172
Common MAC module component of gnrc_netif_mac_t
Definition mac.h:72
gnrc_mac_rx_t rx
MAC internal object which stores reception parameters, queues, and state machines.
Definition mac.h:91
gnrc_mac_tx_t tx
MAC internal object which stores transmission parameters, queues, and state machines.
Definition mac.h:101
csma_sender_conf_t csma_conf
device's software CSMA configuration
Definition mac.h:81
uint16_t mac_info
general information for the MAC protocol
Definition mac.h:76
GoMacH's specific structure for storing internal states.
Definition types.h:275
LWMAC specific structure for storing internal states.
Definition types.h:198
Internal data types used by GNRC_MAC.