Functions | |
int | MQTTDeserialize_unsubscribe (unsigned char *dup, unsigned short *packetid, int maxcount, int *count, MQTTString topicFilters[], unsigned char *buf, int len) |
Deserializes the supplied (wire) buffer into unsubscribe data. More... | |
int | MQTTSerialize_unsuback (unsigned char *buf, int buflen, unsigned short packetid) |
Serializes the supplied unsuback data into the supplied buffer, ready for sending. More... | |
int MQTTDeserialize_unsubscribe | ( | unsigned char * | dup, |
unsigned short * | packetid, | ||
int | maxcount, | ||
int * | count, | ||
MQTTString | topicFilters[], | ||
unsigned char * | buf, | ||
int | len | ||
) |
Deserializes the supplied (wire) buffer into unsubscribe data.
dup | integer returned - the MQTT dup flag |
packetid | integer returned - the MQTT packet identifier |
maxcount | - the maximum number of members allowed in the topicFilters and requestedQoSs arrays |
count | - number of members in the topicFilters and requestedQoSs arrays |
topicFilters | - array of topic filter names |
buf | the raw buffer data, of the correct length determined by the remaining length field |
buflen | the length in bytes of the data in the supplied buffer |
References MQTTHeader::bits, MQTTHeader::byte, MQTTHeader::dup, FUNC_ENTRY, FUNC_EXIT_RC, header, MQTTPacket_decodeBuf(), NULL, readChar(), readInt(), readMQTTLenString(), MQTTHeader::type, and UNSUBSCRIBE.
Referenced by MQTTFormat_toServerString().
int MQTTSerialize_unsuback | ( | unsigned char * | buf, |
int | buflen, | ||
unsigned short | packetid | ||
) |
Serializes the supplied unsuback data into the supplied buffer, ready for sending.
buf | the buffer into which the packet will be serialized |
buflen | the length in bytes of the supplied buffer |
packetid | integer - the MQTT packet identifier |
References MQTTHeader::bits, MQTTHeader::byte, FUNC_ENTRY, FUNC_EXIT_RC, header, MQTTPACKET_BUFFER_TOO_SHORT, MQTTPacket_encode(), ptr, MQTTHeader::type, UNSUBACK, writeChar(), and writeInt().