MBED MQTT Lighting Endpoint for NXP LPC1768+AppBoard

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

Revision:
15:e44d75d95b38
Parent:
13:25448d92c205
Child:
19:956b694f6542
--- a/Definitions.h	Thu Feb 27 04:09:39 2014 +0000
+++ b/Definitions.h	Thu Feb 27 06:05:01 2014 +0000
@@ -26,18 +26,18 @@
 #define ENDPOINT_VERSION_ANNOUNCE "\r\nMBED IMPACT(MQTT) Endpoint v1.0"
 
 // Error Handler Log Message Length
-#define MAX_LOG_MESSAGE     768                             // maximum size of a logging message
+#define MAX_LOG_MESSAGE             768                             // 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
+#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              20                              // 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
 
 // Endpoint GPS Coordinates
-#define ENDPOINT_LOCATION   "Oulo Finland"                  // Where this light/endpoint lives
-#define ENDPOINT_GPS_COORDS "65.017210,25.492411"           // Where this light/endpoint lives
+#define ENDPOINT_LOCATION           "Oulo Finland"                  // Where this light/endpoint lives
+#define ENDPOINT_GPS_COORDS         "65.017210,25.492411"           // Where this light/endpoint lives
 
 // Keyword Definitions for MQTT packets
 #define IOC_REQUEST_LOAD_ALL_VERB   "load"
@@ -66,8 +66,17 @@
 #define IOC_RESPONSE_FAILED         "FAILED"
 
 // Resource Configuration
-#define RESOURCE_NAME_LEN           64                              // Resource name max length
-#define RESOURCE_VALUE_LEN          64                              // Resource value max length
+#define RESOURCE_NAME_LEN           20                              // Resource name max length
+#define RESOURCE_VALUE_LEN          20                              // Resource value max length
+
+// Number of Resources our Endpoint has
+#define NUM_RESOURCES               16
+
+// MapEntry Name length
+#define MAX_NAME_LENGTH             20
+
+// IOC <--> Resource Mapping
+#define NUM_MAPPINGS                NUM_RESOURCES                   // matches the number of resources
 
 // Transport Configuration
 #define NUM_TRANSPORTS              2                               // MQTT, HTTP