Apps Components Interfaces All Files Source Tree | source: tos.lib.TinyDB.TupleIntf.nc |
TupleIntf allows interactions with Tuples, which are base data fetched from the Attr interface and stored in a packed array of fixed width fields.
Note that Tuple's should not be confused with QueryResults (or QueryResultTuples) which represent more complicated, arbitrary sized data structures consisting of an arbitrary number of records. Tuples are used internally to collect data about sensors -- QueryResults are sent to neighboring motes and stored in result buffers for external processing.
Commands |
Returns: | TRUE iff all fields of the specified tuple have been set since it was last reset |
Parameters: |
(on - return) fieldIdx The index of the next empty field in the query |
Returns: | err_NoMoreResults if there are no more empty fields |
Commands - Details |
Parameters: |
q - The query that t belongs to t - The tuple whose field should be set fieldIdx - The field to set in t data - The data to write to t (fieldSize(...) bytes will be copied |
Returns: | FAIL if the field is out of range or NULL, or SUCCESS otherwise |
Parameters: |
fieldIdx - The index of the field to set t - The tuple whose field is to be set numFields - The number of fields in the tuple sizes - The size of each field (in bytes); must be at least numFields long types - The types of each field (From SchemaType.h); must be at least numFields long data - The data to write into the field |
Returns: | FAIL if the field is out or range or NULL, SUCCESS otherwise. |
Parameters: |
t - The tuple to get the field from fieldIdx - The index of the field to retrieve numFields - The total number of fields in the tuple sizes - The sizes (in bytes) of the fields in the tuple; this array must be at least numFields entries The - typs (from SchemaType.h) of the fields in the tuple; this array must be at least numFields entries |
Returns: | A pointer to the requested field, or NULL if no such field exists (note that writing to this pointer will overwrite tuple data!) |
Returns: | An attribute descriptor for the next unset field in the specified tuple, or NULL if all fields are set. |