I'm doing a little event queue simulation with trickle.c that was calling trickle_tx_timeout() at every step with t_now incrementing by 1 each step. If t_now starts at zero it transmits a modest number of packets, but if t_now starts at e.g. 4096, trickle_tx_timout() returns 'transmit now' very often.
The fix is to wait until min(trickle.t) before calling trickle_tx_timeout() as in order_next_transmission()
Should trickle_tx_timeout() work when called (many times) before trickle->t?
Hi,
You're correct, the trickle_tx_timeout() function is meant to be called when the timeout occurs, as it doesn't check the time itself before making the decision.
I'm doing a little event queue simulation with trickle.c that was calling trickle_tx_timeout() at every step with t_now incrementing by 1 each step. If t_now starts at zero it transmits a modest number of packets, but if t_now starts at e.g. 4096, trickle_tx_timout() returns 'transmit now' very often.
The fix is to wait until min(trickle.t) before calling trickle_tx_timeout() as in order_next_transmission()
Should trickle_tx_timeout() work when called (many times) before trickle->t?
Thanks.