Interface: tos.lib.Deluge.SharedMsgBuf

interface SharedMsgBuf

Simple component that allows sharing of message buffers through a parameterized interface.

Author:
Jonathan Hui <jwhui@cs.berkeley.edu>

Commands
command TOS_MsgPtr getMsgBuf() Get the pointer to a shared message buf.
command bool isLocked() Check if shared message buf is currently locked.
command void lock() Acquire lock on shared message buf.
command void unlock() Release lock on shared message buf.

Events
event void bufFree() Signal that the bus is free to allow other components waiting to begin using it right away.

Commands - Details

getMsgBuf

command TOS_MsgPtr getMsgBuf()

Get the pointer to a shared message buf.

Returns:
The pointer to the shared message buf.

isLocked

command bool isLocked()

Check if shared message buf is currently locked.

Returns:
TRUE if the shared message buf is locked; FALSE otherwise.

lock

command void lock()

Acquire lock on shared message buf.

unlock

command void unlock()

Release lock on shared message buf.

Events - Details

bufFree

event void bufFree()

Signal that the bus is free to allow other components waiting to begin using it right away.