]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/net/ctp/CtpRoutingEngineP.nc
fixed bug reported by Mehmet Akif Antepli - arg type mismatch
[tinyos-2.x.git] / tos / lib / net / ctp / CtpRoutingEngineP.nc
index 352938035f3999a048507887ac81a4e00eaca311..298cd6407c6329bc5ff6486cab7c1d7b7a99e600 100644 (file)
@@ -151,13 +151,6 @@ implementation {
     uint32_t parentChanges;
     /* end statistics */
 
-    uint32_t routeUpdateTimerCount;
-
-    // Maximimum it takes to hear four beacons
-    enum {
-      DEATH_TEST_INTERVAL = (maxInterval * 4) / (BEACON_INTERVAL / 1024),
-    };
-    
     // forward declarations
     void routingTableInit();
     uint8_t routingTableFind(am_addr_t);
@@ -199,7 +192,6 @@ implementation {
 
     command error_t Init.init() {
         uint8_t maxLength;
-        routeUpdateTimerCount = 0;
         radioOn = FALSE;
         running = FALSE;
         parentChanges = 0;
@@ -250,7 +242,6 @@ implementation {
     /* Is this quality measure better than the minimum threshold? */
     // Implemented assuming quality is EETX
     bool passLinkEtxThreshold(uint16_t etx) {
-       return TRUE;
         return (etx < ETX_THRESHOLD);
     }
 
@@ -636,26 +627,20 @@ implementation {
     }
 
 
-  /* 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
+  /* 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)
+   *   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
-   *   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) {
+    event bool CompareBit.shouldInsert(message_t *msg, void* payload, uint8_t len) {
         
         bool found = FALSE;
         uint16_t pathEtx;
-        //uint16_t linkEtx = evaluateEtx(0);
         uint16_t neighEtx;
         int i;
         routing_table_entry* entry;
@@ -823,7 +808,7 @@ implementation {
     command uint16_t      CtpRoutingPacket.getEtx(message_t* msg) {
       return getHeader(msg)->etx;
     }
-    command void          CtpRoutingPacket.setEtx(message_t* msg, uint8_t etx) {
+    command void          CtpRoutingPacket.setEtx(message_t* msg, uint16_t etx) {
       getHeader(msg)->etx = etx;
     }