[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Drip/tools/java/net/tinyos/drip Drip.java, 1.9, 1.10

Gilman Tolle gtolle at users.sourceforge.net
Thu Aug 18 23:22:47 PDT 2005


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

Modified Files:
	Drip.java 
Log Message:
Added a new special seqno to Drip: DRIP_SEQNO_UNKNOWN. Drip used to boot up with standard seqno 2, which may be greater or may be less than a normal seqno. If a node rebooted to seqno 2, it could possibly overwrite the whole network if 2 happens to be larger than the network's current state. Now, nodes boot up with DRIP_SEQNO_UNKNOWN, which won't be copied by any node, and can only be overwritten by another node's number. Java tools have been changed to match.

Index: Drip.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Drip/tools/java/net/tinyos/drip/Drip.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Drip.java	8 Aug 2005 15:01:45 -0000	1.9
--- Drip.java	19 Aug 2005 06:22:45 -0000	1.10
***************
*** 113,117 ****
      sendCount = 0;
      maxSendCount = SEND_COUNT;
!     trickle.schedule(trickleTask, 0, SEND_RATE);
      try {
        wait();
--- 113,117 ----
      sendCount = 0;
      maxSendCount = SEND_COUNT;
!     trickle.schedule(trickleTask, 0, 1000);
      try {
        wait();
***************
*** 251,260 ****
  	
      if (newId != id) {
!       log.debug("dropped, not my ID " + id);
        return;
      }
  
!     if ((newSeqno & ~DripConsts.DRIP_WAKEUP_BIT) == DripConsts.DRIP_SEQNO_OLDEST ||
! 	(newSeqno & ~DripConsts.DRIP_WAKEUP_BIT) == DripConsts.DRIP_SEQNO_NEWEST) {
        log.debug("dropped, a special seqno " + newSeqno);
        return;
--- 251,259 ----
  	
      if (newId != id) {
!       log.debug("dropped, not ID " + id);
        return;
      }
  
!     if ((newSeqno & ~DripConsts.DRIP_WAKEUP_BIT) == DripConsts.DRIP_SEQNO_NEWEST) {
        log.debug("dropped, a special seqno " + newSeqno);
        return;
***************
*** 291,295 ****
  
      while ((seqno & ~DripConsts.DRIP_WAKEUP_BIT) == DripConsts.DRIP_SEQNO_OLDEST ||
! 	   (seqno & ~DripConsts.DRIP_WAKEUP_BIT) == DripConsts.DRIP_SEQNO_NEWEST) {
  
        seqno = (seqno + 1) % 256;
--- 290,295 ----
  
      while ((seqno & ~DripConsts.DRIP_WAKEUP_BIT) == DripConsts.DRIP_SEQNO_OLDEST ||
! 	   (seqno & ~DripConsts.DRIP_WAKEUP_BIT) == DripConsts.DRIP_SEQNO_NEWEST ||
! 	   (seqno & ~DripConsts.DRIP_WAKEUP_BIT) == DripConsts.DRIP_SEQNO_UNKNOWN) {
  
        seqno = (seqno + 1) % 256;



More information about the Tinyos-beta-commits mailing list