1) Verify all assumptions, since the timers fire so fast (JobTimer is
fired only 10ms after StopTimer?), could it really be working as
desired?
2) Make sure that different components (or "instances" thereof) are
being wired up. Wiring the same one to two different....
HTH,
Paul
On Thu, Jul 24, 2008 at 6:03 AM, <[EMAIL PROTECTED]> wrote:
> Hi *
>
> I have a little problem with Timers. In my application I use two timers
> "JobTimer" and "StopTimer". I send from base station a start signal and
> start the JobTimer with some intervall( let say 1000 ). After that I
> start StopTimer.startOneShot(10000). So that looks like :
>
> // ... get start signal form BS
> atomic ssBit = TRUE; // StartStopBit
> call SensingControl.startSensing(1000,0); // <- starts sensing ... no
> matter
> startTS = call JobTimer.getNow(); // start timestamp
> call JobTimer.startPeriodic(1000); // start periodic every second
> call StopTimer.startOneShot(10000); // stop after 10 s
> // ..................................................
>
> // now fire events:
> event void JobTimer.fired() {
> if (!radioBusy && ssBit) { // if radio is free and
> ssBit true
> post sendMeasurement(); // send measurement to BS
> }else{ // else (read if
> ssBit =
> false
> sendResult(); // send result (other
> measurement) to
> BS
> }
> }
>
> event void StopTimer.fired(){
> atomic ssBit = FALSE; //set ssBit false
> call SensingControl.stopSensing(); // stop sensing
> call JobTimer.stop(); // stop JobTimer
> call JobTimer.startOneShot(10); // start JobTimer once !!!
> }
>
> The problem is when i call JobTimer.startOneShot(10) it start
> JobTimer.startPeriodic(10)!!! I don't understand this behaviour ?!? Is
> there some study about it? Has somebody observed similary behaviour of
> Timers?
>
> cheers
> Jordan
>
> ----------------------------------------------------
> Tysiące pomysłów na urządzanie domu, mieszkania,
> ogrodu w jednym miejscu!
> Zobacz jak mógłbyś zamieszkać.
> Kliknij: http://klik.wp.pl/?adr=www.dom.wp.pl&sid=419
>
>
> _______________________________________________
> 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