[Tinyos-2-commits] CVS: tinyos-2.x/apps/tests/TestNetwork meyer-short.txt, NONE, 1.1 test.py, 1.2, 1.3
Phil Levis
scipio at users.sourceforge.net
Tue Aug 5 11:40:46 PDT 2008
Update of /cvsroot/tinyos/tinyos-2.x/apps/tests/TestNetwork
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19568
Modified Files:
test.py
Added Files:
meyer-short.txt
Log Message:
Added noise model.
--- NEW FILE: meyer-short.txt ---
-41
-41
-41
-41
-41
-41
-41
-91
-41
-41
-41
-41
-41
-48
-41
-41
-41
-83
-98
[...961 lines suppressed...]
-80
-80
-80
-80
-80
-96
-98
-98
-99
-71
-98
-98
-99
-98
-98
-98
-98
-98
Index: test.py
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/apps/tests/TestNetwork/test.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test.py 12 Jul 2006 16:59:24 -0000 1.2
--- test.py 5 Aug 2008 18:40:43 -0000 1.3
***************
*** 16,24 ****
if s[0] == "gain":
r.add(int(s[1]), int(s[2]), float(s[3]))
! elif s[0] == "noise":
! r.setNoise(int(s[1]), float(s[2]), float(s[3]))
for i in range(0, 10):
m = t.getNode(i);
time = randint(t.ticksPerSecond(), 10 * t.ticksPerSecond())
m.bootAtTime(time)
--- 16,35 ----
if s[0] == "gain":
r.add(int(s[1]), int(s[2]), float(s[3]))
!
! noise = open("meyer-short.txt", "r")
! lines = noise.readlines()
! for line in lines:
! str = line.strip()
! if (str != ""):
! val = int(str)
! for i in range(0, 10):
! m = t.getNode(i);
! m.addNoiseTraceReading(val)
!
!
for i in range(0, 10):
m = t.getNode(i);
+ m.createNoiseModel();
time = randint(t.ticksPerSecond(), 10 * t.ticksPerSecond())
m.bootAtTime(time)
More information about the Tinyos-2-commits
mailing list