Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C12832_lcd EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed
Diff: MBEDEndpoint.cpp
- 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) {