nsp specific components for the NSP version of the impact endpoint

Dependents:   mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet mbed_nsp_endpoint_nxp

Committer:
ansond
Date:
Wed Apr 02 02:31:51 2014 +0000
Revision:
13:6998d9c2410e
Parent:
12:b10cd82bf206
Child:
24:b62fec3ff73c
updates

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ansond 2:a895137e9082 1 /* Copyright C2013 Doug Anson, MIT License
ansond 2:a895137e9082 2 *
ansond 2:a895137e9082 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
ansond 2:a895137e9082 4 * and associated documentation files the "Software", to deal in the Software without restriction,
ansond 2:a895137e9082 5 * including without limitation the rights to use, copy, modify, merge, publish, distribute,
ansond 2:a895137e9082 6 * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
ansond 2:a895137e9082 7 * furnished to do so, subject to the following conditions:
ansond 2:a895137e9082 8 *
ansond 2:a895137e9082 9 * The above copyright notice and this permission notice shall be included in all copies or
ansond 2:a895137e9082 10 * substantial portions of the Software.
ansond 2:a895137e9082 11 *
ansond 2:a895137e9082 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
ansond 2:a895137e9082 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
ansond 2:a895137e9082 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
ansond 2:a895137e9082 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ansond 2:a895137e9082 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ansond 2:a895137e9082 17 */
ansond 2:a895137e9082 18
ansond 2:a895137e9082 19 #ifndef _NSP_DEFINITIONS_H_
ansond 2:a895137e9082 20 #define _NSP_DEFINITIONS_H_
ansond 2:a895137e9082 21
ansond 4:7f7fe167d9c0 22 // Our Endpoint Version Annoucement
ansond 4:7f7fe167d9c0 23 #define ENDPOINT_VERSION_ANNOUNCE "\r\nMBED NSP Endpoint v1.0"
ansond 4:7f7fe167d9c0 24
ansond 2:a895137e9082 25 // NSP Configuration
ansond 13:6998d9c2410e 26 #define NSP_ADDRESS "192.168.1.220" // Target NSP Service - (default)
ansond 13:6998d9c2410e 27 #define NSP_PORT 5683 // Target NSP Service Port Number
ansond 2:a895137e9082 28
ansond 2:a895137e9082 29 // Enable/Disable NSP Get and GetPut operations
ansond 13:6998d9c2410e 30 #define NSP_ENABLE_GET true // true - enable, false - disable
ansond 13:6998d9c2410e 31 #define NSP_ENABLE_GETPUT true // true - enable, false - disable
ansond 2:a895137e9082 32
ansond 2:a895137e9082 33 // Preference File Configuration
ansond 13:6998d9c2410e 34 #define PREFERENCES_FILE "/local/nsp.cfg" // preferences file for endpoint
ansond 2:a895137e9082 35
ansond 4:7f7fe167d9c0 36 // Personality Name Configuration
ansond 4:7f7fe167d9c0 37 #ifdef LIGHT_PERSONALITY
ansond 13:6998d9c2410e 38 #define PERSONALITY_NAME "light-nsp-%d" // name of each personality (i.e. light) in this endpoint
ansond 13:6998d9c2410e 39 #define NSP_NODE_TYPE LIGHT_TYPE_STRING // Node type
ansond 13:6998d9c2410e 40 #define PERSONALITY_TYPE LIGHT_TYPE_STRING // type of personality
ansond 13:6998d9c2410e 41 #define NSP_ENDPOINT_TYPE "MBED NSP Light Node" // mfg type
ansond 4:7f7fe167d9c0 42 #endif
ansond 7:0207dfb9c36b 43 #ifdef COPCAR_PERSONALITY
ansond 13:6998d9c2410e 44 #define PERSONALITY_NAME "copcar-nsp-%d" // name of each personality (i.e. copcar) in this endpoint
ansond 13:6998d9c2410e 45 #define NSP_NODE_TYPE "CopCar" // Node type
ansond 13:6998d9c2410e 46 #define PERSONALITY_TYPE "Cop Car" // type of personality
ansond 13:6998d9c2410e 47 #define NSP_ENDPOINT_TYPE "MBED NSP Cop Car" // mfg type
ansond 7:0207dfb9c36b 48 #endif
ansond 2:a895137e9082 49
ansond 2:a895137e9082 50 // NSP Configuration
ansond 13:6998d9c2410e 51 #define NSP_NODE_LIFETIME "1500" // Node lifetime (seconds) - 25 minutes
ansond 13:6998d9c2410e 52 #define RD_UPDATE_PERIOD 600 // The number of seconds between NSP (re)registration messages - 10 minutes
ansond 2:a895137e9082 53
ansond 2:a895137e9082 54 // NSP Registration Configuration
ansond 13:6998d9c2410e 55 #define NSP_RESOURCES_OBSERVABLE 1 // 1 - all resources will be registered as observable, 0 - not observable
ansond 13:6998d9c2410e 56 #define NSP_RESOURCES_REGISTERED 1 // 1 - all resources will be registered, 0 - not registered
ansond 2:a895137e9082 57
ansond 2:a895137e9082 58 // Transport Configuration
ansond 13:6998d9c2410e 59 #define NUM_TRANSPORTS 2 // Transports used
ansond 13:6998d9c2410e 60 #define NSP_TRANSPORT 0 // NSP Transport index
ansond 13:6998d9c2410e 61 #define HTTP_TRANSPORT 1 // HTTP Transport index
ansond 2:a895137e9082 62
ansond 2:a895137e9082 63 #endif // _NSP_DEFINITIONS_H_