20260117:支持以json格式向mqtt服务器发布数据。
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user