You are right...you need to wait for sendDone() before doing
a new message cycle. In fact there is some evidence that you
want to wait 10 or 20ms after sendDone(). Though I would expect
only the first message to get through because the subsequent
ones should be rejected...check the return val on send() to see.
There is a queued send interface someplace, but I can't put
my cursor on it at the moment...

MS

ricardo tiago wrote:
Hi
i've made a program that sends 3 messages to his neighbors, but if i send the messages in a consecutive way , only the last message is received. If i send the first message then wait a x'time , send the second message and wait again the x'time, etc, the 3 messages are received by the 3 nodes.

Sending 3 consecutive messages...
for ( NeighsPos = 0; NeighsPos < size ; NeighsPos ++) {
dbg("DominantSet","Sending Packet Neighbor Table to Neighbor %d\n",Neighs[NeighsPos]);
    call AMSend.send(Neighs[NeighsPos],&pkt,sizeof(DominantSetMsg));
}

i get in TOSSIM ...
DEBUG (2): Sending Packet Neighbor Table to Neighbor 0
DEBUG (2): Sending Packet Neighbor Table to Neighbor 1
DEBUG (2): Sending Packet Neighbor Table to Neighbor 3

Only the last Neighbor 3 receives the message. I think i know what is the problem. Its probably because i'm not waiting for SendDone before calling again AMSend.send. But isn't there a queue associated with the command send? or am i wrong?

Thanks in advance,
Ricardo

_________________________________________________________________
MSN Busca: fácil, rápido, direto ao ponto.  http://search.msn.com.br

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

Reply via email to