Definitions of internal functions of GNRC_MAC module. More...

Detailed Description

Definitions of internal functions of GNRC_MAC module.

Definition in file internal.h.

#include <stdint.h>
#include "net/ieee802154.h"
#include "net/gnrc/netif.h"
+ Include dependency graph for internal.h:

Go to the source code of this file.

static bool gnrc_netif_get_rx_started (gnrc_netif_t *netif)
 get the 'rx_started' state of the device More...
 
static void gnrc_netif_set_rx_started (gnrc_netif_t *netif, bool rx_started)
 set the rx_started state of the device More...
 
static gnrc_mac_tx_feedback_t gnrc_netif_get_tx_feedback (gnrc_netif_t *netif)
 get the transmission feedback of the device More...
 
static void gnrc_netif_set_tx_feedback (gnrc_netif_t *netif, gnrc_mac_tx_feedback_t txf)
 set the transmission feedback of the device More...
 
bool gnrc_mac_queue_tx_packet (gnrc_mac_tx_t *tx, uint32_t priority, gnrc_pktsnip_t *pkt)
 Queues the packet into the related transmission packet queue in netdev_t::tx. More...
 
bool gnrc_mac_queue_rx_packet (gnrc_mac_rx_t *rx, uint32_t priority, gnrc_pktsnip_t *pkt)
 Queues the packet into the reception packet queue in netdev_t::rx. More...
 
void gnrc_mac_dispatch (gnrc_mac_rx_t *rx)
 Dispatch all the packets stored in netdev_t::rx:dispatch_buffer to upper layer. More...
 

Function Documentation

◆ gnrc_mac_dispatch()

void gnrc_mac_dispatch ( gnrc_mac_rx_t rx)

Dispatch all the packets stored in netdev_t::rx:dispatch_buffer to upper layer.

Parameters
[in,out]rxgnrc_mac reception management object

◆ gnrc_mac_queue_rx_packet()

bool gnrc_mac_queue_rx_packet ( gnrc_mac_rx_t rx,
uint32_t  priority,
gnrc_pktsnip_t pkt 
)

Queues the packet into the reception packet queue in netdev_t::rx.

Parameters
[in,out]rxgnrc_mac reception management object
[in]prioritythe priority of pkt
[in]pktgnrc packet that will be queued
Returns
true if queued successfully, otherwise false.

◆ gnrc_mac_queue_tx_packet()

bool gnrc_mac_queue_tx_packet ( gnrc_mac_tx_t tx,
uint32_t  priority,
gnrc_pktsnip_t pkt 
)

Queues the packet into the related transmission packet queue in netdev_t::tx.

Note that, in case the gnrc_mac_tx_neighbor_t structure is in used (indicated by CONFIG_GNRC_MAC_NEIGHBOR_COUNT != 0), this function queues the packet to the queue associated to the pkt's destination neighbor, including a broadcast-neighbor (neighbor id is 0 in netdev_t::tx::neighbors) which specifically stores broadcasting packets. On the other hand, if gnrc_mac_tx_neighbor_t structure is not in used (indicated by CONFIG_GNRC_MAC_NEIGHBOR_COUNT == 0), this function queues the packet into the single priority TX queue defined in in netdev_t::tx.

Parameters
[in,out]txgnrc_mac transmission management object
[in]prioritythe priority of pkt
[in]pktgnrc packet that will be queued
Returns
true if queued successfully, otherwise false.

◆ gnrc_netif_get_rx_started()

static bool gnrc_netif_get_rx_started ( gnrc_netif_t netif)
inlinestatic

get the 'rx_started' state of the device

This function checks whether the device has started receiving a packet.

Parameters
[in]netifthe network interface
Returns
the rx_started state

Definition at line 42 of file internal.h.

◆ gnrc_netif_get_tx_feedback()

static gnrc_mac_tx_feedback_t gnrc_netif_get_tx_feedback ( gnrc_netif_t netif)
inlinestatic

get the transmission feedback of the device

Parameters
[in]netifthe network interface
Returns
the transmission feedback

Definition at line 72 of file internal.h.

◆ gnrc_netif_set_rx_started()

static void gnrc_netif_set_rx_started ( gnrc_netif_t netif,
bool  rx_started 
)
inlinestatic

set the rx_started state of the device

This function is intended to be called only in netdev_t::event_callback().

Parameters
[in]netifthe network interface
[in]rx_startedthe rx_started state

Definition at line 55 of file internal.h.

◆ gnrc_netif_set_tx_feedback()

static void gnrc_netif_set_tx_feedback ( gnrc_netif_t netif,
gnrc_mac_tx_feedback_t  txf 
)
inlinestatic

set the transmission feedback of the device

This function is intended to be called only in netdev_t::event_callback().

Parameters
[in]netifthe network interface
[in]txfthe transmission feedback

Definition at line 86 of file internal.h.