Hi all,

The Send.sendDone() is called after the MCU successfully write the
CC2420's FIFO. It won't wait for message's ACK from other node(s).

This is my trace on T1.1.15 :
GenericComm.SendMsg[id]->AMStandard.SendMsg->
task void sendTask()->RadioSend.send(buf)->
RadioCRCPacket.Send->CRCPacket.Send :

//CRCPacket.nc:140:
/* Command to transmit a packet */
  command result_t Send.send(TOS_MsgPtr msg) {
    if (txCount == 0)
      {
        txCount = 1;
        txLength = TOS_MsgLength(msg->type);
        sendPtr = (uint8_t *)msg;
        /* send the first byte */
        if (call ByteComm.txByte(sendPtr[0]))
          {
            post CRCCalc();
            return SUCCESS;
          }
        else
          txCount = 0;
      }
    return FAIL;
  }

ByteComm.txByte() will transmit the first byte of the packet. The rest
of the packet will be sent using ByteComm.txByteReady(). If the packet
sending is done, ByteComm.txDone() will be called and notify the upper
layers.

//CRCPacket.nc:191:
  event result_t ByteComm.txDone() {
    if (txCount == txLength)
      sendComplete(TRUE);
    return SUCCESS;
  }
//CRCPacket.nc:159
  void sendComplete(result_t success) {
    TOS_MsgPtr msg = (TOS_MsgPtr)sendPtr;

    /* This is a non-ack based layer */
    if (success)
      msg->ack = TRUE;
    signal Send.sendDone(msg, success);
    txCount = 0;
  }

Please fix me if I'm wrong =) 


Cheers,

-daniel

On Mon, 2007-11-26 at 05:46 +0100, Alban Hessler wrote:
> I guess since she/he is disabling the ack, Liu does not expect the
> timer to be resetted at every send done.
> 
> Alban



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

Reply via email to