MqttPayloadParser.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * MqttPayloadParser.h
8  *
9  * @author Slavey Karadzhov <slaff@attachix.com>
10  *
11  ****/
12 
13 #pragma once
14 
15 #include <esp_systemapi.h>
16 #include "mqtt-codec/src/message.h"
17 
24 #define MQTT_PAYLOAD_PARSER_START -1
25 #define MQTT_PAYLOAD_PARSER_END -2
26 
27 #define MQTT_PAYLOAD_LENGTH 1024
28 
30  void* userData;
31  size_t offset;
32 };
33 
38  Delegate<int(MqttPayloadParserState& state, mqtt_message_t* message, const char* buffer, int length)>;
39 
40 int defaultPayloadParser(MqttPayloadParserState& state, mqtt_message_t* message, const char* buffer, int length);
41 
int defaultPayloadParser(MqttPayloadParserState &state, mqtt_message_t *message, const char *buffer, int length)
Definition: MqttPayloadParser.h:29
void * userData
custom user data
Definition: MqttPayloadParser.h:30
size_t offset
bytes read so far.
Definition: MqttPayloadParser.h:31