[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/ctp CtpForwardingEngineP.nc, 1.1.2.6, 1.1.2.7

Kyle Jamieson kasj78 at users.sourceforge.net
Mon Sep 11 05:12:03 PDT 2006


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/ctp
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22104/tos/lib/net/ctp

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	CtpForwardingEngineP.nc 
Log Message:
Compile-bug fixes for CTP.

Index: CtpForwardingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/ctp/Attic/CtpForwardingEngineP.nc,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -d -r1.1.2.6 -r1.1.2.7
*** CtpForwardingEngineP.nc	8 Sep 2006 21:51:55 -0000	1.1.2.6
--- CtpForwardingEngineP.nc	11 Sep 2006 12:11:59 -0000	1.1.2.7
***************
*** 444,450 ****
        // Set or clear the congestion bit on *outgoing* packets.
        if (congested)
!         call CtpPacket.setOption(qe->msg, CTP_OPTION_ECN);
        else
!         call CtpPacket.clearOption(qe->msg, CTP_OPTION_ECN);
        
        subsendResult = call SubSend.send(dest, qe->msg, payloadLen);
--- 444,450 ----
        // Set or clear the congestion bit on *outgoing* packets.
        if (congested)
!         call CtpPacket.setOption(qe->msg, CTP_OPT_ECN);
        else
!         call CtpPacket.clearOption(qe->msg, CTP_OPT_ECN);
        
        subsendResult = call SubSend.send(dest, qe->msg, payloadLen);
***************
*** 776,780 ****
    SubSnoop.receive(message_t* msg, void *payload, uint8_t len) {
      am_addr_t parent = call UnicastNameFreeRouting.nextHop();
!     am_addr_t proximalSrc = call AMPacket.address(msg);
  
      // Check for the pull bit (P) [TEP123] and act accordingly.  This
--- 776,780 ----
    SubSnoop.receive(message_t* msg, void *payload, uint8_t len) {
      am_addr_t parent = call UnicastNameFreeRouting.nextHop();
!     am_addr_t proximalSrc = call AMPacket.source(msg);
  
      // Check for the pull bit (P) [TEP123] and act accordingly.  This
***************
*** 783,787 ****
        call CtpInfo.triggerRouteUpdate();
  
!     if (call CtpPacket.option(msg, CTP_OPT_ECN) && proximalSrc == parent)
        // We've overheard our parent's ECN bit set.
        startCongestionTimer(CONGESTED_WAIT_WINDOW, CONGESTED_WAIT_OFFSET);
--- 783,787 ----
        call CtpInfo.triggerRouteUpdate();
  
!     if (call CtpPacket.option(msg, CTP_OPT_ECN) && proximalSrc == parent) {
        // We've overheard our parent's ECN bit set.
        startCongestionTimer(CONGESTED_WAIT_WINDOW, CONGESTED_WAIT_OFFSET);
***************
*** 852,857 ****
    command void CtpPacket.setType(message_t* msg, uint8_t id) {getHeader(msg)->type = id;}
  
!   command bool CollectionPacket.option(message_t* msg, ctp_options_t opt) {
!     return (getHeader(msg)->options & opt == opt) ? TRUE : FALSE;
    }
  
--- 852,857 ----
    command void CtpPacket.setType(message_t* msg, uint8_t id) {getHeader(msg)->type = id;}
  
!   command bool CtpPacket.option(message_t* msg, ctp_options_t opt) {
!     return ((getHeader(msg)->options & opt) == opt) ? TRUE : FALSE;
    }
  
***************
*** 928,932 ****
      // A simple predicate for now to determine congestion state of
      // this node.
!     return (call SendQueue.size() + 2 >= SendQueue.maxSize()) ? 
        TRUE : FALSE;
    }
--- 928,932 ----
      // A simple predicate for now to determine congestion state of
      // this node.
!     return (call SendQueue.size() + 2 >= call SendQueue.maxSize()) ? 
        TRUE : FALSE;
    }



More information about the Tinyos-2-commits mailing list