On Jun 11, 2007, at 1:49 AM, Marek Jawurek wrote:
Hi,
recently I ran into problems with TOSSIM of TinyOS version 1.x
which did
not reset completely. Motes did not communicate after the reset
properly. Because of that and because of the fact that most
documentation and development are done for TinyOS 2.x I changed my
application to TinyOS 2.x and tried TOSSIM there.
Someone should change Tutorial 11 and emphasize that without calling
createNoiseModel on every Node there won't be any communication. It
was
rather frustrating for me to search through my code and compare it to
sample code until I found the solution in the Mailinglist. Intuitively
it should just work when I connect 2 nodes via Radio.add().
But here is my current problems. I want to run several simulations and
the following issues arise:
1. My simulation goes on forever, every call to runNextEvent returns 1
but my motes only react on radio communication which is initiated by
node 1 once and then just rebroadcast. Every time I rebroadcast a
message I also print dbg output. No debug output is created after a
while but runNextEvent still returns new events.
Does your application have any timers in it? As long as your
application is doing anything, TOSSIM will simulate it... Among other
things, having timers means that there's a 32kHz clock running, for
the interface LocalTime.
2. I would like to restart a simulation in Python. That means
resetting
everything unique to the last run and to start another run with
TOSSIM.
How can I do that ? Using the constructor Tossim([]) apparently a
singleton is passed because the time in the new Tossim object is the
same as before. Deleting the module TOSSIM with 'del TOSSIM' and
re-importing it doesn't work either.
Hm. The current TOSSIM implementation doesn't support doing this.
While you can turn motes on and off to reset their internal state,
other pieces of state will remain, such as the radio topology. You
could fork within Python to get separate instances...
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help