mbed Connector Interface simplification API on top of mbed-client

Fork of mbedConnectorInterfaceV3 by Doug Anson

NOTE:

This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!

Revision:
65:57ad7b72108f
Parent:
54:dfee8691c83a
Child:
66:764ec3dd205a
diff -r f6e3ecaa8c3a -r 57ad7b72108f source/ThreadedResourceObserver.cpp
--- a/source/ThreadedResourceObserver.cpp	Mon Aug 22 16:55:24 2016 +0000
+++ b/source/ThreadedResourceObserver.cpp	Mon Aug 22 18:13:13 2016 +0000
@@ -26,19 +26,20 @@
  #ifdef CONNECTOR_USING_THREADS
  
  // constructor
- ThreadedResourceObserver::ThreadedResourceObserver(DynamicResource *resource,int sleep_time) : 
-                                                            ResourceObserver(resource,sleep_time) 
-                                                            ,m_observation_thread(&ThreadedResourceObserver::_observation_notifier,this) 
-                                                            {
-        this->setObserving(false);
-        
-        // DEBUG
-        if (sleep_time > 0) {
-            this->logger()->log("ThreadedResourceObserver being used for %s (sleep_time: %d ms)",resource->getFullName().c_str(),sleep_time);
-        }
-        else {
-            this->logger()->log("ThreadedResourceObserver being used for %s",resource->getFullName().c_str());
-        }
+ ThreadedResourceObserver::ThreadedResourceObserver(DynamicResource *resource,int sleep_time) : ResourceObserver(resource,sleep_time), m_observation_thread() {                                                            {
+    // default is not observing...
+    this->setObserving(false);
+    
+    // DEBUG
+    if (sleep_time > 0) {
+        this->logger()->log("ThreadedResourceObserver being used for %s (sleep_time: %d ms)",resource->getFullName().c_str(),sleep_time);
+    }
+    else {
+        this->logger()->log("ThreadedResourceObserver being used for %s",resource->getFullName().c_str());
+    }
+    
+    // start the thread by invoking the thread task...
+    this->m_observation_thread.start(this,&ThreadedResourceObserver::observation_task);
  }
  
  // destructor