[Tinyos-devel] value of error for Send.sendDone from CtpForwardingEngineP.nc

Philip Levis pal at cs.stanford.edu
Sun Sep 28 21:40:39 PDT 2008


On Sep 28, 2008, at 6:38 PM, Omprakash Gnawali wrote:

> 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.

You're right. It's a pretty simple fix.

Phil


More information about the Tinyos-devel mailing list