3.2.5 发布
This commit is contained in:
parent
5f6fc096a3
commit
f78e853342
@ -583,7 +583,7 @@ void JsonData::DataNodeStatusCheck()
|
||||
int lTimeTemp = lNowTime - llastTime;
|
||||
lTimeTemp = abs(lTimeTemp);
|
||||
if (lTimeTemp > onlineCheck){
|
||||
LOG_DEBUG("离线 DataNodeStatusCheck lNowTime = %d,llastTime = %d,interval = %s\n",lNowTime,llastTime,vetRes[i][21].c_str());
|
||||
LOG_DEBUG("offline DataNodeStatusCheck lNowTime = %d,llastTime = %d,interval = %s\n",lNowTime,llastTime,vetRes[i][21].c_str());
|
||||
char whereCon[32] = { 0 };
|
||||
sprintf(whereCon, "dataNodeNo='%s'", strDataNodeNo.c_str());
|
||||
sql_ctl->UpdateTableData(T_SENSOR_INFO(TNAME), "status='0'", whereCon);
|
||||
@ -599,15 +599,16 @@ void JsonData::DataNodeStatusCheck()
|
||||
sprintf(whereCon, "dataNodeNo='%s'", strDataNodeNo.c_str());
|
||||
sql_ctl->UpdateTableData(T_SENSOR_INFO(TNAME), "status='1'", whereCon);
|
||||
}
|
||||
if (lTimeTemp > atoi(vetRes[i][21].c_str()) * 3 )//判定传感器是否超过三次未传特征值
|
||||
if (lTimeTemp > atoi(vetRes[i][21].c_str()) * 5 * 60 )//判定传感器是否超过五次未传特征值
|
||||
{
|
||||
LOG_DEBUG("lTimeTemp = %d,featureInterVal = %d\n",lTimeTemp,atoi(vetRes[i][21].c_str()));
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count == nSize)
|
||||
{
|
||||
LOG_ERROR("ALL Node offline\n");
|
||||
LOG_ERROR("ALL Node offline,count = %d\n",count);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
2
main.cpp
2
main.cpp
@ -31,7 +31,7 @@ int main(int argc, char *argv[])
|
||||
// 初始化日志记录,日志缓存区,记录数,未使用,后期,命令启动
|
||||
log_init(SOFTWARE_RUN_LOG, 1380, 1000 * 1024);
|
||||
LOG_INFO("####CIDNSOFT start####\n");
|
||||
|
||||
LOG_INFO(" Firmware compile time:%s %s,version %s\n", __DATE__, __TIME__,GlobalConfig::Version.c_str());
|
||||
// 查看版本信息
|
||||
if (CheckFileVersion(argc, argv)) {
|
||||
return 0;
|
||||
|
@ -227,15 +227,6 @@ void CheckThread()
|
||||
}
|
||||
if(mqttresend == 7200){
|
||||
mqttresend = 0;
|
||||
#ifdef WIFI_MODULE
|
||||
bool status = Ping( GlobalConfig::ServerIP.c_str(), 10000);
|
||||
if(status != 0){
|
||||
LOG_INFO("===========net status ========failed \n");
|
||||
LOG_ERROR("openSwitch\n");
|
||||
sleep(20);
|
||||
gpio_set(GlobalConfig::GPIO_G.power,1);
|
||||
}
|
||||
#endif
|
||||
LOG_INFO("mqttresend check\n");
|
||||
Json::Value jsHeart;
|
||||
Json::FastWriter fw;
|
||||
|
Loading…
x
Reference in New Issue
Block a user