2025-07-10 17:36:16 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "mqtt_config.hpp"
|
|
|
|
|
#include "logger.hpp"
|
|
|
|
|
#include "mqtt_client.hpp"
|
2025-07-11 17:37:54 +08:00
|
|
|
#include "protocol_codec.hpp"
|
2025-07-10 17:36:16 +08:00
|
|
|
|
|
|
|
|
// 启动 MQTT 客户端(内部自动连接、订阅、发布等)
|
|
|
|
|
void mqtt_client_thread_func();
|
|
|
|
|
|
|
|
|
|
// 外部可访问的 MQTT 客户端指针
|
|
|
|
|
extern std::shared_ptr<MQTTClient> mqtt_client;
|
|
|
|
|
extern std::atomic<bool> mqtt_restart_required;
|