Skip to content

Commit

Permalink
MQTTV5 connect and connack
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jun 25, 2024
1 parent 9d317a7 commit 4b8d616
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
12 changes: 6 additions & 6 deletions source/core_mqtt_serializer.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
* @param[out] pUsed Whether the property is decoded befire.
* @param[out] pIndex Pointer to the current index of the buffer.
*
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalfomedPacket
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalformedPacket
**/

static MQTTStatus_t decodeuint32_t( uint32_t * pProperty,
Expand All @@ -660,7 +660,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
* @param[out] pUsed Whether the property is decoded befire.
* @param[out] pIndex Pointer to the current index of the buffer.
*
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalfomedPacket
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalformedPacket
**/

static MQTTStatus_t decodeuint16_t( uint16_t * pProperty,
Expand All @@ -676,7 +676,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
* @param[out] pUsed Whether the property is decoded befire.
* @param[out] pIndex Pointer to the current index of the buffer.
*
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalfomedPacket
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalformedPacket
**/
static MQTTStatus_t decodeuint8_t( uint8_t * pProperty,
size_t * pPropertyLength,
Expand All @@ -692,7 +692,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
* @param[out] pUsed Whether the property is decoded before.
* @param[out] pIndex Pointer to the current index of the buffer.
*
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalfomedPacket
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalformedPacket
**/
static MQTTStatus_t decodeutf_8( const char ** pProperty,
uint16_t * pLength,
Expand All @@ -707,7 +707,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
* @param[out] pPropertyLength Size of the length.
* @param[out] pIndex Pointer to the current index of the buffer.
*
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalfomedPacket
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalformedPacket
**/
static MQTTStatus_t decodeutf_8pair( MQTTUserProperty_t * pUserProperty,
size_t * pPropertyLength,
Expand All @@ -720,7 +720,7 @@ static MQTTStatus_t deserializePingresp( const MQTTPacketInfo_t * pPingresp );
* @param[out] length Length of the property.
* @param[out] pIndex Pointer to the current index of the buffer.
*
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalfomedPacket
* @return #MQTTSuccess, #MQTTProtocolError and #MQTTMalformedPacket
**/
static MQTTStatus_t deserializeConnackV5( MQTTConnectProperties_t * pConnackProperties,
size_t length,
Expand Down
20 changes: 11 additions & 9 deletions source/include/core_mqtt_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ uint8_t * MQTT_SerializeUnsubscribeHeader( size_t remainingLength,


/**
* @fn uint8_t* MQTT_SerializeConnectProperties(uint8_t* pIndex,const MQTTConnectProperties_t * pConnectProperties);
* @fn uint8_t * MQTT_SerializeConnectProperties(uint8_t* pIndex,const MQTTConnectProperties_t * pConnectProperties);
* @brief Serialize the connect properties of the connect packet header.
*
* @param[out] pIndex Pointer to the buffer where the header is to
Expand All @@ -1594,14 +1594,15 @@ uint8_t * MQTT_SerializeUnsubscribeHeader( size_t remainingLength,
* @cond DOXYGEN_IGNORE
* Doxygen should ignore this definition, this function is private.
*/
uint8_t* MQTT_SerializeConnectProperties(uint8_t* pIndex,const MQTTConnectProperties_t * pConnectProperties);
uint8_t * MQTT_SerializeConnectProperties( uint8_t* pIndex,
const MQTTConnectProperties_t * pConnectProperties);
/** @endcond */


/**
* @fn uint8_t* MQTT_SerializePublishProperties(const MQTTPublishInfo_t * pPublishInfo, uint8_t* pIndex);
* @brief Serialize the connect properties of the connect packet header.
*@param[in] pPublishInfo The publish/will properties information.
* @fn uint8_t * MQTT_SerializePublishProperties(const MQTTPublishInfo_t * pPublishInfo, uint8_t* pIndex);
* @brief Serialize the will properties of the connect packet.
* @param[in] pPublishInfo The publish/will properties information.
* @param[out] pIndex Pointer to the buffer where the header is to
* be serialized.
*
Expand All @@ -1612,7 +1613,8 @@ uint8_t* MQTT_SerializeConnectProperties(uint8_t* pIndex,const MQTTConnectProper
* @cond DOXYGEN_IGNORE
* Doxygen should ignore this definition, this function is private.
*/
uint8_t* MQTT_SerializePublishProperties(const MQTTPublishInfo_t * pPublishInfo, uint8_t* pIndex);
uint8_t * MQTT_SerializePublishProperties( const MQTTPublishInfo_t * pPublishInfo,
uint8_t* pIndex);
/** @endcond */


Expand Down Expand Up @@ -1674,9 +1676,9 @@ uint8_t* MQTT_SerializePublishProperties(const MQTTPublishInfo_t * pPublishInfo,
* @endcode
*/
/* @[declare_mqttv5_deserializeconnack] */
MQTTStatus_t MQTTV5_DeserializeConnack( MQTTConnectProperties_t *pConnackProperties,const MQTTPacketInfo_t * pIncomingPacket,

bool * pSessionPresent );
MQTTStatus_t MQTTV5_DeserializeConnack( MQTTConnectProperties_t *pConnackProperties,
const MQTTPacketInfo_t * pIncomingPacket,
bool * pSessionPresent );
/* @[declare_mqttv5_deserializeconnack] */

/**
Expand Down

0 comments on commit 4b8d616

Please sign in to comment.