[Tinyos-help] Question about how build the topology in tinyos2.1 and how to set the coordination of mote

Nick tinyos2010 tinyos2010 at gmail.com
Tue Apr 13 19:26:11 PDT 2010


Hi
   friends! Now ,i meet a question how bulid topology in the TOSSIM of
tinyos2.1.
(Building a Network Topology for TOSSIM)
http://www.tinyos.net/dist-2.0.0/tinyos-2.x/doc/html/tutorial/usc-topologies.html
I use the command java LinkLayerModel configurationFileName.
i output linkgain.out and topology.out.
My questions are  follows

1. In the  linkgain.out  it have some lines like this
gain 1 2 -58.3
.
.
.
 in my opinion ,this  tell us the mote 1 link to the mote 2 and gain of the
link is -58.3
so,i can use the linkgain.out in the snippet of Python code .
f = open("linkgain.out", "r")
lines = f.readlines()
for line in lines:
  s = line.split()
  if (len(s) > 0):
    if (s[0] == "gain"):
       r.add(int(s[1]), int(s[2]), float(s[3]))
2 in the topology.out ,it have some lines like this
  1  15.43 7.39
   .
   .
   .
  the line tell us the id of mote and coordination of x and y.
so,i can use the topoloy.out in the snippet of Python code .
f = open("topology.out", "r")
lines = f.readlines()
for line in lines:
  s = line.split()
  if (len(s) > 0):
    m = t.getNode(s[0])
Here I create nodes with the IDs in the file, *but where should I set
the dimension x/y? Which method should I use for this?*
In tinyos ,i input the command  "from TOSSIM import *" and "dir(t)" i can't
find the
 function to add the coordination for motes. *would you tell me how to do
and give me some example for it.*


3 in the
http://www.tinyos.net/dist-2.0.0/tinyos-2.x/doc/html/tutorial/usc-topologies.html
it say that  the format of linkgain.out is   "gain"   src   dest
linkgain|   "noise"
nid   nf   awgn)
*but i can't find  "noise"   nid   nf   awgn,what is wrong? and if it have
the  "noise"   nid   nf   awgn, i shall do this as follow.*
*first:*
f = open("linkgain.out", "r")
lines = f.readlines()
for line in lines:
  s = line.split()
  if (len(s) > 0):
    if (s[0] == "noise"):
      t.getNode(int(s[1])).addNoiseTraceReading(int(s[2])l)
      t.getNode(int(s[1])).addNoiseTraceReading(int(s[3])l)
for i in range(0, 16):
    t.getNode(i).createNoiseModel()
but in some example in the* apps,the noise is used by meyer-hevay.txt.  In
the document ,every line have only one number*
*so the first method is not right ,isn't it?*
**
*4 would you tell me how to do build the topology ,in detail,and give me
some example !*
*Thanks  I am waiting for your email online.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20100414/5060604e/attachment.htm 


More information about the Tinyos-help mailing list