Update MQTT config for Keep Alive demo that uses dummy timer (#457)

The MQTT library has been updated with the MQTT_RECV_POLLING_TIMEOUT_MS and MQTT_SEND_RETRY_TIMEOUT_MS configurations which should be set to zero when using a dummy timer function to avoid possibility of infinite loop when retrying failed transport send/receive calls. As the MQTT Keep Alive demo uses a dummy timer function, this PR updates the demo configuration to set these timeouts to zero.
pull/459/head
Archit Aggarwal 4 years ago committed by GitHub
parent 9d937aa0ab
commit c0d4c7c67c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
/* /*
* FreeRTOS Kernel V10.3.0 * FreeRTOS V202011.00
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of * Permission is hereby granted, free of charge, to any person obtaining a copy of
@ -19,10 +19,9 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* *
* http://www.FreeRTOS.org * https://www.FreeRTOS.org
* http://aws.amazon.com/freertos * https://github.com/FreeRTOS
* *
* 1 tab == 4 spaces!
*/ */
#ifndef CORE_MQTT_CONFIG_H #ifndef CORE_MQTT_CONFIG_H
#define CORE_MQTT_CONFIG_H #define CORE_MQTT_CONFIG_H
@ -75,6 +74,41 @@ extern void vLoggingPrintf( const char * pcFormatString,
* macro sets the limit on how many simultaneous PUBLISH states an MQTT * macro sets the limit on how many simultaneous PUBLISH states an MQTT
* context maintains. * context maintains.
*/ */
#define MQTT_STATE_ARRAY_MAX_COUNT 10U #define MQTT_STATE_ARRAY_MAX_COUNT 10U
/**
* @brief The maximum duration between non-empty network reads while
* receiving an MQTT packet via the #MQTT_ProcessLoop or #MQTT_ReceiveLoop
* API functions.
*
* When an incoming MQTT packet is detected, the transport receive function
* may be called multiple times until all of the expected number of bytes of the
* packet are received. This timeout represents the maximum polling duration that
* is allowed without any data reception from the network for the incoming packet.
*
* @note For this demo, the timeout value is configured to zero as the demo uses a
* dummy timer function (of #MQTTGetCurrentTimeFunc_t) that always returns zero.
* It is REQUIRED to set the the timeout to zero when using a dummy timer function
* that always returns zero.
*/
#define MQTT_RECV_POLLING_TIMEOUT_MS 0U
/**
* @brief The maximum duration between non-empty network transmissions while
* sending an MQTT packet via the #MQTT_ProcessLoop or #MQTT_ReceiveLoop
* API functions.
*
* When sending an MQTT packet, the transport send function may be called multiple
* times until the required number of bytes are sent.
* This timeout represents the maximum time wait for any data
* transmission over the network through the transport send function.
*
* @note For this demo, the timeout value is configured to zero as the demo uses a
* dummy timer function (of #MQTTGetCurrentTimeFunc_t) that always returns zero.
* It is REQUIRED to set the the timeout to zero when using a dummy timer function
* that always returns zero.
*
*/
#define MQTT_SEND_RETRY_TIMEOUT_MS 0U
#endif /* ifndef CORE_MQTT_CONFIG_H */ #endif /* ifndef CORE_MQTT_CONFIG_H */

@ -1 +1 @@
Subproject commit 93c15bdab832f0a0aa3b6deb06dd19b0d5227133 Subproject commit 510a3f6ecac041859114b41462c1829a29f026ca
Loading…
Cancel
Save