![](/media/cache/group/arm_mbed.PNG.50x50_q85.png)
MBED MQTT Lighting Endpoint for NXP Ublox (cellular enabled)
Dependencies: C027_Support C12832 StatusReporter LM75B MQTT-ansond c027_radios endpoint_core endpoint_mqtt mbed-rtos mbed
Diff: Definitions.h
- Revision:
- 37:c6c94f1b3e5d
- Parent:
- 32:a7b3c285446c
- Child:
- 42:46cc1641800b
--- a/Definitions.h Sat Mar 01 05:58:00 2014 +0000 +++ b/Definitions.h Sat Mar 01 06:12:50 2014 +0000 @@ -22,20 +22,16 @@ // platform #include "mbed.h" +// include common definitions +#include "CommonDefinitions.h" + // Our Endpoint Version Annoucement #define ENDPOINT_VERSION_ANNOUNCE "\r\nMBED IMPACT(MQTT) Endpoint v1.0" -// Error Handler Log Message Length -#define MAX_LOG_MESSAGE 900 // 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 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 +// Endpoint GPS Coordinates/Location #define ENDPOINT_LOCATION "Oulo Finland" // Where this light/endpoint lives //#define ENDPOINT_GPS_COORDS "25.492411 65.017210" // work #define ENDPOINT_GPS_COORDS "25.467880 65.020071" // home @@ -72,19 +68,6 @@ #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 -// Resource Configuration -#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 #define MQTT_TRANSPORT 0 // MQTT Transport index @@ -106,25 +89,4 @@ #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 - -// Philips Light Support -#define PL_ENABLE false // true - enable for endpoint light, false - disable -#define PL_LIGHT_ID_DOUG 1 // Dougs Light -#define PL_LIGHT_ID_BILL 2 // Bills Light -#define PL_LIGHT_ID_KERRY 3 // Kerrys Light -#define PL_LIGHT_ID PL_LIGHT_ID_DOUG // Default light -#define PL_GW_ADDRESS "192.168.1.178" // Philips Gateway in IOT lab (Austin) -#define PL_DEFAULT_STATE 1 // on -#define PL_DEFAULT_DIM 11 // dim value -#define PL_URL_BUFFER_LEN 128 -#define PL_PAYLOAD_BUFFER_LEN 128 -#define PL_RESPONSE_BUFFER_LEN 128 -#define PL_URL_TEMPLATE "http://%s/api/newdeveloper/lights/%d/state" -#define PL_ON_COMMAND_TEMPLATE "{\"on\":%s,\"sat\":211,\"bri\":%d,\"hue\":13122}" - #endif // _DEFINITIONS_H \ No newline at end of file