MBED MQTT Lighting Endpoint for NXP Ublox (Ethernet enabled)

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

Revision:
30:5c670ec5d203
Parent:
26:25945de9e652
Child:
32:a7b3c285446c
--- a/Definitions.h	Fri Feb 28 05:20:00 2014 +0000
+++ b/Definitions.h	Fri Feb 28 18:08:11 2014 +0000
@@ -49,7 +49,7 @@
 #define IOC_REQUEST_VALUE_VERB      "Get"
 #define IOC_RESPONSE_VERB           "response"
 #define IOC_REPONSE_ID_KEY          "id"
-#define IOC_DATASOURCE_ID           "198"
+#define IOC_DATASOURCE_ID           "199"
 
 // IOC REST Buffer Lengths
 #define IOC_REST_URL_LEN            128
@@ -67,8 +67,8 @@
 #define IOC_RESPONSE_FAILED         "FAILED"
 
 // TEMP - until we get HTTPS with BasicAuth working in MBED...
-//#define GW_IPADDRESS                "192.168.1.191"     // work
-#define GW_IPADDRESS                "10.1.0.27"         // home
+#define GW_IPADDRESS                "192.168.1.191"     // work
+//#define GW_IPADDRESS                "10.1.0.27"         // home
 #define GW_REDIRECT_URL             "http://%s:8888/NSP-IOC-Gateway/IOCRestAPI"
 #define USE_GW_HTTP_REDIRECTOR      true                            // true - make http calls to IOC via GW, false - make http calls directly to IOC
 
@@ -96,11 +96,12 @@
 // 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_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/%s"      // IOC MQTT Topic 
-#define MQTT_IOC_ANNOUNCE_TOPIC     "ARM/sensinode/control"         // IOC MQTT Topic (since MQTT on MBED cannot seem to handle wildcards)
+#define MQTT_IOC_ANNOUNCE_TOPIC     "ARM/sensinode/control/all"     // IOC MQTT Topic (since MQTT on MBED cannot seem to handle wildcards)
+#define MQTT_IOC_ALL_ENDPOINT       "all"                           // must be thes ame as the last element of MATT_IOC_ANNOUNCE_TOPIC
 #define MQTT_IOC_TOPIC_LEN          42                              // max length for the topic string
 #define MQTT_USERNAME               ""                              // IOC MQTT Username
 #define MQTT_PASSWORD               ""                              // IOC MQTT Password