Interface: tos.interfaces.Send
interface Send
- Author:
-
Phil Levis
-
David Gay
Revision: $Revision: 1.11 $
Defines global error codes for error_t in TinyOS.
Commands
command error_t cancel(message_t *msg)
command void *getPayload(message_t *msg, uint8_t len)
command uint8_t maxPayloadLength()
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:
-
'message_t* ONE msg' the packet whose transmission should be cancelled
- Returns:
-
SUCCESS if the packet was successfully cancelled, FAIL
otherwise
getPayload
command void *getPayload(message_t *msg, uint8_t len)
- Parameters:
-
'message_t* ONE msg' the packet
- Returns:
-
'void* COUNT_NOK(len)' a pointer to the packet's payload
maxPayloadLength
command uint8_t maxPayloadLength()
- Returns:
-
the maximum payload length
send
command error_t send(message_t *msg, uint8_t len)
- Parameters:
-
'message_t* ONE 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:
-
'message_t* ONE 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