[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250/mac RedMacP.nc, 1.9, 1.10

akoepke andreaskoepke at users.sourceforge.net
Tue Jul 10 06:10:30 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27623/mac

Modified Files:
	RedMacP.nc 
Log Message:
remove double posting of startdonetask


Index: RedMacP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac/RedMacP.nc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** RedMacP.nc	30 Apr 2007 11:03:25 -0000	1.9
--- RedMacP.nc	10 Jul 2007 13:10:27 -0000	1.10
***************
*** 149,153 ****
          ACK_DURATION = SUB_HEADER_TIME + SUB_FOOTER_TIME,
          MAX_SHORT_RETRY=9,
!         MAX_LONG_RETRY=1,
          MAX_AGE=2*MAX_LONG_RETRY*MAX_SHORT_RETRY,
          MSG_TABLE_ENTRIES=20,
--- 149,153 ----
          ACK_DURATION = SUB_HEADER_TIME + SUB_FOOTER_TIME,
          MAX_SHORT_RETRY=9,
!         MAX_LONG_RETRY=3,
          MAX_AGE=2*MAX_LONG_RETRY*MAX_SHORT_RETRY,
          MSG_TABLE_ENTRIES=20,
***************
*** 206,210 ****
  
      uint8_t congestionLevel = 0;
! 
      message_t *txBufPtr = NULL;
      uint16_t txLen = 0;
--- 206,210 ----
  
      uint8_t congestionLevel = 0;
!     
      message_t *txBufPtr = NULL;
      uint16_t txLen = 0;
***************
*** 405,408 ****
--- 405,409 ----
              txStat.creationTime =  getMetadata(msg)->time;
  #endif
+             getMetadata(msg)->maxRepetitions = macHdr->repetitionCounter;
          }
      }
***************
*** 496,501 ****
          if(call Timer.isRunning()) {
              restLaufzeit = call Timer.getAlarm();
!             call Timer.stop();
!             now = call Timer.getNow();
              if(restLaufzeit >= now) {
                  restLaufzeit = restLaufzeit - now;
--- 497,502 ----
          if(call Timer.isRunning()) {
              restLaufzeit = call Timer.getAlarm();
!             call Timer.stop(); 
!             now = call Timer.getNow(); 
              if(restLaufzeit >= now) {
                  restLaufzeit = restLaufzeit - now;
***************
*** 774,781 ****
                  }
              }
-             else if(macState == INIT) {
-                 // sdDebug(167);
-                 post StartDoneTask();
-             }
              else if(macState == STOP) {
                  // sdDebug(168);
--- 775,778 ----
***************
*** 851,855 ****
                  computeBackoff();
  #ifdef REDMAC_PERFORMANCE
!             call Performance.macDetectedOnCca();
  #endif
              }
--- 848,852 ----
                  computeBackoff();
  #ifdef REDMAC_PERFORMANCE
!                 call Performance.macDetectedOnCca();
  #endif
              }
***************
*** 917,920 ****
--- 914,922 ----
                              }
                          }
+ #ifdef REDMAC_PERFORMANCE
+                         else {
+                             rxStat.duplicate = PERF_REPEATED_MSG;
+                         }
+ #endif                  
                          if(needsAckRx(msg, &level) && (action != RX)) {
                              // sdDebug(197);
***************
*** 934,940 ****
                          // sdDebug(199);
                          action = RX;
- #ifdef REDMAC_PERFORMANCE
-                         rxStat.duplicate = PERF_REPEATED_MSG;
- #endif
                      }
                  }
--- 936,939 ----
***************
*** 970,975 ****
                          }
                      }
!                     (getMetadata(txBufPtr))->ack = WAS_ACKED;
!                     if(isFlagSet(&flags, TEAMGEIST_ACTIVE) && (getHeader(txBufPtr)->type == teamgeistType)) {
                          signal Teamgeist.gotAck(txBufPtr, getHeader(msg)->src,
                                                  getMetadata(txBufPtr)->strength);
--- 969,977 ----
                          }
                      }
!                     getMetadata(txBufPtr)->ack = WAS_ACKED;
!                     getMetadata(txBufPtr)->repetitions = txMacHdr->repetitionCounter;
!                     if(isFlagSet(&flags, TEAMGEIST_ACTIVE) &&
!                        (getHeader(txBufPtr)->type == teamgeistType))
!                     {
                          signal Teamgeist.gotAck(txBufPtr, getHeader(msg)->src,
                                                  getMetadata(txBufPtr)->strength);
***************
*** 981,984 ****
--- 983,987 ----
                  }
                  else {
+                     sdDebug(203);
                      updateLongRetryCounters();
                      action = RX;
***************
*** 991,995 ****
                  }
                  else {
!                     // sdDebug(205);
                      updateLongRetryCounters();
                      action = RX;
--- 994,998 ----
                  }
                  else {
!                     sdDebug(205);
                      updateLongRetryCounters();
                      action = RX;
***************
*** 1058,1062 ****
              setRxMode();
              call Timer.start(RX_ACK_TIMEOUT);
!             sdDebug(220);
              checkCounter = 0;
          }
--- 1061,1065 ----
              setRxMode();
              call Timer.start(RX_ACK_TIMEOUT);
!             // sdDebug(220);
              checkCounter = 0;
          }
***************
*** 1065,1069 ****
              macState = RX;
              setRxMode();
!             sdDebug(221);
  #ifdef REDMAC_DEBUG            
              // sdDebug(40000U + repCounter);
--- 1068,1072 ----
              macState = RX;
              setRxMode();
!             // sdDebug(221);
  #ifdef REDMAC_DEBUG            
              // sdDebug(40000U + repCounter);
***************
*** 1166,1170 ****
              macState = TX_ACK;
              setTxMode();
!             sdDebug(20000 + getHeader(&ackMsg)->dest);
  #ifdef REDMAC_PERFORMANCE
              call Performance.macTxAckStats(getHeader(&ackMsg)->type,
--- 1169,1173 ----
              macState = TX_ACK;
              setTxMode();
!             // sdDebug(20000 + getHeader(&ackMsg)->dest);
  #ifdef REDMAC_PERFORMANCE
              call Performance.macTxAckStats(getHeader(&ackMsg)->type,
***************
*** 1191,1195 ****
          else if(macState == RX_ACK) {
              if(prepareRepetition()) {
!                 sdDebug(253);
                  macState = TX;
                  setTxMode();
--- 1194,1198 ----
          else if(macState == RX_ACK) {
              if(prepareRepetition()) {
!                 // sdDebug(253);
                  macState = TX;
                  setTxMode();
***************
*** 1197,1201 ****
              else {
                  if(needsAckTx(txBufPtr)) {
!                     sdDebug(254);
  #ifdef REDMAC_PERFORMANCE
                      call Performance.macAckTimeout();
--- 1200,1204 ----
              else {
                  if(needsAckTx(txBufPtr)) {
!                     // sdDebug(254);
  #ifdef REDMAC_PERFORMANCE
                      call Performance.macAckTimeout();
***************
*** 1213,1217 ****
          else if(macState == TX_ACK) {
              setTxMode();
!             sdDebug(10000 + getHeader(&ackMsg)->dest);
          }
          else if(macState == SLEEP) {
--- 1216,1220 ----
          else if(macState == TX_ACK) {
              setTxMode();
!             // sdDebug(10000 + getHeader(&ackMsg)->dest);
          }
          else if(macState == SLEEP) {



More information about the Tinyos-2-commits mailing list