Maggie Mei / mbedConnectorInterfaceWithDM

Fork of mbedConnectorInterfaceWithDM by Doug Anson

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mbedConnectorInterface.h Source File

mbedConnectorInterface.h

Go to the documentation of this file.
00001 /**
00002  * @file    mbedConnectorInterface.h
00003  * @brief   mbed Connector Inteface configuration header file
00004  * @author  Doug Anson
00005  * @version 1.0
00006  * @see
00007  *
00008  * Copyright (c) 2014
00009  *
00010  * Licensed under the Apache License, Version 2.0 (the "License");
00011  * you may not use this file except in compliance with the License.
00012  * You may obtain a copy of the License at
00013  *
00014  *     http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing, software
00017  * distributed under the License is distributed on an "AS IS" BASIS,
00018  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00019  * See the License for the specific language governing permissions and
00020  * limitations under the License.
00021  */
00022 
00023 #ifndef __MBED_CONNECTOR_INTERFACE_H__
00024 #define __MBED_CONNECTOR_INTERFACE_H__
00025 
00026 // mbed
00027 #include "mbed.h"
00028 #include "rtos.h"
00029 
00030 // Enable/Disable mbed Cloud support
00031 #include "security.h"
00032 
00033 /************** DEFAULT CONFIGURATION PARAMETERS  ************************/
00034 
00035 // Network Selection Definitions
00036 #define ETHERNET                            1
00037 #define WIFI                                2
00038 #define MESH_LOWPAN_ND                      3
00039 #define MESH_THREAD                         4
00040 
00041 // we will use ThreadedResourceObserver
00042 #define CONNECTOR_USING_THREADS             1
00043 #define MCI_LWIP_INTERFACE                  true
00044 #define HAS_EXECUTE_PARAMS                  true
00045 
00046 // Default node name
00047 #define NODE_NAME_LENGTH                    128
00048 #define NODE_NAME                           "mbed-endpoint"
00049  
00050 // Connection URL to mbed Cloud
00051 #if MBED_CONF_APP_NETWORK_INTERFACE == MESH_LOWPAN_ND || MBED_CONF_APP_NETWORK_INTERFACE == MESH_THREAD
00052     // IPv6 URL Configuration
00053     #define CONNECTOR_URL                   "coaps://[2607:f0d0:2601:52::20]:5684"
00054     
00055     // OVERRIDE (until patched in mbed-client)
00056     #define IPV4_OVERRIDE                   true 
00057 #else
00058     // IPv4 URL Configuration
00059     #define CONNECTOR_URL                   "coap://api.connector.mbed.com:5684"
00060 #endif
00061   
00062 // Default Endpoint Type specification
00063 #define ENDPOINT_TYPE_LENGTH                128
00064 #define DEFAULT_ENDPOINT_TYPE               "mbed-device"
00065  
00066 // Default Domain used
00067 #define DOMAIN_LENGTH                       128
00068 #define DEFAULT_DOMAIN                      "domain"
00069  
00070 // Main loop iteration wait time (ms)
00071 #define MAIN_LOOP_WAIT_TIME_MS              1000
00072  
00073 // mbed-client endpoint lifetime
00074 #define REG_LIFETIME_SEC                    100                                         // Lifetime of the endpoint in seconds
00075 
00076 // default observation period (ms)
00077 #define DEFAULT_OBS_PERIOD                  0                                           // 0 - disabled (manual invocation), otherwise "n" in ms...
00078 
00079 // Maximum CoAP URL length
00080 #define MAX_CONN_URL_LENGTH                 128                                         // Maximum Connection URL length
00081 
00082 // DynamicResource Configuration
00083 #define MAX_VALUE_BUFFER_LENGTH             128                                         // largest "value" a dynamic resource may assume as a string
00084 
00085 // Logger buffer size
00086 #define LOGGER_BUFFER_LENGTH                128                                         // largest single print of a given debug line
00087 
00088 // WiFi Configuration
00089 #define WIFI_SSID_LENGTH                    64
00090 #define WIFI_DEFAULT_SSID                   "changeme"
00091 #define WIFI_AUTH_KEY_LENGTH                64
00092 #define WIFI_DEFAULT_AUTH_KEY               "changeme"
00093 
00094 // Default context address string for mbed-client
00095 #define CONTEXT_ADDRESS_STRING              ""
00096  
00097 /************** DEFAULT CONFIGURATION PARAMETERS  ************************/
00098 
00099 #endif // __MBED_CONNECTOR_INTERFACE___
00100