-
Notifications
You must be signed in to change notification settings - Fork 642
Fix doxygen warnings in MQTT Library documentation #1122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sarenameas
merged 11 commits into
aws:development
from
sarenameas:mqtt/doxygen_code_warnings
Aug 18, 2020
+388
−85
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
24d1450
Fix all doxygen warnings.
11fcc14
Address PR comments.
13736ac
Forward declare all structures in all mqtt files.
962b8e8
Copy the mqtt_state.h private function docs to mqtt_state.c.
9954408
Address PR comments.
47159d2
Fix some comments.
470efaf
Merge branch 'development' into mqtt/doxygen_code_warnings
sarenameas 875e1eb
Delete forgotten @endcond and mqtt_state.h description.
c8a0b5a
Merge branch 'development' into mqtt/doxygen_code_warnings
6329126
Update wording in file description for mqtt_state.c
3a31641
Merge branch 'development' into mqtt/doxygen_code_warnings
sarenameas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,12 +19,23 @@ | |
| * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| */ | ||
|
|
||
| /** | ||
| * @file mqtt_lightweight.h | ||
| * @brief User-facing functions for serializing and deserializing MQTT 3.1.1 | ||
| * packets. This header should be included for building a lightweight MQTT | ||
| * client bypassing the managed CSDK MQTT library API in mqtt.h. | ||
| */ | ||
| #ifndef MQTT_LIGHTWEIGHT_H | ||
| #define MQTT_LIGHTWEIGHT_H | ||
|
|
||
| #include <stddef.h> | ||
| #include <stdint.h> | ||
|
|
||
| /** | ||
| * @cond DOXYGEN_IGNORE | ||
| * Doxygen should ignore this section. | ||
| */ | ||
|
|
||
| /* bool is defined in only C99+. */ | ||
| #if defined( __cplusplus ) || ( defined( __STDC_VERSION__ ) && ( __STDC_VERSION__ >= 199901L ) ) | ||
| #include <stdbool.h> | ||
|
|
@@ -33,6 +44,7 @@ | |
| #define false ( int8_t ) 0 | ||
| #define true ( int8_t ) 1 | ||
| #endif | ||
| /** @endcond */ | ||
|
|
||
| /* Include config file before other headers. */ | ||
| #include "mqtt_config.h" | ||
|
|
@@ -55,26 +67,17 @@ | |
| #define MQTT_PACKET_TYPE_PINGRESP ( ( uint8_t ) 0xD0U ) /**< @brief PINGRESP (server-to-client). */ | ||
| #define MQTT_PACKET_TYPE_DISCONNECT ( ( uint8_t ) 0xE0U ) /**< @brief DISCONNECT (client-to-server). */ | ||
|
|
||
|
|
||
| /** | ||
| * @brief The size of MQTT PUBACK, PUBREC, PUBREL, and PUBCOMP packets, per MQTT spec. | ||
| */ | ||
| #define MQTT_PUBLISH_ACK_PACKET_SIZE ( 4UL ) | ||
|
|
||
| /* Structures defined in this file. */ | ||
| struct MQTTFixedBuffer; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doxygen does not easily support forward declarations like this, so i changed to our original style of |
||
| typedef struct MQTTFixedBuffer MQTTFixedBuffer_t; | ||
|
|
||
| struct MQTTConnectInfo; | ||
| typedef struct MQTTConnectInfo MQTTConnectInfo_t; | ||
|
|
||
| struct MQTTSubscribeInfo; | ||
| typedef struct MQTTSubscribeInfo MQTTSubscribeInfo_t; | ||
|
|
||
| struct MqttPublishInfo; | ||
| typedef struct MqttPublishInfo MQTTPublishInfo_t; | ||
|
|
||
| struct MQTTPublishInfo; | ||
| struct MQTTPacketInfo; | ||
| typedef struct MQTTPacketInfo MQTTPacketInfo_t; | ||
|
|
||
| /** | ||
| * @brief Return codes from MQTT functions. | ||
|
|
@@ -110,16 +113,16 @@ typedef enum MQTTQoS | |
| * These buffers are not copied and must remain in scope for the duration of the | ||
| * MQTT operation. | ||
| */ | ||
| struct MQTTFixedBuffer | ||
| typedef struct MQTTFixedBuffer | ||
| { | ||
| uint8_t * pBuffer; /**< @brief Pointer to buffer. */ | ||
| size_t size; /**< @brief Size of buffer. */ | ||
| }; | ||
| } MQTTFixedBuffer_t; | ||
|
|
||
| /** | ||
| * @brief MQTT CONNECT packet parameters. | ||
| */ | ||
| struct MQTTConnectInfo | ||
| typedef struct MQTTConnectInfo | ||
| { | ||
| /** | ||
| * @brief Whether to establish a new, clean session or resume a previous session. | ||
|
|
@@ -160,12 +163,12 @@ struct MQTTConnectInfo | |
| * @brief Length of MQTT password. Set to 0 if not used. | ||
| */ | ||
| uint16_t passwordLength; | ||
| }; | ||
| } MQTTConnectInfo_t; | ||
|
|
||
| /** | ||
| * @brief MQTT SUBSCRIBE packet parameters. | ||
| */ | ||
| struct MQTTSubscribeInfo | ||
| typedef struct MQTTSubscribeInfo | ||
| { | ||
| /** | ||
| * @brief Quality of Service for subscription. | ||
|
|
@@ -181,12 +184,12 @@ struct MQTTSubscribeInfo | |
| * @brief Length of subscription topic filter. | ||
| */ | ||
| uint16_t topicFilterLength; | ||
| }; | ||
| } MQTTSubscribeInfo_t; | ||
|
|
||
| /** | ||
| * @brief MQTT PUBLISH packet parameters. | ||
| */ | ||
| struct MqttPublishInfo | ||
| typedef struct MQTTPublishInfo | ||
| { | ||
| /** | ||
| * @brief Quality of Service for message. | ||
|
|
@@ -222,12 +225,12 @@ struct MqttPublishInfo | |
| * @brief Message payload length. | ||
| */ | ||
| size_t payloadLength; | ||
| }; | ||
| } MQTTPublishInfo_t; | ||
|
|
||
| /** | ||
| * @brief MQTT incoming packet parameters. | ||
| */ | ||
| struct MQTTPacketInfo | ||
| typedef struct MQTTPacketInfo | ||
| { | ||
| /** | ||
| * @brief Type of incoming MQTT packet. | ||
|
|
@@ -243,7 +246,7 @@ struct MQTTPacketInfo | |
| * @brief Length of remaining serialized data. | ||
| */ | ||
| size_t remainingLength; | ||
| }; | ||
| } MQTTPacketInfo_t; | ||
|
|
||
| /** | ||
| * @brief Get the size and Remaining Length of an MQTT CONNECT packet. | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no misra issues or compiler warnings with this change.