Functions | |
MQTTReturnCode | MQTTDeserialize_ack (unsigned char *packettype, unsigned char *dup, uint16_t *packetid, unsigned char *buf, size_t buflen) |
Deserializes the supplied (wire) buffer into an ack. More... | |
MQTTReturnCode | MQTTDeserialize_publish (unsigned char *dup, QoS *qos, unsigned char *retained, uint16_t *packetid, MQTTString *topicName, unsigned char **payload, uint32_t *payloadlen, unsigned char *buf, size_t buflen) |
Deserializes the supplied (wire) buffer into publish data. More... | |
MQTTReturnCode MQTTDeserialize_ack | ( | unsigned char * | packettype, |
unsigned char * | dup, | ||
uint16_t * | packetid, | ||
unsigned char * | buf, | ||
size_t | buflen | ||
) |
Deserializes the supplied (wire) buffer into an ack.
packettype | returned integer - the MQTT packet type |
dup | returned integer - the MQTT dup flag |
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 MQTTHeader::bits, buf, MQTTHeader::byte, MQTTHeader::dup, FAILURE, FUNC_ENTRY, FUNC_EXIT_RC, header, MQTT_NULL_VALUE_ERROR, MQTTPACKET_BUFFER_TOO_SHORT, MQTTPacket_decodeBuf(), NULL, readChar(), readPacketId(), SUCCESS, and MQTTHeader::type.
MQTTReturnCode MQTTDeserialize_publish | ( | unsigned char * | dup, |
QoS * | qos, | ||
unsigned char * | retained, | ||
uint16_t * | packetid, | ||
MQTTString * | topicName, | ||
unsigned char ** | payload, | ||
uint32_t * | payloadlen, | ||
unsigned char * | buf, | ||
size_t | buflen | ||
) |
Deserializes the supplied (wire) buffer into publish data.
dup | returned integer - the MQTT dup flag |
qos | returned integer - the MQTT QoS value |
retained | returned integer - the MQTT retained flag |
packetid | returned integer - the MQTT packet identifier |
topicName | returned MQTTString - the MQTT topic in the publish |
payload | returned byte buffer - the MQTT publish payload |
payloadlen | returned integer - the length of the MQTT payload |
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, MQTTHeader::dup, FAILURE, FUNC_ENTRY, FUNC_EXIT_RC, header, MQTTPACKET_BUFFER_TOO_SHORT, MQTTPacket_decodeBuf(), NULL, PUBLISH, MQTTHeader::qos, QOS0, readChar(), readMQTTLenString(), readPacketId(), MQTTHeader::retain, SUCCESS, and MQTTHeader::type.