On Feb 1, 2007, at 11:45 PM, Muhammad Azhar wrote:
Hi all,
I have some questions with regards to the MViz program (tinyos-2.x/
apps/MViz). I noticed that it is quite similar to the
MultihopOscilloscope (I shall phrase it as MO as of now) program,
but there are some things that I do not quite understand (maybe I
got some concepts wrong).
A lot of these are because the code for MViz was never polished. I
also wasn't able to finish the tutorial by the release date. My hope
is to clean some of this up for the next release. If you're
interested in doing so, I'd be happy to review/check-in changes.
1) In MO (module), specifically Boot.booted(), local.version was
initialised to 0. However, there was no initialisation for
local.version in MViz. Does TinyOS automatically initialise it to
0? Also, will the version ever change, since I don't see it being
"changed" anywhere else (except Snoop.receive() - but since it was
never manipulated in the first place, will there be a change in
version?)
1) It's not used. This is a bit of leftover from
MultihopOscilloscope. The eventual goal in MViz is to have the
visualization commands from the GUI change what sensors are sampled.
But there's nobody working on it right now.
2) Also, in startTimer(), MO has a line:
if (call Timer.isRunning()) call Timer.stop();
This was not seen in MViz. Will it cause any overflow?
This is a leftover guard condition from a bug in the Timer system
which was fixed. It should (
3) What exactly does Snoop.receive() do? I am quite certain the
situation is one where the motes are of the same collection_id_t,
but how is it possible for the mote to "overhear" other traffic in
the network? Is it because the motes have "parents", and, they
would have to "report" to their parent, but instead, they
"overheard" some packets from another mote of the same
collection_id_t, or, if they are parents themselves, they actually
"overheard" some packets from other motes of the same collection_id_t?
Snoop is there if the collection layer lets you overhear collection
packets destined to other next hops. Some aggregation systems
(synopsis diffusion, TAG) benefit from being able to do this. CTP
doesn't support it, but other (future) collection layers might.
4) In MViz, I don't really see the need for the "reading"
variable, which is set to 0 only in Timer.fired(), and is never
used in any other "methods". Hence, is it possible for the program
to work without this variable?
Try it and find out! :) My guess is yes.
More Questions:
5) Is it possible for me to get 2 sensor readings (one for light
intensity, one for temperature) at one time? From the code, the
Read interface is connected to the sensor. Hence, if I were to
define 2 read interface - assume one is ReadLight and another is
ReadTemp, is it possible to get two sensor readings (assuming I do
not want to use the variables link_route_value, as well as
link_route_addr - in the first place, is it a must to use the
interfaces CtpInfo and LinkEstimator, where both are wired to CtpP,
in implementing a multi-hop network)? If this cannot be done, how
is it possible for me to "multiplex" the data (i.e. after reading
light intensity, my next reading for data should be temperature)?
Sure, you can do it. You can also probably just add a field to the
packet.
6) Is there any method that I can use so that I can get the time
the reading was made?
The LocalTime interface, but this will be in terms of a node's local
clock.
7) I would like to save the values of the data of all the motes at
certain fixed time intervals, instead of just displaying them using
tos-mviz. If this is not possible, is it possible for me to modify
the automatically generated java file?
You to this, you want to modify the MViz application Java code.
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help