2020-05-16 23:49:34 +02:00
|
|
|
#ifndef _MQTTCLIENT_H
|
|
|
|
#define _MQTTCLIENT_H
|
|
|
|
|
|
|
|
#include "globals.h"
|
|
|
|
#include "rcommand.h"
|
2021-03-04 21:22:49 +01:00
|
|
|
#include "hash.h"
|
2020-06-20 15:04:03 +02:00
|
|
|
#include <MQTT.h>
|
2020-07-19 16:03:15 +02:00
|
|
|
#include <ETH.h>
|
2020-12-30 22:25:37 +01:00
|
|
|
#include <mbedtls/base64.h>
|
2020-05-16 23:49:34 +02:00
|
|
|
|
2020-06-20 15:04:03 +02:00
|
|
|
#ifndef MQTT_CLIENTNAME
|
2020-12-27 00:40:07 +01:00
|
|
|
#define MQTT_CLIENTNAME clientId
|
2020-06-20 15:04:03 +02:00
|
|
|
#endif
|
2020-05-16 23:49:34 +02:00
|
|
|
|
|
|
|
extern TaskHandle_t mqttTask;
|
|
|
|
|
|
|
|
void mqtt_enqueuedata(MessageBuffer_t *message);
|
2020-12-10 15:10:28 +01:00
|
|
|
uint32_t mqtt_queuewaiting(void);
|
2020-05-16 23:49:34 +02:00
|
|
|
void mqtt_queuereset(void);
|
|
|
|
void mqtt_client_task(void *param);
|
2020-05-20 18:29:07 +02:00
|
|
|
int mqtt_connect(const char *my_host, const uint16_t my_port);
|
2020-12-30 22:25:37 +01:00
|
|
|
void mqtt_callback(MQTTClient *client, char *topic, char *payload, int length);
|
2020-05-20 12:40:37 +02:00
|
|
|
void NetworkEvent(WiFiEvent_t event);
|
2020-05-16 23:49:34 +02:00
|
|
|
esp_err_t mqtt_init(void);
|
2020-12-23 16:31:31 +01:00
|
|
|
void mqtt_deinit(void);
|
2020-05-16 23:49:34 +02:00
|
|
|
|
|
|
|
#endif // _MQTTCLIENT_H
|