[Tinyos-help] sendDone() called before receive

Philip Levis pal at cs.stanford.edu
Sun Apr 1 20:58:56 PDT 2007


On Apr 1, 2007, at 7:02 PM, Thang Le wrote:

>   From my understanding, in TinyOS 1.1.15, SendDone is invoked when  
> the package is successfully queued at the sender. Even without any  
> receiver, SendDone is still called.
>

sendDone is signaled when the packet is transmitted. The error code  
denotes whether or not the transmission succeeded. Reasons for  
failure can include the radio being turned off mid-transmission,  
hardware failure, etc.

You will never receive a sendDone before the packet is transmitted.  
That would release the packet buffer to the application, which is  
problematic.

Note that since sendDone denotes a data-link (single-hop)  
transmission, it is signaled when the packet goes one hop, not the  
multihop frame within arrives at its destination.

Phil



More information about the Tinyos-help mailing list