Interface: moteiv.tos.lib.Spram.Spram

interface Spram

Spram ("SP RAM") interface for disseminating data across a sensor network.

Author:
Cory Sharp, Moteiv Corporation <info@moteiv.com>

Commands
command void *getData() Get a pointer to Spram's data buffer.
command uint16_t getSizeBytes() Get the size of Spram's data buffer.
command void invalidate() Invalidate the data in Spram's buffer.
command bool isLocked() Query if the data buffer is currently locked by another process.
command bool isValid() Query if the data in the data buffer is valid.
command result_t lock() Lock the data buffer.
command void publish(uint16_t bytes) Publish new data with the specified size.

Events
event void locked() Notification that the data buffer is now locked by Spram.
event void updated() Notification that the data buffer is now unlocked.

Commands - Details

getData

command void *getData()

Get a pointer to Spram's data buffer.

getSizeBytes

command uint16_t getSizeBytes()

Get the size of Spram's data buffer.

invalidate

command void invalidate()

Invalidate the data in Spram's buffer. Forces a new fetch.

isLocked

command bool isLocked()

Query if the data buffer is currently locked by another process.

isValid

command bool isValid()

Query if the data in the data buffer is valid.

lock

command result_t lock()

Lock the data buffer.

Returns:
SUCCESS if the buffer can be locked; FAIL if it is already locked.

publish

command void publish(uint16_t bytes)

Publish new data with the specified size.

Events - Details

locked

event void locked()

Notification that the data buffer is now locked by Spram.

updated

event void updated()

Notification that the data buffer is now unlocked.