MBED_DEMOS / Mbed 2 deprecated mbed_mqtt_endpoint_nxp

Dependencies:   C12832_lcd EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed

Revision:
2:90a84a216c58
Parent:
0:ae2a45502448
Child:
3:3db076b9d380
diff -r 2d81aac640bc -r 90a84a216c58 MBEDEndpoint.cpp
--- a/MBEDEndpoint.cpp	Tue Feb 25 17:12:46 2014 +0000
+++ b/MBEDEndpoint.cpp	Tue Feb 25 18:09:29 2014 +0000
@@ -22,6 +22,9 @@
  // MBED Light support
  #include "MBEDLight.h"
  
+ // Emulated Resource Factory
+ #include "EmulatedResourceFactory.h"
+ 
  // Emulated Actions we can act on
  #include "EmulatedLightDimmerAction.h"
  #include "EmulatedLightSwitchAction.h"
@@ -84,10 +87,10 @@
  }
  
  // initialize our ResourceFactory
- ResourceFactory *MBEDEndpoint::initResourceFactory() {
-     ResourceFactory *factory = new ResourceFactory(this->logger());
-     return factory;
- }
+ ResourceFactory *MBEDEndpoint::initResourceFactory() { return new EmulatedResourceFactory(this->logger()); }
+ 
+ // get our endpoint name (first light name)
+ char *MBEDEndpoint::getEndpointName() { return this->m_lights[0]->getName(); }
  
  // initialize a specific transport
  bool MBEDEndpoint::initializeTransport(int index,char *key,Transport *transport) {