20260117:支持以json格式向mqtt服务器发布数据。

This commit is contained in:
2026-01-18 02:44:38 +08:00
parent 7708a22a6e
commit dd946595c4
19 changed files with 580 additions and 4350 deletions

View File

@@ -1,6 +1,6 @@
#include "App_MQTT.h"
bool bMqttNormalSubscribe(char *pcTopic, char *pcMessage)
bool bMqttDefaultSubscribe(char *pcTopic, char *pcMessage)
{
char cCmd[256] = {0};
snprintf(cCmd, sizeof(cCmd), "AT+MQTT_SUBSCRIBE=\"%s\",\"%s\"", pcTopic, pcMessage);

View File

@@ -14,7 +14,7 @@ typedef enum
}eMqttMode_t;
bool bMqttSubMsgFormat(eMqttMode_t ucMode, char *pcReceivedMsg, char *pcTopic, char *pcMessage);
bool bMqttNormalSubscribe(char *pcTopic, char *pcMessage);
bool bMqttDefaultSubscribe(char *pcTopic, char *pcMessage);
bool bMqttNormalPublish(char *pcTopic, char *pcMessage);
#endif /* __APP_MQTT_H__ */