coreMQTT v2.1.1
MQTT 3.1.1 Client Library
core_mqtt_config_defaults.h
Go to the documentation of this file.
1/*
2 * coreMQTT v2.1.1
3 * Copyright (C) 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 *
5 * SPDX-License-Identifier: MIT
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of
8 * this software and associated documentation files (the "Software"), to deal in
9 * the Software without restriction, including without limitation the rights to
10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 * the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
37#ifndef CORE_MQTT_CONFIG_DEFAULTS_H_
38#define CORE_MQTT_CONFIG_DEFAULTS_H_
39
40/* *INDENT-OFF* */
41#ifdef __cplusplus
42 extern "C" {
43#endif
44/* *INDENT-ON* */
45
46/* MQTT_DO_NOT_USE_CUSTOM_CONFIG allows building the MQTT library
47 * without a custom config. If a custom config is provided, the
48 * MQTT_DO_NOT_USE_CUSTOM_CONFIG macro should not be defined. */
49#ifndef MQTT_DO_NOT_USE_CUSTOM_CONFIG
50/* Include custom config file before other headers. */
51 #include "core_mqtt_config.h"
52#endif
53
54/* The macro definition for MQTT_DO_NOT_USE_CUSTOM_CONFIG is for Doxygen
55 * documentation only. */
56
67#ifdef DOXYGEN
68 #define MQTT_DO_NOT_USE_CUSTOM_CONFIG
69#endif
70
75#ifndef MQTT_SUB_UNSUB_MAX_VECTORS
76 #define MQTT_SUB_UNSUB_MAX_VECTORS ( 4U )
77#endif
78
91#ifndef MQTT_MAX_CONNACK_RECEIVE_RETRY_COUNT
92/* Default value for the CONNACK receive retries. */
93 #define MQTT_MAX_CONNACK_RECEIVE_RETRY_COUNT ( 5U )
94#endif
95
115#ifndef MQTT_PINGRESP_TIMEOUT_MS
116/* Wait 5 seconds by default for a ping response. */
117 #define MQTT_PINGRESP_TIMEOUT_MS ( 5000U )
118#endif
119
130#ifndef PACKET_TX_TIMEOUT_MS
131 #define PACKET_TX_TIMEOUT_MS ( 30000U )
132#endif
133
142#ifndef PACKET_RX_TIMEOUT_MS
143 #define PACKET_RX_TIMEOUT_MS ( 30000U )
144#endif
145
167#ifndef MQTT_RECV_POLLING_TIMEOUT_MS
168 #define MQTT_RECV_POLLING_TIMEOUT_MS ( 10U )
169#endif
170
190#ifndef MQTT_SEND_TIMEOUT_MS
191 #define MQTT_SEND_TIMEOUT_MS ( 20000U )
192#endif
193
194#ifdef MQTT_SEND_RETRY_TIMEOUT_MS
195 #error MQTT_SEND_RETRY_TIMEOUT_MS is deprecated. Instead use MQTT_SEND_TIMEOUT_MS.
196#endif
197
198/* *INDENT-OFF* */
199#ifdef __cplusplus
200 }
201#endif
202/* *INDENT-ON* */
203
204#endif /* ifndef CORE_MQTT_CONFIG_DEFAULTS_H_ */