修改HTTP接口测试问题

This commit is contained in:
lixiaoyuan
2025-09-12 18:44:34 +08:00
parent 59b78d678d
commit 7f23138d9c
40 changed files with 1484 additions and 1165 deletions

View File

@@ -25,16 +25,16 @@ struct REGInfo
}
};
//struct TopicInfo
//{
// std::string name;
// std::string topic;
// int deviceType;
// TopicInfo() {};
// TopicInfo(std::string name, std::string topic, int deviceType)
// :name(name), topic(topic), deviceType(deviceType)
// {};
//};
struct TopicInfo
{
std::string name;
int deviceType {0};
int polling {0}; // 召测
TopicInfo() {};
TopicInfo(std::string name, int deviceType, int polling=0)
:name(name), deviceType(deviceType), polling(polling)
{};
};
using namespace std;
@@ -47,8 +47,7 @@ public:
void destory();
void subscribe();
//int publish();
int publish(std::string topic, std::string text);
int polling();
void onConnectionLost(char* cause);
@@ -61,6 +60,7 @@ public:
void parseEMS_YX(std::shared_ptr<Station> station, njson& json, std::map<std::string, REGInfo>& mapRegInfo);
public:
// MQTT clientId (使用station 的 code)
std::string clientId;
MQTTAsync client = nullptr;
@@ -69,7 +69,7 @@ public:
bool isConnected {false};
bool isSubscribed {false};
std::map<std::string, int> mapTopicInfo;
std::map<std::string, TopicInfo> mapTopicInfo;
};