|
struct | gnrc_lwmac_packet_info_t |
| Type to pass information about parsing. More...
|
|
#define | GNRC_LWMAC_TX_CONTINUE (0x0008U) |
| Flag to track if the sender can continue to transmit packet to the receiver in its TX procedure. More...
|
|
#define | GNRC_LWMAC_QUIT_TX (0x0010U) |
| Flag to track if the sender should quit Tx in current cycle. More...
|
|
#define | GNRC_LWMAC_PHASE_BACKOFF (0x0020U) |
| Flag to track if the device need to reselect a new wake-up phase. More...
|
|
#define | GNRC_LWMAC_QUIT_RX (0x0040U) |
| Flag to track if the device needs to quit the wake-up (listening) procedure. More...
|
|
#define | GNRC_LWMAC_RTT_EVENT_MARGIN_TICKS (RTT_MS_TO_TICKS(2)) |
| Next RTT event must be at least this far in the future. More...
|
|
static void | gnrc_lwmac_set_tx_continue (gnrc_netif_t *netif, bool tx_continue) |
| set the GNRC_LWMAC_TX_CONTINUE flag of the device More...
|
|
static bool | gnrc_lwmac_get_tx_continue (gnrc_netif_t *netif) |
| get the GNRC_LWMAC_TX_CONTINUE flag of the device More...
|
|
static void | gnrc_lwmac_set_quit_tx (gnrc_netif_t *netif, bool quit_tx) |
| set the GNRC_LWMAC_QUIT_TX flag of the device More...
|
|
static bool | gnrc_lwmac_get_quit_tx (gnrc_netif_t *netif) |
| get the GNRC_LWMAC_QUIT_TX flag of the device More...
|
|
static void | gnrc_lwmac_set_phase_backoff (gnrc_netif_t *netif, bool backoff) |
| set the GNRC_LWMAC_PHASE_BACKOFF flag of the device More...
|
|
static bool | gnrc_lwmac_get_phase_backoff (gnrc_netif_t *netif) |
| get the GNRC_LWMAC_PHASE_BACKOFF flag of the device More...
|
|
static void | gnrc_lwmac_set_quit_rx (gnrc_netif_t *netif, bool quit_rx) |
| set the GNRC_LWMAC_QUIT_RX flag of the device More...
|
|
static bool | gnrc_lwmac_get_quit_rx (gnrc_netif_t *netif) |
| get the GNRC_LWMAC_QUIT_RX flag of the device More...
|
|
static void | gnrc_lwmac_set_dutycycle_active (gnrc_netif_t *netif, bool active) |
| set the GNRC_LWMAC_DUTYCYCLE_ACTIVE flag of LWMAC More...
|
|
static bool | gnrc_lwmac_get_dutycycle_active (gnrc_netif_t *netif) |
| get the GNRC_LWMAC_DUTYCYCLE_ACTIVE flag of LWMAC More...
|
|
static void | gnrc_lwmac_set_reschedule (gnrc_netif_t *netif, bool reschedule) |
| set the GNRC_LWMAC_NEEDS_RESCHEDULE flag of LWMAC More...
|
|
static bool | gnrc_lwmac_get_reschedule (gnrc_netif_t *netif) |
| get the GNRC_LWMAC_NEEDS_RESCHEDULE flag of LWMAC More...
|
|
int | _gnrc_lwmac_transmit (gnrc_netif_t *netif, gnrc_pktsnip_t *pkt) |
| send a packet over the network interface in LWMAC
|
|
int | _gnrc_lwmac_parse_packet (gnrc_pktsnip_t *pkt, gnrc_lwmac_packet_info_t *info) |
| Parse an incoming packet and extract important information. More...
|
|
netopt_state_t | _gnrc_lwmac_get_netdev_state (gnrc_netif_t *netif) |
| Shortcut to get the state of netdev. More...
|
|
void | _gnrc_lwmac_set_netdev_state (gnrc_netif_t *netif, netopt_state_t devstate) |
| Shortcut to set the state of netdev. More...
|
|
static uint32_t | _gnrc_lwmac_ticks_to_phase (uint32_t ticks) |
| Convert RTT ticks to device phase. More...
|
|
static uint32_t | _gnrc_lwmac_phase_now (void) |
| Get device's current phase. More...
|
|
static uint32_t | _gnrc_lwmac_ticks_until_phase (uint32_t phase) |
| Calculate how many ticks remaining to the targeted phase in the future. More...
|
|
int | _gnrc_lwmac_dispatch_defer (gnrc_pktsnip_t *buffer[], gnrc_pktsnip_t *pkt) |
| Store the received packet to the dispatch buffer and remove possible duplicate packets. More...
|
|
#define GNRC_LWMAC_PHASE_BACKOFF (0x0020U) |
Flag to track if the device need to reselect a new wake-up phase.
This flag is mainly for potential collision avoidance. In multi-hop scenario, it could be dangerous that a sender's wake-up phase is close to its receiver's, which may lead to collisions when the sender is sending to the receiver while the sender's son nodes are also sending to the sender. To avoid this, in case a sender finds its phase close to its receiver's, it sets up this flag and then randomly reselects a new wake-up phase.
Definition at line 68 of file lwmac_internal.h.
#define GNRC_LWMAC_QUIT_RX (0x0040U) |
Flag to track if the device needs to quit the wake-up (listening) procedure.
LWMAC adopts an auto wake-up extension scheme. That is, normally, after each data reception in the wake-up period, it extends the wake-up period to another basic duration, thus to receive more potential incoming packets, which is also correlated to the pending-bit transmission scheme to support burst transmissions to boost throughput. However, in some situations, like receiving broadcast (stream) packet, the receiver should immediately goto sleep (by setting up this flag) after one reception, thus not to receive duplicate broadcast packets.
Definition at line 81 of file lwmac_internal.h.
#define GNRC_LWMAC_QUIT_TX (0x0010U) |
Flag to track if the sender should quit Tx in current cycle.
This flag is mainly for collision avoidance. In case a node overhears ongoing broadcast packets stream or other ongoing transmissions of other communication pairs during its wake-up period, it sets up this flag, which quits all its potential transmission attempts in this current cycle (started by the wake-up period), thus not to collide with other (neighbor) nodes' transmissions.
Definition at line 56 of file lwmac_internal.h.
#define GNRC_LWMAC_TX_CONTINUE (0x0008U) |
Flag to track if the sender can continue to transmit packet to the receiver in its TX procedure.
LWMAC supports burst transmission based on the pending-bit technique. Namely, if the sender has multi packets for the same receiver, it can successively transmit its packets back to back with this flag set up, with the awareness that the receiver will also keep awake for receptions.
Definition at line 44 of file lwmac_internal.h.