Dear All
I am having problem running Simple Noise model in RadioCountToLeds application.
But when I try to run Simple model via next test file Nodes dont receive
anything (RadioCountToLeds). There must be some setting problem which I cannot
grasp:
from TOSSIM import *
import sys
t = Tossim([])
r = t.radio()
Nodes=15
f = open("topo15.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]))
Log=open("log.txt","w")
t.addChannel("RadioCountToLedsC", sys.stdout)
t.addChannel("Boot", sys.stdout)
for i in range(0, Nodes):
r.setNoise(i,-100,5.0)
for i in range(0, Nodes):
t.getNode(i).bootAtTime(10000+(100000*i));
for i in range(0, 1000000):
t.runNextEvent()
However I am able to receive data when I use Loosy noise model (Mayher etc) via
this Test file:
from TOSSIM import *
import sys
t = Tossim([])
r = t.radio()
Nodes=15
f = open("topo15.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]))
Log=open("log.txt","w")
t.addChannel("RadioCountToLedsC", sys.stdout)
t.addChannel("Boot", sys.stdout)
noise = open("meyer-heavy.txt", "r")
#noise = open("NoNoise.txt", "r")
lines = noise.readlines()
for line in lines:
str = line.strip()
if (str != ""):
val = int(str)
for i in range(0, Nodes):
t.getNode(i).addNoiseTraceReading(val)
for i in range(0, Nodes):
print "Creating noise model for ",i;
t.getNode(i).createNoiseModel()
for i in range(0, Nodes):
t.getNode(i).bootAtTime(10000+(100000*i));
#t.getNode(0).bootAtTime(100001);
#t.getNode(1).bootAtTime(800008);
#t.getNode(2).bootAtTime(1600001);
#t.getNode(3).bootAtTime(2400001);
for i in range(0, 1000000):
t.runNextEvent()
Thanks in advance
This e-mail is intended solely for the addressee. It may contain private and
confidential information. If you are not the intended addressee, please take no
action based on it nor show a copy to anyone. Please reply to this e-mail to
highlight the error. You should also be aware that all electronic mail from,
to, or within Northumbria University may be the subject of a request under the
Freedom of Information Act 2000 and related legislation, and therefore may be
required to be disclosed to third parties.
This e-mail and attachments have been scanned for viruses prior to leaving
Northumbria University. Northumbria University will not be liable for any
losses as a result of any viruses being passed on.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help