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.
MbedCloudClientConfigCheck.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 00020 #ifndef MBED_CLOUD_CONFIG_CHECK_H 00021 #define MBED_CLOUD_CONFIG_CHECK_H 00022 00023 /*! \file MbedCloudClientConfigCheck.h 00024 * \brief Configuration options check. 00025 * 00026 * This set checks and validates the compile-time options that can be made for possible client library. 00027 * NOTE: Not to be used by developers. 00028 */ 00029 00030 #ifndef MBED_CLOUD_CLIENT_ENDPOINT_TYPE 00031 #error "MBED_CLOUD_CLIENT_ENDPOINT_TYPE must be defined with valid endpoint type" 00032 #endif 00033 00034 #ifndef MBED_CLOUD_CLIENT_LIFETIME 00035 #error "MBED_CLOUD_CLIENT_LIFETIME must be defined with valid non-zero lifetime value in seconds, default is 60" 00036 #endif 00037 00038 #ifndef MBED_CLOUD_CLIENT_LISTEN_PORT 00039 #error "MBED_CLOUD_CLIENT_LISTEN_PORT must be defined with valid non-zero port number, default is 0" 00040 #endif 00041 00042 #if !defined (SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE) || (SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE < 16) || (SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE > 1024) 00043 #error "SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE must be defined with one of the values from this - 128, 256, 512 or 1024" 00044 #endif 00045 00046 #if defined (MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP_QUEUE) 00047 #error "TCP queue mode not supported!" 00048 #endif 00049 00050 #if defined (MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP) && ( defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP) || \ 00051 defined (MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP_QUEUE) || defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP_QUEUE)) 00052 #error "Only one MBED_CLOUD_CLIENT_TRANSPORT_MODE can be defined at a time" 00053 #endif 00054 00055 #if defined (MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP) && ( defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP) || \ 00056 defined (MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP_QUEUE) || defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP_QUEUE)) 00057 #error "Only one MBED_CLOUD_CLIENT_TRANSPORT_MODE can be defined at a time" 00058 #endif 00059 00060 #if defined (MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP_QUEUE) && ( defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP) || \ 00061 defined (MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP) || defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP_QUEUE)) 00062 #error "Only one MBED_CLOUD_CLIENT_TRANSPORT_MODE can be defined at a time" 00063 #endif 00064 00065 #if defined (MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP_QUEUE) && ( defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP) || \ 00066 defined (MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP_QUEUE) || defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP)) 00067 #error "Only one MBED_CLOUD_CLIENT_TRANSPORT_MODE can be defined at a time" 00068 #endif 00069 00070 #if !defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP) && !defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP) \ 00071 && !defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP_QUEUE) && !defined(MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP_QUEUE) 00072 #error "One MBED_CLOUD_CLIENT_TRANSPORT_MODE must be defined at a time" 00073 #endif 00074 00075 #if !defined(MBED_CLOUD_CLIENT_STL_API) 00076 #error "MBED_CLOUD_CLIENT_STL_API must have a value, nonzero enables API with STL" 00077 #endif 00078 00079 #if !defined(MBED_CLOUD_CLIENT_STD_NAMESPACE_POLLUTION) 00080 #error "MBED_CLOUD_CLIENT_STD_NAMESPACE_POLLUTION must have a value, nonzero maintains legacy behavior" 00081 #endif 00082 00083 #if defined(ARM_UC_PROFILE_MBED_CLIENT_LITE) && (ARM_UC_PROFILE_MBED_CLIENT_LITE==1) 00084 #error "Pelion Device Management Client must use ARM_UC_PROFILE_MBED_CLIENT_LITE=0 configuration." 00085 #endif 00086 00087 #if defined (PAL_MAX_FRAG_LEN) && (PAL_MAX_FRAG_LEN > 4) 00088 #error "PAL_MAX_FRAG_LEN must be defined with one of the following values 1, 2, 3 or 4" 00089 #endif 00090 00091 #if defined (PAL_MAX_FRAG_LEN) && (PAL_MAX_FRAG_LEN == 1) && (SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE > 256) 00092 #error "SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE must be 256 or lower." 00093 #endif 00094 00095 #if defined (PAL_MAX_FRAG_LEN) && (PAL_MAX_FRAG_LEN == 2) && (SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE > 512) 00096 #error "SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE must be 512 or lower." 00097 #endif 00098 00099 #endif // MBED_CLOUD_CONFIG_CHECK_H
Generated on Mon Aug 29 2022 19:53:40 by
