X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=apps%2Ftests%2FTestNetwork%2Ftest.py;h=616a8630c21c789ab986d2abd387ee2b1647a606;hb=0a72b0e28202661d06e82366bc454236929189cd;hp=cabe01baf625a93eb37d944f0a66601d135a50cc;hpb=5cd913bbae1fabab10405928a1c37ff70c193860;p=tinyos-2.x.git diff --git a/apps/tests/TestNetwork/test.py b/apps/tests/TestNetwork/test.py index cabe01ba..616a8630 100644 --- a/apps/tests/TestNetwork/test.py +++ b/apps/tests/TestNetwork/test.py @@ -15,11 +15,22 @@ for line in lines: if (len(s) > 0): 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])) + +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) print "Booting ", i, " at time ", time