Hello!
I wanted to simulate TOSSIM for mviz app. I made test.py with the following
code and placed it in mviz. Compiled it and ran it after compiling mviz app
using "make iris sim".
-----------------------------------------
test.py
-----------------------------------------
#! /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]))
t.addChannel("MVizC", sys.stdout)
t.addChannel("Boot", sys.stdout)
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(1, 4):
t.getNode(i).addNoiseTraceReading(val)
for i in range(1, 4):
print "Creating noise model for ",i;
t.getNode(i).createNoiseModel()
t.getNode(1).bootAtTime(100001);
t.getNode(2).bootAtTime(800008);
t.getNode(3).bootAtTime(1800009);
------------------------------------------------------------
Now,
I typed "tos-mviz -comm tossim-serial MVizMsg",
as a result mviz window opened but no details about RSS broadcast or the
mote diagrams on the empty space to the right are present.
please guide me what I am missing.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help