第一次提交:完成了网关的单路485数据采集,还有以太网链接和MQTT配置,实现数据上报和命令下发,差一个断网储存
This commit is contained in:
25
components/MQTT_ESP/include/MQTT_ESP.h
Normal file
25
components/MQTT_ESP/include/MQTT_ESP.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#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);
|
||||
Reference in New Issue
Block a user