Hi,
I have a component (C) that repeatedly starts a timer in ONE_SHOT mode
and each timer the timer fires, a message is sent and the timer is
restarted in ONE_SHOT mode. Finally, the main component (A) calls
C.stop ( ), which in turn stops the timer. I am using TOSSIM for
testing and the problem that I am having is that sometimes the
timer.stop ( ) command in component C fails ( the result value is a
failure). So the message continues to be sent. My debugging did not
yield any clues as to why I am unable to stop the timer sometimes. I
would like to know what are the reasons why the timer.stop( ) would
return a failure, when the timer has been started in ONE_SHOT mode.
The pseudocode is as follows:
component C:
C.start( )
{
Timer1.start (TIMER_ONE_SHOT, t1);
}
Timer1.fired( )
{
Timer1.start(TIMER_ONE_SHOT, t1);
send message;
}
C.stop()
{
Timer1.stop ( );
}
Component A:
call C.start( ):
do something;
call C.stop ( );
I would appreciate any pointers in this regard.
thanks
sudha
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help