25 lines
652 B
C
25 lines
652 B
C
#include "mqtt_client.h"
|
|
#include "esp_log.h"
|
|
|
|
void mqtt_app_start(void);
|
|
int mqtt_publish_message(const char* topic, const char* data, int len, int qos, int retain);
|
|
|
|
/**
|
|
* @brief 启动设备状态上报任务
|
|
*
|
|
* @param report_interval_ms 上报间隔(毫秒)
|
|
* @return pdTRUE 成功, pdFALSE 失败
|
|
*/
|
|
BaseType_t mqtt_start_device_status_task(uint32_t report_interval_ms);
|
|
|
|
/**
|
|
* @brief 停止设备状态上报任务
|
|
*/
|
|
void mqtt_stop_device_status_task(void);
|
|
|
|
/**
|
|
* @brief 更新设备状态上报间隔
|
|
*
|
|
* @param report_interval_ms 新的上报间隔(毫秒)
|
|
*/
|
|
void mqtt_update_report_interval(uint32_t report_interval_ms); |