[Tinyos-help] How to run two queries simultaneously on TINYDB?
cr_parekh2003 at yahoo.com
Mon Sep 12 01:37:55 PDT 2005
Thanks a lot for your valued guidance regarding my difficulties.
I tried to run two queries simultaneously.
1. select nodeid,temp from sensors
sample period 8192
while this was running perfectly,
I construct the next query from query constructor window as follows:
2. select nodeid from sensors
sample period 8192
trigger action setsnd(1000)
and issued send query command.
I put my hand on mote with nodeid 30 and waited for about 2 minutes. nothing happened. Moreover the query 1 stoped running.
What went wrong?
Am I going right?
If I'm wrong please suggests steps to issue two or more queries simultaneously from query constructor GUI.
Thanks a lot once again.
Samuel Madden <madden at csail.mit.edu> wrote:
See answers below.
On Sep 9, 2005, at 5:54 AM, chandresh parekh wrote:
> Note: forwarded message attached.
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> From: chandresh parekh
> Date: September 2, 2005 4:50:57 AM EDT
> To: tinyos-help at Millennium.Berkeley.EDU, harri.siirtola at vtt.fi,
> faizimh at gmail.com, mturon at xbow.com
> Subject: [Tinyos-help] some difficulties related to TINYDB
> Hi all,
> I have some difficulties working with TINYDB+MICA2.
> (1) the display topology window doesn't work on my set up. simple
> queries like light or temp. sensing does work. what is possibly
> wrong? any idea?
Sorry, no idea.
> (2) along with light and temperature i also want to see the time at
> which the packet sent and the energy available with a mote after
> the packet transmission. is this feasible? how?
TinyDB doesn't provide either of these features out of the box. If
you use the "voltage" attribute, that will report the battery
voltage, which is related to the remaining energy. The remaining
energy is related to the battery voltage -- consult the data sheet
from the battery manufacturer for more information.
TinyDB doesn't maintain a real time clock on the motes. It is easy
to print out / display the time at which the reading reached the
basestation in the java code, but that doesn't necessarily reflect
the time the data was produced (it could take many milliseconds for
the data to travel through the network.)
> (3) i want to run two queries simultaneously where one query gives
> temp. periodically ,say every 5 minutes and the other query is
> event driven e.g. a beep sound goes when light intensity at any
> mote exceeds a particular threshold. I'm not interested in light
> reding otherwise. is this possible? if yes how?
this should work fine. tinydb allows several queries to run
simultaneously. the syntax for the event query looks light:
select light from sensors
where light > thresh
sample period 1024
output action SetSnd(500)
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tinyos-help