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 <[email protected]> wrote:

> 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 and set to fire in dt time units from the time of invocation.
> The timer will only fire once then stop.
> But it is TinyOS2.x. I am using TinyOS1.x. Don't these rules apply to the
> timer structure in TinyOS1.x? You said it will be overlapping timers. In
> that case, I suppose running another timer doesn't cancel any previous
> running timers. Right?
>
> And also It says previous running timers, If the program is executing the
> code inside the timer.fired, Will that interrupt the code execution and jump
> out of timer function? Thanks.
>
> Regards,
> Peter
>
> On Sat, Apr 18, 2009 at 2:13 AM, Michael Schippling <[email protected]>wrote:
>
>> 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 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,10000);
>>> }
>>> *******************
>>> so the timer1 is triggered every 2000 time units. However, in the timer1
>>> strucuture, I have timer2 which will be triggered at 10000 time units. What
>>> is the order to proceed the above code. like the following?
>>>  trigger timer1 at 2000
>>> trigger timer1 at 4000
>>> trigger timer1 at 6000
>>> trigger timer1 at 8000
>>> trigger timer1 at 10000
>>> trigger timer2 at 10000?
>>>  Any help would be appreciated!
>>>  Regards,
>>> Peter
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Tinyos-help mailing list
>>> [email protected]
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to