Macros | |
#define | min(a, b) ((a < b) ? 1 : 0) |
Functions | |
int | MQTTDeserialize_ack (unsigned char *packettype, unsigned char *dup, unsigned short *packetid, unsigned char *buf, int buflen) |
Deserializes the supplied (wire) buffer into an ack. More... | |
int | MQTTDeserialize_publish (unsigned char *dup, int *qos, unsigned char *retained, unsigned short *packetid, MQTTString *topicName, unsigned char **payload, int *payloadlen, unsigned char *buf, int buflen) |
Deserializes the supplied (wire) buffer into publish data. More... | |
#define min | ( | a, | |
b | |||
) | ((a < b) ? 1 : 0) |
int MQTTDeserialize_ack | ( | unsigned char * | packettype, |
unsigned char * | dup, | ||
unsigned short * | packetid, | ||
unsigned char * | buf, | ||
int | 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, MQTTHeader::byte, MQTTHeader::dup, FUNC_ENTRY, FUNC_EXIT_RC, header, MQTTPacket_decodeBuf(), NULL, readChar(), readInt(), and MQTTHeader::type.
Referenced by cycle(), MQTTDeserialize_unsuback(), MQTTFormat_toClientString(), MQTTFormat_toServerString(), and MQTTPublish().
int MQTTDeserialize_publish | ( | unsigned char * | dup, |
int * | qos, | ||
unsigned char * | retained, | ||
unsigned short * | packetid, | ||
MQTTString * | topicName, | ||
unsigned char ** | payload, | ||
int * | payloadlen, | ||
unsigned char * | buf, | ||
int | 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, MQTTHeader::byte, MQTTHeader::dup, FUNC_ENTRY, FUNC_EXIT_RC, header, MQTTPacket_decodeBuf(), NULL, PUBLISH, MQTTHeader::qos, readChar(), readInt(), readMQTTLenString(), MQTTHeader::retain, and MQTTHeader::type.
Referenced by cycle(), MQTTFormat_toClientString(), and MQTTFormat_toServerString().