Interface: tos.lib.byte_radio.MacSend
interface MacSend
This interface is similar to the Send interface.
It provides the same basic functionality as the Send interface in async
context. It is provided by the MAC layer of byte radios.
- See:
-
Send
- Author:
-
Philipp Huppertz
Commands
command error_t cancel(message_t *msg)
command error_t send(message_t *msg, uint8_t len)
Events
event void sendDone(message_t *msg, error_t error)
Commands - Details
cancel
command error_t cancel(message_t *msg)
- Parameters:
-
msg - the packet whose transmission should be cancelled
- Returns:
-
SUCCESS if the packet was successfully cancelled, FAIL
otherwise
send
command error_t send(message_t *msg, uint8_t len)
- Parameters:
-
msg - the packet to send
-
len - the length of the packet payload
- Returns:
-
SUCCESS if the request was accepted and will issue
a sendDone event, EBUSY if the component cannot accept
the request now but will be able to later, FAIL
if the stack is in a state that cannot accept requests
(e.g., it's off).
Events - Details
sendDone
event void sendDone(message_t *msg, error_t error)
- Parameters:
-
msg - the message which was requested to send
-
error - SUCCESS if it was transmitted successfully, FAIL if
it was not, ECANCEL if it was cancelled via cancel