]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Add defaults for CollectionDebug interface.
authorrazvanm <razvanm>
Wed, 16 May 2007 19:07:19 +0000 (19:07 +0000)
committerrazvanm <razvanm>
Wed, 16 May 2007 19:07:19 +0000 (19:07 +0000)
tos/lib/net/lqi/LqiForwardingEngineP.nc
tos/lib/net/lqi/LqiRoutingEngineP.nc

index c52e80b412467859b2155afc82445ace9d04cc04..59917f95bdb947ac55fbc82f67cbfa3927ea0bef 100644 (file)
@@ -520,5 +520,25 @@ implementation {
  default event bool Intercept.forward[collection_id_t id](message_t* pMsg, void* payload, uint16_t len) {
    return 1;
  }
+
+  /* Default implementations for CollectionDebug calls.
+   * These allow CollectionDebug not to be wired to anything if debugging
+   * is not desired. */
+    
+  default command error_t CollectionDebug.logEvent(uint8_t type) {
+    return SUCCESS;
+  }
+  default command error_t CollectionDebug.logEventSimple(uint8_t type, uint16_t arg) {
+    return SUCCESS;
+  }
+  default command error_t CollectionDebug.logEventDbg(uint8_t type, uint16_t arg1, uint16_t arg2, uint16_t arg3) {
+    return SUCCESS;
+  }
+  default command error_t CollectionDebug.logEventMsg(uint8_t type, uint16_t msg, am_addr_t origin, am_addr_t node) {
+    return SUCCESS;
+  }
+  default command error_t CollectionDebug.logEventRoute(uint8_t type, am_addr_t parent, uint8_t hopcount, uint16_t metric) {
+    return SUCCESS;
+  }
 }
 
index fdea7b4a06e439fc49118b1ae0d1bac31ff8ad56..6740637ebfd1a565dcbfbd5f7604e80b917fc24a 100644 (file)
@@ -397,6 +397,26 @@ implementation {
   event void AMSend.sendDone(message_t* msg, error_t success) {
     msgBufBusy = FALSE;
   }
+
+    /* Default implementations for CollectionDebug calls.
+     * These allow CollectionDebug not to be wired to anything if debugging
+     * is not desired. */
+
+  default command error_t CollectionDebug.logEvent(uint8_t type) {
+    return SUCCESS;
+  }
+  default command error_t CollectionDebug.logEventSimple(uint8_t type, uint16_t arg) {
+    return SUCCESS;
+  }
+  default command error_t CollectionDebug.logEventDbg(uint8_t type, uint16_t arg1, uint16_t arg2, uint16_t arg3) {
+    return SUCCESS;
+  }
+  default command error_t CollectionDebug.logEventMsg(uint8_t type, uint16_t msg, am_addr_t origin, am_addr_t node) {
+    return SUCCESS;
+  }
+  default command error_t CollectionDebug.logEventRoute(uint8_t type, am_addr_t parent, uint8_t hopcount, uint16_t etx) {
+    return SUCCESS;
+  }
   
 }