fix build issue.
This commit is contained in:
parent
2a7eda0060
commit
8b6ce7f0af
@ -402,12 +402,15 @@ std::string JsonData::JsonCmd_52() {
|
||||
if (count < 1) {
|
||||
return "";
|
||||
}
|
||||
std::string tmp_cond;
|
||||
tmp_cond = "sendMsg = '0' ORDER BY timeStamp DESC LIMIT 0,3";
|
||||
memcpy(whereCon, tmp_cond.c_str(), tmp_cond.length());
|
||||
for (int i = 0; i < count; i++) {
|
||||
Json::Value jsSensor;
|
||||
std::string strDataNodeNo = "";
|
||||
jsonVal.clear();
|
||||
jsonVal["cmd"] = "52";
|
||||
memcpy(whereCon, "sendMsg = '0' ORDER BY timeStamp DESC LIMIT 0,3", sizeof(whereCon));
|
||||
|
||||
// 自数据库获取传感器特征数据
|
||||
array_t arrRes;
|
||||
arrRes = sqlite_db_ctrl::instance().GetDataMultiLine(T_DATA_INFO(TNAME), "*", whereCon);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "short_addr_cfg.hpp"
|
||||
#include <fstream>
|
||||
#include <json/json.h>
|
||||
#include <zlog.h>
|
||||
|
||||
@ -16,16 +17,16 @@ int ShortAddrCfg::ReadCfg(std::map<uint16_t, int>& short_addr_map) {
|
||||
if (!reader.parse(base_relation_file, root, false)) {
|
||||
zlog_error(zbt, "[ShortAddrCfg] invalid format, fail to parse %s", BASE_RELATION);
|
||||
base_relation_file.close();
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
base_relation_file.close();
|
||||
if (!root.isArray()) {
|
||||
zlog_error(zbt, "[ShortAddrCfg] invalid format, not an array: %s", BASE_RELATION);
|
||||
return;
|
||||
return 2;
|
||||
}
|
||||
if (root.size() == 0) {
|
||||
zlog_info(zbt, "[ShortAddrCfg] no element in %s", BASE_RELATION);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint16_t short_addr;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "update_cfg.hpp"
|
||||
#include <fstream>
|
||||
#include <json/json.h>
|
||||
#include <zlog.h>
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "upgrade_cfg.hpp"
|
||||
#include <fstream>
|
||||
#include <json/json.h>
|
||||
#include <zlog.h>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user