[Tinyos-devel] value of error for Send.sendDone from CtpForwardingEngineP.nc
Omprakash Gnawali
gnawali at usc.edu
Sun Sep 28 18:38:48 PDT 2008
An excerpt from Send.nc:
/**
* Signaled in response to an accepted send request. <tt>msg</tt>
* is the sent buffer, and <tt>error</tt> indicates whether the
* send was succesful, and if not, the cause of the failure.
*
* @param 'message_t* ONE msg' the message which was requested to send
* @param error SUCCESS if it was transmitted successfully, FAIL if
* it was not, ECANCEL if it was cancelled via <tt>cancel</tt>
*/
event void sendDone(message_t* msg, error_t error);
This comment and what CTP forwarding engine does do not agree. CTP
forwarding engine will return FAIL if it exhausts the number of
retransmissions before receiving an ack:
// <Max retries reached, dropping packet: first case is a client packet,
// second case is a forwarded packet. Memory management for the
// two is different.
...
signal Send.sendDone[qe->client](msg, FAIL);
It is possible that the packet was transmitted successfully. Should
SUCCESS/FAIL value be tied to the acks? I think not.
- om_p
More information about the Tinyos-devel
mailing list