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@93:5caec31ed46a, 2014-03-13 (annotated)
- Committer:
- ansond
- Date:
- Thu Mar 13 17:27:08 2014 +0000
- Revision:
- 93:5caec31ed46a
- Parent:
- 90:01f06917252d
- Child:
- 95:b7abdaefa83a
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 | 87:012b7b4d32b0 | 28 | // NSP Configuration |
ansond | 93:5caec31ed46a | 29 | #define NSP_ADDRESS "192.168.1.150" // Target NSP Service - work |
ansond | 93:5caec31ed46a | 30 | //#define NSP_ADDRESS "192.168.1.220" // Target NSP Service - home vm |
ansond | 87:012b7b4d32b0 | 31 | //#define NSP_ADDRESS "10.1.0.81" // Target NSP Service - home |
ansond | 87:012b7b4d32b0 | 32 | #define NSP_PORT 5683 // Target NSP Service Port Number |
ansond | 87:012b7b4d32b0 | 33 | |
ansond | 81:f10d6a416a72 | 34 | // Hush Logging |
ansond | 85:2123b96e930f | 35 | //#define HUSH_LOG true // false - logging output, true - no logging |
ansond | 81:f10d6a416a72 | 36 | |
ansond | 81:f10d6a416a72 | 37 | // Hush LED usage |
ansond | 85:2123b96e930f | 38 | //#define HUSH_LEDS true // false - enable LEDs, true - disable LEDs |
ansond | 81:f10d6a416a72 | 39 | |
ansond | 46:14840a4dbe68 | 40 | // Memory Debug Enable/Disable |
ansond | 81:f10d6a416a72 | 41 | //#define ENABLE_MEMORY_DEBUG true // false - disable, true - enable (for all error_handler->log() operations) |
ansond | 82:66a9800af243 | 42 | //#define MEMORY_LOGGING true // false - disable, true - enable (for error_handler->log_memory() operations only) |
ansond | 55:e3b6d145d225 | 43 | |
ansond | 55:e3b6d145d225 | 44 | // Enable/Disable NSP Get and GetPut operations |
ansond | 55:e3b6d145d225 | 45 | #define NSP_ENABLE_GET true // true - enable, false - disable |
ansond | 55:e3b6d145d225 | 46 | #define NSP_ENABLE_GETPUT true // true - enable, false - disable |
ansond | 46:14840a4dbe68 | 47 | |
ansond | 64:a2a4892979c6 | 48 | // our MAC address |
ansond | 64:a2a4892979c6 | 49 | #define MAC_ADDRESS 0x00,0x12,0xAB,0xE3,0x4F,0x55 |
ansond | 64:a2a4892979c6 | 50 | |
ansond | 0:dcced975fb52 | 51 | // Our Endpoint Version Annoucement |
ansond | 0:dcced975fb52 | 52 | #define ENDPOINT_VERSION_ANNOUNCE "\r\nMBED IMPACT(NSP) Endpoint v1.0" |
ansond | 0:dcced975fb52 | 53 | |
ansond | 23:7813eb9fea10 | 54 | // Light Configuration |
ansond | 60:1cc3bdc9b20c | 55 | #define LIGHT_NAME "light-nsp-%d" // name of each light in this endpoint |
ansond | 60:1cc3bdc9b20c | 56 | #define LIGHT_NAME_INDEX 1 // start index for the ID of the light name |
ansond | 5:9e795e139e45 | 57 | |
ansond | 45:f9638c23b214 | 58 | // Philips Light Config |
ansond | 74:3714531b6126 | 59 | #define PL_ENABLE false // true - enable for endpoint light, false - disable |
ansond | 48:9f532bc8c4b6 | 60 | #define PL_LIGHT_ID PL_LIGHT_ID_DOUG // Default light for Philips Light |
ansond | 45:f9638c23b214 | 61 | |
ansond | 23:7813eb9fea10 | 62 | // NSP Configuration |
ansond | 57:8248bb7eaf10 | 63 | #define NSP_NODE_TYPE "Light" // Node type |
ansond | 89:7f2dbb19c919 | 64 | #define NSP_NODE_LIFETIME "90" // Node lifetime |
ansond | 89:7f2dbb19c919 | 65 | #define RD_UPDATE_PERIOD 60 // The number of seconds between NSP (re)registration messages |
ansond | 0:dcced975fb52 | 66 | |
ansond | 4:2469fd2fba1c | 67 | // Endpoint GPS Coordinates |
ansond | 70:46dbfb298947 | 68 | #define ENDPOINT_LOCATION "Las Vegas Country Club"// Where this light/endpoint lives |
ansond | 70:46dbfb298947 | 69 | #define ENDPOINT_GPS_COORDS "36.131258,-115.144414" // golf course 36.131258,-115.144414 |
ansond | 7:cca3a2adb6b8 | 70 | |
ansond | 0:dcced975fb52 | 71 | // Transport Configuration |
ansond | 7:cca3a2adb6b8 | 72 | #define NUM_TRANSPORTS 2 // Transports used |
ansond | 0:dcced975fb52 | 73 | #define NSP_TRANSPORT 0 // NSP Transport index |
ansond | 7:cca3a2adb6b8 | 74 | #define HTTP_TRANSPORT 1 // HTTP Transport index |
ansond | 0:dcced975fb52 | 75 | |
ansond | 0:dcced975fb52 | 76 | #endif // _DEFINITIONS_H |