[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/le LinkEstimatorP.nc, 1.1.2.2, 1.1.2.3

Omprakash Gnawali gnawali at users.sourceforge.net
Fri Oct 6 20:13:22 PDT 2006


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

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	LinkEstimatorP.nc 
Log Message:
etx should be total/success

Index: LinkEstimatorP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/le/Attic/LinkEstimatorP.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** LinkEstimatorP.nc	5 Oct 2006 08:08:18 -0000	1.1.2.2
--- LinkEstimatorP.nc	7 Oct 2006 03:13:18 -0000	1.1.2.3
***************
*** 284,299 ****
    }
  
!   // update the ETX estimator
    // called when new beacon estimate is done
!   // also called when new DETX estimate is done
!   void updateETX(neighbor_table_entry_t *ne, uint16_t newEst) {
      ne->etx = (ALPHA * ne->etx + (10 - ALPHA) * newEst)/10;
    }
  
  
!   // update data driven ETX
!   void updateDETX(neighbor_table_entry_t *ne) {
!     uint16_t estETX= (10 * ne->data_success) / ne->data_total - 10;
!     updateETX(ne, estETX);
      ne->data_success = 0;
      ne->data_total = 0;
--- 284,299 ----
    }
  
!   // update the EETX estimator
    // called when new beacon estimate is done
!   // also called when new DEETX estimate is done
!   void updateEETX(neighbor_table_entry_t *ne, uint16_t newEst) {
      ne->etx = (ALPHA * ne->etx + (10 - ALPHA) * newEst)/10;
    }
  
  
!   // update data driven EETX
!   void updateDEETX(neighbor_table_entry_t *ne) {
!     uint16_t estETX= (10 * ne->data_total) / ne->data_success - 10;
!     updateEETX(ne, estETX);
      ne->data_success = 0;
      ne->data_total = 0;
***************
*** 373,377 ****
  	  ne->failcnt = 0;
  	}
! 	updateETX(ne, computeBidirEETX(ne->inquality, ne->outquality));
        }
        else {
--- 373,377 ----
  	  ne->failcnt = 0;
  	}
! 	updateEETX(ne, computeBidirEETX(ne->inquality, ne->outquality));
        }
        else {
***************
*** 488,492 ****
  			      NeighborTable[idx].outquality);
        */
!       return NeighborTable[idx].etx - 10;
      };
    }
--- 488,492 ----
  			      NeighborTable[idx].outquality);
        */
!       return NeighborTable[idx].etx;
      };
    }
***************
*** 576,580 ****
      ne->data_total++;
      if (ne->data_total >= DLQ_PKT_WINDOW) {
!       updateDETX(ne);
      }
      return SUCCESS;
--- 576,580 ----
      ne->data_total++;
      if (ne->data_total >= DLQ_PKT_WINDOW) {
!       updateDEETX(ne);
      }
      return SUCCESS;
***************
*** 593,597 ****
      ne->data_total++;
      if (ne->data_total >= DLQ_PKT_WINDOW) {
!       updateDETX(ne);
      }
      return SUCCESS;
--- 593,597 ----
      ne->data_total++;
      if (ne->data_total >= DLQ_PKT_WINDOW) {
!       updateDEETX(ne);
      }
      return SUCCESS;



More information about the Tinyos-2-commits mailing list