20260115:初步实现了MQTT协议发布指令的功能;完善了部分任务之间的运行逻辑。

This commit is contained in:
2026-01-15 16:50:36 +08:00
parent ce68cc42b3
commit 7708a22a6e
18 changed files with 8241 additions and 725 deletions

View File

@@ -0,0 +1,9 @@
#include "App_MQTT.h"
bool bMqttNormalSubscribe(char *pcTopic, char *pcMessage)
{
char cCmd[256] = {0};
snprintf(cCmd, sizeof(cCmd), "AT+MQTT_SUBSCRIBE=\"%s\",\"%s\"", pcTopic, pcMessage);
// Add logic to send the command and handle the response
return true;
}

View File

@@ -0,0 +1,20 @@
#ifndef __APP_MQTT_H__
#define __APP_MQTT_H__
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "ESP8266.h"
typedef enum
{
MQTT_MODE_NORMAL = 0,
MQTT_MODE_PROPERTY,
}eMqttMode_t;
bool bMqttSubMsgFormat(eMqttMode_t ucMode, char *pcReceivedMsg, char *pcTopic, char *pcMessage);
bool bMqttNormalSubscribe(char *pcTopic, char *pcMessage);
bool bMqttNormalPublish(char *pcTopic, char *pcMessage);
#endif /* __APP_MQTT_H__ */