From e4a3213b996d1c6e7ffb6a28676dcdc7b4f3813f Mon Sep 17 00:00:00 2001 From: Akshai M Date: Fri, 26 Jun 2020 17:48:38 +0530 Subject: [PATCH 1/8] net/asymcute : Model 'ASYMCUTE_BUFSIZE' with exp Added 'CONFIG_ASYMCUTE_BUFSIZE_EXP' and modelled ASYMCUTE_BUFSIZE as power of an exponent. --- sys/include/net/asymcute.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/include/net/asymcute.h b/sys/include/net/asymcute.h index 65e806b2b4..031357fca9 100644 --- a/sys/include/net/asymcute.h +++ b/sys/include/net/asymcute.h @@ -58,11 +58,22 @@ extern "C" { #endif +/** + * @brief Default buffer size for the ASYMCUTE (as exponent of 2^n). + * + * As the buffer size ALWAYS needs to be power of two, this option + * represents the exponent of 2^n, which will be used as the size of + * the buffer. + */ +#ifndef CONFIG_ASYMCUTE_BUFSIZE_EXP +#define CONFIG_ASYMCUTE_BUFSIZE_EXP (7U) +#endif + #ifndef ASYMCUTE_BUFSIZE /** * @brief Default buffer size used for receive and request buffers */ -#define ASYMCUTE_BUFSIZE (128U) +#define ASYMCUTE_BUFSIZE (1 << CONFIG_ASYMCUTE_BUFSIZE_EXP) #endif #ifndef ASYMCUTE_HANDLER_PRIO From 7ba0d3c76f2a5486debbd5acd3b58b31a1d7b388 Mon Sep 17 00:00:00 2001 From: Akshai M Date: Fri, 26 Jun 2020 17:55:52 +0530 Subject: [PATCH 2/8] net/asymcute : Move 'ASYMCUTE_TOPIC_MAXLEN' to 'CONFIG_' --- sys/include/net/asymcute.h | 6 +++--- sys/net/application_layer/asymcute/asymcute.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/include/net/asymcute.h b/sys/include/net/asymcute.h index 031357fca9..696e33cd47 100644 --- a/sys/include/net/asymcute.h +++ b/sys/include/net/asymcute.h @@ -106,13 +106,13 @@ extern "C" { #define ASYMCUTE_LISTENER_STACKSIZE (THREAD_STACKSIZE_DEFAULT) #endif -#ifndef ASYMCUTE_TOPIC_MAXLEN +#ifndef CONFIG_ASYMCUTE_TOPIC_MAXLEN /** * @brief Maximum topic length * * @note Must be less than (256 - 8) AND less than (ASYMCUTE_BUFSIZE - 8). */ -#define ASYMCUTE_TOPIC_MAXLEN (32U) +#define CONFIG_ASYMCUTE_TOPIC_MAXLEN (32U) #endif #ifndef ASYMCUTE_KEEPALIVE @@ -283,7 +283,7 @@ struct asymcute_con { */ struct asymcute_topic { asymcute_con_t *con; /**< connection used for registration */ - char name[ASYMCUTE_TOPIC_MAXLEN + 1]; /**< topic string (ACSII only) */ + char name[CONFIG_ASYMCUTE_TOPIC_MAXLEN + 1]; /**< topic string (ACSII only) */ uint8_t flags; /**< normal, short, or pre-defined */ uint16_t id; /**< topic id */ }; diff --git a/sys/net/application_layer/asymcute/asymcute.c b/sys/net/application_layer/asymcute/asymcute.c index 96a68fcab2..1961eb967f 100644 --- a/sys/net/application_layer/asymcute/asymcute.c +++ b/sys/net/application_layer/asymcute/asymcute.c @@ -679,7 +679,7 @@ int asymcute_topic_init(asymcute_topic_t *topic, const char *topic_name, } else { len = strlen(topic_name); - if ((len == 0) || (len > ASYMCUTE_TOPIC_MAXLEN)) { + if ((len == 0) || (len > CONFIG_ASYMCUTE_TOPIC_MAXLEN)) { return ASYMCUTE_OVERFLOW; } } From 1753b84cbadeba8662b88a2828a105c6e41958de Mon Sep 17 00:00:00 2001 From: Akshai M Date: Fri, 26 Jun 2020 17:57:56 +0530 Subject: [PATCH 3/8] net/asymcute : Move 'ASYMCUTE_KEEPALIVE' to 'CONFIG_' --- sys/include/net/asymcute.h | 8 ++++---- sys/net/application_layer/asymcute/asymcute.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/include/net/asymcute.h b/sys/include/net/asymcute.h index 696e33cd47..89b050b18a 100644 --- a/sys/include/net/asymcute.h +++ b/sys/include/net/asymcute.h @@ -115,13 +115,13 @@ extern "C" { #define CONFIG_ASYMCUTE_TOPIC_MAXLEN (32U) #endif -#ifndef ASYMCUTE_KEEPALIVE +#ifndef CONFIG_ASYMCUTE_KEEPALIVE /** * @brief Keep alive interval [in s] communicated to the gateway * * For the default value, see spec v1.2, section 7.2 -> T_WAIT: > 5 min */ -#define ASYMCUTE_KEEPALIVE (360) /* -> 6 min*/ +#define CONFIG_ASYMCUTE_KEEPALIVE (360) /* -> 6 min*/ #endif #ifndef ASYMCUTE_KEEPALIVE_PING @@ -131,9 +131,9 @@ extern "C" { * The default behavior of this implementation is to send ping messages as soon * as three quarters of the keep alive interval have passed. * - * @note Must be less than ASYMCUTE_KEEPALIVE + * @note Must be less than CONFIG_ASYMCUTE_KEEPALIVE */ -#define ASYMCUTE_KEEPALIVE_PING ((ASYMCUTE_KEEPALIVE / 4) * 3) +#define ASYMCUTE_KEEPALIVE_PING ((CONFIG_ASYMCUTE_KEEPALIVE / 4) * 3) #endif #ifndef ASYMCUTE_T_RETRY diff --git a/sys/net/application_layer/asymcute/asymcute.c b/sys/net/application_layer/asymcute/asymcute.c index 1961eb967f..1c4595ff28 100644 --- a/sys/net/application_layer/asymcute/asymcute.c +++ b/sys/net/application_layer/asymcute/asymcute.c @@ -752,7 +752,7 @@ int asymcute_connect(asymcute_con_t *con, asymcute_req_t *req, req->data[1] = MQTTSN_CONNECT; req->data[2] = ((clean) ? MQTTSN_CS : 0); req->data[3] = PROTOCOL_VERSION; - byteorder_htobebufs(&req->data[4], ASYMCUTE_KEEPALIVE); + byteorder_htobebufs(&req->data[4], CONFIG_ASYMCUTE_KEEPALIVE); memcpy(&req->data[6], cli_id, id_len); req->data_len = (size_t)req->data[0]; _req_send(req, con, _on_con_timeout); From 6dc5747c4bd770ebee55915e7ea7df30ba1016c7 Mon Sep 17 00:00:00 2001 From: Akshai M Date: Fri, 26 Jun 2020 17:59:21 +0530 Subject: [PATCH 4/8] net/asymcute : Move 'ASYMCUTE_T_RETRY' to 'CONFIG_' --- sys/include/net/asymcute.h | 4 ++-- sys/net/application_layer/asymcute/asymcute.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/include/net/asymcute.h b/sys/include/net/asymcute.h index 89b050b18a..e5fb733f63 100644 --- a/sys/include/net/asymcute.h +++ b/sys/include/net/asymcute.h @@ -136,13 +136,13 @@ extern "C" { #define ASYMCUTE_KEEPALIVE_PING ((CONFIG_ASYMCUTE_KEEPALIVE / 4) * 3) #endif -#ifndef ASYMCUTE_T_RETRY +#ifndef CONFIG_ASYMCUTE_T_RETRY /** * @brief Resend interval [in seconds] * * For the default value, see spec v1.2, section 7.2 -> T_RETRY: 10 to 15 sec */ -#define ASYMCUTE_T_RETRY (10U) /* -> 10 sec */ +#define CONFIG_ASYMCUTE_T_RETRY (10U) /* -> 10 sec */ #endif #ifndef ASYMCUTE_N_RETRY diff --git a/sys/net/application_layer/asymcute/asymcute.c b/sys/net/application_layer/asymcute/asymcute.c index 1c4595ff28..4d8ec0a819 100644 --- a/sys/net/application_layer/asymcute/asymcute.c +++ b/sys/net/application_layer/asymcute/asymcute.c @@ -31,7 +31,7 @@ #define PROTOCOL_VERSION (0x01) -#define RETRY_TO (ASYMCUTE_T_RETRY * US_PER_SEC) +#define RETRY_TO (CONFIG_ASYMCUTE_T_RETRY * US_PER_SEC) #define KEEPALIVE_TO (ASYMCUTE_KEEPALIVE_PING * US_PER_SEC) #define VALID_PUBLISH_FLAGS (MQTTSN_QOS_1 | MQTTSN_DUP | MQTTSN_RETAIN) From a1df2e33b02dc02694a83dbafd4261e58604f39b Mon Sep 17 00:00:00 2001 From: Akshai M Date: Fri, 26 Jun 2020 18:00:48 +0530 Subject: [PATCH 5/8] net/asymcute : Move 'ASYMCUTE_N_RETRY' to 'CONFIG_' --- sys/include/net/asymcute.h | 4 ++-- sys/net/application_layer/asymcute/asymcute.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/include/net/asymcute.h b/sys/include/net/asymcute.h index e5fb733f63..26b9ed582a 100644 --- a/sys/include/net/asymcute.h +++ b/sys/include/net/asymcute.h @@ -145,13 +145,13 @@ extern "C" { #define CONFIG_ASYMCUTE_T_RETRY (10U) /* -> 10 sec */ #endif -#ifndef ASYMCUTE_N_RETRY +#ifndef CONFIG_ASYMCUTE_N_RETRY /** * @brief Number of retransmissions until requests time out * * For the default value, see spec v1.2, section 7.2 -> N_RETRY: 3-5 */ -#define ASYMCUTE_N_RETRY (3U) +#define CONFIG_ASYMCUTE_N_RETRY (3U) #endif /** diff --git a/sys/net/application_layer/asymcute/asymcute.c b/sys/net/application_layer/asymcute/asymcute.c index 4d8ec0a819..a408a02173 100644 --- a/sys/net/application_layer/asymcute/asymcute.c +++ b/sys/net/application_layer/asymcute/asymcute.c @@ -181,7 +181,7 @@ static void _req_send(asymcute_req_t *req, asymcute_con_t *con, /* initialize request */ req->con = con; req->cb = cb; - req->retry_cnt = ASYMCUTE_N_RETRY; + req->retry_cnt = CONFIG_ASYMCUTE_N_RETRY; event_callback_init(&req->to_evt, _on_req_timeout, (void *)req); event_timeout_init(&req->to_timer, &_queue, &req->to_evt.super); /* add request to the pending queue (if non-con request) */ @@ -328,7 +328,7 @@ static void _on_connack(asymcute_con_t *con, const uint8_t *data, size_t len) if (data[2] == MQTTSN_ACCEPTED) { con->state = CONNECTED; /* start keep alive timer */ - con->keepalive_retry_cnt = ASYMCUTE_N_RETRY; + con->keepalive_retry_cnt = CONFIG_ASYMCUTE_N_RETRY; event_timeout_set(&con->keepalive_timer, KEEPALIVE_TO); ret = ASYMCUTE_CONNECTED; } @@ -369,9 +369,9 @@ static void _on_pingresp(asymcute_con_t *con) { mutex_lock(&con->lock); /* only handle ping resp message if we are actually waiting for a reply */ - if (con->keepalive_retry_cnt < ASYMCUTE_N_RETRY) { + if (con->keepalive_retry_cnt < CONFIG_ASYMCUTE_N_RETRY) { event_timeout_clear(&con->keepalive_timer); - con->keepalive_retry_cnt = ASYMCUTE_N_RETRY; + con->keepalive_retry_cnt = CONFIG_ASYMCUTE_N_RETRY; event_timeout_set(&con->keepalive_timer, KEEPALIVE_TO); } mutex_unlock(&con->lock); @@ -637,7 +637,7 @@ int asymcute_listener_run(asymcute_con_t *con, char *stack, size_t stacksize, random_bytes((uint8_t *)&con->last_id, 2); event_callback_init(&con->keepalive_evt, _on_keepalive_evt, con); event_timeout_init(&con->keepalive_timer, &_queue, &con->keepalive_evt.super); - con->keepalive_retry_cnt = ASYMCUTE_N_RETRY; + con->keepalive_retry_cnt = CONFIG_ASYMCUTE_N_RETRY; con->state = NOTCON; con->user_cb = callback; From 8a6d2882f7a77e19f7976ec6d7a89bf1c0833ac9 Mon Sep 17 00:00:00 2001 From: Akshai M Date: Mon, 6 Jul 2020 11:57:22 +0530 Subject: [PATCH 6/8] net/asymcute : Move 'ASYMCUTE_KEEPALIVE_PING' to 'CONFIG_' --- sys/include/net/asymcute.h | 4 ++-- sys/net/application_layer/asymcute/asymcute.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/include/net/asymcute.h b/sys/include/net/asymcute.h index 26b9ed582a..5d460e0605 100644 --- a/sys/include/net/asymcute.h +++ b/sys/include/net/asymcute.h @@ -124,7 +124,7 @@ extern "C" { #define CONFIG_ASYMCUTE_KEEPALIVE (360) /* -> 6 min*/ #endif -#ifndef ASYMCUTE_KEEPALIVE_PING +#ifndef CONFIG_ASYMCUTE_KEEPALIVE_PING /** * @brief Interval to use for sending periodic ping messages * @@ -133,7 +133,7 @@ extern "C" { * * @note Must be less than CONFIG_ASYMCUTE_KEEPALIVE */ -#define ASYMCUTE_KEEPALIVE_PING ((CONFIG_ASYMCUTE_KEEPALIVE / 4) * 3) +#define CONFIG_ASYMCUTE_KEEPALIVE_PING ((CONFIG_ASYMCUTE_KEEPALIVE / 4) * 3) #endif #ifndef CONFIG_ASYMCUTE_T_RETRY diff --git a/sys/net/application_layer/asymcute/asymcute.c b/sys/net/application_layer/asymcute/asymcute.c index a408a02173..ab6a7d7494 100644 --- a/sys/net/application_layer/asymcute/asymcute.c +++ b/sys/net/application_layer/asymcute/asymcute.c @@ -32,7 +32,7 @@ #define PROTOCOL_VERSION (0x01) #define RETRY_TO (CONFIG_ASYMCUTE_T_RETRY * US_PER_SEC) -#define KEEPALIVE_TO (ASYMCUTE_KEEPALIVE_PING * US_PER_SEC) +#define KEEPALIVE_TO (CONFIG_ASYMCUTE_KEEPALIVE_PING * US_PER_SEC) #define VALID_PUBLISH_FLAGS (MQTTSN_QOS_1 | MQTTSN_DUP | MQTTSN_RETAIN) #define VALID_SUBSCRIBE_FLAGS (MQTTSN_QOS_1 | MQTTSN_DUP) From e9f270c78a3f0aaead8d5af87e38d38035421154 Mon Sep 17 00:00:00 2001 From: Akshai M Date: Mon, 6 Jul 2020 14:16:06 +0530 Subject: [PATCH 7/8] net/asymcute : Expose to Kconfig --- sys/net/application_layer/Kconfig | 2 + sys/net/application_layer/asymcute/Kconfig | 88 ++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 sys/net/application_layer/asymcute/Kconfig diff --git a/sys/net/application_layer/Kconfig b/sys/net/application_layer/Kconfig index 60bc142bcd..39779d9e73 100644 --- a/sys/net/application_layer/Kconfig +++ b/sys/net/application_layer/Kconfig @@ -4,6 +4,8 @@ # General Public License v2.1. See the file LICENSE in the top level # directory for more details. # +rsource "asymcute/Kconfig" + menu "CoAP" rsource "Kconfig.coap" diff --git a/sys/net/application_layer/asymcute/Kconfig b/sys/net/application_layer/asymcute/Kconfig new file mode 100644 index 0000000000..a31d39310b --- /dev/null +++ b/sys/net/application_layer/asymcute/Kconfig @@ -0,0 +1,88 @@ +# Copyright (c) 2020 Freie Universitaet Berlin +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# +menuconfig KCONFIG_MODULE_ASYMCUTE + bool "Configure Asymcute" + depends on MODULE_ASYMCUTE + help + Configure Asymcute using Kconfig.`Asymcute` is a asynchronous MQTT-SN + client implementation, aiming at providing the user a high degree of + flexibility. It provides a flexible interface that allows users to issue + any number of concurrent requests to one or more different gateways + simultaneously. + +if KCONFIG_MODULE_ASYMCUTE + +config ASYMCUTE_BUFSIZE_EXP + int "Exponent for the buffer size (resulting in the buffer size 2^n)" + default 7 + help + As the buffer size ALWAYS needs to be power of two, this option + represents the exponent of 2^n, which will be used as the size of the + buffer ('ASYMCUTE_BUFSIZE'). Default value is 7 which corresponds to a + buffer size of 128. + +config ASYMCUTE_TOPIC_MAXLEN + int "Maximum topic length" + default 32 + help + Configure maximum length for client's topic. The value must be less than + (256 - 8) and less than ('ASYMCUTE_BUFSIZE' - 8). + +config ASYMCUTE_KEEPALIVE + int "Keep alive interval in seconds" + range 300 $(UINT32_MAX) + default 360 + help + Configure 'CONFIG_ASYMCUTE_KEEPALIVE', keep alive interval in seconds + which is communicated to the gateway in the CONNECT message. For more + information, see MQTT-SN Spec v1.2, section 5.4.4. For default values, + see section 7.2 -> TWAIT: > 5 min. Default value is 360 seconds which + corresponds to 6 minutes. + +config ASYMCUTE_KEEPALIVE_PING_EN + bool "Enable configuration of keep alive ping" + help + Enable configuration of 'CONFIG_ASYMCUTE_KEEPALIVE_PING', keep alive + ping interval. If not enabled, 'CONFIG_ASYMCUTE_KEEPALIVE_PING' will + default to three quarters of 'CONFIG_ASYMCUTE_KEEPALIVE', keep alive + interval. + +config ASYMCUTE_KEEPALIVE_PING + int "Keep alive ping interval in seconds" + default 270 + depends on ASYMCUTE_KEEPALIVE_PING_EN + help + Configure 'CONFIG_ASYMCUTE_KEEPALIVE_PING', interval used by client for + sending periodic keep alive ping messages to the gateway. The value must + be less than 'CONFIG_ASYMCUTE_KEEPALIVE'. + +config ASYMCUTE_T_RETRY + int "Retry timer in seconds" + range 10 15 + default 10 + help + Configure 'CONFIG_ASYMCUTE_T_RETRY', interval used for timing the retry + messages which are sent when the expected reply from GW is not received. + The retry timer is started by the client when the message is sent and + stopped when the expected reply from GW is received. If the timer times + out and the expected GW’s reply is not received, the client retransmits + the message. For more information, see MQTT-SN Spec v1.2, section 6.13. + For default values, see section 7.2 -> Tretry: 10 to 15 sec. + +config ASYMCUTE_N_RETRY + int "Maximum number of retransmissions" + range 3 5 + default 3 + help + Configure 'CONFIG_ASYMCUTE_N_RETRY',the maximum number of retransmissions + in the event that the retry timer times out. After 'CONFIG_ASYMCUTE_N_RETRY' + number of retransmissions, the client aborts the procedure and assumes + that its MQTT-SN connection to the gateway is disconnected. For more + information, see MQTT-SN Spec v1.2, section 6.13. For default values, + see section 7.2 -> Nretry: 3-5. + +endif # KCONFIG_MODULE_ASYMCUTE From 7a2e9c894802477700f6d12e4866a71df902088e Mon Sep 17 00:00:00 2001 From: Akshai M Date: Mon, 6 Jul 2020 16:40:40 +0530 Subject: [PATCH 8/8] net/asymcute : Update documentation --- sys/include/net/asymcute.h | 120 +++++++++++++++++++++---------------- 1 file changed, 68 insertions(+), 52 deletions(-) diff --git a/sys/include/net/asymcute.h b/sys/include/net/asymcute.h index 5d460e0605..08c4f9dd32 100644 --- a/sys/include/net/asymcute.h +++ b/sys/include/net/asymcute.h @@ -59,16 +59,80 @@ extern "C" { #endif /** - * @brief Default buffer size for the ASYMCUTE (as exponent of 2^n). + * @defgroup net_asymcute_conf Asymcute (MQTT-SN Client) compile configurations + * @ingroup config + * @{ + */ +/** + * @brief Default buffer size for Asymcute client (as exponent of 2^n) * - * As the buffer size ALWAYS needs to be power of two, this option - * represents the exponent of 2^n, which will be used as the size of - * the buffer. + * As the buffer size ALWAYS needs to be power of two, this option represents + * the exponent of 2^n, which will be used as the size of the buffer. */ #ifndef CONFIG_ASYMCUTE_BUFSIZE_EXP #define CONFIG_ASYMCUTE_BUFSIZE_EXP (7U) #endif +/** + * @brief Maximum topic length + * + * @note Must be less than (256 - 8) AND less than ( @ref ASYMCUTE_BUFSIZE - 8). + */ +#ifndef CONFIG_ASYMCUTE_TOPIC_MAXLEN +#define CONFIG_ASYMCUTE_TOPIC_MAXLEN (32U) +#endif + +/** + * @brief Keep alive interval [in s] communicated to the gateway + * + * keep alive interval in seconds which is communicated to the gateway in the + * CONNECT message. For more information, see MQTT-SN Spec v1.2, section 5.4.4. + * For default values,see section 7.2 -> TWAIT: > 5 min. + */ +#ifndef CONFIG_ASYMCUTE_KEEPALIVE +#define CONFIG_ASYMCUTE_KEEPALIVE (360) +#endif + +/** + * @brief Interval to use for sending periodic ping messages + * + * The default behavior of this implementation is to send ping messages as soon + * as three quarters of the keep alive interval have passed. + * + * @note Must be less than @ref CONFIG_ASYMCUTE_KEEPALIVE + */ +#ifndef CONFIG_ASYMCUTE_KEEPALIVE_PING +#define CONFIG_ASYMCUTE_KEEPALIVE_PING ((CONFIG_ASYMCUTE_KEEPALIVE / 4) * 3) +#endif + +/** + * @brief Resend interval [in seconds] + * + * Interval used for timing the retry messages which are sent when the expected + * reply from GW is not received. The retry timer is started by the client when + * the message is sent and stopped when the expected reply from GW is received. + * If the timer times out and the expected GW’s reply is not received, the + * client retransmits the message. For more information, see MQTT-SN Spec v1.2, + * section 6.13. For default values, see section 7.2 -> Tretry: 10 to 15 sec. + */ +#ifndef CONFIG_ASYMCUTE_T_RETRY +#define CONFIG_ASYMCUTE_T_RETRY (10U) +#endif + +/** + * @brief Number of retransmissions until requests time out + * + * Maximum number of retransmissions in the event that the retry timer times + * out. After 'CONFIG_ASYMCUTE_N_RETRY' number of retransmissions, the client + * aborts the procedure and assumes that its MQTT-SN connection to the gateway + * is disconnected. For more information, see MQTT-SN Spec v1.2, section 6.13. + * For default values, see section 7.2 -> Nretry: 3-5. + */ +#ifndef CONFIG_ASYMCUTE_N_RETRY +#define CONFIG_ASYMCUTE_N_RETRY (3U) +#endif +/** @} */ + #ifndef ASYMCUTE_BUFSIZE /** * @brief Default buffer size used for receive and request buffers @@ -106,54 +170,6 @@ extern "C" { #define ASYMCUTE_LISTENER_STACKSIZE (THREAD_STACKSIZE_DEFAULT) #endif -#ifndef CONFIG_ASYMCUTE_TOPIC_MAXLEN -/** - * @brief Maximum topic length - * - * @note Must be less than (256 - 8) AND less than (ASYMCUTE_BUFSIZE - 8). - */ -#define CONFIG_ASYMCUTE_TOPIC_MAXLEN (32U) -#endif - -#ifndef CONFIG_ASYMCUTE_KEEPALIVE -/** - * @brief Keep alive interval [in s] communicated to the gateway - * - * For the default value, see spec v1.2, section 7.2 -> T_WAIT: > 5 min - */ -#define CONFIG_ASYMCUTE_KEEPALIVE (360) /* -> 6 min*/ -#endif - -#ifndef CONFIG_ASYMCUTE_KEEPALIVE_PING -/** - * @brief Interval to use for sending periodic ping messages - * - * The default behavior of this implementation is to send ping messages as soon - * as three quarters of the keep alive interval have passed. - * - * @note Must be less than CONFIG_ASYMCUTE_KEEPALIVE - */ -#define CONFIG_ASYMCUTE_KEEPALIVE_PING ((CONFIG_ASYMCUTE_KEEPALIVE / 4) * 3) -#endif - -#ifndef CONFIG_ASYMCUTE_T_RETRY -/** - * @brief Resend interval [in seconds] - * - * For the default value, see spec v1.2, section 7.2 -> T_RETRY: 10 to 15 sec - */ -#define CONFIG_ASYMCUTE_T_RETRY (10U) /* -> 10 sec */ -#endif - -#ifndef CONFIG_ASYMCUTE_N_RETRY -/** - * @brief Number of retransmissions until requests time out - * - * For the default value, see spec v1.2, section 7.2 -> N_RETRY: 3-5 - */ -#define CONFIG_ASYMCUTE_N_RETRY (3U) -#endif - /** * @brief Return values used by public Asymcute functions */