From 83fedde0fc10d735c86163eda04eebcaa6479f50 Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Mon, 14 Aug 2023 15:06:15 +1000 Subject: [PATCH 1/3] Updating next version to be v1.0.6 --- client/include/cc_mqttsn_client/common.h | 2 +- gateway/include/cc_mqttsn_gateway/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/include/cc_mqttsn_client/common.h b/client/include/cc_mqttsn_client/common.h index 545c6c4..c2f3075 100644 --- a/client/include/cc_mqttsn_client/common.h +++ b/client/include/cc_mqttsn_client/common.h @@ -40,7 +40,7 @@ extern "C" { #define CC_MQTTSN_CLIENT_MINOR_VERSION 0U /// @brief Patch level of the library -#define CC_MQTTSN_CLIENT_PATCH_VERSION 5U +#define CC_MQTTSN_CLIENT_PATCH_VERSION 6U /// @brief Macro to create numeric version as single unsigned number #define CC_MQTTSN_CLIENT_MAKE_VERSION(major_, minor_, patch_) \ diff --git a/gateway/include/cc_mqttsn_gateway/version.h b/gateway/include/cc_mqttsn_gateway/version.h index fb7b240..67c9c8e 100644 --- a/gateway/include/cc_mqttsn_gateway/version.h +++ b/gateway/include/cc_mqttsn_gateway/version.h @@ -17,7 +17,7 @@ #define CC_MQTTSN_GW_MINOR_VERSION 0U /// @brief Patch level of the library -#define CC_MQTTSN_GW_PATCH_VERSION 5U +#define CC_MQTTSN_GW_PATCH_VERSION 6U /// @brief Macro to create numeric version as single unsigned number #define CC_MQTTSN_GW_MAKE_VERSION(major_, minor_, patch_) \ From 0be24ef0737191e2e630ca09d60b89b28d441328 Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Wed, 22 Nov 2023 09:22:09 +1000 Subject: [PATCH 2/3] Requiring v2.5 of cc.mqtt311.generated and cc.mqttsn.generated. --- .appveyor.yml | 4 ++-- .github/workflows/actions_build.yml | 4 ++-- client/src/basic/BasicClient.h | 2 +- gateway/src/lib/common.h | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 40440c9..e37381d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,8 +20,8 @@ configuration: environment: COMMS_BRANCH: v5.2.1 - CC_MQTTSN_BRANCH: v2.4 - CC_MQTT311_BRANCH: v2.4 + CC_MQTTSN_BRANCH: v2.5 + CC_MQTT311_BRANCH: v2.5 matrix: - CPP_STD: 11 diff --git a/.github/workflows/actions_build.yml b/.github/workflows/actions_build.yml index 140a4cf..2b0392a 100644 --- a/.github/workflows/actions_build.yml +++ b/.github/workflows/actions_build.yml @@ -4,8 +4,8 @@ on: [push] env: COMMS_BRANCH: v5.2.1 - CC_MQTTSN_BRANCH: v2.4 - CC_MQTT311_BRANCH: v2.4 + CC_MQTTSN_BRANCH: v2.5 + CC_MQTT311_BRANCH: v2.5 jobs: build_gcc_old_ubuntu_20_04: diff --git a/client/src/basic/BasicClient.h b/client/src/basic/BasicClient.h index f5c59a7..478737a 100644 --- a/client/src/basic/BasicClient.h +++ b/client/src/basic/BasicClient.h @@ -24,7 +24,7 @@ #include "cc_mqttsn_client/common.h" #include "details/WriteBufStorageType.h" -static_assert(COMMS_MAKE_VERSION(2, 4, 0) <= cc_mqttsn::version(), +static_assert(COMMS_MAKE_VERSION(2, 5, 0) <= cc_mqttsn::version(), "The version of cc.mqttsn.generated library is too old"); namespace cc_mqttsn_client diff --git a/gateway/src/lib/common.h b/gateway/src/lib/common.h index edd4dcc..846c820 100644 --- a/gateway/src/lib/common.h +++ b/gateway/src/lib/common.h @@ -20,10 +20,10 @@ #include "RegMgr.h" -static_assert(COMMS_MAKE_VERSION(2, 4, 0) <= cc_mqttsn::version(), +static_assert(COMMS_MAKE_VERSION(2, 5, 0) <= cc_mqttsn::version(), "The version of cc.mqttsn.generated library is too old"); -static_assert(COMMS_MAKE_VERSION(2, 4, 0) <= cc_mqtt311::version(), +static_assert(COMMS_MAKE_VERSION(2, 5, 0) <= cc_mqtt311::version(), "The version of cc.mqtt311.generated library is too old"); namespace cc_mqttsn_gateway From a9e65e7c34976d1e71604f3f75c23141dd30da2e Mon Sep 17 00:00:00 2001 From: Alex Robenko Date: Thu, 23 Nov 2023 08:07:25 +1000 Subject: [PATCH 3/3] Fixes to doxygen cocumentation. --- client/doc/doxygen.conf | 2 +- client/templ/client.h.templ | 12 +++++++----- gateway/doc/doxygen.conf | 2 +- gateway/include/cc_mqttsn_gateway/Session.h | 2 +- gateway/include/cc_mqttsn_gateway/gateway_all.h | 12 ++++++------ 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/client/doc/doxygen.conf b/client/doc/doxygen.conf index 3172862..4d8992d 100644 --- a/client/doc/doxygen.conf +++ b/client/doc/doxygen.conf @@ -808,7 +808,7 @@ WARN_IF_UNDOCUMENTED = NO # markup commands wrongly. # The default value is: YES. -WARN_IF_DOC_ERROR = NO +WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return diff --git a/client/templ/client.h.templ b/client/templ/client.h.templ index 84f3f07..5a210eb 100644 --- a/client/templ/client.h.templ +++ b/client/templ/client.h.templ @@ -146,7 +146,6 @@ unsigned cc_mqttsn_##NAME##client_process_data(CC_MqttsnClientHandle client, con /// This call may cause invocation of some other callbacks, such as a request /// to send new data to the gateway. /// @param[in] client Handle returned by @ref cc_mqttsn_##NAME##client_new() function. -/// @param[in] ms Number of elapsed @b milliseconds. void cc_mqttsn_##NAME##client_tick(CC_MqttsnClientHandle client); /// @brief Set retry period to wait between resending unacknowledged message to the gateway. @@ -183,7 +182,7 @@ void cc_mqttsn_##NAME##client_set_broadcast_radius(CC_MqttsnClientHandle client, /// gateways can be done using this function. By default the search for /// the gateway is @b enabled. /// @param[in] client Handle returned by @ref cc_mqttsn_##NAME##client_new() function. -/// @param[in] value @b true to enable, and @false to disable. +/// @param[in] value @b true to enable, and @b false to disable. void cc_mqttsn_##NAME##client_set_searchgw_enabled(CC_MqttsnClientHandle client, bool value); /// @brief Send @b SEARCHGW message. @@ -292,6 +291,10 @@ CC_MqttsnErrorCode cc_mqttsn_##NAME##client_reconnect( /// the library assumes "disconnected" internal state and some functions, /// such as requests to publish and/or subscribe may not work. /// @param[in] client Handle returned by @ref cc_mqttsn_##NAME##client_new() function. +/// @param[in] callback Callback to be invoked when operation is complete, +/// must @b NOT be NULL. +/// @param[in] data Pointer to any user data, it will be passed as the first +/// parameter to the invoked completion report callback, can be NULL. /// @return Error code indicating success/failure status of the operation. CC_MqttsnErrorCode cc_mqttsn_##NAME##client_disconnect( CC_MqttsnClientHandle client, @@ -482,9 +485,8 @@ CC_MqttsnErrorCode cc_mqttsn_##NAME##client_will_topic_update( /// @details When the operation is complete, the provided callback /// will be invoked. /// @param[in] client Handle returned by @ref cc_mqttsn_##NAME##client_new() function. -/// @param[in] topic New will topic string. The parameter can be NULL. -/// In this case the request means erase current will information -/// recorded with the gateway/broker. +/// @param[in] msg Pointer to message body buffer +/// @param[in] msgLen Length of message body buffer. /// @param[in] callback Callback to be invoked when operation is complete, /// must @b NOT be NULL. /// @param[in] data Pointer to any user data, it will be passed as the first diff --git a/gateway/doc/doxygen.conf b/gateway/doc/doxygen.conf index 4456596..78455d8 100644 --- a/gateway/doc/doxygen.conf +++ b/gateway/doc/doxygen.conf @@ -808,7 +808,7 @@ WARN_IF_UNDOCUMENTED = NO # markup commands wrongly. # The default value is: YES. -WARN_IF_DOC_ERROR = NO +WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return diff --git a/gateway/include/cc_mqttsn_gateway/Session.h b/gateway/include/cc_mqttsn_gateway/Session.h index 930f738..1f64f43 100644 --- a/gateway/include/cc_mqttsn_gateway/Session.h +++ b/gateway/include/cc_mqttsn_gateway/Session.h @@ -240,7 +240,7 @@ class Session /// be performed only when the session's operation has been successfully /// started (see start()). Otherwise the call to this function gets /// ignored. - /// @param[in] conneted Connection status - @b true means connected, @b false disconnected. + /// @param[in] connected Connection status - @b true means connected, @b false disconnected. void setBrokerConnected(bool connected); /// @brief Add predefined topic string and ID information. diff --git a/gateway/include/cc_mqttsn_gateway/gateway_all.h b/gateway/include/cc_mqttsn_gateway/gateway_all.h index 6b0d7ba..ba20723 100644 --- a/gateway/include/cc_mqttsn_gateway/gateway_all.h +++ b/gateway/include/cc_mqttsn_gateway/gateway_all.h @@ -135,7 +135,7 @@ typedef struct /// @details When the requested time is due, the driving code is expected /// to call cc_mqttsn_gw_session_tick() member function. /// @param[in] userData User data passed as the last parameter to the setting function. -/// @param[in] value Number of @b milliseconds to measure. +/// @param[in] duration Number of @b milliseconds to measure. typedef void (*CC_MqttsnSessionTickReqCb)(void* userData, unsigned duration); /// @brief Type of callback, used to cancel existing time measurement. @@ -388,7 +388,7 @@ void cc_mqttsn_gw_session_tick(CC_MqttsnSessionHandle session); /// send new message(s) and/or (re)start time measurement. /// @param[in] session Handle returned by cc_mqttsn_gw_session_alloc() function. /// @param[in] buf Pointer to the buffer of data to process. -/// @param[in] len Number of bytes in the data buffer. +/// @param[in] bufLen Number of bytes in the data buffer. /// @return Number of processed bytes. /// @note The function returns number of bytes that were actually consumed, and /// can be removed from the holding buffer. @@ -403,7 +403,7 @@ unsigned cc_mqttsn_gw_session_data_from_client( /// send new message(s) and/or (re)start time measurement. /// @param[in] session Handle returned by cc_mqttsn_gw_session_alloc() function. /// @param[in] buf Pointer to the buffer of data to process. -/// @param[in] len Number of bytes in the data buffer. +/// @param[in] bufLen Number of bytes in the data buffer. /// @return Number of processed bytes. /// @note The function returns number of bytes that were actually consumed, and /// can be removed from the holding buffer. @@ -418,7 +418,7 @@ unsigned cc_mqttsn_gw_session_data_from_broker( /// started (see cc_mqttsn_gw_session_start()). Otherwise the call to this function gets /// ignored. /// @param[in] session Handle returned by cc_mqttsn_gw_session_alloc() function. -/// @param[in] conneted Connection status - @b true means connected, @b false disconnected. +/// @param[in] connected Connection status - @b true means connected, @b false disconnected. void cc_mqttsn_gw_session_broker_connected(CC_MqttsnSessionHandle session, bool connected); /// @brief Add predefined topic string and ID information. @@ -433,8 +433,8 @@ bool cc_mqttsn_gw_session_add_predefined_topic( /// @brief Limit range of topic IDs allocated for newly registered topics. /// @param[in] session Handle returned by cc_mqttsn_gw_session_alloc() function. -/// @param[in] minVal Min topic ID. -/// @param[in] maxVal Max topic ID. +/// @param[in] minTopicId Min topic ID. +/// @param[in] maxTopicId Max topic ID. /// @return success/failure status bool cc_mqttsn_gw_session_set_topic_id_alloc_range( CC_MqttsnSessionHandle session,