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:
27:b8aaf7dc7023
Parent:
21:0bbe9057e7b1
Child:
33:1d0b855df5a5
--- a/source/Utils.cpp	Sun Jun 12 03:18:25 2016 +0000
+++ b/source/Utils.cpp	Tue Jun 14 04:01:34 2016 +0000
@@ -25,6 +25,7 @@
 #include "mbed-connector-interface/OptionsBuilder.h"
 #include "mbed-connector-interface/mbedEndpointNetwork.h"
 #include "mbed-connector-interface/DeviceManager.h"
+#include "mbed-connector-interface/ObjectInstanceManager.h"
 
 // Maximum CoAP URL length
 #define MAX_CONN_URL_LENGTH		128
@@ -46,8 +47,15 @@
     logger.log("Endpoint: allocating endpoint instance...");
 	Connector::Endpoint *ep = new Connector::Endpoint(&logger,options);
 	if (ep != NULL) {
+		// link to config object
 		config.setEndpoint((void *)ep);
+		
+		// not sure if we need this anymore...
 		ep->asRouterNode(canActAsRouterNode);
+		
+		// Add ObjectInstanceManager
+		ObjectInstanceManager *oim = new ObjectInstanceManager(&logger,(void *)ep);
+		ep->setObjectInstanceManager(oim);
     }
     return (void *)ep;
 }