From 34679948969c29e7ea11766c1065b798144d0e86 Mon Sep 17 00:00:00 2001 From: Ken Bannister Date: Sat, 29 Dec 2018 10:46:19 -0500 Subject: [PATCH 1/3] net/gcoap: add config macros to config doc group --- sys/include/net/gcoap.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/sys/include/net/gcoap.h b/sys/include/net/gcoap.h index 991909c4a9..236f7c9269 100644 --- a/sys/include/net/gcoap.h +++ b/sys/include/net/gcoap.h @@ -231,6 +231,12 @@ extern "C" { #endif +/** + * @defgroup net_gcoap_conf Gcoap compile configurations + * @ingroup net_gcoap + * @ingroup config + * @{ + */ /** * @brief Size for module message queue */ @@ -258,6 +264,7 @@ extern "C" { #ifndef GCOAP_REQ_WAITING_MAX #define GCOAP_REQ_WAITING_MAX (2) #endif +/** @} */ /** * @brief Maximum length in bytes for a token @@ -270,7 +277,8 @@ extern "C" { #define GCOAP_HEADER_MAXLEN (sizeof(coap_hdr_t) + GCOAP_TOKENLEN_MAX) /** - * @brief Length in bytes for a token; use 2 if not defined + * @ingroup net_gcoap_conf + * @brief Length in bytes for a token */ #ifndef GCOAP_TOKENLEN #define GCOAP_TOKENLEN (2) @@ -298,6 +306,7 @@ extern "C" { #define GCOAP_SEND_LIMIT_NON (-1) /** + * @ingroup net_gcoap_conf * @brief Time in usec that the event loop waits for an incoming CoAP message */ #ifndef GCOAP_RECV_TIMEOUT @@ -305,6 +314,7 @@ extern "C" { #endif /** + * @ingroup net_gcoap_conf * @brief Default time to wait for a non-confirmable response [in usec] * * Set to 0 to disable timeout. @@ -327,15 +337,16 @@ extern "C" { #define GCOAP_MSG_TYPE_INTR (0x1502) /** - * @brief Maximum number of Observe clients; use 2 if not defined + * @ingroup net_gcoap_conf + * @brief Maximum number of Observe clients */ #ifndef GCOAP_OBS_CLIENTS_MAX #define GCOAP_OBS_CLIENTS_MAX (2) #endif /** - * @brief Maximum number of registrations for Observable resources; use 2 if - * not defined + * @ingroup net_gcoap_conf + * @brief Maximum number of registrations for Observable resources */ #ifndef GCOAP_OBS_REGISTRATIONS_MAX #define GCOAP_OBS_REGISTRATIONS_MAX (2) @@ -351,6 +362,7 @@ extern "C" { /** @} */ /** + * @ingroup net_gcoap_conf * @brief Width in bytes of the Observe option value for a notification * * This width is used to determine the length of the 'tick' used to measure @@ -402,6 +414,7 @@ extern "C" { #endif /** + * @ingroup net_gcoap_conf * @brief Count of PDU buffers available for resending confirmable messages */ #ifndef GCOAP_RESEND_BUFS_MAX From beae37cf18908a47a3d501c97f65bbac2b648660 Mon Sep 17 00:00:00 2001 From: Ken Bannister Date: Sun, 30 Dec 2018 09:31:15 -0500 Subject: [PATCH 2/3] net/gcoap: retitle documentation group Avoids confusion with generic CoAP and capitalization retains order in documentation. --- sys/include/net/gcoap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/include/net/gcoap.h b/sys/include/net/gcoap.h index 236f7c9269..22430d9afa 100644 --- a/sys/include/net/gcoap.h +++ b/sys/include/net/gcoap.h @@ -8,7 +8,7 @@ */ /** - * @defgroup net_gcoap CoAP + * @defgroup net_gcoap Gcoap * @ingroup net * @brief High-level interface to CoAP messaging * From 03d4230d3afbccc233ca8847cca37b65afa2c6a0 Mon Sep 17 00:00:00 2001 From: Ken Bannister Date: Mon, 31 Dec 2018 06:13:55 -0500 Subject: [PATCH 3/3] net/gcoap: specify range for token length --- sys/include/net/gcoap.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/include/net/gcoap.h b/sys/include/net/gcoap.h index 22430d9afa..1059d656ce 100644 --- a/sys/include/net/gcoap.h +++ b/sys/include/net/gcoap.h @@ -279,6 +279,8 @@ extern "C" { /** * @ingroup net_gcoap_conf * @brief Length in bytes for a token + * + * Value must be in the range 0 to @ref GCOAP_TOKENLEN_MAX. */ #ifndef GCOAP_TOKENLEN #define GCOAP_TOKENLEN (2)