Skip to content

core: Trickle timer implementation

Tommaso Pecorella requested to merge tommypec/ns-3-dev:trickle-timer into master

This piece of code implements RFC 6206: The Trickle Algorithm

Practically it's a flexible self-repeating timer, where the "event" is fired periodically - but the period is variable according to external inputs.

In other words, you can tell the timer that it did receive a consistent event (and then it might suppress the next event call), or an inconsistent (and then the timer increase its frequency).

You can also reset the timer (it increase its frequency), or change the parameters mentioned in the standard.

For your information, it is used in RPL and similar protocols to avoid synchronization issues between nodes. So... it's naturally desynchronized.

As an example, in a timer that has a (average) frequency of 16 seconds, after an initial transient the events are fired with a period between 8 and 24 seconds, like in the figure.

Picture_1

Edited by Tommaso Pecorella

Merge request reports