[Tinyos-help] a problem about Tossim

Romain Thouvenin romain.thouvenin at gmail.com
Tue May 1 01:44:04 PDT 2007


If you use TinyOS 2.0.1, you need to update your script to be
compliant with the new radio model of tossim. It is described in the
tutorial.

Also, you didn't set the noise of your 4th node.

Hope it helps,

Romain

On 5/1/07, eamin_winfor at 126.com <eamin_winfor at 126.com> wrote:
> hi,
>
> i have meet a problem about Tossim,
> when  finished the " make micaz sim " and get a "_tossim.dll"  file, i use
> the tossim to simulate the blink,
> and i do as the Toturial Lesson 11,
> the test.py is:
>
> 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("AMControlStart", sys.stdout)
> t.addChannel("Boot", sys.stdout)
> t.addChannel("AMControlStartFalse", sys.stdout)
> t.addChannel("Timer0Fired", sys.stdout)
> t.addChannel("Send", sys.stdout)
> t.addChannel("SendDone", sys.stdout)
> t.addChannel("RecevieLen", sys.stdout)
> t.addChannel("ReceiveCounter", sys.stdout)
> t.addChannel("ReceiveNodeID", sys.stdout)
>
> t.getNode(1).bootAtTime(100001);
> t.getNode(2).bootAtTime(800008);
> t.getNode(3).bootAtTime(1800009);
> t.getNode(4).bootAtTime(84210);
>
> r.setNoise(1, -100.0, 5.0)
> r.setNoise(2, -100.0, 5.0)
> r.setNoise(3, -100.0, 5.0)
> for i in range(0, 1000):
>   t.runNextEvent()
>
> and the result is :
>
> 1   2   -54.0
> 2   1   -55.0
> 1   4   -60.0
> 4   1   -60.0
> 2   3   -64.0
> 3   2   -64.0
>
> DEBUG (4): AMControl Start!
> DEBUG (4): Application Booted!
> DEBUG (1): AMControl Start!
> DEBUG (1): Application Booted!
> DEBUG (2): AMControl Start!
> DEBUG (2): Application Booted!
> DEBUG (3): AMControl Start!
> EBUG (3): Application Booted!
>
> It seems that the event Timer.fired( ) doesn't work.
> I' m lost ,anyhelp is appriciate!
>
> Eamin
>
>
>
>
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>


More information about the Tinyos-help mailing list