On Thu, Mar 11, 2010 at 11:25 AM, Xiaohui Liu <[email protected]> wrote: > Hi everyone, > > I was trying to understand the following snippet in 4bitle: > > void updateNeighborTableEst(am_addr_t n) { > > minPkt = BLQ_PKT_WINDOW; > > ... > > > > totalPkt = ne->rcvcnt + ne->failcnt; > > if (totalPkt < minPkt) { > > totalPkt = minPkt; > > } > > if (totalPkt == 0) { > > ne->inquality = (ALPHA * ne->inquality) / 10; > > } > > ... > > updateNeighborTableEst() is only called when at least BLQ_PKT_WINDOW of > packets are received, meaning totalPkt is equal to or larger than > BLQ_PKT_WINDOW. Why is it necessary to compare totalPkt with minPkt and > consider the case totalPkt is zero? Thank you for clarification.
This is dead code as Islam Hegazy mentioned in his emails. - om_p _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
