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 
9 #pragma once
10 
21 #include <stdint.h>
22 #include <stdbool.h>
23 
24 #include "msg.h"
25 #include "xtimer.h"
26 #include "net/gnrc/netif.h"
27 #include "types.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
42  uint32_t offset);
43 
51 
62 
74 
81 
88 {
89  assert(timeout);
90 
91  timeout->expired = true;
92 }
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
#define assert(cond)
abort the program if assertion is false
Definition: assert.h:135
Definition for GNRC's network interfaces.
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_expired(gnrc_netif_t *netif, gnrc_gomach_timeout_type_t type)
Check whether GoMacH timeout of type type is expired.
static void gnrc_gomach_timeout_make_expire(gnrc_gomach_timeout_t *timeout)
Make a specific GoMacH timeout expired.
Definition: timeout.h:87
void gnrc_gomach_reset_timeouts(gnrc_netif_t *netif)
Reset all GoMacH timeouts.
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.
GoMacH's timeout structure.
Definition: types.h:259
Representation of a network interface.
Definition: netif.h:135
gnrc_gomach_timeout_type_t
GoMacH timeout types.
Definition: types.h:174
MAC type definitions for the PSA Crypto API.
xtimer interface definitions