I think you r not using the latest version of LinkEstimatorP.nc You can find Rev.1.17 (latest version) in the following link:
http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x/tos/lib/net/4bitle/ <http://tinyos.cvs.sourceforge.net/viewvc/tinyos/tinyos-2.x/tos/lib/net/4bitle/> Regards, 2010/3/6 Islam Hegazy <[email protected]> > Hi > > I was tracing the code of 4bit link estimator in LinkEstimatorP.nc when I > came to the following 2 statements which can'tbe satisfied. > > In the function updateNeighborEntryIdx the following if statement calls the > function updateNeighborTableEst > > if (NeighborTable[idx].rcvcnt >= BLQ_PKT_WINDOW) > > { > > updateNeighborTableEst(NeighborTable[idx].ll_addr); > > } > > Inside the updateNeighborTableEst function we have the statements > > minPkt = BLQ_PKT_WINDOW; > > totalPkt = ne->rcvcnt + ne->failcnt; > > then we have the condition > > if (totalPkt < minPkt) > > { > > totalPkt = minPkt; //statement 1 > > } > > which will never be satisfied because, at least, rcvcnt = BLQ_PKT_WINDOW > (from the if in updateNeighborEntryIdx) . So, always total >= BLQ_PKT_WINDOW > 'minPkt' > > > > The second statement is right after statement 1 in updateNeighborTableEst > > if (totalPkt == 0) > > { > > ne->inquality = (ALPHA * ne->inquality) / 10; //statement 2 > > } > > This statement is never satisfied because statement 1 always set totalPkt > > 0. Another main reason for not satisfying this statment, > updateNeighborTableEst will never be called if rcvcnt < BLQ_PKT_WINDOW which > means totalPkt > 0 (remember totalPkt = ne->rcvcnt + ne->failcnt). > > I searched the code for other calls to updateNeighborTableEst but I didn't > find any. I'd appreciate it if someone can highlight the importance of these > 2 statements. > > Regards > > Islam Hegazy > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Mehmet Akif Antepli Telecommunications Lab. D-217 Dept. of EEE Middle East Technical University
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
