[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/storage/Config README.txt, 1.1.2.1, 1.1.2.2 RandRWC.nc, 1.1.2.4, 1.1.2.5

David Gay idgay at users.sourceforge.net
Fri Jun 16 15:53:12 PDT 2006


Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/storage/Config
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22588/Config

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	README.txt RandRWC.nc 
Log Message:
switch to TKK id's, where KK is the seed and T the action. T=0 is 
"run full test" for all 4 tests.


Index: README.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/storage/Config/Attic/README.txt,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** README.txt	25 May 2006 22:21:46 -0000	1.1.2.1
--- README.txt	16 Jun 2006 22:53:10 -0000	1.1.2.2
***************
*** 1,3 ****
! README for Log
  Author/Contact: tinyos-help at millennium.berkeley.edu
  
--- 1,3 ----
! README for Config
  Author/Contact: tinyos-help at millennium.berkeley.edu
  
***************
*** 5,15 ****
  
  Application to test the ConfigStorageC abstraction. There must be a
! volumes-<chip>.xml file in this directory describing the test volume
! for your flash chip.
  
! The mote id controls a random seed used in the test (k), and the actual
! test performed
! k * 2: do a bunch of writes, reads and commits
! k * 2 + 1: check if the result of a previous run with id = k * 2 is correct
  
  A successful test will turn on the green led. A failed test will turn on
--- 5,17 ----
  
  Application to test the ConfigStorageC abstraction. There must be a
! volumes-<chip>.xml file in this directory describing the a volume
! named CONFIGTEST capable of storing 2kB of config data.
  
! The mote id is of the form T*100 + k, where k is a random seed and
! T specifies the test to be performed:
! 
! T = 0: do a bunch of writes, reads and commits
! T != 0: check if the contents of the volume are consistent with 
!         a previous run with T = 0 and the same random seed
  
  A successful test will turn on the green led. A failed test will turn on

Index: RandRWC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/storage/Config/Attic/RandRWC.nc,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** RandRWC.nc	7 Jun 2006 23:08:24 -0000	1.1.2.4
--- RandRWC.nc	16 Jun 2006 22:53:10 -0000	1.1.2.5
***************
*** 65,71 ****
  
    void resetSeed(int offset) {
!     shiftReg = 119 * 119 * ((TOS_NODE_ID >> 1) + 1 + offset);
      initSeed = shiftReg;
!     mask = 137 * 29 * ((TOS_NODE_ID >> 1) + 1 + offset);
    }
    
--- 65,71 ----
  
    void resetSeed(int offset) {
!     shiftReg = 119 * 119 * ((TOS_NODE_ID % 100) + 1 + offset);
      initSeed = shiftReg;
!     mask = 137 * 29 * ((TOS_NODE_ID % 100) + 1 + offset);
    }
    
***************
*** 241,248 ****
  
    void done() {
      call Leds.led2Toggle();
  
!     if (TOS_NODE_ID & 1)
        {
  	if (testCount)
  	  success();
--- 241,258 ----
  
    void done() {
+     uint8_t act = TOS_NODE_ID / 100;
+ 
      call Leds.led2Toggle();
  
!     switch (act)
        {
+       case 0:
+ 	if (testCount < sizeof actions)
+ 	  doAction(actions[testCount]);
+ 	else
+ 	  success();
+ 	break;
+ 
+       default:
  	if (testCount)
  	  success();
***************
*** 266,274 ****
  	    doAction(A_READ);
  	  }
        }
-     else if (testCount < sizeof actions)
-       doAction(actions[testCount]);
-     else
-       success();
      testCount++;
    }
--- 276,281 ----
  	    doAction(A_READ);
  	  }
+ 	break;
        }
      testCount++;
    }



More information about the Tinyos-2-commits mailing list