use TCP to connect to mbed connector
Fork of mbedConnectorInterfaceWithDM by
Diff: mbed-connector-interface/mbedConnectorInterface.h
- Revision:
- 71:5069a202e892
- Parent:
- 60:0d9e607dd678
--- a/mbed-connector-interface/mbedConnectorInterface.h Mon Aug 22 19:51:07 2016 +0000 +++ b/mbed-connector-interface/mbedConnectorInterface.h Fri Nov 04 16:29:17 2016 +0000 @@ -27,47 +27,50 @@ #include "mbed.h" #include "rtos.h" +// Enable/Disable mbed Cloud support +#include "security.h" + /************** DEFAULT CONFIGURATION PARAMETERS ************************/ - // Network Selection Definitions - #define ETHERNET 1 - #define WIFI 2 - #define MESH_LOWPAN_ND 3 - #define MESH_THREAD 4 +// Network Selection Definitions +#define ETHERNET 1 +#define WIFI 2 +#define MESH_LOWPAN_ND 3 +#define MESH_THREAD 4 - // we will use ThreadedResourceObserver - #define CONNECTOR_USING_THREADS 1 - #define MCI_LWIP_INTERFACE true - #define HAS_EXECUTE_PARAMS true +// we will use ThreadedResourceObserver +#define CONNECTOR_USING_THREADS 1 +#define MCI_LWIP_INTERFACE true +#define HAS_EXECUTE_PARAMS true - // Default node name - #define NODE_NAME_LENGTH 128 - #define NODE_NAME "mbed-endpoint" +// Default node name +#define NODE_NAME_LENGTH 128 +#define NODE_NAME "mbed-endpoint" - // Connection URL to mbed Cloud - #if MBED_CONF_APP_NETWORK_INTERFACE == MESH_LOWPAN_ND || MBED_CONF_APP_NETWORK_INTERFACE == MESH_THREAD - // IPv6 URL Configuration +// Connection URL to mbed Cloud +#if MBED_CONF_APP_NETWORK_INTERFACE == MESH_LOWPAN_ND || MBED_CONF_APP_NETWORK_INTERFACE == MESH_THREAD + // IPv6 URL Configuration #define CONNECTOR_URL "coaps://[2607:f0d0:2601:52::20]:5684" // OVERRIDE (until patched in mbed-client) #define IPV4_OVERRIDE true - #else +#else // IPv4 URL Configuration #define CONNECTOR_URL "coap://api.connector.mbed.com:5684" - #endif +#endif - // Default Endpoint Type specification - #define ENDPOINT_TYPE_LENGTH 128 - #define DEFAULT_ENDPOINT_TYPE "mbed-device" +// Default Endpoint Type specification +#define ENDPOINT_TYPE_LENGTH 128 +#define DEFAULT_ENDPOINT_TYPE "mbed-device" - // Default Domain used - #define DOMAIN_LENGTH 128 - #define DEFAULT_DOMAIN "domain" +// Default Domain used +#define DOMAIN_LENGTH 128 +#define DEFAULT_DOMAIN "domain" - // Main loop iteration wait time (ms) - #define MAIN_LOOP_WAIT_TIME_MS 1000 +// Main loop iteration wait time (ms) +#define MAIN_LOOP_WAIT_TIME_MS 1000 - // mbed-client endpoint lifetime +// mbed-client endpoint lifetime #define REG_LIFETIME_SEC 100 // Lifetime of the endpoint in seconds // default observation period (ms)