Deserialize an MQTT CONNACK, SUBACK, UNSUBACK, PUBACK, PUBREC, PUBREL, PUBCOMP, or PINGRESP.
uint16_t * pPacketId,
bool * pSessionPresent );
MQTTStatus_t MQTT_DeserializeAck(const MQTTPacketInfo_t *pIncomingPacket, uint16_t *pPacketId, bool *pSessionPresent)
Deserialize an MQTT CONNACK, SUBACK, UNSUBACK, PUBACK, PUBREC, PUBREL, PUBCOMP, or PINGRESP.
Definition: core_mqtt_serializer.c:2488
MQTTStatus_t
Return codes from MQTT functions.
Definition: core_mqtt_serializer.h:99
MQTT incoming packet parameters.
Definition: core_mqtt_serializer.h:256
- Parameters
-
[in] | pIncomingPacket | MQTTPacketInfo_t containing the buffer. |
[out] | pPacketId | The packet ID of obtained from the buffer. Not used in CONNACK or PINGRESP. |
[out] | pSessionPresent | Boolean flag from a CONNACK indicating present session. |
- Returns
- MQTTBadParameter, MQTTBadResponse, MQTTServerRefused, or MQTTSuccess.
Example
uint16_t packetId;
bool sessionPresent;
receiveIncomingPacket( &incomingPacket );
{
{
}
}
#define MQTT_PACKET_TYPE_PUBLISH
PUBLISH (bidirectional).
Definition: core_mqtt_serializer.h:67
@ MQTTSuccess
Definition: core_mqtt_serializer.h:100
uint8_t type
Type of incoming MQTT packet.
Definition: core_mqtt_serializer.h:260