use TCP to connect to mbed connector

Fork of mbedConnectorInterfaceWithDM by Doug Anson

Revision:
54:dfee8691c83a
Parent:
35:782c99a7a290
--- a/source/TickerResourceObserver.cpp	Mon Aug 08 19:02:00 2016 +0000
+++ b/source/TickerResourceObserver.cpp	Tue Aug 09 17:18:49 2016 +0000
@@ -29,8 +29,14 @@
  TickerResourceObserver::TickerResourceObserver(DynamicResource *resource,int sleep_time) : 
                                     ResourceObserver(resource,(int)(sleep_time/1000)) {
      this->setObserving(false);
+     
      // DEBUG
-     std::printf("TickerResourceObserver being used for %s (sleep_time=%d)\r\n",resource->getFullName().c_str(),sleep_time);
+     if (sleep_time > 0) {
+        this->logger()->log("TickerResourceObserver being used for %s (sleep_time: %d ms)",resource->getFullName().c_str(),sleep_time);
+     }
+     else {
+        this->logger()->log("TickerResourceObserver being used for %s",resource->getFullName().c_str());
+     }
  }
   
  // destructor
@@ -57,5 +63,10 @@
  void TickerResourceObserver::stopObservation() {
      this->setObserving(false);
  }
+
+ // halt the underlying observer mechanism
+ void TickerResourceObserver::halt() {
+     this->m_ticker.detach();
+ }
  
  #endif // CONNECTOR_USING_TICKER
\ No newline at end of file