/**
@mainpage Overview
@anchor mqtt
@brief MQTT 5.0 client library

> MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks. The design principles are to minimise network bandwidth and device resource requirements whilst also attempting to ensure reliability and some degree of assurance of delivery. These principles also turn out to make the protocol ideal of the emerging "machine-to-machine" (M2M) or "Internet of Things" world of connected devices, and for mobile applications where bandwidth and battery power are at a premium.
<span style="float:right;margin-right:4em"> &mdash; <i>Official description of MQTT from [mqtt.org](https://mqtt.org)</i></span><br>

This MQTT library implements the client side of the MQTT 5.0 protocol. This library is optimized for resource constrained embedded devices. Features of this library include:
- Fully synchronous API, to allow applications to completely manage their concurrency and multi-threading method.
- Operations on fixed buffers, so that applications may control their memory allocation strategy.
- Scalable performance and footprint. The [configuration settings](@ref core_mqtt_config) allow this library to be tailored to a system's resources.

Please see https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/main/demos/mqtt for example code demonstrating integration with TLS.

@section mqtt_memory_requirements Memory Requirements
@brief Memory requirements of the MQTT library.

@include{doc} size_table.md
 */

/**
@page mqtt_design Design
@brief Architecture of the MQTT library.

This MQTT client library provides an implementation of the [MQTT 5.0 specification](https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html). It is optimized for resource constrained devices and does not allocate any memory.

@section mqtt_interfaces Interfaces and Callbacks

The MQTT library relies on interfaces to dissociate itself from platform specific functionality,
such as the transport layer or maintaining time. Interfaces used by MQTT are simply function pointers
with expectations of behavior.

The MQTT library expects the application to provide implementations for the following interfaces:

<table>
    <tr>
        <td><b>Function Pointer</b></td>
        <td><b>Use</b></td>
    </tr>
    <tr>
        <td>@ref TransportRecv_t</td>
        <td>Receiving data from an established network connection.</td>
    </tr>
    <tr>
        <td>@ref TransportSend_t</td>
        <td>Sending data over an established network connection.</td>
    </tr>
    <tr>
        <td>@ref MQTTGetCurrentTimeFunc_t</td>
        <td>Obtaining timestamps for complying with user-specified timeouts and the MQTT keep-alive mechanism.</td>
    </tr>
    <tr>
        <td>@ref MQTTEventCallback_t</td>
        <td>Returning packets received from the network to the user application after deserialization.</td>
    </tr>
</table>

Apart from these, users can optionally define the following callbacks if they wish to use library's mechanism to resend
unacknowledged publish packets on a persistent session reconnection.

<table>
    <tr>
        <td><b>Function Pointer</b></td>
        <td><b>Use</b></td>
    </tr>
    <tr>
        <td>@ref MQTTStorePacketForRetransmit</td>
        <td>Storing an outgoing publish packet. </td>
    </tr>
    <tr>
        <td>@ref MQTTRetrievePacketForRetransmit</td>
        <td>Retreiving the stored publish packet for retransmission.</td>
    </tr>
    <tr>
        <td>@ref MQTTClearPacketForRetransmit</td>
        <td>Removing the stored copy of a publish packet</td>
    </tr>
</table>

@section mqtt_serializers Serializers and Deserializers

The managed MQTT API in @ref core_mqtt.h uses a set of serialization and deserialization functions
declared in @ref core_mqtt_serializer.h. If a user does not want to use the functionality provided by the managed API,
these low-level functions can be used directly:

- @ref mqtt_getconnectpacketsize_function <br>
- @ref mqtt_serializeconnect_function <br>
- @ref mqtt_getsubscribepacketsize_function <br>
- @ref mqtt_serializesubscribe_function <br>
- @ref mqtt_validatesubscribeproperties_function <br>
- @ref mqtt_getunsubscribepacketsize_function <br>
- @ref mqtt_serializeunsubscribe_function <br>
- @ref mqtt_getpublishpacketsize_function <br>
- @ref mqtt_serializepublish_function <br>
- @ref mqtt_serializepublishheader_function <br>
- @ref mqtt_serializepublishheaderwithouttopic_function <br>
- @ref mqtt_validatepublishparams_function <br>
- @ref mqtt_validatepublishproperties_function <br>
- @ref mqtt_serializeack_function <br>
- @ref mqtt_getackpacketsize_function <br>
- @ref mqtt_getdisconnectpacketsize_function <br>
- @ref mqtt_getpingreqpacketsize_function <br>
- @ref mqtt_serializepingreq_function <br>
- @ref mqtt_deserializepublish_function <br>
- @ref mqtt_deserializeack_function <br>
- @ref mqtt_getincomingpackettypeandlength_function <br>
- @ref mqtt_initconnect_function <br>

@section mqtt_sessions Sessions and State

The MQTT 5.0 protocol allows for a client and server to maintain persistent sessions, which
can be resumed after a reconnect. The elements of a session stored by this client library consist
of the states of incomplete publishes with Quality of Service levels of 1 (at least once), or 2 (exactly once).
These states are stored in the pointers pointed to by @ref MQTTContext_t.outgoingPublishRecords and @ref MQTTContext_t.incomingPublishRecords;
This library does not store any subscription information, nor any information for QoS 0 publishes.

When resuming a persistent session, the client library will resend PUBRELs for all PUBRECs that had been received
for incomplete outgoing QoS 2 publishes. If the optional retransmission callbacks are defined then the library will also
resend any unacknowledged QoS>0 publishes. If the broker does not resume the session, then all state information
in the client will be reset.

@note The library stores only the <i>state</i> of incomplete publishes and not the publish payloads. If the retransmission
callbacks are not defined then, it is the responsibility of the user application to save publish payloads until the publish is complete.
If a persistent session is resumed, then @ref mqtt_publishtoresend_function should be called to obtain the
packet identifiers of incomplete publishes, followed by a call to @ref mqtt_publish_function to resend the
unacknowledged publish.

@section mqtt_receivepackets Packet Reception

MQTT Packets are received from the network with calls to @ref mqtt_processloop_function or @ref mqtt_receiveloop_function. These functions are mostly identical,
with the exception of keep-alive; the former sends ping requests and processes ping responses to ensure the MQTT session does not remain idle for more than the keep-alive interval, while the latter does not.
Since calls to @ref mqtt_publish_function, @ref mqtt_subscribe_function, and @ref mqtt_unsubscribe_function only send packets and do not
wait for acknowledgments, a call to @ref mqtt_processloop_function or @ref mqtt_receiveloop_function must follow in order to receive any expected acknowledgment.
The exception is @ref mqtt_connect_function; since a MQTT session cannot be considered established until the server acknowledges a CONNECT packet with a CONNACK,
the function waits until the CONNACK is received.

@subsection mqtt_receivetimeout Runtime Timeouts passed to MQTT library
@ref mqtt_connect_function accepts a timeout parameter for packet reception. If this value is set to 0, then instead of a time-based loop, it will attempt to call the transport receive function up to a maximum number of retries,
which is defined by @ref MQTT_MAX_CONNACK_RECEIVE_RETRY_COUNT.

For @ref mqtt_processloop_function and @ref mqtt_receiveloop_function, the timeout functionality is handled by the user application. It is up to the user to define the number of times these functions will be called, provided that there are no network errors.
A single call to the function consists of an attempt to receive all available bytes from the network. If the read was successful, attempt(s) to receive the rest of the packet (with retry attempts governed by @ref MQTT_RECV_POLLING_TIMEOUT_MS) are made.
This is followed by the deserialization of the received packet. After this a the application callback is invoked, followed by sending acknowledgement response, if needed
(with retry attempts governed by @ref MQTT_SEND_TIMEOUT_MS).
If the first read did not succeed, then instead the library checks if a ping request needs to be sent (only for the process loop).

See the below diagrams for a representation of the above flows:
| MQTT Connect Diagram | MQTT ProcessLoop Diagram | MQTT ReceiveLoop Diagram |
| :--: | :--: | :--: |
|<img src="mqtt_connect_design.png" alt="MQTT Connect" width=100% /> |<img src="mqtt_processloop_design.png" alt="MQTT Process Loop" width=100% /> |<img src="mqtt_receiveloop_design.png" alt="MQTT Receive Loop" width=100% /> |

@section mqtt_keepalive Keep-Alive

The MQTT standard specifies a keep-alive mechanism to detect half-open or otherwise unusable network connections.
An MQTT client will send periodic ping requests (PINGREQ) to the server if the connection is idle. The MQTT server must respond to ping requests with a ping response (PINGRESP).

In this library, @ref mqtt_processloop_function handles sending of PINGREQs and processing corresponding PINGRESPs to comply with the keep-alive interval. The value of the keep alive interval is the one set in @ref MQTTContext_t.keepAliveIntervalSec
unless the server had sent a Server Keep Alive property in the CONNACK packet, in which case the Server Keep Alive value will be used.

The standard does not specify the time duration within which the server has to respond to a ping request, noting only a "reasonable amount of time". If the response to a ping request is not received within @ref MQTT_PINGRESP_TIMEOUT_MS, this library assumes that the connection is dead.

If @ref mqtt_receiveloop_function is used instead of @ref mqtt_processloop_function, then no ping requests are sent. The application must ensure the connection does not remain idle for more than the keep-alive interval by calling @ref mqtt_ping_function to send ping requests.
The timestamp in @ref MQTTContext_t.lastPacketTxTime indicates when a packet was last sent by the library.

Sending any ping request sets the @ref MQTTContext_t.waitingForPingResp flag. This flag is cleared by @ref mqtt_processloop_function when a ping response is received. If @ref mqtt_receiveloop_function is used instead, then this flag must be cleared manually by the application's callback.
*/

/**
@page core_mqtt_config Configurations
@brief Configurations of the MQTT Library.
<!-- @par configpagestyle allows the @section titles to be styled according to style.css -->
@par configpagestyle

Some configuration settings are C pre-processor constants, and some are function-like macros for logging. They can be set with a `#define` in the config file (**core_mqtt_config.h**) or by using a compiler option such as -D in gcc.

@section MQTT_DO_NOT_USE_CUSTOM_CONFIG
@copydoc MQTT_DO_NOT_USE_CUSTOM_CONFIG

@section MQTT_PINGRESP_TIMEOUT_MS
@copydoc MQTT_PINGRESP_TIMEOUT_MS

@section MQTT_RECV_POLLING_TIMEOUT_MS
@copydoc MQTT_RECV_POLLING_TIMEOUT_MS

@section MQTT_SEND_TIMEOUT_MS
@copydoc MQTT_SEND_TIMEOUT_MS

@section MQTT_MAX_CONNACK_RECEIVE_RETRY_COUNT
@copydoc MQTT_MAX_CONNACK_RECEIVE_RETRY_COUNT

@section mqtt_logerror LogError
@copydoc LogError

@section mqtt_logwarn LogWarn
@copydoc LogWarn

@section mqtt_loginfo LogInfo
@copydoc LogInfo

@section mqtt_logdebug LogDebug
@copydoc LogDebug
*/

/**
@page mqtt_functions Functions
@brief The functions of the MQTT Library are categorised as follows
- @subpage mqtt_primaryfunctions
- @subpage mqtt_serializerfunctions
- @subpage mqtt_propertyaddfunctions
- @subpage mqtt_propertygetfunctions

@page mqtt_primaryfunctions Primary functions
@subpage mqtt_init_function <br>
@subpage mqtt_initstatefulqos_function <br>
@subpage mqtt_initretransmits_function <br>
@subpage mqtt_connect_function <br>
@subpage mqtt_subscribe_function <br>
@subpage mqtt_publish_function <br>
@subpage mqtt_ping_function <br>
@subpage mqtt_unsubscribe_function <br>
@subpage mqtt_disconnect_function <br>
@subpage mqtt_processloop_function <br>
@subpage mqtt_receiveloop_function <br>
@subpage mqtt_getpacketid_function <br>
@subpage mqtt_getsubackstatuscodes_function <br>
@subpage mqtt_status_strerror_function <br>
@subpage mqtt_publishtoresend_function <br><br>

@page mqtt_serializerfunctions Serializer functions
@subpage mqttpropertybuilder_init_function <br>
@subpage mqtt_getconnectpacketsize_function <br>
@subpage mqtt_serializeconnect_function <br>
@subpage mqtt_getsubscribepacketsize_function <br>
@subpage mqtt_serializesubscribe_function <br>
@subpage mqtt_validatesubscribeproperties_function <br>
@subpage mqtt_getunsubscribepacketsize_function <br>
@subpage mqtt_serializeunsubscribe_function <br>
@subpage mqtt_getpublishpacketsize_function <br>
@subpage mqtt_serializepublish_function <br>
@subpage mqtt_serializepublishheader_function <br>
@subpage mqtt_serializepublishheaderwithouttopic_function <br>
@subpage mqtt_validatepublishparams_function <br>
@subpage mqtt_validatepublishproperties_function <br>
@subpage mqtt_serializeack_function <br>
@subpage mqtt_getackpacketsize_function <br>
@subpage mqtt_getdisconnectpacketsize_function <br>
@subpage mqtt_getpingreqpacketsize_function <br>
@subpage mqtt_serializepingreq_function <br>
@subpage mqtt_deserializepublish_function <br>
@subpage mqtt_deserializeack_function <br>
@subpage mqtt_getincomingpackettypeandlength_function <br>
@subpage mqtt_initconnect_function <br>

@page mqtt_propertyaddfunctions Property Add functions
@subpage mqttpropadd_subscriptionid_function <br>
@subpage mqttpropadd_userprop_function <br>
@subpage mqttpropadd_sessionexpiry_function <br>
@subpage mqttpropadd_connreceivemax_function <br>
@subpage mqttpropadd_connmaxpacketsize_function <br>
@subpage mqttpropadd_conntopicaliasmax_function <br>
@subpage mqttpropadd_connrequestrespinfo_function <br>
@subpage mqttpropadd_connrequestprobinfo_function <br>
@subpage mqttpropadd_connauthmethod_function <br>
@subpage mqttpropadd_connauthdata_function <br>
@subpage mqttpropadd_willdelayinterval_function <br>
@subpage mqttpropadd_pubpayloadformat_function <br>
@subpage mqttpropadd_pubmessageexpiry_function <br>
@subpage mqttpropadd_pubtopicalias_function <br>
@subpage mqttpropadd_pubresponsetopic_function <br>
@subpage mqttpropadd_pubcorrelationdata_function <br>
@subpage mqttpropadd_pubcontenttype_function <br>
@subpage mqttpropadd_reasonstring_function <br>

@page mqtt_propertygetfunctions Property Get functions
@subpage MQTTPropGet_payloadformat_function <br>
@subpage MQTTPropGet_responsetopic_function <br>
@subpage MQTTPropGet_correlationdata_function <br>
@subpage MQTTPropGet_messageexpiryinterval_function <br>
@subpage MQTTPropGet_contenttype_function <br>
@subpage MQTTPropGet_subscriptionid_function <br>
@subpage mqttpropget_userprop_function <br>
@subpage mqttpropget_reasonstring_function <br>
@subpage mqttpropget_sessionexpiry_function <br>
@subpage MQTTPropGet_topicaliasmax_function <br>
@subpage MQTTPropGet_receivemax_function <br>
@subpage MQTTPropGet_maxqos_function <br>
@subpage MQTTPropGet_retainavailable_function <br>
@subpage MQTTPropGet_maxpacketsize_function <br>

@page mqtt_init_function MQTT_Init
@snippet core_mqtt.h declare_mqtt_init
@copydoc MQTT_Init

@page mqtt_initstatefulqos_function MQTT_InitStatefulQoS
@snippet core_mqtt.h declare_mqtt_initstatefulqos
@copydoc MQTT_InitStatefulQoS

@page mqtt_initretransmits_function MQTT_InitRetransmits
@snippet core_mqtt.h declare_mqtt_initretransmits
@copydoc MQTT_InitRetransmits

@page mqtt_connect_function MQTT_Connect
@snippet core_mqtt.h declare_mqtt_connect
@copydoc MQTT_Connect

@page mqtt_subscribe_function MQTT_Subscribe
@snippet core_mqtt.h declare_mqtt_subscribe
@copydoc MQTT_Subscribe

@page mqtt_publish_function MQTT_Publish
@snippet core_mqtt.h declare_mqtt_publish
@copydoc MQTT_Publish

@page mqtt_ping_function MQTT_Ping
@snippet core_mqtt.h declare_mqtt_ping
@copydoc MQTT_Ping

@page mqtt_unsubscribe_function MQTT_Unsubscribe
@snippet core_mqtt.h declare_mqtt_unsubscribe
@copydoc MQTT_Unsubscribe

@page mqtt_disconnect_function MQTT_Disconnect
@snippet core_mqtt.h declare_mqtt_disconnect
@copydoc MQTT_Disconnect

@page mqtt_processloop_function MQTT_ProcessLoop
@snippet core_mqtt.h declare_mqtt_processloop
@copydoc MQTT_ProcessLoop

@page mqtt_receiveloop_function MQTT_ReceiveLoop
@snippet core_mqtt.h declare_mqtt_receiveloop
@copydoc MQTT_ReceiveLoop

@page mqtt_getpacketid_function MQTT_GetPacketId
@snippet core_mqtt.h declare_mqtt_getpacketid
@copydoc MQTT_GetPacketId

@page mqtt_getsubackstatuscodes_function MQTT_GetSubAckStatusCodes
@snippet core_mqtt.h declare_mqtt_getsubackstatuscodes
@copydoc MQTT_GetSubAckStatusCodes

@page mqtt_status_strerror_function MQTT_Status_strerror
@snippet core_mqtt.h declare_mqtt_status_strerror
@copydoc MQTT_Status_strerror

@page mqtt_publishtoresend_function MQTT_PublishToResend
@snippet core_mqtt_state.h declare_mqtt_publishtoresend
@copydoc MQTT_PublishToResend

@page mqttpropertybuilder_init_function MQTTPropertyBuilder_Init
@snippet core_mqtt_serializer.h declare_mqttpropertybuilder_init
@copydoc MQTTPropertyBuilder_Init

@page mqtt_getconnectpacketsize_function MQTT_GetConnectPacketSize
@snippet core_mqtt_serializer.h declare_mqtt_getconnectpacketsize
@copydoc MQTT_GetConnectPacketSize

@page mqtt_serializeconnect_function MQTT_SerializeConnect
@snippet core_mqtt_serializer.h declare_mqtt_serializeconnect
@copydoc MQTT_SerializeConnect

@page mqtt_getsubscribepacketsize_function MQTT_GetSubscribePacketSize
@snippet core_mqtt_serializer.h declare_mqtt_getsubscribepacketsize
@copydoc MQTT_GetSubscribePacketSize

@page mqtt_serializesubscribe_function MQTT_SerializeSubscribe
@snippet core_mqtt_serializer.h declare_mqtt_serializesubscribe
@copydoc MQTT_SerializeSubscribe

@page mqtt_getunsubscribepacketsize_function MQTT_GetUnsubscribePacketSize
@snippet core_mqtt_serializer.h declare_mqtt_getunsubscribepacketsize
@copydoc MQTT_GetUnsubscribePacketSize

@page mqtt_serializeunsubscribe_function MQTT_SerializeUnsubscribe
@snippet core_mqtt_serializer.h declare_mqtt_serializeunsubscribe
@copydoc MQTT_SerializeUnsubscribe

@page mqtt_validatepublishparams_function MQTT_ValidatePublishParams
@snippet core_mqtt_serializer.h declare_mqtt_validatepublishparams
@copydoc MQTT_ValidatePublishParams

@page mqtt_getpublishpacketsize_function MQTT_GetPublishPacketSize
@snippet core_mqtt_serializer.h declare_mqtt_getpublishpacketsize
@copydoc MQTT_GetPublishPacketSize

@page mqtt_serializepublish_function MQTT_SerializePublish
@snippet core_mqtt_serializer.h declare_mqtt_serializepublish
@copydoc MQTT_SerializePublish

@page mqtt_validatepublishproperties_function MQTT_ValidatePublishProperties
@snippet core_mqtt_serializer.h declare_mqtt_validatepublishproperties
@copydoc MQTT_ValidatePublishProperties

@page mqtt_serializepublishheader_function MQTT_SerializePublishHeader
@snippet core_mqtt_serializer.h declare_mqtt_serializepublishheader
@copydoc MQTT_SerializePublishHeader

@page mqtt_serializepublishheaderwithouttopic_function MQTT_SerializePublishHeaderWithoutTopic
@snippet core_mqtt_serializer.h declare_mqtt_serializepublishheaderwithouttopic
@copydoc MQTT_SerializePublishHeaderWithoutTopic

@page mqtt_serializeack_function MQTT_SerializeAck
@snippet core_mqtt_serializer.h declare_mqtt_serializeack
@copydoc MQTT_SerializeAck

@page mqtt_getackpacketsize_function MQTT_GetAckPacketSize
@snippet core_mqtt_serializer.h declare_mqtt_getackpacketsize
@copydoc MQTT_GetAckPacketSize

@page mqtt_getdisconnectpacketsize_function MQTT_GetDisconnectPacketSize
@snippet core_mqtt_serializer.h declare_mqtt_getdisconnectpacketsize
@copydoc MQTT_GetDisconnectPacketSize

@page mqtt_getpingreqpacketsize_function MQTT_GetPingreqPacketSize
@snippet core_mqtt_serializer.h declare_mqtt_getpingreqpacketsize
@copydoc MQTT_GetPingreqPacketSize

@page mqtt_serializepingreq_function MQTT_SerializePingreq
@snippet core_mqtt_serializer.h declare_mqtt_serializepingreq
@copydoc MQTT_SerializePingreq

@page mqtt_deserializepublish_function MQTT_DeserializePublish
@snippet core_mqtt_serializer.h declare_mqtt_deserializepublish
@copydoc MQTT_DeserializePublish

@page mqtt_deserializeack_function MQTT_DeserializeAck
@snippet core_mqtt_serializer.h declare_mqtt_deserializeack
@copydoc MQTT_DeserializeAck

@page mqtt_getincomingpackettypeandlength_function MQTT_GetIncomingPacketTypeAndLength
@snippet core_mqtt_serializer.h declare_mqtt_getincomingpackettypeandlength
@copydoc MQTT_GetIncomingPacketTypeAndLength

@page mqttpropadd_subscriptionid_function MQTTPropAdd_SubscriptionId
@snippet core_mqtt_serializer.h declare_mqttpropadd_subscriptionid
@copydoc MQTTPropAdd_SubscriptionId

@page mqttpropadd_userprop_function MQTTPropAdd_UserProp
@snippet core_mqtt_serializer.h declare_mqttpropadd_userprop
@copydoc MQTTPropAdd_UserProp

@page mqttpropadd_sessionexpiry_function MQTTPropAdd_SessionExpiry
@snippet core_mqtt_serializer.h declare_mqttpropadd_sessionexpiry
@copydoc MQTTPropAdd_SessionExpiry

@page mqttpropadd_willdelayinterval_function MQTTPropAdd_WillDelayInterval
@snippet core_mqtt_serializer.h declare_mqttpropadd_willdelayinterval
@copydoc MQTTPropAdd_WillDelayInterval

@page mqttpropadd_connreceivemax_function MQTTPropAdd_ReceiveMax
@snippet core_mqtt_serializer.h declare_mqttpropadd_receivemax
@copydoc MQTTPropAdd_ReceiveMax

@page mqttpropadd_connmaxpacketsize_function MQTTPropAdd_MaxPacketSize
@snippet core_mqtt_serializer.h declare_mqttpropadd_maxpacketsize
@copydoc MQTTPropAdd_MaxPacketSize

@page mqttpropadd_conntopicaliasmax_function MQTTPropAdd_TopicAliasMax
@snippet core_mqtt_serializer.h declare_mqttpropadd_topicaliasmax
@copydoc MQTTPropAdd_TopicAliasMax

@page mqttpropadd_connrequestrespinfo_function MQTTPropAdd_RequestRespInfo
@snippet core_mqtt_serializer.h declare_mqttpropadd_requestrespinfo
@copydoc MQTTPropAdd_RequestRespInfo

@page mqttpropadd_connrequestprobinfo_function MQTTPropAdd_RequestProbInfo
@snippet core_mqtt_serializer.h declare_mqttpropadd_requestprobinfo
@copydoc MQTTPropAdd_RequestProbInfo

@page mqttpropadd_connauthmethod_function MQTTPropAdd_AuthMethod
@snippet core_mqtt_serializer.h declare_mqttpropadd_authmethod
@copydoc MQTTPropAdd_AuthMethod

@page mqttpropadd_connauthdata_function MQTTPropAdd_AuthData
@snippet core_mqtt_serializer.h declare_mqttpropadd_authdata
@copydoc MQTTPropAdd_AuthData

@page mqttpropadd_pubpayloadformat_function MQTTPropAdd_PayloadFormat
@snippet core_mqtt_serializer.h declare_mqttpropadd_payloadformat
@copydoc MQTTPropAdd_PayloadFormat

@page mqttpropadd_pubmessageexpiry_function MQTTPropAdd_MessageExpiry
@snippet core_mqtt_serializer.h declare_mqttpropadd_messageexpiry
@copydoc MQTTPropAdd_MessageExpiry

@page mqttpropadd_pubtopicalias_function MQTTPropAdd_TopicAlias
@snippet core_mqtt_serializer.h declare_mqttpropadd_topicalias
@copydoc MQTTPropAdd_TopicAlias

@page mqttpropadd_pubresponsetopic_function MQTTPropAdd_ResponseTopic
@snippet core_mqtt_serializer.h declare_mqttpropadd_responsetopic
@copydoc MQTTPropAdd_ResponseTopic

@page mqttpropadd_pubcorrelationdata_function MQTTPropAdd_CorrelationData
@snippet core_mqtt_serializer.h declare_mqttpropadd_correlationdata
@copydoc MQTTPropAdd_CorrelationData

@page mqttpropadd_pubcontenttype_function MQTTPropAdd_ContentType
@snippet core_mqtt_serializer.h declare_mqttpropadd_contenttype
@copydoc MQTTPropAdd_ContentType

@page mqttpropadd_reasonstring_function MQTTPropAdd_ReasonString
@snippet core_mqtt_serializer.h declare_mqttpropadd_reasonstring
@copydoc MQTTPropAdd_ReasonString

@page mqtt_validatesubscribeproperties_function MQTT_ValidateSubscribeProperties
@snippet core_mqtt_serializer.h declare_mqtt_validatesubscribeproperties
@copydoc MQTT_ValidateSubscribeProperties

@page MQTTPropGet_payloadformat_function MQTTPropGet_PayloadFormatIndicator
@snippet core_mqtt_serializer.h declare_mqttpropget_payloadformatindicator
@copydoc MQTTPropGet_PayloadFormatIndicator

@page MQTTPropGet_responsetopic_function MQTTPropGet_ResponseTopic
@snippet core_mqtt_serializer.h declare_mqttpropget_responsetopic
@copydoc MQTTPropGet_ResponseTopic

@page MQTTPropGet_correlationdata_function MQTTPropGet_CorrelationData
@snippet core_mqtt_serializer.h declare_mqttpropget_correlationdata
@copydoc MQTTPropGet_CorrelationData

@page MQTTPropGet_messageexpiryinterval_function MQTTPropGet_MessageExpiryInterval
@snippet core_mqtt_serializer.h declare_mqttpropget_messageexpiryinterval
@copydoc MQTTPropGet_MessageExpiryInterval

@page MQTTPropGet_contenttype_function MQTTPropGet_ContentType
@snippet core_mqtt_serializer.h declare_mqttpropget_contenttype
@copydoc MQTTPropGet_ContentType

@page MQTTPropGet_subscriptionid_function MQTTPropGet_SubscriptionId
@snippet core_mqtt_serializer.h declare_mqttpropget_subscriptionid
@copydoc MQTTPropGet_SubscriptionId

@page mqttpropget_userprop_function MQTTPropGet_UserProp
@snippet core_mqtt_serializer.h declare_mqttpropget_userprop
@copydoc MQTTPropGet_UserProp

@page mqttpropget_reasonstring_function MQTTPropGet_ReasonString
@snippet core_mqtt_serializer.h declare_mqttpropget_reasonstring
@copydoc MQTTPropGet_ReasonString

@page mqttpropget_disconnectserverref_function MQTTPropGet_ServerRef
@snippet core_mqtt_serializer.h declare_mqttpropget_serverref
@copydoc MQTTPropGet_ServerRef

@page mqttpropget_sessionexpiry_function MQTTPropGet_SessionExpiry
@snippet core_mqtt_serializer.h declare_mqttpropget_sessionexpiry
@copydoc MQTTPropGet_SessionExpiry

@page MQTTPropGet_topicaliasmax_function MQTTPropGet_TopicAliasMax
@snippet core_mqtt_serializer.h declare_mqttpropget_topicaliasmax
@copydoc MQTTPropGet_TopicAliasMax

@page MQTTPropGet_receivemax_function MQTTPropGet_ReceiveMax
@snippet core_mqtt_serializer.h declare_mqttpropget_receivemax
@copydoc MQTTPropGet_ReceiveMax

@page MQTTPropGet_maxqos_function MQTTPropGet_MaxQos
@snippet core_mqtt_serializer.h declare_mqttpropget_maxqos
@copydoc MQTTPropGet_MaxQos

@page MQTTPropGet_retainavailable_function MQTTPropGet_RetainAvailable
@snippet core_mqtt_serializer.h declare_mqttpropget_retainavailable
@copydoc MQTTPropGet_RetainAvailable

@page MQTTPropGet_maxpacketsize_function MQTTPropGet_MaxPacketSize
@snippet core_mqtt_serializer.h declare_mqttpropget_maxpacketsize
@copydoc MQTTPropGet_MaxPacketSize

@page mqtt_initconnect_function MQTT_InitConnect
@snippet core_mqtt_serializer.h declare_mqtt_initconnect
@copydoc MQTT_InitConnect

*/

/**
@defgroup mqtt_enum_types Enumerated Types
@brief Enumerated types of the MQTT library
*/

/**
@defgroup mqtt_callback_types Callback Types
@brief Callback function pointer types of the MQTT library
*/

/**
@defgroup mqtt_struct_types Parameter Structures
@brief Structures passed as parameters to [MQTT library functions](@ref mqtt_functions)

These structures are passed as parameters to library functions. Documentation for these structures will state the functions associated with each parameter structure and the purpose of each member.
*/

/**
@defgroup mqtt_basic_types Basic Types
@brief Primitive types of the MQTT library.
*/

/**
@defgroup mqtt_constants Constants
@brief Constants defined in the MQTT library
*/
