修改视频辅助检测来车状态时,来车方向判断与识别来车状态时,不一起发送到来导致的不记录方向问题
This commit is contained in:
parent
2cdb0c022a
commit
bb41c419de
|
@ -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();
|
||||
|
|
|
@ -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<std::string> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue