Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
MbedCloudClientConfig.h
00001 // ---------------------------------------------------------------------------- 00002 // Copyright 2016-2017 ARM Ltd. 00003 // 00004 // SPDX-License-Identifier: Apache-2.0 00005 // 00006 // Licensed under the Apache License, Version 2.0 (the "License"); 00007 // you may not use this file except in compliance with the License. 00008 // You may obtain a copy of the License at 00009 // 00010 // http://www.apache.org/licenses/LICENSE-2.0 00011 // 00012 // Unless required by applicable law or agreed to in writing, software 00013 // distributed under the License is distributed on an "AS IS" BASIS, 00014 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 // See the License for the specific language governing permissions and 00016 // limitations under the License. 00017 // ---------------------------------------------------------------------------- 00018 00019 #ifndef MBED_CLOUD_CLIENT_CONFIG_H 00020 #define MBED_CLOUD_CLIENT_CONFIG_H 00021 00022 #include <stdint.h> 00023 00024 /*! \file MbedCloudClientConfig.h 00025 * \brief Configuration options (set of defines and values). 00026 * 00027 * This lists a set of compile-time options that needs to be used to enable 00028 * or disable features selectively, and set the values for the mandatory 00029 * parameters. 00030 */ 00031 00032 #if defined (__ICCARM__) 00033 #define m2m_deprecated 00034 #else 00035 #define m2m_deprecated __attribute__ ((deprecated)) 00036 #endif 00037 00038 #ifdef __DOXYGEN__ 00039 // This __DOXYGEN__ block is for documentation purposes only and it does not affect application build. 00040 00041 /** 00042 * \def MBED_CLOUD_CLIENT_ENDPOINT_TYPE 00043 * 00044 * \brief This is mandatory MACRO and MUST be enabled. You MUST define it like this #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE "default". 00045 */ 00046 #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE /* "default" */ 00047 00048 /** 00049 * \def MBED_CLOUD_CLIENT_LIFETIME 00050 * 00051 * \brief This is mandatory MACRO and MUST be enabled. You MUST define it like this: #define MBED_CLOUD_CLIENT_LIFETIME 3600. 00052 * This value denotes time in seconds. 00053 */ 00054 #define MBED_CLOUD_CLIENT_LIFETIME /* 3600 */ 00055 00056 /** 00057 * \def MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP 00058 * 00059 * \brief Enable this MACRO if you want to enable UDP mode for the client. 00060 */ 00061 #define MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP 00062 00063 /** 00064 * \def MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP 00065 * 00066 * \brief Enable this MACRO if you want to enable TCP mode for the client. 00067 */ 00068 #define MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP 00069 00070 /** 00071 * \def MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP_QUEUE 00072 * 00073 * \brief Enable this MACRO if you want to enable UDP_QUEUE mode for the client. 00074 */ 00075 #define MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP_QUEUE 00076 00077 #endif // __DOXYGEN__ 00078 00079 /** 00080 * \def MBED_CLOUD_CLIENT_STL_API this flag controls the API's which use C++'s 00081 * Standard Template Library (STL). The cost of STL is ~15KB of flash, depending on compiler, 00082 * so on resource constrained devices it is essential to be able to remove any reference to it. 00083 * In practice the SimpleM2MResourceString and SimpleM2MResourceInt classes are build with STL, 00084 * so if one is not using them and wants to save RAM and ROM, setting this define to zero 00085 * may help quite a lot. The SimpleM2MResource* classes and related API's are marked as deprecated, 00086 * so they may be removed in the future releases. 00087 */ 00088 #ifndef MBED_CLOUD_CLIENT_STL_API 00089 #define MBED_CLOUD_CLIENT_STL_API 1 00090 #endif 00091 00092 /** 00093 * \def MBED_CLOUD_CLIENT_STD_NAMESPACE_POLLUTION this causes a inclusion of "MbedCloudCLient.h 00094 * to "pollute" the namespace with "using namespace std;". This has been always the case, but 00095 * any library should not pollute application's namespace with std by having the "using std" 00096 * in a a public header file. 00097 * But as as removal of it from our headers may break existing applications, which build due to this 00098 * leakage, we need to maintain the old behavior for a while and just allow one to remove it. 00099 */ 00100 #ifndef MBED_CLOUD_CLIENT_STD_NAMESPACE_POLLUTION 00101 #define MBED_CLOUD_CLIENT_STD_NAMESPACE_POLLUTION 1 00102 #endif 00103 00104 /** 00105 * \def MBED_CLOUD_CLIENT_LISTEN_PORT 00106 * 00107 * \brief This is mandatory MACRO and is set to 0 by default. This implies that the client picks a random port 00108 * for listening to the incoming connection. 00109 */ 00110 #define MBED_CLOUD_CLIENT_LISTEN_PORT 0 00111 00112 #ifdef MBED_CLOUD_CLIENT_USER_CONFIG_FILE 00113 #include MBED_CLOUD_CLIENT_USER_CONFIG_FILE 00114 #endif 00115 00116 #include "MbedCloudClientConfigCheck.h" 00117 00118 #endif // MBED_CLOUD_CLIENT_CONFIG_H
Generated on Mon Aug 29 2022 19:53:40 by
