Interface: tos.interfaces.Send
interface Send
- Author:
-
Philip Levis
Commands
command void *getBuffer(TOS_MsgPtr msg, uint16_t *length)
command result_t send(TOS_MsgPtr msg, uint16_t length)
Events
event result_t sendDone(TOS_MsgPtr msg, result_t success)
Commands - Details
getBuffer
command void *getBuffer(TOS_MsgPtr msg, uint16_t *length)
- Parameters:
-
msg
- The message to get the data region of.
-
length
- Pointer to a field to store the length of the data region.
- Returns:
-
A pointer to the data region.
send
command result_t send(TOS_MsgPtr msg, uint16_t length)
- Parameters:
-
msg
- The buffer to send.
-
length
- The length of the data buffer sent using this
component. This must be <= the maximum length provided by
getBuffer().
- Returns:
-
Whether the send request was successful: SUCCESS means a
sendDone() event will be signaled later, FAIL means one will not.
Events - Details
sendDone
event result_t sendDone(TOS_MsgPtr msg, result_t success)
- Parameters:
-
msg
- The message sent.
-
success
- Whether the send was successful.
- Returns:
-
Should always return SUCCESS.