GlobalVariable.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. #include "GlobalVariable.h"
  2. #include "spdlog/spdlog.h"
  3. // #include "FuncBase.h"
  4. /* ====================================================================================
  5. * ******************************* 全局变量定义 **********************************
  6. * ====================================================================================*/
  7. int g_eventTimeVaild = 600; /* 事件时间有效性,单位秒,超过这个时间就认为是无效数据 */
  8. /* ====================================================================================
  9. * *************************** DeviceInfo成员函数 *******************************
  10. * ====================================================================================*/
  11. /* 对比是否相等 */
  12. bool DeviceInfo::operator==(const DeviceInfo& other)
  13. {
  14. if(DeviceID != other.DeviceID) {
  15. return false;
  16. }
  17. else if(DeviceName != other.DeviceName || DeviceIP != other.DeviceIP) {
  18. return false;
  19. }
  20. else if(DeviceSerial != other.DeviceSerial || DeviceType != other.DeviceType) {
  21. return false;
  22. }
  23. else if(DevicePort != other.DevicePort || UserAccount != other.UserAccount || UserPassword != other.UserPassword) {
  24. return false;
  25. }
  26. return true;
  27. }
  28. /* 对比设备关联的算法信息是否相等 */
  29. bool DeviceInfo::isEqualAlgorithmInfo(const std::vector<AlgorithmInfo>& other)
  30. {
  31. /* 算法数目不相等,直接返回false */
  32. if(vecAlgorithmInfo.size() != other.size()) {
  33. return false;
  34. }else {
  35. /* 算法数目相等,进一步对比算法信息 */
  36. bool isEquality = true;
  37. /* 逐步对比算法信息 */
  38. for(const auto& it0 : vecAlgorithmInfo) {
  39. bool isEq2 = true;
  40. for(const auto& it1 : other) {
  41. if(it0 == it1) {
  42. continue;
  43. }else {
  44. isEq2 = false;
  45. break;
  46. }
  47. }
  48. if(!isEq2) {
  49. isEquality = false;
  50. break;
  51. }
  52. }
  53. if(!isEquality) {
  54. return false;
  55. }
  56. }
  57. return true;
  58. }
  59. DetectPeriodInfo::DetectPeriodInfo()
  60. {
  61. ChannelID = 0;
  62. appFunction = AppFunction::APP_NONE;
  63. PeriodName = "";
  64. PeriodType = Enum_PeriodType::PERIOD_ALL;
  65. listWeekTime.clear();
  66. lastTime = QDateTime::fromString("1970-01-01 00:00:00", "yyyy-MM-dd hh:mm:ss");
  67. }
  68. DetectPeriodInfo::DetectPeriodInfo(const DetectPeriodInfo& other)
  69. {
  70. ChannelID = other.ChannelID;
  71. appFunction = other.appFunction;
  72. PeriodName = other.PeriodName;
  73. PeriodType = other.PeriodType;
  74. listWeekTime = other.listWeekTime;
  75. lastTime = other.lastTime;
  76. }
  77. DetectPeriodInfo& DetectPeriodInfo::operator=(const DetectPeriodInfo& other)
  78. {
  79. if (this != &other) {
  80. ChannelID = other.ChannelID;
  81. appFunction = other.appFunction;
  82. PeriodName = other.PeriodName;
  83. PeriodType = other.PeriodType;
  84. listWeekTime = other.listWeekTime;
  85. lastTime = other.lastTime;
  86. }
  87. return *this;
  88. }
  89. /* ====================================================================================
  90. * ******************************* 各种报警信息 **********************************
  91. * ====================================================================================*/
  92. AlarmInfo::AlarmInfo()
  93. {
  94. Is_Alarm = false;
  95. Is_InsertEQM = false;
  96. Is_OnWork = false;
  97. AlarmID = 0;
  98. DeviceID = 0;
  99. RoomID = 0;
  100. ChannelID = 0;
  101. State = 0;
  102. OnWork = 0;
  103. StartTime = "";
  104. EndTime = "";
  105. EventTime = "";
  106. PicUrl = "";
  107. ImageInfo = "";
  108. // AppID = "";
  109. ActionID = "";
  110. ActionDes = "";
  111. FaceIDList = "";
  112. FaceNameList = "";
  113. listBbox.clear();
  114. listPersonInfo.clear();
  115. appFunction = AppFunction::APP_NONE;
  116. }
  117. AlarmInfo::AlarmInfo(const AlarmInfo& other)
  118. {
  119. Is_Alarm = other.Is_Alarm;
  120. Is_InsertEQM = other.Is_InsertEQM;
  121. Is_OnWork = other.Is_OnWork;
  122. AlarmID = other.AlarmID;
  123. DeviceID = other.DeviceID;
  124. RoomID = other.RoomID;
  125. ChannelID = other.ChannelID;
  126. State = other.State;
  127. OnWork = other.OnWork;
  128. StartTime = other.StartTime;
  129. EndTime = other.EndTime;
  130. EventTime = other.EventTime;
  131. PicUrl = other.PicUrl;
  132. ImageInfo = other.ImageInfo;
  133. // AppID = other.AppID;
  134. ActionID = other.ActionID;
  135. ActionDes = other.ActionDes;
  136. FaceIDList = other.FaceIDList;
  137. FaceNameList = other.FaceNameList;
  138. listBbox = other.listBbox;
  139. listPersonInfo = other.listPersonInfo;
  140. appFunction = other.appFunction;
  141. }
  142. AlarmInfo& AlarmInfo::operator=(AlarmInfo& other)
  143. {
  144. if(this != &other)
  145. {
  146. Is_Alarm = other.Is_Alarm;
  147. Is_InsertEQM = other.Is_InsertEQM;
  148. Is_OnWork = other.Is_OnWork;
  149. AlarmID = other.AlarmID;
  150. DeviceID = other.DeviceID;
  151. RoomID = other.RoomID;
  152. ChannelID = other.ChannelID;
  153. State = other.State;
  154. OnWork = other.OnWork;
  155. StartTime = other.StartTime;
  156. EndTime = other.EndTime;
  157. EventTime = other.EventTime;
  158. PicUrl = other.PicUrl;
  159. ImageInfo = other.ImageInfo;
  160. // AppID = other.AppID;
  161. ActionID = other.ActionID;
  162. ActionDes = other.ActionDes;
  163. FaceIDList = other.FaceIDList;
  164. FaceNameList = other.FaceNameList;
  165. listBbox = other.listBbox;
  166. listPersonInfo = other.listPersonInfo;
  167. appFunction = other.appFunction;
  168. }
  169. return *this;
  170. }
  171. /* 清空内容 */
  172. void AlarmInfo::reInit()
  173. {
  174. Is_Alarm = false;
  175. Is_InsertEQM = false;
  176. Is_OnWork = false;
  177. AlarmID = 0;
  178. DeviceID = 0;
  179. RoomID = 0;
  180. ChannelID = 0;
  181. State = 0;
  182. OnWork = 0;
  183. StartTime = "";
  184. EndTime = "";
  185. EventTime = "";
  186. PicUrl = "";
  187. ImageInfo = "";
  188. // AppID = "";
  189. ActionID = "";
  190. ActionDes = "";
  191. FaceIDList = "";
  192. FaceNameList = "";
  193. listBbox.clear();
  194. listPersonInfo.clear();
  195. appFunction = AppFunction::APP_NONE;
  196. }
  197. /* 获取人脸列表 */
  198. std::string AlarmInfo::getFaceIDListString()
  199. {
  200. std::string strFaceList = "";
  201. for(auto& it : listPersonInfo)
  202. {
  203. if(it.PersonID.size() < 0)
  204. {
  205. continue;
  206. }
  207. strFaceList += it.PersonID + ";" ;
  208. }
  209. /* 去掉最后的“;” */
  210. if(strFaceList.size() > 0)
  211. {
  212. strFaceList = strFaceList.substr(0, strFaceList.size() - 1);
  213. }
  214. return strFaceList;
  215. }
  216. /* 获取人脸名称列表 */
  217. std::string AlarmInfo::getFaceNameListString()
  218. {
  219. std::string strFaceName;
  220. for(auto& it : listPersonInfo)
  221. {
  222. if(it.PersonName.size() < 0)
  223. {
  224. continue;
  225. }
  226. strFaceName += it.PersonName + ";";
  227. }
  228. /* 去掉最后的“;” */
  229. if(strFaceName.size() > 0)
  230. {
  231. strFaceName = strFaceName.substr(0, strFaceName.size() - 1);
  232. }
  233. return strFaceName;
  234. }
  235. /**
  236. * @brief 添加报警信息
  237. *
  238. * @param info
  239. * @return true
  240. * @return false
  241. */
  242. bool ListAlarmInfo::addAlarmInfo(AlarmInfo& info)
  243. {
  244. /* 先查找有没有重复的 */
  245. auto p = findAlarmInfo(info);
  246. if(p != nullptr)
  247. {
  248. return false;
  249. }
  250. AlarmInfo* pNew = new AlarmInfo(info);
  251. listAlarmInfo.push_back(pNew);
  252. return true;
  253. }
  254. /**
  255. * @brief 检查列表中是是否有这个报警信息,这里只检查ChannelID、RoomID、CameraID、ActionID是否相等
  256. *
  257. * @param info
  258. * @return AlarmInfo*
  259. */
  260. AlarmInfo* ListAlarmInfo::findAlarmInfo(AlarmInfo& info)
  261. {
  262. for(auto& it0 : listAlarmInfo)
  263. {
  264. if(it0->ChannelID == info.ChannelID && it0->RoomID == info.RoomID && it0->DeviceID == info.DeviceID && it0->ActionID == info.ActionID)
  265. {
  266. return it0;
  267. }
  268. }
  269. return nullptr;
  270. }
  271. /* 删除报警记录 */
  272. void ListAlarmInfo::deleteAlarmInfo(AlarmInfo& info)
  273. {
  274. for(auto it = listAlarmInfo.begin(); it != listAlarmInfo.end();)
  275. {
  276. if((*it)->ChannelID == info.ChannelID && (*it)->RoomID == info.RoomID && (*it)->DeviceID == info.DeviceID && (*it)->ActionID == info.ActionID)
  277. {
  278. delete *it;
  279. it = listAlarmInfo.erase(it);
  280. }else {
  281. ++it;
  282. }
  283. }
  284. }
  285. /* 清空报警记录 */
  286. void ListAlarmInfo::clearAlarmInfo()
  287. {
  288. for(auto& it : listAlarmInfo)
  289. {
  290. delete it;
  291. }
  292. listAlarmInfo.clear();
  293. }
  294. /* 查找是否有相同的人脸信息 */
  295. bool RoomFaceInfo::findPersonInfo(const PersonInfo& info)
  296. {
  297. for(auto& it0 : listPersonInfo)
  298. {
  299. if(it0.PersonID == info.PersonID && it0.PersonName == info.PersonName)
  300. {
  301. return true;
  302. }
  303. }
  304. return false;
  305. }
  306. /* 添加房间人脸信息 */
  307. void ListRoomFaceInfo::addRoomFaceInfo(RoomFaceInfo& info)
  308. {
  309. /* 先查找有没有重复的 */
  310. auto p = findRoomFaceInfo(info);
  311. if(p != nullptr)
  312. {
  313. return;
  314. }
  315. listRoomFaceInfo.push_back(info);
  316. }
  317. /**
  318. * @brief 通过报警信息添加人脸信息
  319. *
  320. * @param info
  321. */
  322. void ListRoomFaceInfo::addRoomFaceInfo(AlarmInfo& info)
  323. {
  324. auto p = findRoomFaceInfo(info.ChannelID, info.RoomID, info.DeviceID);
  325. if(p == nullptr)
  326. {
  327. RoomFaceInfo rfi;
  328. rfi.ChannelID = info.ChannelID;
  329. rfi.RoomID = info.RoomID;
  330. rfi.CameraID = info.DeviceID;
  331. rfi.MaxNum = 0;
  332. rfi.MinNum = 0;
  333. rfi.StartTime = QDateTime::currentDateTime();
  334. listRoomFaceInfo.push_back(rfi);
  335. }
  336. /* 将人员信息加入到列表中,添加时会先查找有没有相同的信息 */
  337. for(auto& it0 : info.listPersonInfo)
  338. {
  339. if(!p->findPersonInfo(it0))
  340. {
  341. p->listPersonInfo.push_back(it0);
  342. }
  343. }
  344. }
  345. RoomFaceInfo* ListRoomFaceInfo::findRoomFaceInfo(RoomFaceInfo& info)
  346. {
  347. for(auto& it0 : listRoomFaceInfo)
  348. {
  349. if(it0.ChannelID == info.ChannelID && it0.RoomID == info.RoomID && it0.CameraID == info.CameraID)
  350. {
  351. return &it0;
  352. }
  353. }
  354. return nullptr;
  355. }
  356. /* 查找有没有相同的结构 */
  357. RoomFaceInfo* ListRoomFaceInfo::findRoomFaceInfo(int ChannelID, int RoomID, int CameraID)
  358. {
  359. for(auto& it0 : listRoomFaceInfo)
  360. {
  361. if(it0.ChannelID == ChannelID && it0.RoomID == RoomID && it0.CameraID == CameraID)
  362. {
  363. return &it0;
  364. }
  365. }
  366. return nullptr;
  367. }
  368. /* ====================================================================================
  369. * ************************** ListActionInfo成员函数 ****************************
  370. * ====================================================================================*/
  371. ActionInfo::ActionInfo()
  372. {
  373. RunState = RunTimeState::RUN_STATE_INIT;
  374. ChannelID = -1;
  375. RoomID = -1;
  376. CameraID = -1;
  377. RoomType = Enum_RoomType::ROOM_NONE;
  378. ActionID = "";
  379. strRoomName = "";
  380. strActionName = "";
  381. }
  382. ActionInfo& ActionInfo::operator=(const ActionInfo& other)
  383. {
  384. if (this != &other)
  385. {
  386. ChannelID = other.ChannelID;
  387. RoomID = other.RoomID;
  388. CameraID = other.CameraID;
  389. ActionID = other.ActionID;
  390. strRoomName = other.strRoomName;
  391. RoomType = other.RoomType;
  392. }
  393. return *this;
  394. }
  395. bool ActionInfo::operator==(const ActionInfo& other)
  396. {
  397. if(ChannelID != other.ChannelID) {
  398. return false;
  399. }
  400. if(RoomID != other.RoomID) {
  401. return false;
  402. }
  403. if(CameraID != other.CameraID) {
  404. return false;
  405. }
  406. if(ActionID != other.ActionID) {
  407. return false;
  408. }
  409. if(RoomType != other.RoomType) {
  410. return false;
  411. }
  412. return true;
  413. }
  414. /* 对比除摄像机外的基础信息是否相等 */
  415. bool ActionInfo::isEqualBaseInfo(const ActionInfo& other)
  416. {
  417. if(ChannelID != other.ChannelID) {
  418. return false;
  419. }
  420. if(RoomID != other.RoomID) {
  421. return false;
  422. }
  423. if(ActionID != other.ActionID) {
  424. return false;
  425. }
  426. if(RoomType != other.RoomType) {
  427. return false;
  428. }
  429. return true;
  430. }
  431. /* 添加关联信息,会自动进行重复判断,如果已有相同的信息,则跳过 */
  432. bool ListActionInfo::insertActionInfo(ActionInfo* info)
  433. {
  434. /* 先判断是否已经在列表中了 */
  435. if(findActionInList(info) == nullptr)
  436. {
  437. ActionInfo* pActionInfo = new ActionInfo;
  438. *pActionInfo = *info;
  439. listActionInfo.push_back(pActionInfo);
  440. }
  441. return true;
  442. }
  443. /* 删除信息 */
  444. bool ListActionInfo::deleteActionInfo(ActionInfo* info)
  445. {
  446. if(info == nullptr)
  447. {
  448. return false;
  449. }
  450. if(findActionInList(info) != nullptr)
  451. {
  452. listActionInfo.remove(info);
  453. delete info;
  454. info = nullptr;
  455. }
  456. return true;
  457. }
  458. /* 给算法添加摄像机,原有的会被替换掉 */
  459. bool ListActionInfo::addActionCamera(ActionInfo* pInfo)
  460. {
  461. auto pActionInfo = findActionIDInListNoCamera(pInfo);
  462. if(pActionInfo != nullptr)
  463. {
  464. pActionInfo->CameraID = pInfo->CameraID;
  465. }
  466. return true;
  467. }
  468. /* 清空算法中的摄像机信息 */
  469. void ListActionInfo::clearCameraList()
  470. {
  471. for(auto& it0 : listActionInfo)
  472. {
  473. it0->CameraID = -1;
  474. }
  475. }
  476. /* 清空设置成STOP或ERROR的Action */
  477. void ListActionInfo::clearStopAction()
  478. {
  479. for(auto it0 = listActionInfo.begin(); it0 != listActionInfo.end();)
  480. {
  481. if(( (*it0)->RunState == RunTimeState::RUN_STATE_STOP) || ((*it0)->RunState == RunTimeState::RUN_STATE_ERROR))
  482. {
  483. delete *it0;
  484. it0 = listActionInfo.erase(it0);
  485. }else {
  486. ++it0;
  487. }
  488. }
  489. }
  490. /* 查找算法ID是否已在列表中 */
  491. ActionInfo* ListActionInfo::findActionInList(ActionInfo* pInfo)
  492. {
  493. for(const auto& it0 : listActionInfo)
  494. {
  495. if(*it0 == *pInfo)
  496. {
  497. return it0;
  498. }
  499. }
  500. return nullptr;
  501. }
  502. /* 查找算法ID是否在列表中,这里查找不会对比摄像机ID */
  503. ActionInfo* ListActionInfo::findActionIDInListNoCamera(ActionInfo* pInfo)
  504. {
  505. for(const auto& it0 : listActionInfo)
  506. {
  507. if(it0->isEqualBaseInfo(*pInfo))
  508. {
  509. return it0;
  510. }
  511. }
  512. return nullptr;
  513. }
  514. /* 清空容器 */
  515. void ListActionInfo::clear()
  516. {
  517. for(auto& it0 : listActionInfo)
  518. {
  519. delete it0;
  520. it0 = nullptr;
  521. }
  522. listActionInfo.clear();
  523. }
  524. /* ====================================================================================
  525. * *********************** ListRoomActionInfo成员函数 ***************************
  526. * ====================================================================================*/
  527. /* 对比频道信息、房间信息、算法ID是否相等 */
  528. bool RoomActionInfo::isEqualBaseInfo(const RoomActionInfo& other)
  529. {
  530. if(ChannelID != other.ChannelID) {
  531. return false;
  532. }
  533. if(RoomID != other.RoomID) {
  534. return false;
  535. }
  536. if(ActionID != other.ActionID) {
  537. return false;
  538. }
  539. if(RoomType != other.RoomType) {
  540. return false;
  541. }
  542. return true;
  543. }
  544. /* 添加关联信息,会自动进行重复判断,如果已有相同的room和action关联信息,则跳过 */
  545. bool ListRoomActionInfo::insertRoomActionInfo(const RoomActionInfo& info)
  546. {
  547. /* 先判断是否已经在列表中了 */
  548. if(findActionIDInList(info.ChannelID, info.RoomID, info.ActionID) == nullptr)
  549. {
  550. RoomActionInfo* pRoomActionInfo = new RoomActionInfo;
  551. *pRoomActionInfo = info;
  552. listRoomActionInfo.push_back(pRoomActionInfo);
  553. }
  554. return true;
  555. }
  556. /* 添加关联信息,会自动进行重复判断,如果已有相同的room和action关联信息,则跳过 */
  557. bool ListRoomActionInfo::insertRoomActionInfo(const int ChannelID, const int RoomID, const std::string& strActionID)
  558. {
  559. /* 先判断是否已经在列表中了 */
  560. if(findActionIDInList(ChannelID, RoomID, strActionID) == nullptr)
  561. {
  562. RoomActionInfo* pRoomActionInfo = new RoomActionInfo;
  563. pRoomActionInfo->RoomID = RoomID;
  564. pRoomActionInfo->ActionID = strActionID;
  565. listRoomActionInfo.push_back(pRoomActionInfo);
  566. }
  567. return true;
  568. }
  569. /* 删除一个容器,注意,这个不能在别的for循环中删除,只能单独删除 */
  570. bool ListRoomActionInfo::deleteRoomActionInfo(RoomActionInfo* pInfo)
  571. {
  572. if(pInfo == nullptr)
  573. {
  574. return false;
  575. }
  576. for(auto it0 = listRoomActionInfo.begin(); it0 != listRoomActionInfo.end(); ++it0)
  577. {
  578. if(*it0 == pInfo)
  579. {
  580. listRoomActionInfo.erase(it0);
  581. delete pInfo;
  582. pInfo = nullptr;
  583. return true;
  584. }
  585. }
  586. return false;
  587. }
  588. /* 清空容器 */
  589. void ListRoomActionInfo::clear()
  590. {
  591. for(auto& it0 : listRoomActionInfo)
  592. {
  593. delete it0;
  594. it0 = nullptr;
  595. }
  596. listRoomActionInfo.clear();
  597. }
  598. /* 添加算法信息,根据传入的算法信息,自动将其加入到对应的容器中 */
  599. void ListRoomActionInfo::addActionInfo(const ActionInfo& info)
  600. {
  601. auto pRAInfo = findActionIDInList(info.ChannelID, info.RoomID, info.ActionID);
  602. if(pRAInfo != nullptr)
  603. {
  604. pRAInfo->listCameraID.push_back(info.CameraID);
  605. }else {
  606. RoomActionInfo* pRoomActionInfo = new RoomActionInfo;
  607. pRoomActionInfo->ChannelID = info.ChannelID;
  608. pRoomActionInfo->RoomID = info.RoomID;
  609. pRoomActionInfo->ActionID = info.ActionID;
  610. pRoomActionInfo->RoomType = info.RoomType;
  611. pRoomActionInfo->strRoomName = info.strRoomName;
  612. pRoomActionInfo->listCameraID.push_back(info.CameraID);
  613. listRoomActionInfo.push_back(pRoomActionInfo);
  614. }
  615. }
  616. /* 清空算法对应的摄像机列表 */
  617. void ListRoomActionInfo::clearCameraList()
  618. {
  619. for(auto& it0 : listRoomActionInfo)
  620. {
  621. it0->listCameraID.clear();
  622. }
  623. }
  624. /* 清理设置为STOP或者ERROR的RoomAction */
  625. // void ListRoomActionInfo::clearStopRoomAction()
  626. // {
  627. // for(auto it0 = listRoomActionInfo.begin(); it0 != listRoomActionInfo.end();)
  628. // {
  629. // if(( (*it0)->RunState == RunTimeState::RUN_STATE_STOP) || ((*it0)->RunState == RunTimeState::RUN_STATE_ERROR))
  630. // {
  631. // delete *it0;
  632. // it0 = listRoomActionInfo.erase(it0);
  633. // }else {
  634. // ++it0;
  635. // }
  636. // }
  637. // }
  638. /* 查找算法ID是否已在列表中 */
  639. RoomActionInfo* ListRoomActionInfo::findActionIDInList(const int chnID, const int RoomID, const std::string& strActionID)
  640. {
  641. for(const auto& it0 : listRoomActionInfo)
  642. {
  643. if((it0->RoomID == RoomID) && (it0->ActionID == strActionID) && (it0->ChannelID == chnID))
  644. {
  645. return it0;
  646. }
  647. }
  648. return nullptr;
  649. }