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.
sn_config.h
00001 /* 00002 * Copyright (c) 2016 ARM Limited. All rights reserved. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * Licensed under the Apache License, Version 2.0 (the License); you may 00005 * not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef SN_CONFIG_H 00018 #define SN_CONFIG_H 00019 00020 /** 00021 * \brief Configuration options (set of defines and values) 00022 * 00023 * This lists set of compile-time options that needs to be used to enable 00024 * or disable features selectively, and set the values for the mandatory 00025 * parameters. 00026 */ 00027 00028 /** 00029 * \def SN_COAP_DUPLICATION_MAX_MSGS_COUNT 00030 * \brief For Message duplication detection 00031 * Init value for the maximum count of messages to be stored for duplication detection 00032 * Setting of this value to 0 will disable duplication check, also reduce use of ROM memory 00033 * Default is set to 1. 00034 */ 00035 #undef SN_COAP_DUPLICATION_MAX_MSGS_COUNT /* 1 */ 00036 00037 /** 00038 * \def SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 00039 * \brief For Message blockwising 00040 * Init value for the maximum payload size to be sent and received at one blockwise message 00041 * Setting of this value to 0 with SN_COAP_BLOCKWISE_ENABLED will disable this feature, and 00042 * also reduce use of ROM memory. 00043 * Note: This define is common for both received and sent Blockwise messages 00044 */ 00045 #undef SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE /* 0 */ // < Must be 2^x and x is at least 4. Suitable values: 0, 16, 32, 64, 128, 256, 512 and 1024 00046 00047 /** 00048 * \def SN_COAP_DISABLE_RESENDINGS 00049 * \brief Disables resending feature. Resending feature should not be needed 00050 * when using CoAP with TCP transport for example. By default resendings are 00051 * enabled. Set to 1 to disable. 00052 */ 00053 #undef SN_COAP_DISABLE_RESENDINGS /* 0 */ // < Default re-sending are not disabled. Set to 1 to disable re-sendings 00054 00055 /** 00056 * \def SN_COAP_RESENDING_QUEUE_SIZE_MSGS 00057 * \brief Sets the number of messages stored 00058 * in the resending queue. Default is 2 00059 */ 00060 #undef SN_COAP_RESENDING_QUEUE_SIZE_MSGS /* 2 */ // < Default re-sending queue size - defines how many messages can be stored. Setting this to 0 disables feature 00061 00062 /** 00063 * \def DEFAULT_RESPONSE_TIMEOUT 00064 * \brief Sets the CoAP re-send interval in seconds. 00065 * By default is 10 seconds. 00066 */ 00067 #undef DEFAULT_RESPONSE_TIMEOUT 00068 00069 /** 00070 * \def SN_COAP_RESENDING_QUEUE_SIZE_BYTES 00071 * \brief Sets the size of the re-sending buffer. 00072 * Setting this to 0 disables this feature. 00073 * By default, this feature is disabled. 00074 */ 00075 #undef SN_COAP_RESENDING_QUEUE_SIZE_BYTES /* 0 */ // Default re-sending queue size - defines size of the re-sending buffer. Setting this to 0 disables feature 00076 00077 /** 00078 * \def SN_COAP_MAX_INCOMING_MESSAGE_SIZE 00079 * \brief Sets the maximum size (in bytes) that 00080 * mbed Client will allow to be handled while 00081 * receiving big payload in blockwise mode. 00082 * Application can set this value based on their 00083 * available storage capability. 00084 * By default, maximum size is UINT16_MAX, 65535 bytes. 00085 */ 00086 #undef SN_COAP_MAX_INCOMING_MESSAGE_SIZE /* UINT16_MAX */ 00087 00088 /** 00089 * \def SN_COAP_MAX_NONBLOCKWISE_PAYLOAD_SIZE 00090 * \brief Sets the maximum payload size allowed before blockwising the message. 00091 * This option should only be used when using TCP and TLS as transport 00092 * with known maximum fragment size. This optimizes the number of messages 00093 * if it is possible to send larger than 1kB messages without blockwise transfer. 00094 * If payload length is larger than SN_COAP_MAX_NONBLOCKWISE_PAYLOAD_SIZE 00095 * it will be sent using blockwise transfer. 00096 * By default, this feature is disabled, 0 disables the feature, set to positive 00097 * value larger than SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE to enable. 00098 * Note that value should be less than transport layer maximum fragment size. 00099 * Note that value has no effect if blockwise transfer is disabled. 00100 */ 00101 #undef SN_COAP_MAX_NONBLOCKWISE_PAYLOAD_SIZE /* 0 */ 00102 00103 /** 00104 * \def SN_COAP_BLOCKWISE_ENABLED 00105 * \brief Enables the blockwise functionality in CoAP library also when blockwise payload 00106 * size is set to '0' in SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE. 00107 */ 00108 #undef SN_COAP_BLOCKWISE_ENABLED /* 0 */ 00109 00110 /** 00111 * \def SN_COAP_RESENDING_MAX_COUNT 00112 * \brief Defines how many times CoAP library tries to re-send the CoAP packet. 00113 * By default value is 3. 00114 */ 00115 #undef SN_COAP_RESENDING_MAX_COUNT /* 3 */ 00116 00117 /** 00118 * \def SN_COAP_MAX_ALLOWED_RESENDING_COUNT 00119 * \brief Maximum allowed count of re-sending that can be set at runtime via 00120 * 'sn_coap_protocol_set_retransmission_parameters()' API. 00121 * By default value is 6. 00122 */ 00123 #undef SN_COAP_MAX_ALLOWED_RESENDING_COUNT /* 6 */ 00124 00125 /** 00126 * \def SN_COAP_MAX_ALLOWED_RESPONSE_TIMEOUT 00127 * \brief Maximum allowed re-send interval in seconds that can be set at runtime via 00128 * 'sn_coap_protocol_set_retransmission_parameters()' API. 00129 * By default value is 40. 00130 */ 00131 #undef SN_COAP_MAX_ALLOWED_RESPONSE_TIMEOUT /* 40 */ 00132 00133 /** 00134 * \def SN_COAP_MAX_ALLOWED_RESENDING_BUFF_SIZE_MSGS 00135 * \brief Maximum allowed count of messages that can be stored into resend buffer at runtime via 00136 * 'sn_coap_protocol_set_retransmission_buffer()' API. 00137 * By default value is 6. 00138 */ 00139 #undef SN_COAP_MAX_ALLOWED_RESENDING_BUFF_SIZE_MSGS /* 6 */ 00140 00141 /** 00142 * \def SN_COAP_MAX_ALLOWED_RESENDING_BUFF_SIZE_BYTES 00143 * \brief Maximum size of messages in bytes that can be stored into resend buffer at runtime via 00144 * 'sn_coap_protocol_set_retransmission_buffer()' API. 00145 * By default value is 512. 00146 */ 00147 #undef SN_COAP_MAX_ALLOWED_RESENDING_BUFF_SIZE_BYTES /* 512 */ 00148 00149 /** 00150 * \def SN_COAP_MAX_ALLOWED_DUPLICATION_MESSAGE_COUNT 00151 * \brief Maximum allowed number of saved messages for message duplicate searching 00152 * that can be set via 'sn_coap_protocol_set_duplicate_buffer_size' API. 00153 * By default value is 6. 00154 */ 00155 #undef SN_COAP_MAX_ALLOWED_DUPLICATION_MESSAGE_COUNT 00156 00157 /** 00158 * \def SN_COAP_DUPLICATION_MAX_TIME_MSGS_STORED 00159 * \brief Maximum time in seconds howe long message is kept for duplicate detection. 00160 * By default 60 seconds. 00161 */ 00162 #undef SN_COAP_DUPLICATION_MAX_TIME_MSGS_STORED 00163 00164 /** 00165 * \def SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED 00166 * \brief Maximum time in seconds how long (messages and payload) are be stored for blockwising. 00167 * Longer time will increase the memory consumption in lossy networks. 00168 * By default 60 seconds. 00169 */ 00170 #undef SN_COAP_BLOCKWISE_MAX_TIME_DATA_STORED 00171 00172 /** 00173 * \def SN_COAP_MAX_INCOMING_BLOCK_MESSAGE_SIZE 00174 * \brief Maximum size of blockwise message that can be received. 00175 * By default 65535 bytes. 00176 */ 00177 #undef SN_COAP_MAX_INCOMING_BLOCK_MESSAGE_SIZE 00178 00179 #ifdef MBED_CLIENT_USER_CONFIG_FILE 00180 #include MBED_CLIENT_USER_CONFIG_FILE 00181 #endif 00182 00183 #endif // SN_CONFIG_H
Generated on Tue Aug 9 2022 00:37:19 by
1.7.2