[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestSimTimers TestTimerC.nc, 1.2, 1.3

Phil Levis scipio at users.sourceforge.net
Wed Jul 4 08:53:58 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSimTimers
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30730/apps/tests/TestSimLargeTimer

Modified Files:
	TestTimerC.nc 
Log Message:
Simulation test cases.


Index: TestTimerC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestSimTimers/TestTimerC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TestTimerC.nc	10 Apr 2007 01:27:10 -0000	1.2
--- TestTimerC.nc	4 Jul 2007 15:53:56 -0000	1.3
***************
*** 65,72 ****
      elapsed /= (sim_ticks_per_sec() / 1024);
      if (elapsed != interval) {
!       dbg("TestTimer", "Timer %c is off. Should have fired in %u, fired in %u.\n", name, interval, (uint32_t)elapsed);
      }
      else {
!       dbg("TestTimer", "Timer %c is good.\n", name);
      }
    }
--- 65,72 ----
      elapsed /= (sim_ticks_per_sec() / 1024);
      if (elapsed != interval) {
!       dbg("TestTimer", "Timer %c is off. Should have fired in %u, fired in %u @ %s.\n", name, interval, (uint32_t)elapsed, sim_time_string());
      }
      else {
!       dbg("TestTimer", "Timer %c is good @ %s.\n", name, sim_time_string());
      }
    }
***************
*** 82,87 ****
      call A.startPeriodic(aTime);
      call B.startPeriodic(bTime);
!     call C.startOneShot(cTime);
!     call D.startOneShot(dTime);
      aStart = bStart = cStart = dStart = sim_time();
    }
--- 82,87 ----
      call A.startPeriodic(aTime);
      call B.startPeriodic(bTime);
! //    call C.startOneShot(cTime);
!  //   call D.startOneShot(dTime);
      aStart = bStart = cStart = dStart = sim_time();
    }
***************
*** 105,109 ****
      check('B', bStart, bTime);
      call B.stop();
!     bTime = 1 + (call Random.rand32() & 0x3ff);
      call B.startPeriodic(bTime);
      bStart = sim_time();
--- 105,109 ----
      check('B', bStart, bTime);
      call B.stop();
!     bTime = 1 + (call Random.rand32() & 0x3fff);
      call B.startPeriodic(bTime);
      bStart = sim_time();



More information about the Tinyos-2-commits mailing list