AWS IoT for ESP32 v1.0.0
An ESP-IDF based solution
lib_msg.h
Go to the documentation of this file.
1/*
2 * lib_msg.h
3 *
4 * Created on: Aug 14, 2021
5 * Author: Saheblal Bagwan
6 */
7
13#ifndef LIB_MSG_H_
14#define LIB_MSG_H_
15
16#include "lib_config.h"
17#include "stdutils.h"
18
23typedef enum
24{
27 // QOS2_AT_EXACTLY_ONCE // Exactly once // not supported
30
35typedef enum
36{
43
47typedef struct
48{
49 char topicStr[LENGTH_MQTT_TOPIC]; /*<! MQTT topic */
50 char payloadStr[LENGTH_MQTT_PAYLOAD];
51 uint16_t payloadLen_u16;
52 uint8_t topicLen_u8;
54 bool retain_b8;
56
61typedef struct
62{
65 uint16_t dataLen_u16;
66 uint16_t packetId_u16;
68 uint8_t data_a8[LENGTH_HTTP_PACKET];
69} packet_st;
70
71#endif /* LIB_MSG_H_ */
Configuration header file.
packetStatus_et
Definition: lib_msg.h:36
@ STATUS_INPORGESS
Definition: lib_msg.h:38
@ PACKET_STATUS_MAX
Definition: lib_msg.h:41
@ STATUS_COMPLETE
Definition: lib_msg.h:39
@ STATUS_FAILED
Definition: lib_msg.h:40
@ STATUS_IDLE
Definition: lib_msg.h:37
qos_et
Definition: lib_msg.h:24
@ QOS_AT_MAX
Definition: lib_msg.h:28
@ QOS0_AT_MOST_ONCE
Definition: lib_msg.h:25
@ QOS1_AT_LEASET_ONCE
Definition: lib_msg.h:26
Structure to represent MQTT message.
Definition: lib_msg.h:48
bool retain_b8
Definition: lib_msg.h:54
qos_et qos_e
Definition: lib_msg.h:53
uint8_t topicLen_u8
Definition: lib_msg.h:52
uint16_t payloadLen_u16
Definition: lib_msg.h:51
Packeting structure to handle fragmentation and re-assembly of file download.
Definition: lib_msg.h:62
uint16_t dataLen_u16
Definition: lib_msg.h:65
packetStatus_et status_e
Definition: lib_msg.h:67
uint32_t expectedFileSize_u32
Definition: lib_msg.h:63
uint16_t packetId_u16
Definition: lib_msg.h:66
uint32_t receivedFileSize_u32
Definition: lib_msg.h:64