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:
Fri Mar 28 17:08:22 2014 +0000
Revision:
4:7f7fe167d9c0
Parent:
2:a895137e9082
Child:
7:0207dfb9c36b
refactor personality

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 4:7f7fe167d9c0 26 #define NSP_ADDRESS "192.168.1.220" // Target NSP Service - (default)
ansond 4:7f7fe167d9c0 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 4:7f7fe167d9c0 30 #define NSP_ENABLE_GET true // true - enable, false - disable
ansond 4:7f7fe167d9c0 31 #define NSP_ENABLE_GETPUT true // true - enable, false - disable
ansond 2:a895137e9082 32
ansond 2:a895137e9082 33 // Preference File Configuration
ansond 4:7f7fe167d9c0 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 4:7f7fe167d9c0 38 #define PERSONALITY_NAME "light-nsp-%d" // name of each personality (i.e. light) in this endpoint
ansond 4:7f7fe167d9c0 39 #endif
ansond 2:a895137e9082 40
ansond 2:a895137e9082 41 // NSP Configuration
ansond 4:7f7fe167d9c0 42 #define NSP_NODE_TYPE LIGHT_TYPE_STRING // Node type
ansond 4:7f7fe167d9c0 43 #define NSP_NODE_LIFETIME "3600" // Node lifetime (seconds) - 1 hour
ansond 4:7f7fe167d9c0 44 #define RD_UPDATE_PERIOD 1700 // The number of seconds between NSP (re)registration messages - 28.3 minutes
ansond 2:a895137e9082 45
ansond 2:a895137e9082 46 // NSP Registration Configuration
ansond 4:7f7fe167d9c0 47 #define NSP_RESOURCES_OBSERVABLE 1 // 1 - all resources will be registered as observable, 0 - not observable
ansond 4:7f7fe167d9c0 48 #define NSP_RESOURCES_REGISTERED 1 // 1 - all resources will be registered, 0 - not registered
ansond 2:a895137e9082 49
ansond 2:a895137e9082 50 // Transport Configuration
ansond 4:7f7fe167d9c0 51 #define NUM_TRANSPORTS 2 // Transports used
ansond 4:7f7fe167d9c0 52 #define NSP_TRANSPORT 0 // NSP Transport index
ansond 4:7f7fe167d9c0 53 #define HTTP_TRANSPORT 1 // HTTP Transport index
ansond 2:a895137e9082 54
ansond 2:a895137e9082 55 #endif // _NSP_DEFINITIONS_H_