On Sun, Feb 21, 2010 at 10:02 PM, Xiaohui Liu <[email protected]> wrote:
> Hi everyone,
> Please help me with the following questions regarding CTP, specifically for
> forwarding engine component "CtpForwardingEngineP.nc".
> 1) In the event handler
>   event void SubSend.sendDone(message_t* msg, error_t error) {
> ..
> else if (error != SUCCESS) {
> ..
> else if (ackPending && !call PacketAcknowledgements.wasAcked(msg)) {
> ..
> }
> What is the difference between the two conditions? Aren't both of them
> suggesting failed delivery by means of absence of ACK? What scenarios would
> cause "error != SUCCESS" exactly, possibly besides no ACK?

The possible return values are: SUCCESS, FAIL, and ECANCEL. SUCCESS
does not mean the packet was acknowledged.


> 2) In the same event handler
>   event void SubSend.sendDone(message_t* msg, error_t error) {
> ..
>     else if (qe->client < CLIENT_COUNT) {
> ..
>        call SendQueue.dequeue();
> ..
>   }
>     else if (call MessagePool.size() < call MessagePool.maxSize()) {
> ..
>       call SentCache.insert(qe->msg);
>       call SendQueue.dequeue();
> ..
> It shows forwarded packets from other nodes are cached after successfully
> transmitted, for duplicate suppression. However, packets generated locally
> (qe->client < CLIENT_COUNT) are not cached. Since these two kind of packets
> share the same send queue, why are they treated differently as to caching?

Duplicates typically happen due to retransmissions. With a small cache
size (4 entries), we wanted to focus on catching the dominant cause of
duplication. CTP defines duplicates as packets that match origin, seq,
thl, and type. If you encounter the same packet twice once it has gone
through a loop, the chances are small that the thl will be the same.
So those packets would not be duplicate with CTP's definition of
duplicate.

- om_p

_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to