i am using this test in TOSSIM, it works fine for 3 nodes? but node 4 does not
seem to be receiving anything!! and any non of the other node receive anything
from node 4!! I tried changing the range in the for loops but that did not help.
I thought maybe because in the r.add() it is not being linked to anything else,
but i am not sure if that is the case, I am new to this so not very sure what is
going on...
thanks for any suggestions.
#! /usr/bin/python
from TOSSIM import *
import sys
t = Tossim([])
r = t.radio()
f = open("topo.txt", "r")
lines = f.readlines()
for line in lines:
s = line.split()
if (len(s) > 0):
print " ", s[0], " ", s[1], " ", s[2];
r.add(int(s[0]), int(s[1]), float(s[2]))
ff = open("output.txt","w")
t.addChannel("BlinkToRadioC", sys.stdout)
t.addChannel("BlinkToRadioC",ff)
noise = open("meyer-heavy.txt", "r")
lines = noise.readlines()
for line in lines:
str = line.strip()
if (str != ""):
val = int(str)
for i in range(0, 5):
t.getNode(i).addNoiseTraceReading(val)
for i in range(0, 5):
print "Creating noise model for ",i;
t.getNode(i).createNoiseModel()
t.getNode(1).bootAtTime(10001);
t.getNode(2).bootAtTime(100001);
t.getNode(3).bootAtTime(200002);
t.getNode(4).bootAtTime(800008);
for i in range(1,300):
t.runNextEvent()
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help