timeout.h File Reference

Timeout handling of LWMAC. More...

Detailed Description

Timeout handling of LWMAC.

Author
Daniel Krebs githu.nosp@m.b@da.nosp@m.niel-.nosp@m.kreb.nosp@m.s.net
Shuguo Zhuo shugu.nosp@m.o.zh.nosp@m.uo@in.nosp@m.ria..nosp@m.fr

Definition in file timeout.h.

#include <stdint.h>
#include <stdbool.h>
#include "net/gnrc/netif.h"
#include "net/gnrc/lwmac/types.h"
+ Include dependency graph for timeout.h:

Go to the source code of this file.

#define GNRC_LWMAC_TIMEOUT_INITIAL   { {}, {}, false, TIMEOUT_DISABLED }
 Static initializer for gnrc_lwmac_timeout_t.
 
void gnrc_lwmac_set_timeout (gnrc_netif_t *netif, gnrc_lwmac_timeout_type_t type, uint32_t offset)
 Set LWMAC timeout of type type of offset offset. More...
 
void gnrc_lwmac_clear_timeout (gnrc_netif_t *netif, gnrc_lwmac_timeout_type_t type)
 Clear LWMAC timeout of type type. More...
 
bool gnrc_lwmac_timeout_is_running (gnrc_netif_t *netif, gnrc_lwmac_timeout_type_t type)
 Check whether LWMAC timeout of type type is running. More...
 
bool gnrc_lwmac_timeout_is_expired (gnrc_netif_t *netif, gnrc_lwmac_timeout_type_t type)
 Check whether LWMAC timeout of type type is expired. More...
 
void gnrc_lwmac_reset_timeouts (gnrc_netif_t *netif)
 Reset all LWMAC timeouts. More...
 
void gnrc_lwmac_timeout_make_expire (gnrc_lwmac_timeout_t *timeout)
 Make a specific LWMAC timeout expired. More...
 

Function Documentation

◆ gnrc_lwmac_clear_timeout()

void gnrc_lwmac_clear_timeout ( gnrc_netif_t netif,
gnrc_lwmac_timeout_type_t  type 
)

Clear LWMAC timeout of type type.

Parameters
[in,out]netifthe network interface
[in]typeLWMAC timeout type

◆ gnrc_lwmac_reset_timeouts()

void gnrc_lwmac_reset_timeouts ( gnrc_netif_t netif)

Reset all LWMAC timeouts.

Parameters
[in,out]netifthe network interface

◆ gnrc_lwmac_set_timeout()

void gnrc_lwmac_set_timeout ( gnrc_netif_t netif,
gnrc_lwmac_timeout_type_t  type,
uint32_t  offset 
)

Set LWMAC timeout of type type of offset offset.

Parameters
[in,out]netifthe network interface
[in]typeLWMAC timeout type
[in]offsettimeout offset

◆ gnrc_lwmac_timeout_is_expired()

bool gnrc_lwmac_timeout_is_expired ( gnrc_netif_t netif,
gnrc_lwmac_timeout_type_t  type 
)

Check whether LWMAC timeout of type type is expired.

It will clear the timeout once it is found expired.

Parameters
[in,out]netifthe network interface
[in]typeLWMAC timeout type
Returns
true, if timeout of type type is expired.
false, if timeout of type type is not expired, or not exist.

◆ gnrc_lwmac_timeout_is_running()

bool gnrc_lwmac_timeout_is_running ( gnrc_netif_t netif,
gnrc_lwmac_timeout_type_t  type 
)

Check whether LWMAC timeout of type type is running.

Parameters
[in]netifthe network interface
[in]typeLWMAC timeout type
Returns
true, if timeout of type type is running.
false, if timeout of type type is not running.

◆ gnrc_lwmac_timeout_make_expire()

void gnrc_lwmac_timeout_make_expire ( gnrc_lwmac_timeout_t timeout)

Make a specific LWMAC timeout expired.

Parameters
[in,out]timeoutLWMAC timeout