13#ifndef ZEPHYR_INCLUDE_NET_TRICKLE_H_
14#define ZEPHYR_INCLUDE_NET_TRICKLE_H_
73#define NET_TRICKLE_INFINITE_REDUNDANCY 0
141 return trickle->
I != 0U;
int net_trickle_start(struct net_trickle *trickle, net_trickle_cb_t cb, void *user_data)
Start a Trickle timer.
int net_trickle_stop(struct net_trickle *trickle)
Stop a Trickle timer.
static bool net_trickle_is_running(struct net_trickle *trickle)
Check if the Trickle timer is running or not.
Definition trickle.h:137
int net_trickle_create(struct net_trickle *trickle, uint32_t Imin, uint8_t Imax, uint8_t k)
Create a Trickle timer.
void net_trickle_consistency(struct net_trickle *trickle)
To be called by the protocol handler when it hears a consistent network transmission.
void net_trickle_inconsistency(struct net_trickle *trickle)
To be called by the protocol handler when it hears an inconsistent network transmission.
void(* net_trickle_cb_t)(struct net_trickle *trickle, bool do_suppress, void *user_data)
Trickle timer callback.
Definition trickle.h:47
Network core definitions.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
A structure used to submit work after a delay.
Definition kernel.h:3985
The variable names are taken directly from RFC 6206 when applicable.
Definition trickle.h:55
uint8_t Imax
Max number of doublings.
Definition trickle.h:60
bool double_to
Flag telling if the internval is doubled.
Definition trickle.h:65
struct k_work_delayable timer
Internal timer struct.
Definition trickle.h:67
void * user_data
User specific opaque data.
Definition trickle.h:69
uint32_t I
Current interval size.
Definition trickle.h:56
net_trickle_cb_t cb
Callback to be called when timer expires.
Definition trickle.h:68
uint8_t k
Redundancy constant.
Definition trickle.h:62
uint8_t c
Consistency counter.
Definition trickle.h:63
uint32_t Istart
Start of the interval in ms.
Definition trickle.h:58
uint32_t Imin
Min interval size in ms.
Definition trickle.h:57
uint32_t Imax_abs
Max interval size in ms (not doublings)
Definition trickle.h:59