Microchip® Advanced Software Framework

AWS_SDK/AWS_SDK/aws_mqtt_embedded_client_lib/MQTTPacket/src/MQTTUnsubscribe.h File Reference

Macros

#define DLLExport
 
#define DLLImport
 

Functions

DLLExport MQTTReturnCode MQTTDeserialize_unsuback (uint16_t *packetid, unsigned char *buf, size_t buflen)
 Deserializes the supplied (wire) buffer into unsuback data. More...
 
DLLExport MQTTReturnCode MQTTSerialize_unsubscribe (unsigned char *buf, size_t buflen, uint8_t dup, uint16_t packetid, uint32_t count, MQTTString topicFilters[], uint32_t *serialized_len)
 Serializes the supplied unsubscribe data into the supplied buffer, ready for sending. More...
 

#define DLLExport
#define DLLImport

DLLExport MQTTReturnCode MQTTDeserialize_unsuback ( uint16_t *  packetid,
unsigned char *  buf,
size_t  buflen 
)

Deserializes the supplied (wire) buffer into unsuback data.

Parameters
packetidreturned integer - the MQTT packet identifier
bufthe raw buffer data, of the correct length determined by the remaining length field
buflenthe length in bytes of the data in the supplied buffer
Returns
MQTTReturnCode indicating function execution status

References FAILURE, FUNC_ENTRY, FUNC_EXIT_RC, MQTT_NULL_VALUE_ERROR, MQTTDeserialize_ack(), NULL, SUCCESS, and UNSUBACK.

DLLExport MQTTReturnCode MQTTSerialize_unsubscribe ( unsigned char *  buf,
size_t  buflen,
uint8_t  dup,
uint16_t  packetid,
uint32_t  count,
MQTTString  topicFilters[],
uint32_t *  serialized_len 
)

Serializes the supplied unsubscribe data into the supplied buffer, ready for sending.

Parameters
bufthe raw buffer data, of the correct length determined by the remaining length field
buflenthe length in bytes of the data in the supplied buffer
dupinteger - the MQTT dup flag
packetidinteger - the MQTT packet identifier
count- number of members in the topicFilters array
topicFilters- array of topic filter names
serialized_len- the length of the serialized data
Returns
MQTTReturnCode indicating function execution status

References buf, MQTTHeader::byte, count, FUNC_ENTRY, FUNC_EXIT_RC, header, i, MQTT_NULL_VALUE_ERROR, MQTTPACKET_BUFFER_TOO_SHORT, MQTTPacket_encode(), MQTTPacket_InitHeader(), MQTTPacket_len(), MQTTSerialize_GetUnsubscribePacketLength(), NULL, ptr, SUCCESS, UNSUBSCRIBE, writeChar(), writeMQTTString(), and writePacketId().