MBED NanoService Lighting Endpoint for NXP Ublox (cellular enabled)
Dependencies: C027_Support C12832 StatusReporter LM75B c027_radios endpoint_core endpoint_nsp nsp_resources mbed mbed-rtos
Definitions.h@84:72c9ea4f7775, 2014-03-11 (annotated)
- Committer:
- ansond
- Date:
- Tue Mar 11 21:26:23 2014 +0000
- Revision:
- 84:72c9ea4f7775
- Parent:
- 82:66a9800af243
- Child:
- 85:2123b96e930f
updates
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ansond | 0:dcced975fb52 | 1 | /* Copyright C2013 Doug Anson, MIT License |
ansond | 0:dcced975fb52 | 2 | * |
ansond | 0:dcced975fb52 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
ansond | 0:dcced975fb52 | 4 | * and associated documentation files the "Software", to deal in the Software without restriction, |
ansond | 0:dcced975fb52 | 5 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, |
ansond | 0:dcced975fb52 | 6 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is |
ansond | 0:dcced975fb52 | 7 | * furnished to do so, subject to the following conditions: |
ansond | 0:dcced975fb52 | 8 | * |
ansond | 0:dcced975fb52 | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
ansond | 0:dcced975fb52 | 10 | * substantial portions of the Software. |
ansond | 0:dcced975fb52 | 11 | * |
ansond | 0:dcced975fb52 | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
ansond | 0:dcced975fb52 | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
ansond | 0:dcced975fb52 | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
ansond | 0:dcced975fb52 | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
ansond | 0:dcced975fb52 | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
ansond | 0:dcced975fb52 | 17 | */ |
ansond | 0:dcced975fb52 | 18 | |
ansond | 0:dcced975fb52 | 19 | #ifndef _DEFINITIONS_H_ |
ansond | 0:dcced975fb52 | 20 | #define _DEFINITIONS_H_ |
ansond | 0:dcced975fb52 | 21 | |
ansond | 0:dcced975fb52 | 22 | // platform |
ansond | 0:dcced975fb52 | 23 | #include "mbed.h" |
ansond | 0:dcced975fb52 | 24 | |
ansond | 23:7813eb9fea10 | 25 | // include common definitions |
ansond | 23:7813eb9fea10 | 26 | #include "CommonDefinitions.h" |
ansond | 23:7813eb9fea10 | 27 | |
ansond | 81:f10d6a416a72 | 28 | // Hush Logging |
ansond | 84:72c9ea4f7775 | 29 | #define HUSH_LOG true // false - logging output, true - no logging |
ansond | 81:f10d6a416a72 | 30 | |
ansond | 81:f10d6a416a72 | 31 | // Hush LED usage |
ansond | 84:72c9ea4f7775 | 32 | #define HUSH_LEDS true // false - enable LEDs, true - disable LEDs |
ansond | 81:f10d6a416a72 | 33 | |
ansond | 46:14840a4dbe68 | 34 | // Memory Debug Enable/Disable |
ansond | 81:f10d6a416a72 | 35 | //#define ENABLE_MEMORY_DEBUG true // false - disable, true - enable (for all error_handler->log() operations) |
ansond | 82:66a9800af243 | 36 | //#define MEMORY_LOGGING true // false - disable, true - enable (for error_handler->log_memory() operations only) |
ansond | 55:e3b6d145d225 | 37 | |
ansond | 55:e3b6d145d225 | 38 | // Enable/Disable NSP Get and GetPut operations |
ansond | 55:e3b6d145d225 | 39 | #define NSP_ENABLE_GET true // true - enable, false - disable |
ansond | 55:e3b6d145d225 | 40 | #define NSP_ENABLE_GETPUT true // true - enable, false - disable |
ansond | 46:14840a4dbe68 | 41 | |
ansond | 64:a2a4892979c6 | 42 | // our MAC address |
ansond | 64:a2a4892979c6 | 43 | #define MAC_ADDRESS 0x00,0x12,0xAB,0xE3,0x4F,0x55 |
ansond | 64:a2a4892979c6 | 44 | |
ansond | 0:dcced975fb52 | 45 | // Our Endpoint Version Annoucement |
ansond | 0:dcced975fb52 | 46 | #define ENDPOINT_VERSION_ANNOUNCE "\r\nMBED IMPACT(NSP) Endpoint v1.0" |
ansond | 0:dcced975fb52 | 47 | |
ansond | 23:7813eb9fea10 | 48 | // Light Configuration |
ansond | 60:1cc3bdc9b20c | 49 | #define LIGHT_NAME "light-nsp-%d" // name of each light in this endpoint |
ansond | 60:1cc3bdc9b20c | 50 | #define LIGHT_NAME_INDEX 1 // start index for the ID of the light name |
ansond | 5:9e795e139e45 | 51 | |
ansond | 45:f9638c23b214 | 52 | // Philips Light Config |
ansond | 74:3714531b6126 | 53 | #define PL_ENABLE false // true - enable for endpoint light, false - disable |
ansond | 48:9f532bc8c4b6 | 54 | #define PL_LIGHT_ID PL_LIGHT_ID_DOUG // Default light for Philips Light |
ansond | 45:f9638c23b214 | 55 | |
ansond | 23:7813eb9fea10 | 56 | // NSP Configuration |
ansond | 57:8248bb7eaf10 | 57 | #define NSP_NODE_TYPE "Light" // Node type |
ansond | 72:520f9864d7d3 | 58 | #define NSP_NODE_LIFETIME "120" // Node lifetime |
ansond | 68:965b2b01451c | 59 | #define RD_UPDATE_PERIOD 15 // The number of seconds between NSP (re)registration messages |
ansond | 0:dcced975fb52 | 60 | |
ansond | 4:2469fd2fba1c | 61 | // Endpoint GPS Coordinates |
ansond | 70:46dbfb298947 | 62 | #define ENDPOINT_LOCATION "Las Vegas Country Club"// Where this light/endpoint lives |
ansond | 70:46dbfb298947 | 63 | #define ENDPOINT_GPS_COORDS "36.131258,-115.144414" // golf course 36.131258,-115.144414 |
ansond | 7:cca3a2adb6b8 | 64 | |
ansond | 0:dcced975fb52 | 65 | // Transport Configuration |
ansond | 7:cca3a2adb6b8 | 66 | #define NUM_TRANSPORTS 2 // Transports used |
ansond | 0:dcced975fb52 | 67 | #define NSP_TRANSPORT 0 // NSP Transport index |
ansond | 7:cca3a2adb6b8 | 68 | #define HTTP_TRANSPORT 1 // HTTP Transport index |
ansond | 0:dcced975fb52 | 69 | |
ansond | 7:cca3a2adb6b8 | 70 | // NSP Configuration |
ansond | 79:8e7db90a07fd | 71 | #define NSP_ADDRESS "192.168.1.150" // Target NSP Service - work |
ansond | 79:8e7db90a07fd | 72 | //#define NSP_ADDRESS "10.1.0.81" // Target NSP Service - home |
ansond | 19:a1fb67efb302 | 73 | #define NSP_PORT 5683 // Target NSP Service Port Number |
ansond | 0:dcced975fb52 | 74 | |
ansond | 0:dcced975fb52 | 75 | #endif // _DEFINITIONS_H |