Hi,
 
I am trying to implement end-to-end ACK's from the Base station to the source nodes.
 
For the Surge application, in the MultiHopEngineM.nc routing module, the ReceiveMsg.receive() function is used to implement the receiving and forwarding functionalities. Here, I added the if (TOS_LOCAL_ADDRESS == 0) condition as shown below and I got the source address. Now, in this condition, can I call the Send.send() function for transmitting the ACK packet with the new destination address as the source.

if (pMsg->addr == TOS_LOCAL_ADDRESS) { // Addressed to local node
      if ((signal Intercept.intercept[id](pMsg,&pMHMsg->data[0],PayloadLen)) == SUCCESS) {
        dbg(DBG_ROUTE,"MHop: Calling the mForward function");
        pMsg = mForward(pMsg,id);
      }
      if (TOS_LOCAL_ADDRESS == 0) {
         dbg(DBG_ROUTE,"MHop: BS calling mFrwd for node %x", pMHMsg->originaddr);
         //call Send.send() for the ACK packet with destination as pMHMsg->originaddr
      }
}
else {
      // Snoop the packet for permiscuous applications
      signal Snoop.intercept[id](pMsg,&pMHMsg->data[0],PayloadLen);
}

Please let me know if I can call the Send.send() function in the packet reception handler. Will it cause any problem?
 
If I can call the send() function, how do I create a packet now has the source address (pMHMsg->originaddr) as the destination address in the TOS_Msg packet?
 
Can you please give some suggestions on this issue. Thanks a lot.
 
Regards,
Yogesh.
 


Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
_______________________________________________
Tinyos-users mailing list
[email protected]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

Reply via email to