MQTT-C
|
A message queue. More...
#include <mqtt.h>
Data Fields | |
void * | mem_start |
The start of the message queue's memory block. More... | |
void * | mem_end |
The end of the message queue's memory block. | |
uint8_t * | curr |
A pointer to the position in the buffer you can pack bytes at. More... | |
size_t | curr_sz |
The number of bytes that can be written to curr . More... | |
struct mqtt_queued_message * | queue_tail |
The tail of the array of mqtt_queued_messages's. More... | |
Related Functions | |
(Note that these are not member functions.) | |
void | mqtt_mq_init (struct mqtt_message_queue *mq, void *buf, size_t bufsz) |
Initialize a message queue. More... | |
void | mqtt_mq_clean (struct mqtt_message_queue *mq) |
Clear as many messages from the front of the queue as possible. More... | |
struct mqtt_queued_message * | mqtt_mq_register (struct mqtt_message_queue *mq, size_t nbytes) |
Register a message that was just added to the buffer. More... | |
struct mqtt_queued_message * | mqtt_mq_find (struct mqtt_message_queue *mq, enum MQTTControlPacketType control_type, uint16_t *packet_id) |
Find a message in the message queue. More... | |
A message queue.
curr
and curr_sz
. uint8_t* mqtt_message_queue::curr |
A pointer to the position in the buffer you can pack bytes at.
curr
you must call mqtt_mq_register. size_t mqtt_message_queue::curr_sz |
The number of bytes that can be written to curr
.
curr
. This is because the mqtt_queued_message structs share the same memory (and thus, a mqtt_queued_message must be allocated in the message queue's memory whenever a new message is registered). void* mqtt_message_queue::mem_start |
The start of the message queue's memory block.
struct mqtt_queued_message* mqtt_message_queue::queue_tail |
The tail of the array of mqtt_queued_messages's.