Hi,
 
I was able to implement end-to-end acknowledgements in TOSSIM by making the following changes in the ReceiveMsg.receive() function of the MultiHopEngineM.nc routing module. Guess I wont be needing BCast or Drip now. Thanks for your time and suggestions.
 
if (pMsg->addr == TOS_LOCAL_ADDRESS) { // Addressed to all nodes
    if ((signal Intercept.intercept[id](pMsg,&pMHMsg->data[0],PayloadLen)) == SUCCESS) {
         if ((TOS_LOCAL_ADDRESS != 0) && (pMHMsg->sourceaddr != 0)) { // All nodes except node 0 forward packets and only when the source address is not node 0
               pMsg = mForward(pMsg,id);
         }
         else if (TOS_LOCAL_ADDRESS == 0) { // If packet is received by node 0, it will call the SendMsg.send() function with the source node as the destination address
               pMHMsg->sourceaddr = TOS_LOCAL_ADDRESS;
               if (call SendMsg.send[id](pMHMsg->originaddr, pMsg->length,pMsg) !=SUCCESS) {
                     return FAIL;
               }
         }
    }
}
 
Regards,
Yogesh.


Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
_______________________________________________
Tinyos-users mailing list
[email protected]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

Reply via email to