Interface: tos.interfaces.ByteComm

interface ByteComm

A byte-level communication interface. 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 result_t txByte(uint8_t data) Transmits a byte over the radio

Events
event result_t rxByteReady(uint8_t data, bool error, uint16_t strength) Notification that the radio is ready to receive another byte
event result_t txByteReady(bool success) Notification that the bus is ready to transmit/queue another byte
event result_t txDone() Notification that the transmission has been completed and the transmit queue has been emptied.

Commands - Details

txByte

command result_t txByte(uint8_t data)

Transmits a byte over the radio

Parameters:
data - the byte to be transmitted
Returns:
SUCCESS if successful

Events - Details

rxByteReady

event result_t rxByteReady(uint8_t data, bool error, uint16_t strength)

Notification that the radio is ready to receive another byte

Parameters:
data - the byte read from the radio
error - determines the success of receiving the byte
strength - the signal strength of the received byte
Returns:
SUCCESS if successful

txByteReady

event result_t txByteReady(bool success)

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

Parameters:
success - Notification of the successful transmission of the last byte
Returns:
SUCCESS if successful

txDone

event result_t txDone()

Notification that the transmission has been completed and the transmit queue has been emptied.

Returns:
SUCCESS always