Functions | |
MQTTReturnCode | MQTTDeserialize_unsuback (uint16_t *packetid, unsigned char *buf, size_t buflen) |
Deserializes the supplied (wire) buffer into unsuback data. More... | |
size_t | MQTTSerialize_GetUnsubscribePacketLength (uint32_t count, MQTTString topicFilters[]) |
Determines the length of the MQTT unsubscribe packet that would be produced using the supplied parameters. More... | |
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... | |
MQTTReturnCode MQTTDeserialize_unsuback | ( | uint16_t * | packetid, |
unsigned char * | buf, | ||
size_t | buflen | ||
) |
Deserializes the supplied (wire) buffer into unsuback data.
packetid | returned integer - the MQTT packet identifier |
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 FAILURE, FUNC_ENTRY, FUNC_EXIT_RC, MQTT_NULL_VALUE_ERROR, MQTTDeserialize_ack(), NULL, SUCCESS, and UNSUBACK.
size_t MQTTSerialize_GetUnsubscribePacketLength | ( | uint32_t | count, |
MQTTString | topicFilters[] | ||
) |
Determines the length of the MQTT unsubscribe packet that would be produced using the supplied parameters.
count | the number of topic filter strings in topicFilters |
topicFilters | the array of topic filter strings to be used in the publish |
References count, i, len, and MQTTstrlen().
Referenced by MQTTSerialize_unsubscribe().
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.
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 |
dup | integer - the MQTT dup flag |
packetid | integer - 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 |
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().