diff --git a/engine/GetRfidEngine/GetRfidEngine.cpp b/engine/GetRfidEngine/GetRfidEngine.cpp index 734bf21..a5ea3cb 100644 --- a/engine/GetRfidEngine/GetRfidEngine.cpp +++ b/engine/GetRfidEngine/GetRfidEngine.cpp @@ -75,7 +75,7 @@ APP_ERROR GetRfidEngine::Process() { if (!this->baseScoket_.bRuning()) { - LogError << "TCP 连接失败,重启中 ..."; + LogError << "RFID 连接失败,重启中 ..."; usleep(20 * 1000 * 1000); // 20秒后重试 this->baseScoket_.Close(); this->baseScoket_.Open(); diff --git a/engine/VideoAuxiliaryEngine/VideoAuxiliaryEngine.cpp b/engine/VideoAuxiliaryEngine/VideoAuxiliaryEngine.cpp index 3a88c7c..401a13e 100644 --- a/engine/VideoAuxiliaryEngine/VideoAuxiliaryEngine.cpp +++ b/engine/VideoAuxiliaryEngine/VideoAuxiliaryEngine.cpp @@ -39,7 +39,7 @@ APP_ERROR VideoAuxiliaryEngine::Process() this->baseScoket_.SetPort(this->videoAuxiliaryConfig_.iPort, this->videoAuxiliaryConfig_.strIp); this->baseScoket_.Init(); LogInfo << "视频辅助 服务端IP:" << this->videoAuxiliaryConfig_.strIp << " 端口:" << this->videoAuxiliaryConfig_.iPort; - LogInfo << "开启通讯..."; + LogInfo << "视频辅助 开启通讯..."; while (!isStop_) { @@ -93,6 +93,7 @@ bool VideoAuxiliaryEngine::getOrder(const std::string &recv, Json::Value &order) void VideoAuxiliaryEngine::dealSocketInfo(const std::string &info) { std::string vedioInfo = info; + LogInfo << "接收到:" << vedioInfo; StringUtil::getins()->replace_all_distinct(vedioInfo, "}{", "}&{"); std::vector vecJson = StringUtil::getins()->split(vedioInfo, "&"); for (int i = 0; i < vecJson.size(); ++i) @@ -119,6 +120,7 @@ void VideoAuxiliaryEngine::dealSocketInfo(const std::string &info) { if (iDirection != 0) pComeTrainInfo->iDirection = iDirection; outputQueMap_[strPort0_]->push(pComeTrainInfo); this->carType_ = tmpCarType; + LogInfo << "视频辅助-来车了"; } else if (this->carType_ == "1") { @@ -127,6 +129,7 @@ void VideoAuxiliaryEngine::dealSocketInfo(const std::string &info) { pComeTrainInfo->iDirection = 0; outputQueMap_[strPort0_]->push(pComeTrainInfo); this->carType_ = tmpCarType; + LogInfo << "视频辅助-火车离开了"; } else { @@ -134,11 +137,21 @@ void VideoAuxiliaryEngine::dealSocketInfo(const std::string &info) { continue; } - if (tmpCarType == this->carType_ && iDirection != 0) + if (iDirection != 0) { pComeTrainInfo->bComeTrain = true; pComeTrainInfo->iDirection = iDirection; outputQueMap_[strPort0_]->push(pComeTrainInfo); + LogInfo << "视频辅助-获得是否需要识别判定" << iDirection; + } + } + else { + if (iDirection != 0) + { + pComeTrainInfo->bComeTrain = true; + pComeTrainInfo->iDirection = iDirection; + outputQueMap_[strPort0_]->push(pComeTrainInfo); + LogInfo << "视频辅助-获得是否需要识别判定" << iDirection; } } }