net/gnrc/gomach/timeout.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 INRIA
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 
19 #ifndef NET_GNRC_GOMACH_TIMEOUT_H
20 #define NET_GNRC_GOMACH_TIMEOUT_H
21 
22 #include <stdint.h>
23 #include <stdbool.h>
24 
25 #include "msg.h"
26 #include "xtimer.h"
27 #include "net/gnrc/netif.h"
28 #include "types.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
43  uint32_t offset);
44 
52 
63 
75 
82 
89 {
90  assert(timeout);
91 
92  timeout->expired = true;
93 }
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
99 #endif /* NET_GNRC_GOMACH_TIMEOUT_H */
100 
bool gnrc_gomach_timeout_is_expired(gnrc_netif_t *netif, gnrc_gomach_timeout_type_t type)
Check whether GoMacH timeout of type type is expired.
bool expired
Timeout expiration indicator.
Definition: gomach/types.h:274
void gnrc_gomach_set_timeout(gnrc_netif_t *netif, gnrc_gomach_timeout_type_t type, uint32_t offset)
Set GoMacH timeout of type type of offset offset.
void gnrc_gomach_clear_timeout(gnrc_netif_t *netif, gnrc_gomach_timeout_type_t type)
Clear GoMacH timeout of type type.
bool gnrc_gomach_timeout_is_running(gnrc_netif_t *netif, gnrc_gomach_timeout_type_t type)
Check whether GoMacH timeout of type type is running.
void gnrc_gomach_reset_timeouts(gnrc_netif_t *netif)
Reset all GoMacH timeouts.
gnrc_gomach_timeout_type_t
GoMacH timeout types.
Definition: gomach/types.h:186
#define assert(cond)
abort the program if assertion is false
Definition: assert.h:104
Definition for GNRC&#39;s network interfaces.
Messaging API for inter process communication.
Internal used types of GoMacH.
static void gnrc_gomach_timeout_make_expire(gnrc_gomach_timeout_t *timeout)
Make a specific GoMacH timeout expired.
xtimer interface definitions
Representation of a network interface.
Definition: netif.h:61
GoMacH&#39;s timeout structure.
Definition: gomach/types.h:271