MBED_DEMOS / Mbed 2 deprecated mbed_mqtt_endpoint_ublox_cellular

Dependencies:   C027_Support C12832 StatusReporter LM75B MQTT-ansond c027_radios endpoint_core endpoint_mqtt mbed-rtos mbed

Files at this revision

API Documentation at this revision

Comitter:
ansond
Date:
Tue Feb 25 16:56:31 2014 +0000
Child:
1:2d81aac640bc
Commit message:
initial checkin

Changed in this revision

Beep.lib Show annotated file Show diff for this revision Revisions of this file
C12832_lcd.lib Show annotated file Show diff for this revision Revisions of this file
Definitions.h Show annotated file Show diff for this revision Revisions of this file
EmulatedLightDimmerAction.cpp Show annotated file Show diff for this revision Revisions of this file
EmulatedLightDimmerAction.h Show annotated file Show diff for this revision Revisions of this file
EmulatedLightSwitchAction.cpp Show annotated file Show diff for this revision Revisions of this file
EmulatedLightSwitchAction.h Show annotated file Show diff for this revision Revisions of this file
EmulatedResourceFactory.cpp Show annotated file Show diff for this revision Revisions of this file
EmulatedResourceFactory.h Show annotated file Show diff for this revision Revisions of this file
EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
HTTPClient.lib Show annotated file Show diff for this revision Revisions of this file
HTTPTransport.cpp Show annotated file Show diff for this revision Revisions of this file
HTTPTransport.h Show annotated file Show diff for this revision Revisions of this file
MBEDEndpoint.cpp Show annotated file Show diff for this revision Revisions of this file
MBEDEndpoint.h Show annotated file Show diff for this revision Revisions of this file
MMA7660.lib Show annotated file Show diff for this revision Revisions of this file
MODSERIAL.lib Show annotated file Show diff for this revision Revisions of this file
MQTT.lib Show annotated file Show diff for this revision Revisions of this file
MQTTTransport.cpp Show annotated file Show diff for this revision Revisions of this file
MQTTTransport.h Show annotated file Show diff for this revision Revisions of this file
MbedJSONValue.lib Show annotated file Show diff for this revision Revisions of this file
endpoint_core.lib Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
splitstring.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Beep.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/shimniok/code/Beep/#3eb39e374fc3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832_lcd.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/dreschpe/code/C12832_lcd/#8f86576007d6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Definitions.h	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,63 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+#ifndef _DEFINITIONS_H_
+#define _DEFINITIONS_H_
+
+// platform
+#include "mbed.h"
+
+// Our Endpoint Version Annoucement
+#define ENDPOINT_VERSION_ANNOUNCE "\r\nMBED IMPACT(MQTT) Endpoint v1.0"
+
+// Error Handler
+#define MAX_LOG_MESSAGE     256                             // maximum size of a logging message
+
+// Light Configuration
+#define NUM_LIGHTS          1                               // number of lights in this endpoint
+#define LIGHT_NAME          "mbed-mqtt-light-%d"            // name of each light in this endpoint
+#define LIGHT_NAME_LEN      64                              // buffer size for the light name
+#define LIGHT_ON_STATE      "0"                             // initial state of each light in this endpoint
+#define LIGHT_DIM_STATE     "25"                            // initial dimming state of each light in this endpoint
+
+// Resource Configuration
+#define RESOURCE_NAME_LEN   64                              // Resource name max length
+#define RESOURCE_VALUE_LEN  64                              // Resource value max length
+
+// Transport Configuration
+#define NUM_TRANSPORTS      2                               // MQTT, HTTP
+#define MQTT_TRANSPORT      0                               // MQTT Transport index
+#define HTTP_TRANSPORT      1                               // HTTP Transport index
+
+// MQTT connect information
+#define MQTT_HOSTNAME       "iocana.bcu.ac.uk"              // IOC MQTT Broker Host - iocana.bcu.ac.uk
+#define MQTT_HOSTPORT       1883                            // IOC MQTT Broker Port
+#define MQTT_ENDPOINT_ID    "mbed%d"                        // IOC MQTT Endpoint ID template
+#define MQTT_MAXID_VALUE    99                              // IOC MQTT Endpoint ID maximum integer value
+#define MQTT_ENDPOINT_IDLEN 64                              // IOC MQTT Endpoint ID length (max)
+#define MQTT_IOC_TOPIC      "ARM/sensinode/control/#"       // IOC MQTT Topic 
+#define MQTT_USERNAME       ""                              // IOC MQTT Username
+#define MQTT_PASSWORD       ""                              // IOC MQTT Password
+
+// Main Loop
+#define MAIN_LOOP_SLEEP     100                             // sleep time (ms) between main loop iterations
+
+// LED Blink Time
+#define BLINK_TIME     100                                  // LED blink times
+
+#endif // _DEFINITIONS_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EmulatedLightDimmerAction.cpp	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,40 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+ #include "EmulatedLightDimmerAction.h"
+ 
+  // Our instance
+ EmulatedLightDimmerAction *_dimmerAction = NULL;
+ 
+ // static callback for Dimming operations
+ void emulated_light_dimming_cb() {
+ }
+ 
+ // default constructor
+ EmulatedLightDimmerAction::EmulatedLightDimmerAction(ErrorHandler *error_handler,Light *light) : LightDimmerAction(error_handler,light) {
+     _dimmerAction = this;
+ }
+ 
+ // destructor
+ EmulatedLightDimmerAction::~EmulatedLightDimmerAction() {
+ }
+
+ // DIM the light
+ void EmulatedLightDimmerAction::dim(int value) { 
+    ((LightDimmerAction *)this)->light()->dim(value); 
+ }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EmulatedLightDimmerAction.h	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,33 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+#ifndef _EMULATED_LIGHT_DIMMER_ACTION_H_
+#define _EMULATED_LIGHT_DIMMER_ACTION_H_
+
+// Base class
+#include "LightDimmerAction.h"
+
+class EmulatedLightDimmerAction : public LightDimmerAction {        
+    public:
+        EmulatedLightDimmerAction(ErrorHandler *error_handler,Light *light);
+        virtual ~EmulatedLightDimmerAction(); 
+        
+        void dim(int value);       
+};
+
+#endif // _LIGHT_DIMMER_ACTION_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EmulatedLightSwitchAction.cpp	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,45 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+ #include "EmulatedLightSwitchAction.h"
+  
+ // Our instance
+ EmulatedLightSwitchAction *_switchAction = NULL;
+ 
+ // static callback for Switching operations
+ void emulated_light_switch_cb() {
+ }
+ 
+ // default constructor
+ EmulatedLightSwitchAction::EmulatedLightSwitchAction(ErrorHandler *error_handler,Light *light) : LightSwitchAction(error_handler,light) {
+    _switchAction = this;
+ }
+ 
+ // destructor
+ EmulatedLightSwitchAction::~EmulatedLightSwitchAction() {
+ }
+
+ // Light turned ON
+ void EmulatedLightSwitchAction::on() { 
+    ((LightSwitchAction *)this)->light()->on(); 
+ }
+ 
+ // Light turned OFF
+ void EmulatedLightSwitchAction::off() { 
+    ((LightSwitchAction *)this)->light()->off(); 
+ }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EmulatedLightSwitchAction.h	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,34 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+#ifndef _EMULATED_LIGHT_SWITCH_ACTION_H_
+#define _EMULATED_LIGHT_SWITCH_ACTION_H_
+
+// Base class
+#include "LightSwitchAction.h"
+
+class EmulatedLightSwitchAction : public LightSwitchAction {        
+    public:
+        EmulatedLightSwitchAction(ErrorHandler *error_handler,Light *light);
+        virtual ~EmulatedLightSwitchAction(); 
+        
+        void on();
+        void off();       
+};
+
+#endif // _LIGHT_SWITCH_ACTION_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EmulatedResourceFactory.cpp	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,59 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+ // class definition
+ #include "EmulatedResourceFactory.h"
+ 
+ // Ethernet
+ #include "EthernetInterface.h"
+ extern EthernetInterface ethernet;
+ 
+ // NSP supports Light Dimming
+ extern void emulated_light_dimming_cb();
+ 
+ // NSP supports Light Switch 
+ extern void emulated_light_switch_cb();
+ 
+ // default constructor
+ EmulatedResourceFactory::EmulatedResourceFactory(ErrorHandler *error_handler) : ResourceFactory(error_handler) {  
+ }
+ 
+ // default destructor
+ EmulatedResourceFactory::~EmulatedResourceFactory() {
+ }
+ 
+ // create resources
+ void EmulatedResourceFactory::createResources(char *endpoint_name) {
+    // create all of the resources we expect for this endpoint
+    this->createResource("dev/addldata","AdditionalData");
+    this->createResource("dev/location","Oulo Finland");
+    this->createResource("dev/bat","1.0");
+    this->createResource("sens/I","0.05");
+    this->createResource("nw/ipaddr",ethernet.getIPAddress());
+    this->createResource(endpoint_name,"lt/o/dim","25",(void *)&emulated_light_dimming_cb);          // Action: dim/brighten light
+    this->createResource("nw/eripaddr","0.0.0.0");
+    this->createResource(endpoint_name,"lt/0/on","1",(void *)&emulated_light_switch_cb);             // Action: light on/off
+    this->createResource("dev/mdl","Sensinode MBED Light");
+    this->createResource("gps/int","60");
+    this->createResource("gps/fix","1");
+    this->createResource("nw/pipaddr","0.0.0.0");
+    this->createResource("nw/prssi","0.0");
+    this->createResource("sens/temp","23.2");
+    this->createResource("sens/V","3.2");
+    this->createResource("gps/loc","65.017210,25.492411");
+ } 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EmulatedResourceFactory.h	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,37 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+#ifndef _EMULATED_RESOURCE_FACTORY_H_
+#define _EMULATED_RESOURCE_FACTORY_H_
+
+// Base Class
+#include "ResourceFactory.h"
+
+// ErrorHandler support
+#include "ErrorHandler.h"
+
+class EmulatedResourceFactory : public ResourceFactory {    
+    public:
+        EmulatedResourceFactory(ErrorHandler *error_handler);
+        virtual ~EmulatedResourceFactory();
+                      
+        virtual void createResources(char *endpoint_name);
+};
+
+
+#endif // _EMULATED_RESOURCE_FACTORY_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EthernetInterface.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/EthernetInterface/#6a67d2bddc7c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HTTPClient.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/donatien/code/HTTPClient/#1f743885e7de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HTTPTransport.cpp	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,63 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+ #include "HTTPTransport.h"
+ 
+ // HTTP Client
+ HTTPClient _http;
+ 
+ // default constructor
+ HTTPTransport::HTTPTransport(ErrorHandler *error_handler) : Transport(error_handler) {
+     this->m_http = &_http;
+     this->m_connected = true;
+ }
+ 
+ // default destructor
+ HTTPTransport::~HTTPTransport() {
+ }
+ 
+ // connect up HTTP
+ bool HTTPTransport::connect() { return this->m_connected; }
+ 
+ // disconnect from HTTP
+ bool HTTPTransport::disconnect() { return true; }
+ 
+ // HTTP Get
+ bool HTTPTransport::httpGet(char *url,char *result,int result_length) {
+    return (this->m_http->get(url,result,result_length) == 0);
+ }
+ 
+ // HTTP Put
+ bool HTTPTransport::httpPut(char *url,char *data,int data_length,char *result,int result_length) {
+     HTTPText input(data,data_length);
+     HTTPText output(result,result_length);
+     return (this->m_http->put(url,output,&input) != 0);
+ }
+ 
+ // HTTP Post
+ bool HTTPTransport::httpPost(char *url,char *data,int data_length,char *result,int result_length) {
+     HTTPText input(data,data_length);
+     HTTPText output(result,result_length);
+     return (this->m_http->post(url,output,&input) != 0);
+ }
+ 
+ // HTTP Delete
+ bool HTTPTransport::httpDelete(char *url,char *data,int data_length) {
+     HTTPText input(data,data_length);
+     return (this->m_http->del(url,&input) != 0);
+ }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HTTPTransport.h	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,45 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+#ifndef ___HTTPTRANSPORT_H_
+#define ___HTTPTRANSPORT_H_
+
+// Base Class
+#include "Transport.h"
+
+// HTTP Client Library Support
+#include "HTTPClient.h"
+
+class HTTPTransport : public Transport {
+    private:
+        HTTPClient *m_http;
+        
+    public:
+        HTTPTransport(ErrorHandler *error_handler);
+        virtual ~HTTPTransport();
+
+        bool httpGet(char *url,char *result,int result_length);
+        bool httpPut(char *url,char *data,int data_length,char *result,int result_length);
+        bool httpPost(char *url,char *data,int data_length,char *result,int result_length);
+        bool httpDelete(char *url,char *data,int data_length);
+        
+        virtual bool connect();
+        virtual bool disconnect();
+};
+
+#endif // ___HTTPTRANSPORT_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MBEDEndpoint.cpp	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,219 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+ #include "MQTTTransport.h"
+ #include "MBEDEndpoint.h"
+ 
+ // MBED Light support
+ #include "MBEDLight.h"
+ 
+ // Emulated Actions we can act on
+ #include "EmulatedLightDimmerAction.h"
+ #include "EmulatedLightSwitchAction.h"
+  
+ // default constructor
+ MBEDEndpoint::MBEDEndpoint(ErrorHandler *error_handler,EthernetInterface *ethernet) {
+     bool success = true;
+     for(int i=0;i<NUM_TRANSPORTS;++i) this->m_transports[i] = NULL;
+     this->m_error_handler = error_handler;
+     this->logger()->log(ENDPOINT_VERSION_ANNOUNCE);
+     if (success) this->logger()->turnLEDBlue();
+     if (success) success = this->initializeEthernet(ethernet);
+     if (success) this->logger()->turnLEDYellow();
+     if (success) success = this->initializeTransports();
+     if (success) success = this->initializeLights();
+     if (success) this->logger()->turnLEDGreen();
+     if (!success) this->logger()->turnLEDRed();
+ }
+ 
+ // default destructor
+ MBEDEndpoint::~MBEDEndpoint() {
+     bool success = true;
+     if (success) this->logger()->turnLEDYellow();
+     if (success) success = this->closeLights();
+     if (success) success = this->closeTransports();
+     if (success) success = this->closeEthernet();
+     if (success) this->logger()->turnLEDBlue();
+ }
+ 
+ // initialize the Lights
+ bool MBEDEndpoint::initializeLights() {
+     this->logger()->log("Initializing Lights...");
+     for(int i=0;i<NUM_LIGHTS;++i) {
+         this->m_lights[i] = new MBEDLight(this->logger(),this->m_transports,i+1,this);
+         this->m_lights[i]->setDimmerAction(new EmulatedLightDimmerAction(this->logger(),this->m_lights[i]));
+         this->m_lights[i]->setSwitchAction(new EmulatedLightSwitchAction(this->logger(),this->m_lights[i]));
+     }
+     return true;
+ }
+ 
+ // does the input name match any of our light resources?
+ int MBEDEndpoint::indexOfLight(char *name) {
+     bool found = false;
+     int index = -1;
+     
+     for(int i=0;i<NUM_LIGHTS && !found;++i) {
+         if (strcmp(this->m_lights[i]->getName(),name) == 0) {
+             found = true;
+             index = i;
+         }
+     }
+     
+     return index;
+ }
+ 
+ // get a specific resources
+ ResourceFactory *MBEDEndpoint::getResources(int index) {
+     if (index >= 0 && index < NUM_LIGHTS) return this->m_lights[index]->resources();
+     return NULL;
+ }
+ 
+ // initialize our ResourceFactory
+ ResourceFactory *MBEDEndpoint::initResourceFactory() {
+     ResourceFactory *factory = new ResourceFactory(this->logger());
+     return factory;
+ }
+ 
+ // initialize a specific transport
+ bool MBEDEndpoint::initializeTransport(int index,char *key,Transport *transport) {
+     bool success = false;
+     if (this->m_transports[index] == NULL) {
+          this->logger()->log("Initializing %s Transport...", key);
+          this->m_transports[index] = transport;
+          if (this->m_transports[index] != NULL) success = this->m_transports[index]->connect();
+      }
+      else {
+          this->logger()->log("%s already connected (OK)...", key);
+          success = true;
+      }
+      return success;
+ }
+ 
+ // initialize our transports
+ bool MBEDEndpoint::initializeTransports() {
+      bool success = true;
+      
+      if (success == true) {
+        // MQTT Initialization
+        success = this->initializeTransport(MQTT_TRANSPORT,"MQTT",new MQTTTransport(this->m_error_handler));
+      }
+      
+      if (success == true) {
+          // HTTP Initialization
+          success = this->initializeTransport(HTTP_TRANSPORT,"HTTP",new HTTPTransport(this->m_error_handler));
+      }
+      return success;
+ }
+ 
+ // initialize our Ethernet 
+ bool MBEDEndpoint::initializeEthernet(EthernetInterface *ethernet) {
+     bool success = false;
+     this->m_ethernet = ethernet;
+     if (this->m_ethernet != NULL) {
+         this->logger()->log("Initializing Ethernet...");
+         
+         // connect up ethernet
+         this->m_ethernet->init();
+         this->m_ethernet->connect();
+         
+         // display our IP address
+         char *ipaddr = this->m_ethernet->getIPAddress();
+         if (ipaddr != NULL && strlen(ipaddr) > 0) {
+            this->logger()->log("IPAddress: %s",this->m_ethernet->getIPAddress());
+            success = true;
+         }
+         else {
+            this->logger()->log("Ethernet Not Connected...");
+            success = false;
+         }
+     }
+     else {
+         this->logger()->log("No Ethernet instance found");
+         success = false;
+     }
+     return success;
+ }
+ 
+ // load up our endpoint to the IOC
+ void MBEDEndpoint::loadEndpoint() {
+ }
+ 
+ // update our endpoint with the IOC
+ void MBEDEndpoint::updateEndpoint() {
+ }
+        
+ 
+ // close down the Lights
+ bool MBEDEndpoint::closeLights() {
+    bool success = true;
+    this->logger()->log("Closing down Lights...");
+    return success;
+ }
+ 
+ // close a given transport
+ bool MBEDEndpoint::closeTransport(int index,char *key) {
+    this->logger()->log("Closing down %s Transport...", key);
+    if (this->m_transports[index] != NULL) delete this->m_transports[index];
+    return true;
+ }
+ 
+ // close down our transports
+ bool MBEDEndpoint::closeTransports() {
+     bool success = true;
+     
+     if (success) {
+         // close MQTT
+         success = this->closeTransport(MQTT_TRANSPORT,"MQTT");
+     }
+     
+     if (success) {
+         // close HTTP
+         success = this->closeTransport(HTTP_TRANSPORT,"HTTP");
+     }
+     
+     return success;
+ }
+ 
+ // close down our Ethernet 
+ bool MBEDEndpoint::closeEthernet() {
+     this->logger()->log("Closing down Ethernet...");
+     if (this->m_ethernet != NULL) this->m_ethernet->disconnect();
+     return true;
+ }
+ 
+ // get our error handler
+ ErrorHandler *MBEDEndpoint::logger() { return this->m_error_handler; }
+ 
+ // main running loop
+ void MBEDEndpoint::run() {
+     this->logger()->log("Endpoint Main Loop");
+     while(true) {
+         // sleep a bit
+         //this->logger()->log("Sleeping for a bit...");
+         wait_ms(MAIN_LOOP_SLEEP);
+         
+         // check for events 
+         //this->logger()->log("Processing Events...");
+         for(int i=0;i<NUM_TRANSPORTS;++i) this->m_transports[i]->checkAndProcess();
+         
+         // check for exit
+         //this->logger()->log("Checking for exit...");
+         this->logger()->checkForExit();
+     }
+}
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MBEDEndpoint.h	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,71 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+#ifndef _MBED_ENDPOINT_H_
+#define _MBED_ENDPOINT_H_
+
+// Ethernet Interface
+#include "EthernetInterface.h"
+
+// ErrorHandler support
+#include "ErrorHandler.h"
+
+// Transport support
+#include "MQTTTransport.h"
+#include "HTTPTransport.h"
+
+// Light Support
+#include "Light.h"
+
+// ResourceFactory Support
+#include "ResourceFactory.h"
+  
+class MBEDEndpoint {
+    private:
+        EthernetInterface *m_ethernet;                              // ethernet interface
+        ErrorHandler      *m_error_handler;                         // our error handler
+        Transport         *m_transports[NUM_TRANSPORTS];            // our transport
+        Light             *m_lights[NUM_LIGHTS];                    // our lights
+        
+    public:
+        MBEDEndpoint(ErrorHandler *error_handler,EthernetInterface *ethernet);
+       ~MBEDEndpoint();
+        ResourceFactory *initResourceFactory();
+        void run();
+        
+        int indexOfLight(char *name);
+        ResourceFactory *getResources(int index);
+        
+        void loadEndpoint();
+        void updateEndpoint();
+    
+    protected:
+    
+    private:
+        bool initializeLights();
+        bool initializeTransport(int index,char *key,Transport *transport);
+        bool initializeTransports();
+        bool initializeEthernet(EthernetInterface *ethernet);
+        bool closeLights();
+        bool closeTransport(int index,char *key);
+        bool closeTransports();
+        bool closeEthernet(); 
+        ErrorHandler *logger(); 
+};
+
+#endif // _MBED_ENDPOINT_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MMA7660.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Sissors/code/MMA7660/#a8e20db7901e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MODSERIAL.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/AjK/code/MODSERIAL/#ae0408ebdd68
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MQTT.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/jwende/code/MQTT/#ca855d29545b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MQTTTransport.cpp	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,201 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+ #include "MQTTTransport.h"
+ 
+ #include "MBEDEndpoint.h"
+ 
+ // String splitting support
+ #include "splitstring.h"
+ 
+ // our transmitt instance 
+ MQTTTransport *instance =  NULL;
+
+ // MQTT callback to handle received messages
+ void _mqtt_message_handler(char *topic,char *payload,unsigned int length) {
+    if (instance != NULL) instance->processMessage((char *)payload,length);
+ }
+ 
+ // our MQTT client endpoint
+ PubSubClient _mqtt(MQTT_HOSTNAME,MQTT_HOSTPORT,_mqtt_message_handler);
+  
+ // default constructor
+ MQTTTransport::MQTTTransport(ErrorHandler *error_handler) : Transport(error_handler) {
+     this->m_mqtt = NULL;
+     instance = this;
+     this->m_map = new MBEDToIOCResourceMap();
+ }
+ 
+ // default destructor
+ MQTTTransport::~MQTTTransport() {
+     this->disconnect();
+     if (this->m_mqtt != NULL) delete this->m_mqtt;
+ }
+ 
+ // process a MQTT Message
+ void MQTTTransport::processMessage(char *payload, unsigned int len) {
+     string message_type;
+     string message_name;
+     string message_verb;
+     string message_value;
+     string message_opt;
+     MBEDEndpoint *endpoint = (MBEDEndpoint *)this->getEndpoint();
+
+     // DEBUG
+     this->logger()->log("MQTT Message: %s length=%d",payload,len);
+     
+     // split the string by the delimiter
+     splitstring str_payload(payload);
+     vector<string> data = str_payload.split(':');
+     
+     // format of the MQTT message:   message_type:name:verb|Parameter_X:value|keyword:optional_data
+     if (data.size() > 0) message_type = data[0];
+     if (data.size() > 1) message_name = data[1];
+     if (data.size() > 2) message_verb = data[2];
+     if (data.size() > 3) message_value = data[3];
+     if (data.size() > 4) message_opt = data[4];
+     
+     // load endpoints
+     if (strcmp(message_type.c_str(),"endpoint") == 0) {
+         if (strcmp(message_name.c_str(),"all") == 0) {
+             if (strcmp(message_verb.c_str(),"load") == 0) {
+                 // load up our endpoint
+                 endpoint->loadEndpoint();
+             }
+             if (strcmp(message_verb.c_str(),"update") == 0) {
+                 // update our endpoint
+                 endpoint->updateEndpoint();
+             }
+         }
+         else {
+             // destined for our lights?
+             int index = endpoint->indexOfLight((char *)message_name.c_str());
+             if (index >= 0) {
+                 if (strcmp(message_verb.c_str(),"update") == 0) {
+                     // update our endpoint
+                     endpoint->updateEndpoint();
+                 }
+             }
+         }
+     }
+     
+     // change a resource value
+     if (strcmp(message_type.c_str(),"change") == 0) {
+         // destined for our lights?
+         int index = endpoint->indexOfLight((char *)message_name.c_str());
+         if (index >= 0) {
+             // map the parameter to one of ours
+             char *mapped_resource = this->mapEndpointResourceToIOCResource((char *)message_verb.c_str());
+             if (mapped_resource != NULL) {
+                 ResourceFactory *factory = endpoint->getResources(index);
+                 factory->setResourceValue((char *)message_name.c_str(),(char *)message_value.c_str());
+             }
+         }
+     }
+     
+     // get a resource value
+     if (strcmp(message_type.c_str(),"get") == 0) {
+         // destined for our lights?
+         int index = endpoint->indexOfLight((char *)message_name.c_str());
+         if (index >= 0) {
+             // map the parameter to one of ours
+             char *mapped_resource = this->mapEndpointResourceToIOCResource((char *)message_verb.c_str());
+             if (mapped_resource != NULL) {
+                 ResourceFactory *factory = endpoint->getResources(index);
+                 char *resource_value = factory->getResourceValue((char *)message_name.c_str());
+                 
+                 // end the resource value back over MQTT
+                 this->sendResourceValue((char *)message_name.c_str(),(char *)message_verb.c_str(),resource_value);
+             }
+         }
+     }
+ }
+ 
+ void MQTTTransport::sendResourceValue(char *endpoint_name,char *parameter_name,char *value) {
+ }
+ 
+ char *MQTTTransport::mapEndpointResourceToIOCResource(char *ioc_name) {
+     return this->m_map->getMBEDMappedName(ioc_name);
+ }
+ 
+ char *MQTTTransport::makeID(char *id_template,char *buffer) {
+     srand(time(0));
+     srand(rand());
+     sprintf(buffer,id_template,rand()%MQTT_MAXID_VALUE);
+     return buffer;
+ }
+ 
+ // connect up MQTT
+ bool MQTTTransport::connect() {
+     char mqtt_id[MQTT_ENDPOINT_IDLEN+1];
+     memset(mqtt_id,0,(MQTT_ENDPOINT_IDLEN+1));
+     if (this->m_connected == false) {
+         this->logger()->log("MQTT Init: %s:%d...",MQTT_HOSTNAME,MQTT_HOSTPORT);
+         this->m_mqtt = &_mqtt;
+         if (this->m_mqtt != NULL) {
+             char *id = this->makeID(MQTT_ENDPOINT_ID,mqtt_id);
+             this->logger()->log("MQTT Connect: ID: %s...",id);
+             if (this->m_mqtt->connect(id)) {
+                 this->logger()->log("MQTT Subscribe: Topic: %s...",MQTT_IOC_TOPIC);
+                 if (this->m_mqtt->subscribe(MQTT_IOC_TOPIC)) {
+                     this->logger()->log("MQTT CONNECTED.");
+                     this->m_connected = true;
+                 }
+                 else {
+                     this->logger()->log("MQTT Subscribe: Topic: %s FAILED",MQTT_IOC_TOPIC);
+                     this->logger()->turnLEDRed();
+                 }
+             }
+             else {
+                 this->logger()->log("MQTT Connect: ID: %s FAILED",id);
+                 this->logger()->turnLEDRed();
+             }
+         }
+         else {
+             this->logger()->log("MQTT Unable to allocate new instance");
+             this->logger()->turnLEDRed();
+         }
+     }
+     else {
+         this->logger()->log("MQTT already connected (OK)");
+     }
+     return this->m_connected;
+ }
+ 
+ // disconnect from MQTT
+ bool MQTTTransport::disconnect() {
+     if (this->m_mqtt != NULL) {
+         this->logger()->log("MQTT Unsubscribing from: %s...",MQTT_IOC_TOPIC);
+         this->m_mqtt->unsubscribe(MQTT_IOC_TOPIC);
+         this->logger()->log("MQTT Disconnecting...");
+         this->m_mqtt->disconnect();
+     }
+     else {
+         this->logger()->log("MQTT already disconnected (OK)");
+     }
+     this->m_connected = false;
+     return true;
+ }
+ 
+ // check transport and process stuff
+ void MQTTTransport::checkAndProcess() {
+     if (this->m_mqtt != NULL && this->m_connected == true) {
+         this->m_mqtt->loop();
+         this->logger()->blinkMQTTTransportRxLED();
+     }
+ }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MQTTTransport.h	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,53 @@
+/* Copyright C2013 Doug Anson, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files the "Software", to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+#ifndef ___MQTTTRANSPORT_H_
+#define ___MQTTTRANSPORT_H_
+
+// Base Class
+#include "Transport.h"
+
+// MBED to IOC Resource Map
+#include "MBEDToIOCResourceMap.h"
+
+// MQTT Support
+#include "PubSubClient.h"
+
+class MQTTTransport : public Transport {
+    private:
+        PubSubClient         *m_mqtt;
+        MBEDToIOCResourceMap *m_map;
+        
+    public:
+        MQTTTransport(ErrorHandler *error_handler);
+        virtual ~MQTTTransport();
+       
+        void processMessage(char *payload, unsigned int len);
+    
+        virtual bool connect();
+        virtual bool disconnect();
+        
+        virtual void checkAndProcess();
+        
+    private:
+        char *makeID(char *id_template, char *buffer);
+        char *mapEndpointResourceToIOCResource(char *ioc_name);
+        void sendResourceValue(char *endpoint_name,char *parameter_name,char *value);
+};
+
+#endif // ___MQTTTRANSPORT_H_
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MbedJSONValue.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/samux/code/MbedJSONValue/#10a99cdf7846
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/endpoint_core.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/ansond/code/endpoint_core/#f1c9299a3ca1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#f88660a9bed1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/splitstring.lib	Tue Feb 25 16:56:31 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/ansond/code/splitstring/#8b94fff26053