mqtt support for sending fragmented messages and full mqtt message length support

This commit is contained in:
David Cermak
2018-10-25 16:38:25 +02:00
parent cf5b8eda89
commit e0bbbebc08
5 changed files with 142 additions and 39 deletions

View File

@@ -15,9 +15,19 @@ struct outbox_item;
typedef struct outbox_list_t * outbox_handle_t;
typedef struct outbox_item * outbox_item_handle_t;
typedef struct outbox_message * outbox_message_handle_t;
typedef struct outbox_message {
uint8_t *data;
int len;
int msg_id;
int msg_type;
uint8_t *remaining_data;
int remaining_len;
} outbox_message_t;
outbox_handle_t outbox_init();
outbox_item_handle_t outbox_enqueue(outbox_handle_t outbox, uint8_t *data, int len, int msg_id, int msg_type, int tick);
outbox_item_handle_t outbox_enqueue(outbox_handle_t outbox, outbox_message_handle_t message, int tick);
outbox_item_handle_t outbox_dequeue(outbox_handle_t outbox);
outbox_item_handle_t outbox_get(outbox_handle_t outbox, int msg_id);
esp_err_t outbox_delete(outbox_handle_t outbox, int msg_id, int msg_type);