Interface: tos.interfaces.AMSend
interface AMSendCommands
command error_t cancel(message_t *msg)
command void *getPayload(message_t *msg)
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:
-
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)
- Parameters:
-
msg
- the packet
- Returns:
-
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
-
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:
-
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