Now with this program no syntax errors, but i'm not able to print on an output 
file my dbg messages (written in my nesc program). And i don't know if it is 
the right way to create the chain i mentioned before.
 
 
 
import simcore
import simutil
import simtime
import math
from simcore import *
from java.util import *
from net.tinyos.message import *
from net.tinyos.packet import *
radio.setLossRate(0,1,0)
radio.setLossRate(0,2,1)
radio.setLossRate(0,3,1)
radio.setLossRate(1,0,0)
radio.setLossRate(1,2,0)
radio.setLossRate(1,3,1)
radio.setLossRate(2,0,1)
radio.setLossRate(2,1,0)
radio.setLossRate(2,3,0)
radio.setLossRate(3,0,1)
radio.setLossRate(3,1,1)
radio.setLossRate(3,2,0)

sim.exec("./build/pc/main.exe", 4, "-b=0 -rf=lossy -t=10")
sim.exit()

        -----Original Message----- 
        From: Munaretto, Daniel 
        Sent: Wed 6/7/2006 4:01 PM 
        To: tinyos-help@Millennium.Berkeley.EDU 
        Cc: 
        Subject: typhon+tossim
        
        
        Hi all,
         i'm really new with typhon scripts and i saw the /tython/manual.html 
but i don't know how to do this simple file with 4 nodes.
         
        If i want only to modify the loss rate among nodes, although to have a 
sort of chain of nodes (0 sees only 1, 1 sees only 0 and 2, and so on), i tried 
to run this "test.py"
         
        java net.tinyos.sim.SimDriver -script "test.py"
         
        where test.py is:
         
        .......
         
        from simcore import *
        from java.util import *
        from net.tinyos.message import *
        from net.tinyos.packet import *
        radio.setLossRate(0,1,0)
        radio.setLossRate(0,2,1)
        radio.setLossRate(0,3,1)
        radio.setLossRate(1,0,0)
        radio.setLossRate(1,2,0)
        radio.setLossRate(1,3,1)
        radio.setLossRate(2,0,1)
        radio.setLossRate(2,1,0)
        radio.setLossRate(2,3,0)
        radio.setLossRate(3,0,1)
        radio.setLossRate(3,1,1)
        radio.setLossRate(3,2,0)

        sim.exec("./build/pc/main.exe", 4, "-b=0 -gui -rf=lossy -t=10 ")
         
        ......
         
        But it is shown syntax error.
        
        Anyone could suggest me how to build up this simple example?
        Cheers
        Daniele


_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to