Interface: tos.interfaces.AMSend
interface AMSend
- 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(am_addr_t addr, 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 transmission was cancelled, FAIL otherwise.
- See:
-
sendDone
getPayload
command void *getPayload(message_t *msg, uint8_t len)
- Parameters:
-
'message_t* ONE msg' the packet
- Returns:
-
'void* COUNT(len)' the payload of the packet
maxPayloadLength
command uint8_t maxPayloadLength()
- Returns:
-
the maximum payload length
send
command error_t send(am_addr_t addr, message_t *msg, uint8_t len)
- Parameters:
-
addr - address to which to send the packet
-
'message_t* ONE msg' the packet
-
len - the length of the data in the packet payload
- Returns:
-
SUCCESS if the request to send succeeded and a
sendDone will be signaled later, EBUSY if the
abstraction cannot send now but will be able to
later, or FAIL if the communication layer is not
in a state that can send (e.g., off).
- See:
-
sendDone
Events - Details
sendDone
event void sendDone(message_t *msg, error_t error)
- Parameters:
-
'message_t* ONE msg' the packet which was submitted as a send request
-
error - SUCCESS if it was sent successfully, FAIL if it was not,
ECANCEL if it was cancelled
- See:
-
send
-
cancel