Re: [Tinyos-help] understanding of Timers in TinyOS

2009-04-19 Thread Michael Schippling
I don't know how much of the TEP applies to T1. But I see what you are getting at and I may be incorrect in thinking that your Timer2 one-shot will keep firing. It may be that each start cancels the previous one. If that's the case and if Timer1 keeps firing, then Timer2 will never get a chance to

Re: [Tinyos-help] understanding of Timers in TinyOS

2009-04-18 Thread Eric Decker
The best way to answer this kind of question is to look at the source code. You can find out exactly what files are being used to build your object by using the verbose keywork to the make and then take a look at what the code is doing. eric On Fri, Apr 17, 2009 at 6:30 PM, BAI LI wrote: > Hi

Re: [Tinyos-help] understanding of Timers in TinyOS

2009-04-17 Thread BAI LI
Hi Michael, Thanks for your reply. I noticed in TEP102. It says: startPeriodic(dt)cancel any previously running timer and set to fire in dt time units from the time of invocation. The timer will fire periodically every dt time units until stopped.startOneShot(dt)cancel any previously running timer

Re: [Tinyos-help] understanding of Timers in TinyOS

2009-04-17 Thread Michael Schippling
I believe the first timer2 fire will be at 12000, since it gets started on the first 2000 REPEAT fire. However at that point timer1 will also fire and you will start getting overlapping events as both timers will effectively be on 2000 REPEAT cycles. MS BAI LI wrote: > Hi, > > I am confused abo

[Tinyos-help] understanding of Timers in TinyOS

2009-04-16 Thread BAI LI
Hi, I am confused about the timer strucuture. someone could clarify it for me? Thanks. In the following code, call Timer1.start(TIMER_REPEAT,2000); event result_t Timer.fired(){ call Timer2.start(TIMER_ONE_SHOT,1); } *** so the timer1 is triggered every