Functions | |
int | MQTTDeserialize_suback (unsigned short *packetid, int maxcount, int *count, int grantedQoSs[], unsigned char *buf, int buflen) |
Deserializes the supplied (wire) buffer into suback data. More... | |
int | MQTTSerialize_subscribe (unsigned char *buf, int buflen, unsigned char dup, unsigned short packetid, int count, MQTTString topicFilters[], int requestedQoSs[]) |
Serializes the supplied subscribe data into the supplied buffer, ready for sending. More... | |
int | MQTTSerialize_subscribeLength (int count, MQTTString topicFilters[]) |
Determines the length of the MQTT subscribe packet that would be produced using the supplied parameters. More... | |
int MQTTDeserialize_suback | ( | unsigned short * | packetid, |
int | maxcount, | ||
int * | count, | ||
int | grantedQoSs[], | ||
unsigned char * | buf, | ||
int | buflen | ||
) |
Deserializes the supplied (wire) buffer into suback data.
packetid | returned integer - the MQTT packet identifier |
maxcount | - the maximum number of members allowed in the grantedQoSs array |
count | returned integer - number of members in the grantedQoSs array |
grantedQoSs | returned array of integers - the granted qualities of service |
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, FUNC_ENTRY, FUNC_EXIT_RC, header, MQTTPacket_decodeBuf(), NULL, readChar(), readInt(), SUBACK, and MQTTHeader::type.
Referenced by MQTTFormat_toClientString(), and MQTTSubscribe().
int MQTTSerialize_subscribe | ( | unsigned char * | buf, |
int | buflen, | ||
unsigned char | dup, | ||
unsigned short | packetid, | ||
int | count, | ||
MQTTString | topicFilters[], | ||
int | requestedQoSs[] | ||
) |
Serializes the supplied subscribe 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 bufferr |
dup | integer - the MQTT dup flag |
packetid | integer - the MQTT packet identifier |
count | - number of members in the topicFilters and reqQos arrays |
topicFilters | - array of topic filter names |
requestedQoSs | - array of requested QoS |
References MQTTHeader::bits, MQTTHeader::byte, count, MQTTHeader::dup, FUNC_ENTRY, FUNC_EXIT_RC, header, i, MQTTPACKET_BUFFER_TOO_SHORT, MQTTPacket_encode(), MQTTPacket_len(), MQTTSerialize_subscribeLength(), ptr, MQTTHeader::qos, SUBSCRIBE, MQTTHeader::type, writeChar(), writeInt(), and writeMQTTString().
Referenced by MQTTSubscribe().
int MQTTSerialize_subscribeLength | ( | int | count, |
MQTTString | topicFilters[] | ||
) |
Determines the length of the MQTT subscribe 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, and MQTTstrlen().
Referenced by MQTTSerialize_subscribe().