[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Drip Drip.h, 1.4, 1.5 DripM.nc, 1.6, 1.7 DripStateM.nc, 1.5, 1.6

Gilman Tolle gtolle at users.sourceforge.net
Fri Jul 15 15:23:21 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/Drip
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19101

Modified Files:
	Drip.h DripM.nc DripStateM.nc 
Log Message:
Fixed a bug in the seqno handling. Changed the semantics of returning FAIL to rebroadcastRequest so that other clients can continue to Drip even while one client can't

Index: Drip.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/Drip.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Drip.h	14 Jun 2005 18:19:35 -0000	1.4
--- Drip.h	15 Jul 2005 22:23:18 -0000	1.5
***************
*** 62,66 ****
    DRIP_INVALID_KEY = 0,
    DRIP_CACHE_ENTRIES = uniqueCount("DripState"),
!   DRIP_SEQNO_OLDEST = 0xff,
    DRIP_SEQNO_NEWEST = 0,
    DRIP_SEQNO_FIRST = 2,
--- 62,67 ----
    DRIP_INVALID_KEY = 0,
    DRIP_CACHE_ENTRIES = uniqueCount("DripState"),
!   DRIP_SEQNO_OLDEST = 0xfe, // not ff, because both oldest and newest should have the least significant bit unset.
! 
    DRIP_SEQNO_NEWEST = 0,
    DRIP_SEQNO_FIRST = 2,

Index: DripM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/DripM.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** DripM.nc	14 Jun 2005 18:19:35 -0000	1.6
--- DripM.nc	15 Jul 2005 22:23:19 -0000	1.7
***************
*** 100,106 ****
  
  	msgBufBusy = TRUE;
!       
  	if (!signal Drip.rebroadcastRequest[readyKey](pMsgBuf, dripMsg->data)) {
  	  msgBufBusy = FALSE;
  	} else {
  	  dbg(DBG_USR1, "Sending id: %d\n", readyKey);
--- 100,107 ----
  
  	msgBufBusy = TRUE;
! 
  	if (!signal Drip.rebroadcastRequest[readyKey](pMsgBuf, dripMsg->data)) {
  	  msgBufBusy = FALSE;
+ 	  call DripState.entrySent[readyKey]();
  	} else {
  	  dbg(DBG_USR1, "Sending id: %d\n", readyKey);

Index: DripStateM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/DripStateM.nc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DripStateM.nc	14 Jun 2005 18:19:35 -0000	1.5
--- DripStateM.nc	15 Jul 2005 22:23:19 -0000	1.6
***************
*** 109,114 ****
      // Seqno 0 means that the seqno is unknown, and should only be seen
      // in a message coming in from the UART.
!     while ((dripEntry->metadata.seqno & ~DRIP_WAKEUP_BIT) == DRIP_SEQNO_OLDEST ||
! 	   (dripEntry->metadata.seqno & ~DRIP_WAKEUP_BIT) == DRIP_SEQNO_NEWEST) {
        dripEntry->metadata.seqno++;
        dripEntry->metadata.seqno++;
--- 109,117 ----
      // Seqno 0 means that the seqno is unknown, and should only be seen
      // in a message coming in from the UART.
!     while (((dripEntry->metadata.seqno & ~DRIP_WAKEUP_BIT) == 
! 	    DRIP_SEQNO_OLDEST)
! 	   ||
! 	   ((dripEntry->metadata.seqno & ~DRIP_WAKEUP_BIT) == 
! 	    DRIP_SEQNO_NEWEST)) {
        dripEntry->metadata.seqno++;
        dripEntry->metadata.seqno++;
***************
*** 273,275 ****
--- 276,280 ----
      }
    }
+ 
+   
  }



More information about the Tinyos-beta-commits mailing list