2007/6/16, Tal Rusak <[EMAIL PROTECTED]>:
I have read the TOSSIM tutorial at
http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson11.html
As I followed the tutorial, I encountered the following issues when
using TinyOS 2.0.1:
1) For some reason, the result of the command dir(t) appears to be
quoted incorrectly at the end of the "Running TOSSIM with Python" section.
When I run this command, I get a command ticksPerSecond in addition to the
ones listed in the tutorial.
2) The "setThreshold" command, cited at the start of the tutorial
section "Configuring a Network", does not appear to exist in this release.
Also, it is not listed in the dir(r) response cited above or in the one
that I run myself. How, then do I complete the following step of the
tutorial?
"If you set node's clear channel assessment to be at -110dBm, then nodes
will never transmit, as noise and interference never drop this low."
3) The tutorial cites the first ten lines of the meyer-heavy.txt noise
trace. However, these are not the first ten lines of the actual file in
the distribution that I downloaded (from the Toilers). The first ten lines
of the file I have are:
-39
-98
-98
-98
-99
-98
-94
-98
-98
-98
This appears to be the same as the current CVS version of the file.
If this seems incorrect, where can I find the full, correct
meyer-heavy.txt noise trace?
4) The tutorial refers to the file packets.py. This file contains the
following line of code:
print "Delivering " + msg.__str__() + " to 0 at " + str(t.time() + 3);
This line does not run correctly for me. This is the error message:
Traceback (most recent call last):
File "packets.py", line 46, in ?
print "Delivering ", msg, " to 0 at ", str(t.time() + 3);
TypeError: 'str' object is not callable
However, when I change it as follows, then the code does run:
print "Delivering " + msg.__str__() + " to 0 at " + (t.time() + 3);
Line 46 of the latest CVS version
(/tinyos-2.x/tos/lib/tossim/examples/packets.py) still seems to have
this problem.
I don't know why it is complaining, but I read that when you call print, it
automatically calls str() on objects which are not strings. It seems to me
that since msg.__str__() is defined, calling "print msg;" would go fine.
I really don't know python well, but wouldn't the interpreter complain if
you used
"print "Delivering " + msg.__str__() + " to 0 at " + (t.time() + 3);" ?
I don't know the return type of Tossim.time but since you are adding it to
3, you shouldn't be able to concatenate strings and numbers.
But
print "Delivering ", msg.__str__(), " to 0 at ", (t.time() + 3);
might work.
I need confirmation on all this I said =(
5) The "Configuring a Network" section of the tutorial has the following
statement near the end:
"TOSSIM has two sample configuration files generated from the tool in
tos/lib/tossim/topologies. The first is grid.txt . . . The second file is
scatter.txt"
However, I cannot find these files in the cited directory.
If anyone knows about any form of additional documentation for TOSSIM
beyond this tutorial, such as source code documentation, I would be
very interested in reading it.
I appreciate your help in advance.
Thanks,
Tal
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
--
"The truth shall set you free"
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help