Interface: tos.lib.byte_radio.RadioByteComm

interface RadioByteComm

A byte-level communication interface for byte radios. It signals byte receptions and provides a split-phased byte send interface. txByteReady states that the component can accept another byte in its queue to send, while txDone states that the send queue has been emptied.

Author:
Jason Hill
David Gay
Philip Levis

Commands
command bool isTxDone() Check to see if the transmission is done and the queue is empty
command void txByte(uint8_t data) Transmits a byte over the radio.

Events
event void rxByteReady(uint8_t data) Notification that the radio is ready to receive another byte.
event void txByteReady(error_t error) Notification that the bus is ready to transmit/queue another byte.

Commands - Details

isTxDone

command bool isTxDone()

Check to see if the transmission is done and the queue is empty

Returns:
TRUE if the queue is empty and no more bytes will be sent. FALSE if bytes remain in the queue.

txByte

command void txByte(uint8_t data)

Transmits a byte over the radio.

Parameters:
data - The byte to be transmitted.

Events - Details

rxByteReady

event void rxByteReady(uint8_t data)

Notification that the radio is ready to receive another byte.

Parameters:
data - The byte read from the radio.

txByteReady

event void txByteReady(error_t error)

Notification that the bus is ready to transmit/queue another byte.

Parameters:
error - Success Notification of the successful transmission of the last byte.