1#ifndef __MQTT_MSG_REQS_H
2#define __MQTT_MSG_REQS_H
6#include <webclient/http_funcs.h>
7#include <mqtt/msg_types.h>
19 Pkt::eReasonCode_t reason;
36 Pkt::eReasonCode_t reason;
44 Pkt::eReasonCode_t reason;
48struct UnsubscribeAck {
54 Pkt::eReasonCode_t reason;
63 Pkt::eReasonCode_t reason;
80 UnsubscribeAck unsuback;
85 {
return (Pkt::eType_t)(flags>>4); }
88 {
return (flags & 0xF); }
99typedef int (*ConnAckCb_t) (
Client *mConn,
int mqttFd,
void *ctx, PacketInfo::ConnectAck *connack);
100typedef bool(*TopicMatchCb_t)(
Client *mConn, NBString *topicName,
void *matchCtx);
101typedef int (*WrPropCb_t) (
Client *mConn,
int mqttFd,
void *ctx, uint32_t propLen);
102typedef int (*WrPayloadCb_t) (
Client *mClient,
int mqttFd,
void *ctx, uint32_t payloadLen);
103typedef int (*AckCb_t) (
Client *mClient,
void *ctx, PacketInfo::PublishAck *ack);
104typedef int (*DisconnCb_t) (
Client *mClient, PacketInfo::Disconnect *disconn);
116 ePropListType_Callback,
122 ePayloadType_PoolPtr,
123 ePayloadType_Callback,
128 ePropValType_ValByte,
129 ePropValType_ValShort,
130 ePropValType_ValLong,
131 ePropValType_ValPStr,
132 ePropValType_ValPStrPair,
133 ePropValType_ValPData,
134 ePropValType_ValLocStr,
135 ePropValType_ValLocStrPair,
136 ePropValType_ValLocData,
137 ePropValType_Callback
140struct RequestProperty {
141 RequestProperty *pNext;
142 ePropertyValueType valType;
172 uint32_t GetEncodedLength();
173 uint32_t ListGetEncodedLength();
185 const char *clientId;
186 const char *username;
187 const char *password;
189 uint32_t propsType:4;
190 uint32_t propsLen:28;
192 const uint8_t *propBuf;
193 RequestProperty *propList;
200 ConnAckCb_t connAckCb;
211 const char *topicName;
212 uint32_t propsType : 4;
213 uint32_t propsLen : 28;
216 const uint8_t *propBuf;
217 RequestProperty *propList;
223 uint32_t payloadType : 4;
224 uint32_t payloadLen : 28;
230 WrPayloadCb_t payWrCb;
240 eSubReq_Pay_cstrList,
242 eSubReq_Pay_nbstrList,
244} eSubscribeRequestPayloadType;
249 eSubReq_UProp_ptrupList,
250 eSubReq_UProp_upList,
252 eSubReq_UProp_ptrnbstrList,
253 eSubReq_UProp_nbstrList,
255} eSubscribeRequestUserPropertyType;
262struct UserProperty_NbStr {
290 uint8_t propsType: 4;
298 uint32_t totalStrLen;
299 WrPayloadCb_t filtersCb;
306 UserProperty *pUPropList;
309 UserProperty_NbStr nbUProp;
312 UserProperty_NbStr *pUPropNBList;
316 UserProperty UPropList[];
320 UserProperty_NbStr UPropNBList[];
323 uint32_t totalUserPropsLen;
324 WrPayloadCb_t UPropsCb;
330struct SubUnsubQueueMsg {
331 SubUnsubQueueMsg *pNextReq;
Advanced low-level MQTT Client for interacting with Mqtt Brokers. The client handles all network comm...
Definition mqtt.h:263
Lightweight alternative to C++ CString class.
Definition nbstring.h:118
Parsed Uniform Resource Identifier Class (URI).
Definition http_funcs.h:62
MQTT PacketInfo Namespace.
Definition mqtt_msg_reqs.h:13
MQTT Namespace.
Definition mqtt.h:81
Structure used to specify details for a Publish call.
Definition mqtt_msg_reqs.h:181
PacketInfo::Msg message data structure.
Definition mqtt_msg_reqs.h:70
uint8_t GetFlags()
Definition mqtt_msg_reqs.h:87
Msg()
Definition mqtt_msg_reqs.h:90
Pkt::eType_t GetType()
Definition mqtt_msg_reqs.h:84
Structure used to specify details for a Publish call.
Definition mqtt_msg_reqs.h:207
Structure used to specify a topic filter for subscriptions.
Definition mqtt_msg_reqs.h:278
Structure used to specify a topic filter for subscriptions.
Definition mqtt_msg_reqs.h:270
Structure used to specify details for a Subscribe call.
Definition mqtt_msg_reqs.h:286
TopicHandler context definition.
Definition mqtt.h:155
Main buffer structure for network and serial communication.
Definition buffers.h:90