Hi Liu,

Your timer one shot of 1000 ms won't fire if your code fails during run-time in 
the packet send code. 
Just check if your successfully sending a packet or not by having a look at the 
packet send and send done code.

Hope this helps!

Kartik.

--- On Fri, 6/18/10, Xiaohui Liu <[email protected]> wrote:

From: Xiaohui Liu <[email protected]>
Subject: Re: [Tinyos-help] Timer not fire in TOSSIM
To: "Kartik Siddhabathula" <[email protected]>
Cc: "Tinyos-Help" <[email protected]>
Date: Friday, June 18, 2010, 9:38 AM

Hi,
event void Boot.booted() {    call Timer.startOneShot(2000);}
event void Timer.fired() {    send a packet here    call 
Timer.startOneShot(1000);
}

On Fri, Jun 18, 2010 at 12:35 AM, Kartik Siddhabathula 
<[email protected]> wrote:

Hi Liu,

It will be better if you give some code snippet.

Thanks,
Kartik

--- On Thu, 6/17/10, Xiaohui Liu <[email protected]> wrote:


From: Xiaohui Liu <[email protected]>
Subject: [Tinyos-help] Timer not fire in TOSSIM

To: "Tinyos-Help" <[email protected]>
Date: Thursday, June 17, 2010, 11:02 PM

Hi,

I set a timer by calling Timer.startOneShot(1000), but it seems the timer never 
fires. The simulation does normally terminate in finite time, so there is no 
infinite loop. Can anyone give me some hint on what might be causing the 
problem? Thanks.



-- 
-Xiaohui Liu



-----Inline Attachment Follows-----

_______________________________________________
Tinyos-help mailing list
[email protected]

https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



      


-- 
-Xiaohui Liu





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

Reply via email to