19 lines
332 B
C++
19 lines
332 B
C++
#pragma once
|
|
|
|
#include "config.h"
|
|
#include <PubSubClient.h>
|
|
#include <WiFiClient.h>
|
|
|
|
class MQTTClient {
|
|
private:
|
|
WiFiClient* _wifi_client;
|
|
PubSubClient* _mqtt;
|
|
unsigned long _last_reconnect_attempt;
|
|
void _reconnect();
|
|
public:
|
|
MQTTClient();
|
|
void loop();
|
|
void publish_status(String s);
|
|
void publish_rfid_uid(uint32_t uid);
|
|
};
|