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:
122:4072e03884e4
Parent:
80:8b3bff9cc598
--- a/source/OptionsBuilder.cpp	Fri Mar 31 06:21:29 2017 +0000
+++ b/source/OptionsBuilder.cpp	Thu Jul 13 18:48:54 2017 +0000
@@ -24,6 +24,7 @@
 #include "mbed-connector-interface/OptionsBuilder.h"
 
 // ResourceObserver support
+#include "mbed-connector-interface/EventQueueResourceObserver.h"
 #include "mbed-connector-interface/ThreadedResourceObserver.h"
 #include "mbed-connector-interface/TickerResourceObserver.h"
 #include "mbed-connector-interface/MinarResourceObserver.h"
@@ -195,20 +196,29 @@
         ((DynamicResource *)resource)->setOptions(this);
         ((DynamicResource *)resource)->setEndpoint((const void *)this->getEndpoint());
         if (((DynamicResource *)resource)->isObservable() == true && use_observer == true) {
+        	//
         	// Establish the appropriate ResourceObserver
+			//
 #if defined (MCI_MINAR_SCHEDULER) 
-			// Minar-based Scheduler ResourceObserver
+			// mbedOS3 RTOS Minar-based Scheduler ResourceObserver
 			MinarResourceObserver *observer = new MinarResourceObserver((DynamicResource *)resource,(int)sleep_time);
-#else
-	#ifdef CONNECTOR_USING_THREADS
+#endif
+
+#ifdef CONNECTOR_USING_THREADS
 			// mbedOS RTOS Thread ResourceObserver
             ThreadedResourceObserver *observer = new ThreadedResourceObserver((DynamicResource *)resource,(int)sleep_time);
-	#endif
-	#ifdef CONNECTOR_USING_TICKER
-			// mbed Ticker ResourceObserver
+#endif
+
+#ifdef CONNECTOR_USING_TICKER
+			// mbedOS RTOS Ticker ResourceObserver
             TickerResourceObserver *observer = new TickerResourceObserver((DynamicResource *)resource,(int)sleep_time);
-	#endif
 #endif
+
+#ifdef CONNECTOR_USING_EVENT_QUEUES
+			// mbedOS RTOS EventQueue ResourceObserver
+            EventQueueResourceObserver *observer = new EventQueueResourceObserver((DynamicResource *)resource,(int)sleep_time);
+#endif
+
 			// If no observer type is set in mbed-connector-interface/configuration.h (EndpointNetwork lib), then "observer" will be unresolved
             this->m_resource_observers.push_back(observer);