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 
gnrc_gomach_timeout_is_running
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.
assert
#define assert(cond)
abort the program if assertion is false
Definition: assert.h:104
types.h
Internal used types of GoMacH.
gnrc_gomach_timeout_is_expired
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.
msg.h
Messaging API for inter process communication.
gnrc_netif_t
Representation of a network interface.
Definition: netif.h:115
gnrc_gomach_clear_timeout
void gnrc_gomach_clear_timeout(gnrc_netif_t *netif, gnrc_gomach_timeout_type_t type)
Clear GoMacH timeout of type type.
gnrc_gomach_timeout_type_t
gnrc_gomach_timeout_type_t
GoMacH timeout types.
Definition: types.h:176
gnrc_gomach_reset_timeouts
void gnrc_gomach_reset_timeouts(gnrc_netif_t *netif)
Reset all GoMacH timeouts.
gnrc_gomach_timeout_t
GoMacH's timeout structure.
Definition: types.h:261
gnrc_gomach_timeout_make_expire
static void gnrc_gomach_timeout_make_expire(gnrc_gomach_timeout_t *timeout)
Make a specific GoMacH timeout expired.
Definition: timeout.h:88
netif.h
Definition for GNRC's network interfaces.
gnrc_gomach_set_timeout
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.
xtimer.h
xtimer interface definitions