Implementation of a generic Trickle Algorithm (RFC 6206)
More...
Implementation of a generic Trickle Algorithm (RFC 6206)
- See also
- https://tools.ietf.org/html/rfc6206
|
file | trickle.h |
| Trickle timer interface definition.
|
|
◆ trickle_callback()
is called after the interval is over and executes callback function
- Parameters
-
◆ trickle_increment_counter()
void trickle_increment_counter |
( |
trickle_t * |
trickle | ) |
|
increments the counter by one
- Parameters
-
◆ trickle_interval()
is called after the interval is over and calculates the next interval
- Precondition
(trickle->I > 0)
required for trickle algorithm to work
- Parameters
-
◆ trickle_reset_timer()
void trickle_reset_timer |
( |
trickle_t * |
trickle | ) |
|
◆ trickle_start()
void trickle_start |
( |
kernel_pid_t |
pid, |
|
|
trickle_t * |
trickle, |
|
|
uint16_t |
msg_type, |
|
|
uint32_t |
Imin, |
|
|
uint8_t |
Imax, |
|
|
uint8_t |
k |
|
) |
| |
start the trickle timer
- Precondition
Imin > 0
-
(Imin << Imax) < (UINT32_MAX / 2)
to avoid overflow of uint32_t
- Parameters
-
[in] | pid | target thread |
[in] | trickle | trickle timer |
[in] | msg_type | msg_t.type for messages |
[in] | Imin | minimum interval in ms |
[in] | Imax | maximum interval in ms |
[in] | k | redundancy constant |
◆ trickle_stop()
stops the trickle timer
- Parameters
-