[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/4bitle LinkEstimatorP.nc, 1.8, 1.9
Omprakash Gnawali
gnawali at users.sourceforge.net
Sat Sep 27 10:01:03 PDT 2008
Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/4bitle
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv4430/4bitle
Modified Files:
LinkEstimatorP.nc
Log Message:
updates to the compare bit interface/use of white bit
Index: LinkEstimatorP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/4bitle/LinkEstimatorP.nc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** LinkEstimatorP.nc 10 Jul 2008 19:01:00 -0000 1.8
--- LinkEstimatorP.nc 27 Sep 2008 17:00:54 -0000 1.9
***************
*** 645,656 ****
} else {
dbg("LI", "No room in the table\n");
! if (signal CompareBit.shouldInsert(msg,
! call Packet.getPayload(msg, call Packet.payloadLength(msg)),
! call Packet.payloadLength(msg),
! call LinkPacketMetadata.highChannelQuality(msg))) {
! nidx = findRandomNeighborIdx();
! if (nidx != INVALID_RVAL) {
! signal LinkEstimator.evicted(NeighborTable[nidx].ll_addr);
! initNeighborIdx(nidx, ll_addr);
}
}
--- 645,662 ----
} else {
dbg("LI", "No room in the table\n");
!
! /* if the white bit is set, lets ask the router if the path through
! this link is better than at least one known path - if so
! lets insert this link into the table.
! */
! if (call LinkPacketMetadata.highChannelQuality(msg)) {
! if (signal CompareBit.shouldInsert(msg,
! call Packet.getPayload(msg, call Packet.payloadLength(msg)),
! call Packet.payloadLength(msg))) {
! nidx = findRandomNeighborIdx();
! if (nidx != INVALID_RVAL) {
! signal LinkEstimator.evicted(NeighborTable[nidx].ll_addr);
! initNeighborIdx(nidx, ll_addr);
! }
}
}
More information about the Tinyos-2-commits
mailing list