[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/ctp CtpRoutingEngineP.nc, 1.17, 1.18 CompareBit.nc, 1.2, 1.3
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/ctp
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv4430/ctp
Modified Files:
CtpRoutingEngineP.nc CompareBit.nc
Log Message:
updates to the compare bit interface/use of white bit
Index: CtpRoutingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/ctp/CtpRoutingEngineP.nc,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** CtpRoutingEngineP.nc 4 Sep 2008 23:08:08 -0000 1.17
--- CtpRoutingEngineP.nc 27 Sep 2008 17:00:54 -0000 1.18
***************
*** 637,660 ****
! /* This should see if the node should be inserted in the table.
! * If the white_bit is set, this means the LL believes this is a good
! * first hop link.
! * The link will be recommended for insertion if it is better* than some
* link in the routing table that is not our parent.
* We are comparing the path quality up to the node, and ignoring the link
* quality from us to the node. This is because of a couple of things:
! * 1. because of the white bit, we assume that the 1-hop to the candidate
! * link is good (say, etx=1)
* 2. we are being optimistic to the nodes in the table, by ignoring the
* 1-hop quality to them (which means we are assuming it's 1 as well)
* This actually sets the bar a little higher for replacement
* 3. this is faster
- * 4. it doesn't require the link estimator to have stabilized on a link
*/
! event bool CompareBit.shouldInsert(message_t *msg, void* payload, uint8_t len, bool white_bit) {
bool found = FALSE;
uint16_t pathEtx;
- //uint16_t linkEtx = evaluateEtx(0);
uint16_t neighEtx;
int i;
--- 637,654 ----
! /* The link will be recommended for insertion if it is better* than some
* link in the routing table that is not our parent.
* We are comparing the path quality up to the node, and ignoring the link
* quality from us to the node. This is because of a couple of things:
! * 1. we expect this call only for links with white bit set
* 2. we are being optimistic to the nodes in the table, by ignoring the
* 1-hop quality to them (which means we are assuming it's 1 as well)
* This actually sets the bar a little higher for replacement
* 3. this is faster
*/
! event bool CompareBit.shouldInsert(message_t *msg, void* payload, uint8_t len) {
bool found = FALSE;
uint16_t pathEtx;
uint16_t neighEtx;
int i;
Index: CompareBit.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/ctp/CompareBit.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CompareBit.nc 4 Jun 2008 04:30:41 -0000 1.2
--- CompareBit.nc 27 Sep 2008 17:00:54 -0000 1.3
***************
*** 26,31 ****
/** Link estimator asks the routing engine if this entry
! * should be inserted into the neighbor table given the
! * white bit. The return value is the "pin bit" - if true
* insert into the neighbor table. In the reference implementation
* the router will return true if the path through the source
--- 26,32 ----
/** Link estimator asks the routing engine if this entry
! * should be inserted into the neighbor table if the
! * white bit on a link is set but there is no room for the link
! * on the link table. The return value is the "pin bit" - if true
* insert into the neighbor table. In the reference implementation
* the router will return true if the path through the source
***************
*** 39,42 ****
/* should the source of this message be inserted into the neighbor table? */
! event bool shouldInsert(message_t * ONE msg, void* COUNT_NOK(len) payload, uint8_t len, bool white_bit);
}
--- 40,44 ----
/* should the source of this message be inserted into the neighbor table? */
! /* expect to be called only for links with the white bit set */
! event bool shouldInsert(message_t * ONE msg, void* COUNT_NOK(len) payload, uint8_t len);
}
More information about the Tinyos-2-commits
mailing list