MBED NanoService Lighting Endpoint for NXP Ublox (Ethernet enabled)
Dependencies: C027 C12832 EthernetInterface StatusReporter LM75B endpoint_core endpoint_nsp mbed-rtos mbed nsp_resources
Definitions.h@131:749a859fb0d2, 2014-03-19 (annotated)
- Committer:
- ansond
- Date:
- Wed Mar 19 17:05:24 2014 +0000
- Revision:
- 131:749a859fb0d2
- Parent:
- 129:5116d592e33f
- Child:
- 133:09e2e15514e0
working mac disabled
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 | 129:5116d592e33f | 29 | #define NSP_ADDRESS "192.168.1.220" // Target NSP Service - (default) |
ansond | 129:5116d592e33f | 30 | #define NSP_PORT 5683 // Target NSP Service Port Number |
ansond | 87:012b7b4d32b0 | 31 | |
ansond | 81:f10d6a416a72 | 32 | // Hush Logging |
ansond | 85:2123b96e930f | 33 | //#define HUSH_LOG true // false - logging output, true - no logging |
ansond | 81:f10d6a416a72 | 34 | |
ansond | 81:f10d6a416a72 | 35 | // Hush LED usage |
ansond | 85:2123b96e930f | 36 | //#define HUSH_LEDS true // false - enable LEDs, true - disable LEDs |
ansond | 81:f10d6a416a72 | 37 | |
ansond | 46:14840a4dbe68 | 38 | // Memory Debug Enable/Disable |
ansond | 129:5116d592e33f | 39 | //#define ENABLE_MEMORY_DEBUG true // false - disable, true - enable (for all error_handler->log() operations) |
ansond | 82:66a9800af243 | 40 | //#define MEMORY_LOGGING true // false - disable, true - enable (for error_handler->log_memory() operations only) |
ansond | 55:e3b6d145d225 | 41 | |
ansond | 55:e3b6d145d225 | 42 | // Enable/Disable NSP Get and GetPut operations |
ansond | 129:5116d592e33f | 43 | #define NSP_ENABLE_GET true // true - enable, false - disable |
ansond | 129:5116d592e33f | 44 | #define NSP_ENABLE_GETPUT true // true - enable, false - disable |
ansond | 46:14840a4dbe68 | 45 | |
ansond | 64:a2a4892979c6 | 46 | // our MAC address |
ansond | 131:749a859fb0d2 | 47 | //#define MAC_ADDRESS 0x00,0x1e,0xAB,0xE3,0x4F,0x55 |
ansond | 64:a2a4892979c6 | 48 | |
ansond | 0:dcced975fb52 | 49 | // Our Endpoint Version Annoucement |
ansond | 0:dcced975fb52 | 50 | #define ENDPOINT_VERSION_ANNOUNCE "\r\nMBED IMPACT(NSP) Endpoint v1.0" |
ansond | 0:dcced975fb52 | 51 | |
ansond | 124:78caa245d307 | 52 | // Preference File Configuration |
ansond | 124:78caa245d307 | 53 | #define PREFERENCES_FILE "/local/nsp.cfg"// preferences file for endpoint |
ansond | 124:78caa245d307 | 54 | |
ansond | 23:7813eb9fea10 | 55 | // Light Configuration |
ansond | 119:e3dbffa77b72 | 56 | #define LIGHT_NAME "light-nsp-%d" // name of each light in this endpoint |
ansond | 119:e3dbffa77b72 | 57 | #define LIGHT_BLINK_WAIT_MS 1000 // time between blinks (ms) |
ansond | 123:43e130c37cde | 58 | #define LIGHT_NAME_INDEX 1 // start index for the ID of the light name |
ansond | 5:9e795e139e45 | 59 | |
ansond | 45:f9638c23b214 | 60 | // Philips Light Config |
ansond | 119:e3dbffa77b72 | 61 | #define PL_ENABLE false // true - enable for endpoint light, false - disable |
ansond | 119:e3dbffa77b72 | 62 | #define PL_LIGHT_ID PL_LIGHT_ID_BILL // Default light for Philips Light |
ansond | 45:f9638c23b214 | 63 | |
ansond | 111:e5b1bb31eb63 | 64 | // External LED Light Configuration |
ansond | 119:e3dbffa77b72 | 65 | #define EXT_LED_ENABLE true // true - enable external LED endpoint light, false - disable |
ansond | 119:e3dbffa77b72 | 66 | #define EXT_LED_PIN p21 // pin to use for external LED cathode |
ansond | 111:e5b1bb31eb63 | 67 | |
ansond | 23:7813eb9fea10 | 68 | // NSP Configuration |
ansond | 119:e3dbffa77b72 | 69 | #define NSP_NODE_TYPE "Light" // Node type |
ansond | 119:e3dbffa77b72 | 70 | #define NSP_NODE_LIFETIME "3600" // Node lifetime (seconds) - 1 hour |
ansond | 119:e3dbffa77b72 | 71 | #define RD_UPDATE_PERIOD 1700 // The number of seconds between NSP (re)registration messages - 28.3 minutes |
ansond | 0:dcced975fb52 | 72 | |
ansond | 106:4f7323a01fb8 | 73 | // NSP Registration Configuration |
ansond | 106:4f7323a01fb8 | 74 | #define NSP_RESOURCES_OBSERVABLE 1 // 1 - all resources will be registered as observable, 0 - not observable |
ansond | 106:4f7323a01fb8 | 75 | #define NSP_RESOURCES_REGISTERED 1 // 1 - all resources will be registered, 0 - not registered |
ansond | 106:4f7323a01fb8 | 76 | |
ansond | 4:2469fd2fba1c | 77 | // Endpoint GPS Coordinates |
ansond | 70:46dbfb298947 | 78 | #define ENDPOINT_LOCATION "Las Vegas Country Club"// Where this light/endpoint lives |
ansond | 70:46dbfb298947 | 79 | #define ENDPOINT_GPS_COORDS "36.131258,-115.144414" // golf course 36.131258,-115.144414 |
ansond | 7:cca3a2adb6b8 | 80 | |
ansond | 0:dcced975fb52 | 81 | // Transport Configuration |
ansond | 7:cca3a2adb6b8 | 82 | #define NUM_TRANSPORTS 2 // Transports used |
ansond | 0:dcced975fb52 | 83 | #define NSP_TRANSPORT 0 // NSP Transport index |
ansond | 7:cca3a2adb6b8 | 84 | #define HTTP_TRANSPORT 1 // HTTP Transport index |
ansond | 0:dcced975fb52 | 85 | |
ansond | 0:dcced975fb52 | 86 | #endif // _DEFINITIONS_H |