Apps     Components     Interfaces     All Files     Source Tree     source: tos.lib.TinyDB.QueryProcessor.nc

Interface: QueryProcessor

A QueryProcessor runs queries -- this interface is very simple since our only query processor (TupleRouterM) generates and processes queries all by itself (it doesn't currently provide a non-am based interface for receiving queries from neighbors.)

See uses portion of the Network interface in TupleRouterM to understand how queries are submitted to a query processor.

For now, this interface simply allows clients to know when a query has ended and get information about currently running queries.
Author: Sam Madden (madden@cs.berkeley.edu)

Components providing this interface:
tos.lib.TinyDB.TupleRouter
tos.lib.TinyDB.TupleRouterM

Components requiring this interface:
tos.lib.TinyDB.AggOperator
tos.lib.TinyDB.DBBufferC
tos.lib.TinyDB.NetworkC
tos.lib.TinyDB.Tuple

Commands

Events

Commands - Details

getQueryCmd

ParsedQueryPtr getQueryCmd(uint8_t qid)

Return information about a currently running query

Parameters:

qid - The query for which information is sought

Returns: A pointer to the query data structure, or NULL if no such query exists.

msgToQueryRoot

short msgToQueryRoot(TOS_Msg *msg)

Given a processor message return the owner (origninating node) of the query, or -1 if the query is unknown or the message is a query processor message.

Parameters:

msg - The query for which the root is sought