Macros | |
#define | DLLExport |
#define | DLLImport |
Functions | |
DLLExport MQTTReturnCode | MQTTDeserialize_suback (uint16_t *packetid, uint32_t maxcount, uint32_t *count, QoS grantedQoSs[], unsigned char *buf, size_t buflen) |
Deserializes the supplied (wire) buffer into suback data. More... | |
DLLExport MQTTReturnCode | MQTTSerialize_subscribe (unsigned char *buf, size_t buflen, unsigned char dup, uint16_t packetid, uint32_t count, MQTTString topicFilters[], QoS requestedQoSs[], uint32_t *serialized_len) |
Serializes the supplied subscribe data into the supplied buffer, ready for sending. More... | |
#define DLLExport |
#define DLLImport |
DLLExport MQTTReturnCode MQTTDeserialize_suback | ( | uint16_t * | packetid, |
uint32_t | maxcount, | ||
uint32_t * | count, | ||
QoS | grantedQoSs[], | ||
unsigned char * | buf, | ||
size_t | 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, buf, MQTTHeader::byte, FAILURE, FUNC_ENTRY, FUNC_EXIT_RC, header, MQTT_NULL_VALUE_ERROR, MQTTPACKET_BUFFER_TOO_SHORT, MQTTPacket_decodeBuf(), NULL, readChar(), readPacketId(), SUBACK, SUCCESS, and MQTTHeader::type.
DLLExport MQTTReturnCode MQTTSerialize_subscribe | ( | unsigned char * | buf, |
size_t | buflen, | ||
unsigned char | dup, | ||
uint16_t | packetid, | ||
uint32_t | count, | ||
MQTTString | topicFilters[], | ||
QoS | requestedQoSs[], | ||
uint32_t * | serialized_len | ||
) |
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 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_GetSubscribePacketLength(), NULL, ptr, SUBSCRIBE, SUCCESS, writeChar(), writeMQTTString(), and writePacketId().