Mbed Cloud example program for workshop in W27 2018.

Dependencies:   MMA7660 LM75B

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MbedCloudClientConfigCheck.h Source File

MbedCloudClientConfigCheck.h

Go to the documentation of this file.
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)
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 #endif // MBED_CLOUD_CONFIG_CHECK_H