Hi,

I am trying to understand the behaviour of CTP's beacon sending. I know that it 
is adaptable according to several factors as mentioned in the CTP paper. 
However, when I trace the implementation, I get lost. I know that CTP has no 
specific intervals to send the beacons. From the code, I see that it depends on 
the previous sending time and it calculates a new sending time. But what is the 
pattern or distribution used to generate these sending times. I'd appreciate it 
if someone can explain to me the purpose of each of the following functions: 
remainingInterval()
decayInterval()
resetInterval()
chooseAdvertiseTime()

Also, in chooseAdvertiseTime() the following code exists
beaconTimer.stop()
beaconTimer.startOneshot( t )

What is the purpose of stop() and startOneshot() already stops any running 
timer and start a new one.

Also, in StdControl.start() in the CtpRoutingEngineP.nc it call 
beaconTimer.startOneshot(  ) through the call of resetInterval() and then in 
StdControl.startDone() beaconTimer.startOneshot(BEACON_INTERVAL) is called 
again. Doesn't the 2nd call cancel the timer set in the first call?

Regards
Islam

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to