调整测试demo订阅的主题
This commit is contained in:
@@ -46,8 +46,9 @@ int GetVersion::HandleMsg(const msg_t msg,msg_t &outMsg, handparam_t *param) {
|
||||
recvTimeStr = jsObj["time"];
|
||||
}catch (nlohmann::json::parse_error& e) {
|
||||
std::cerr << "Parsing error: " << e.what() << std::endl;
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
makeGetVersionReponse(tokenStr,outMsg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -66,7 +67,7 @@ void GetVersion::makeGetVersionReponse(std::string tokenStr,msg_t &outMsg) {
|
||||
js["time"] = ToolUtils::getTimeStringWithFomat(true);
|
||||
js["data"] = {{"version","shb-xxxx"}};
|
||||
|
||||
outMsg.topic = "/test2-topic";
|
||||
outMsg.topic = "/sys.dbc/sys.brd/S-datacenter/F-GetVersion";
|
||||
outMsg.payload = js.dump();
|
||||
outMsg.timestamp = ToolUtils::getUtcTime(true);
|
||||
}
|
||||
Reference in New Issue
Block a user