GlobalInfo.cpp 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302
  1. #include "GlobalInfo.h"
  2. #include <QSettings>
  3. #include "spdlog/spdlog.h"
  4. /* ====================================================================================
  5. * ******************************* 全局变量定义 **********************************
  6. * ====================================================================================*/
  7. int g_eventTimeVaild = 600; /* 事件时间有效性,单位秒,超过这个时间就认为是无效数据 */
  8. ActionList g_actionList; /* 全局算法列表 */
  9. /* ====================================================================================
  10. * *************************** DeviceInfo成员函数 *******************************
  11. * ====================================================================================*/
  12. /* 对比是否相等 */
  13. bool DeviceInfo::operator==(const DeviceInfo& other)
  14. {
  15. if(DeviceID != other.DeviceID) {
  16. return false;
  17. }
  18. else if(DeviceName != other.DeviceName || DeviceIP != other.DeviceIP) {
  19. return false;
  20. }
  21. else if(DeviceSerial != other.DeviceSerial || DeviceType != other.DeviceType) {
  22. return false;
  23. }
  24. else if(DevicePort != other.DevicePort || UserAccount != other.UserAccount || UserPassword != other.UserPassword) {
  25. return false;
  26. }
  27. return true;
  28. }
  29. /* 对比设备关联的算法信息是否相等 */
  30. bool DeviceInfo::isEqualAlgorithmInfo(const std::vector<AlgorithmInfo>& other)
  31. {
  32. /* 算法数目不相等,直接返回false */
  33. if(vecAlgorithmInfo.size() != other.size()) {
  34. return false;
  35. }else {
  36. /* 算法数目相等,进一步对比算法信息 */
  37. bool isEquality = true;
  38. /* 逐步对比算法信息 */
  39. for(const auto& it0 : vecAlgorithmInfo) {
  40. bool isEq2 = true;
  41. for(const auto& it1 : other) {
  42. if(it0 == it1) {
  43. continue;
  44. }else {
  45. isEq2 = false;
  46. break;
  47. }
  48. }
  49. if(!isEq2) {
  50. isEquality = false;
  51. break;
  52. }
  53. }
  54. if(!isEquality) {
  55. return false;
  56. }
  57. }
  58. return true;
  59. }
  60. /* ====================================================================================
  61. * ******************************* 各种报警信息 **********************************
  62. * ====================================================================================*/
  63. AlarmInfo::AlarmInfo()
  64. {
  65. Is_Alarm = false;
  66. AlarmID = 0;
  67. DeviceID = 0;
  68. RoomID = 0;
  69. ChannelID = 0;
  70. State = 0;
  71. OnWork = 0;
  72. StartTime = "";
  73. EndTime = "";
  74. EventTime = "";
  75. PicUrl = "";
  76. ImageInfo = "";
  77. AppID = "";
  78. ActionID = "";
  79. ActionDes = "";
  80. FaceIDList = "";
  81. FaceNameList = "";
  82. listBbox.clear();
  83. }
  84. AlarmInfo::AlarmInfo(const AlarmInfo& other)
  85. {
  86. Is_Alarm = other.Is_Alarm;
  87. AlarmID = other.AlarmID;
  88. DeviceID = other.DeviceID;
  89. RoomID = other.RoomID;
  90. ChannelID = other.ChannelID;
  91. State = other.State;
  92. OnWork = other.OnWork;
  93. StartTime = other.StartTime;
  94. EndTime = other.EndTime;
  95. EventTime = other.EventTime;
  96. PicUrl = other.PicUrl;
  97. ImageInfo = other.ImageInfo;
  98. AppID = other.AppID;
  99. ActionID = other.ActionID;
  100. ActionDes = other.ActionDes;
  101. FaceIDList = other.FaceIDList;
  102. FaceNameList = other.FaceNameList;
  103. listBbox = other.listBbox;
  104. vecPersonInfo = other.vecPersonInfo;
  105. }
  106. AlarmInfo& AlarmInfo::operator=(AlarmInfo& other)
  107. {
  108. if(this != &other)
  109. {
  110. Is_Alarm = other.Is_Alarm;
  111. AlarmID = other.AlarmID;
  112. DeviceID = other.DeviceID;
  113. RoomID = other.RoomID;
  114. ChannelID = other.ChannelID;
  115. State = other.State;
  116. OnWork = other.OnWork;
  117. StartTime = other.StartTime;
  118. EndTime = other.EndTime;
  119. EventTime = other.EventTime;
  120. PicUrl = other.PicUrl;
  121. ImageInfo = other.ImageInfo;
  122. AppID = other.AppID;
  123. ActionID = other.ActionID;
  124. ActionDes = other.ActionDes;
  125. FaceIDList = other.FaceIDList;
  126. FaceNameList = other.FaceNameList;
  127. listBbox = other.listBbox;
  128. vecPersonInfo = other.vecPersonInfo;
  129. }
  130. return *this;
  131. }
  132. /* 清空内容 */
  133. void AlarmInfo::reInit()
  134. {
  135. Is_Alarm = false;
  136. AlarmID = 0;
  137. DeviceID = 0;
  138. RoomID = 0;
  139. ChannelID = 0;
  140. State = 0;
  141. OnWork = 0;
  142. StartTime = "";
  143. EndTime = "";
  144. EventTime = "";
  145. PicUrl = "";
  146. ImageInfo = "";
  147. AppID = "";
  148. ActionID = "";
  149. ActionDes = "";
  150. FaceIDList = "";
  151. FaceNameList = "";
  152. listBbox.clear();
  153. }
  154. /**
  155. * @brief 添加报警信息
  156. *
  157. * @param info
  158. * @return true
  159. * @return false
  160. */
  161. bool ListAlarmInfo::addAlarmInfo(AlarmInfo& info)
  162. {
  163. /* 先查找有没有重复的 */
  164. auto p = findAlarmInfo(info);
  165. if(p != nullptr)
  166. {
  167. return false;
  168. }
  169. listAlarmInfo.push_back(info);
  170. return true;
  171. }
  172. /**
  173. * @brief 检查列表中是是否有这个报警信息,这里只检查ChannelID、RoomID、CameraID、ActionID是否相等
  174. *
  175. * @param info
  176. * @return AlarmInfo*
  177. */
  178. AlarmInfo* ListAlarmInfo::findAlarmInfo(AlarmInfo& info)
  179. {
  180. for(auto& it0 : listAlarmInfo)
  181. {
  182. if(it0.ChannelID == info.ChannelID && it0.RoomID == info.RoomID && it0.DeviceID == info.DeviceID && it0.ActionID == info.ActionID)
  183. {
  184. return &it0;
  185. }
  186. }
  187. return nullptr;
  188. }
  189. /* 查找是否有相同的人脸信息 */
  190. bool RoomFaceInfo::findPersonInfo(const PersonInfo& info)
  191. {
  192. for(auto& it0 : listPersonInfo)
  193. {
  194. if(it0.PersonID == info.PersonID && it0.PersonName == info.PersonName)
  195. {
  196. return true;
  197. }
  198. }
  199. return false;
  200. }
  201. /* 添加房间人脸信息 */
  202. void ListRoomFaceInfo::addRoomFaceInfo(RoomFaceInfo& info)
  203. {
  204. /* 先查找有没有重复的 */
  205. auto p = findRoomFaceInfo(info);
  206. if(p != nullptr)
  207. {
  208. return;
  209. }
  210. listRoomFaceInfo.push_back(info);
  211. }
  212. /**
  213. * @brief 通过报警信息添加人脸信息
  214. *
  215. * @param info
  216. */
  217. void ListRoomFaceInfo::addRoomFaceInfo(AlarmInfo& info)
  218. {
  219. auto p = findRoomFaceInfo(info.ChannelID, info.RoomID, info.DeviceID);
  220. if(p == nullptr)
  221. {
  222. RoomFaceInfo rfi;
  223. rfi.ChannelID = info.ChannelID;
  224. rfi.RoomID = info.RoomID;
  225. rfi.CameraID = info.DeviceID;
  226. rfi.MaxNum = 0;
  227. rfi.MinNum = 0;
  228. rfi.StartTime = QDateTime::currentDateTime();
  229. listRoomFaceInfo.push_back(rfi);
  230. }
  231. /* 将人员信息加入到列表中,添加时会先查找有没有相同的信息 */
  232. for(auto& it0 : info.vecPersonInfo)
  233. {
  234. if(!p->findPersonInfo(it0))
  235. {
  236. p->listPersonInfo.push_back(it0);
  237. }
  238. }
  239. }
  240. RoomFaceInfo* ListRoomFaceInfo::findRoomFaceInfo(RoomFaceInfo& info)
  241. {
  242. for(auto& it0 : listRoomFaceInfo)
  243. {
  244. if(it0.ChannelID == info.ChannelID && it0.RoomID == info.RoomID && it0.CameraID == info.CameraID)
  245. {
  246. return &it0;
  247. }
  248. }
  249. return nullptr;
  250. }
  251. /* 查找有没有相同的结构 */
  252. RoomFaceInfo* ListRoomFaceInfo::findRoomFaceInfo(int ChannelID, int RoomID, int CameraID)
  253. {
  254. for(auto& it0 : listRoomFaceInfo)
  255. {
  256. if(it0.ChannelID == ChannelID && it0.RoomID == RoomID && it0.CameraID == CameraID)
  257. {
  258. return &it0;
  259. }
  260. }
  261. return nullptr;
  262. }
  263. IllegalInvasionInfo::IllegalInvasionInfo(const IllegalInvasionInfo& other)
  264. {
  265. isInsertEQM = other.isInsertEQM;
  266. PKID = other.PKID;
  267. CameraID = other.CameraID;
  268. RoomID = other.RoomID;
  269. ChannelID = other.ChannelID;
  270. RoomType = other.RoomType;
  271. FirstTime = other.FirstTime;
  272. strActionDec = other.strActionDec;
  273. strImageInfo = other.strImageInfo;
  274. }
  275. IllegalInvasionInfo& IllegalInvasionInfo::operator=(const IllegalInvasionInfo& other)
  276. {
  277. if(this != &other)
  278. {
  279. isInsertEQM = other.isInsertEQM;
  280. PKID = other.PKID;
  281. CameraID = other.CameraID;
  282. RoomID = other.RoomID;
  283. ChannelID = other.ChannelID;
  284. RoomType = other.RoomType;
  285. FirstTime = other.FirstTime;
  286. strActionDec = other.strActionDec;
  287. strImageInfo = other.strImageInfo;
  288. }
  289. return *this;
  290. }
  291. /* 添加信息 */
  292. void ListIllegalInvasionInfo::addIllInfo(IllegalInvasionInfo& info)
  293. {
  294. if(findIllInfo(info) == nullptr)
  295. {
  296. listIll.push_back(info);
  297. }
  298. }
  299. /* 查找相同的信息 */
  300. IllegalInvasionInfo* ListIllegalInvasionInfo::findIllInfo(IllegalInvasionInfo& info)
  301. {
  302. for(auto& it : listIll)
  303. {
  304. if(it.RoomID == info.RoomID && it.RoomType == info.RoomType)
  305. {
  306. return &it;
  307. }
  308. }
  309. return nullptr;
  310. }
  311. IllegalInvasionInfo* ListIllegalInvasionInfo::findIllInfo(int roomID, int roomType)
  312. {
  313. for(auto& it : listIll)
  314. {
  315. if(it.RoomID == roomID && it.RoomType == roomType)
  316. {
  317. return &it;
  318. }
  319. }
  320. return nullptr;
  321. }
  322. /* 删除报警信息 */
  323. void ListIllegalInvasionInfo::deleteIllInfo(IllegalInvasionInfo& info)
  324. {
  325. for(auto it = listIll.begin(); it != listIll.end();)
  326. {
  327. if(it->RoomID == info.RoomID && it->RoomType == info.RoomType)
  328. {
  329. it = listIll.erase(it);
  330. }else {
  331. ++it;
  332. }
  333. }
  334. }
  335. void ListIllegalInvasionInfo::deleteIllInfo(int roomID, int roomType)
  336. {
  337. for(auto it = listIll.begin(); it != listIll.end();)
  338. {
  339. if(it->RoomID == roomID && it->RoomType == roomType)
  340. {
  341. it = listIll.erase(it);
  342. }else {
  343. ++it;
  344. }
  345. }
  346. }
  347. RoomIllegalInvasionInfo::RoomIllegalInvasionInfo(const RoomIllegalInvasionInfo& o)
  348. {
  349. isAlarm = o.isAlarm;
  350. RoomID = o.RoomID;
  351. RoomType = o.RoomType;
  352. numMaxFace = o.numMaxFace;
  353. numMaxPerson = o.numMaxPerson;
  354. strBoxList = o.strBoxList;
  355. strMessage = o.strMessage;
  356. strImage = o.strImage;
  357. CameraID = o.CameraID;
  358. }
  359. RoomIllegalInvasionInfo& RoomIllegalInvasionInfo::operator=(const RoomIllegalInvasionInfo& o)
  360. {
  361. if(this != &o) {
  362. isAlarm = o.isAlarm;
  363. RoomID = o.RoomID;
  364. RoomType = o.RoomType;
  365. numMaxFace = o.numMaxFace;
  366. numMaxPerson = o.numMaxPerson;
  367. strBoxList = o.strBoxList;
  368. strMessage = o.strMessage;
  369. strImage = o.strImage;
  370. CameraID = o.CameraID;
  371. }
  372. return *this;
  373. }
  374. /* 添加房间 */
  375. void ListRoomIll::addRoom(int RoomID, int RoomType)
  376. {
  377. auto p = findRoom(RoomID, RoomType);
  378. if(p == nullptr)
  379. {
  380. RoomIllegalInvasionInfo ill;
  381. ill.RoomID = RoomID;
  382. ill.RoomType = RoomType;
  383. listRoomIll.push_back(ill);
  384. }
  385. }
  386. /* 查找是否有相同的房间 */
  387. RoomIllegalInvasionInfo* ListRoomIll::findRoom(int RoomID, int RoomType)
  388. {
  389. for(auto& it : listRoomIll)
  390. {
  391. if(it.RoomID == RoomID && it.RoomType == RoomType)
  392. {
  393. return &it;
  394. }
  395. }
  396. return nullptr;
  397. }
  398. PersonCountRuleInfo::PersonCountRuleInfo()
  399. {
  400. ChannelID = -1;
  401. week = 0;
  402. RuleType = 0;
  403. LiveMinEnable = false;
  404. LiveMaxEnable = false;
  405. DicMinEnable = false;
  406. DicMaxEnable = false;
  407. LiveDicMinEnable = false;
  408. LiveDicMaxEnable = false;
  409. LiveMin = 0;
  410. LiveMax = 0;
  411. DicMin = 0;
  412. DicMax = 0;
  413. LiveDicMin = 0;
  414. LiveDicMax = 0;
  415. RuleName = "";
  416. }
  417. PersonCountRuleInfo& PersonCountRuleInfo::operator=(PersonCountRuleInfo& other)
  418. {
  419. if(this != &other)
  420. {
  421. ChannelID = other.ChannelID;
  422. week = other.week;
  423. RuleType = other.RuleType;
  424. PeriodName = other.PeriodName;
  425. StartTime = other.StartTime;
  426. EndTime = other.EndTime;
  427. LiveMinEnable = other.LiveMinEnable;
  428. LiveMaxEnable = other.LiveMaxEnable;
  429. DicMinEnable = other.DicMinEnable;
  430. DicMaxEnable = other.DicMaxEnable;
  431. LiveDicMinEnable = other.LiveDicMinEnable;
  432. LiveDicMaxEnable = other.LiveDicMaxEnable;
  433. LiveMin = other.LiveMin;
  434. LiveMax = other.LiveMax;
  435. DicMin = other.DicMin;
  436. DicMax = other.DicMax;
  437. LiveDicMin = other.LiveDicMin;
  438. LiveDicMax = other.LiveDicMax;
  439. RuleName = other.RuleName;
  440. }
  441. return *this;
  442. }
  443. /* ====================================================================================
  444. * ************************** ListActionInfo成员函数 ****************************
  445. * ====================================================================================*/
  446. ActionInfo::ActionInfo()
  447. {
  448. RunState = RunTimeState::RUN_STATE_INIT;
  449. ChannelID = -1;
  450. RoomID = -1;
  451. CameraID = -1;
  452. RoomType = -1;
  453. ActionID = "";
  454. strRoomName = "";
  455. strActionName = "";
  456. }
  457. ActionInfo& ActionInfo::operator=(const ActionInfo& other)
  458. {
  459. if (this != &other)
  460. {
  461. ChannelID = other.ChannelID;
  462. RoomID = other.RoomID;
  463. CameraID = other.CameraID;
  464. ActionID = other.ActionID;
  465. strRoomName = other.strRoomName;
  466. RoomType = other.RoomType;
  467. }
  468. return *this;
  469. }
  470. bool ActionInfo::operator==(const ActionInfo& other)
  471. {
  472. if(ChannelID != other.ChannelID) {
  473. return false;
  474. }
  475. if(RoomID != other.RoomID) {
  476. return false;
  477. }
  478. if(CameraID != other.CameraID) {
  479. return false;
  480. }
  481. if(ActionID != other.ActionID) {
  482. return false;
  483. }
  484. if(RoomType != other.RoomType) {
  485. return false;
  486. }
  487. return true;
  488. }
  489. /* 对比除摄像机外的基础信息是否相等 */
  490. bool ActionInfo::isEqualBaseInfo(const ActionInfo& other)
  491. {
  492. if(ChannelID != other.ChannelID) {
  493. return false;
  494. }
  495. if(RoomID != other.RoomID) {
  496. return false;
  497. }
  498. if(ActionID != other.ActionID) {
  499. return false;
  500. }
  501. if(RoomType != other.RoomType) {
  502. return false;
  503. }
  504. return true;
  505. }
  506. /* 添加关联信息,会自动进行重复判断,如果已有相同的信息,则跳过 */
  507. bool ListActionInfo::insertActionInfo(ActionInfo* info)
  508. {
  509. /* 先判断是否已经在列表中了 */
  510. if(findActionInList(info) == nullptr)
  511. {
  512. ActionInfo* pActionInfo = new ActionInfo;
  513. *pActionInfo = *info;
  514. listActionInfo.push_back(pActionInfo);
  515. }
  516. return true;
  517. }
  518. /* 删除信息 */
  519. bool ListActionInfo::deleteActionInfo(ActionInfo* info)
  520. {
  521. if(info == nullptr)
  522. {
  523. return false;
  524. }
  525. if(findActionInList(info) != nullptr)
  526. {
  527. listActionInfo.remove(info);
  528. delete info;
  529. info = nullptr;
  530. }
  531. return true;
  532. }
  533. /* 给算法添加摄像机,原有的会被替换掉 */
  534. bool ListActionInfo::addActionCamera(ActionInfo* pInfo)
  535. {
  536. auto pActionInfo = findActionIDInListNoCamera(pInfo);
  537. if(pActionInfo != nullptr)
  538. {
  539. pActionInfo->CameraID = pInfo->CameraID;
  540. }
  541. return true;
  542. }
  543. /* 清空算法中的摄像机信息 */
  544. void ListActionInfo::clearCameraList()
  545. {
  546. for(auto& it0 : listActionInfo)
  547. {
  548. it0->CameraID = -1;
  549. }
  550. }
  551. /* 清空设置成STOP或ERROR的Action */
  552. void ListActionInfo::clearStopAction()
  553. {
  554. for(auto it0 = listActionInfo.begin(); it0 != listActionInfo.end();)
  555. {
  556. if(( (*it0)->RunState == RunTimeState::RUN_STATE_STOP) || ((*it0)->RunState == RunTimeState::RUN_STATE_ERROR))
  557. {
  558. delete *it0;
  559. it0 = listActionInfo.erase(it0);
  560. }else {
  561. ++it0;
  562. }
  563. }
  564. }
  565. /* 查找算法ID是否已在列表中 */
  566. ActionInfo* ListActionInfo::findActionInList(ActionInfo* pInfo)
  567. {
  568. for(const auto& it0 : listActionInfo)
  569. {
  570. if(*it0 == *pInfo)
  571. {
  572. return it0;
  573. }
  574. }
  575. return nullptr;
  576. }
  577. /* 查找算法ID是否在列表中,这里查找不会对比摄像机ID */
  578. ActionInfo* ListActionInfo::findActionIDInListNoCamera(ActionInfo* pInfo)
  579. {
  580. for(const auto& it0 : listActionInfo)
  581. {
  582. if(it0->isEqualBaseInfo(*pInfo))
  583. {
  584. return it0;
  585. }
  586. }
  587. return nullptr;
  588. }
  589. /* 清空容器 */
  590. void ListActionInfo::clear()
  591. {
  592. for(auto& it0 : listActionInfo)
  593. {
  594. delete it0;
  595. it0 = nullptr;
  596. }
  597. listActionInfo.clear();
  598. }
  599. /* ====================================================================================
  600. * *********************** ListRoomActionInfo成员函数 ***************************
  601. * ====================================================================================*/
  602. /* 对比频道信息、房间信息、算法ID是否相等 */
  603. bool RoomActionInfo::isEqualBaseInfo(const RoomActionInfo& other)
  604. {
  605. if(ChannelID != other.ChannelID) {
  606. return false;
  607. }
  608. if(RoomID != other.RoomID) {
  609. return false;
  610. }
  611. if(ActionID != other.ActionID) {
  612. return false;
  613. }
  614. if(RoomType != other.RoomType) {
  615. return false;
  616. }
  617. return true;
  618. }
  619. /* 添加关联信息,会自动进行重复判断,如果已有相同的room和action关联信息,则跳过 */
  620. bool ListRoomActionInfo::insertRoomActionInfo(const RoomActionInfo& info)
  621. {
  622. /* 先判断是否已经在列表中了 */
  623. if(findActionIDInList(info.ChannelID, info.RoomID, info.ActionID) == nullptr)
  624. {
  625. RoomActionInfo* pRoomActionInfo = new RoomActionInfo;
  626. *pRoomActionInfo = info;
  627. listRoomActionInfo.push_back(pRoomActionInfo);
  628. }
  629. return true;
  630. }
  631. /* 添加关联信息,会自动进行重复判断,如果已有相同的room和action关联信息,则跳过 */
  632. bool ListRoomActionInfo::insertRoomActionInfo(const int ChannelID, const int RoomID, const std::string& strActionID)
  633. {
  634. /* 先判断是否已经在列表中了 */
  635. if(findActionIDInList(ChannelID, RoomID, strActionID) == nullptr)
  636. {
  637. RoomActionInfo* pRoomActionInfo = new RoomActionInfo;
  638. pRoomActionInfo->RoomID = RoomID;
  639. pRoomActionInfo->ActionID = strActionID;
  640. listRoomActionInfo.push_back(pRoomActionInfo);
  641. }
  642. return true;
  643. }
  644. /* 删除一个容器,注意,这个不能在别的for循环中删除,只能单独删除 */
  645. bool ListRoomActionInfo::deleteRoomActionInfo(RoomActionInfo* pInfo)
  646. {
  647. if(pInfo == nullptr)
  648. {
  649. return false;
  650. }
  651. for(auto it0 = listRoomActionInfo.begin(); it0 != listRoomActionInfo.end(); ++it0)
  652. {
  653. if(*it0 == pInfo)
  654. {
  655. listRoomActionInfo.erase(it0);
  656. delete pInfo;
  657. pInfo = nullptr;
  658. return true;
  659. }
  660. }
  661. return false;
  662. }
  663. /* 清空容器 */
  664. void ListRoomActionInfo::clear()
  665. {
  666. for(auto& it0 : listRoomActionInfo)
  667. {
  668. delete it0;
  669. it0 = nullptr;
  670. }
  671. listRoomActionInfo.clear();
  672. }
  673. /* 添加算法信息,根据传入的算法信息,自动将其加入到对应的容器中 */
  674. void ListRoomActionInfo::addActionInfo(const ActionInfo& info)
  675. {
  676. auto pRAInfo = findActionIDInList(info.ChannelID, info.RoomID, info.ActionID);
  677. if(pRAInfo != nullptr)
  678. {
  679. pRAInfo->listCameraID.push_back(info.CameraID);
  680. }else {
  681. RoomActionInfo* pRoomActionInfo = new RoomActionInfo;
  682. pRoomActionInfo->ChannelID = info.ChannelID;
  683. pRoomActionInfo->RoomID = info.RoomID;
  684. pRoomActionInfo->ActionID = info.ActionID;
  685. pRoomActionInfo->RoomType = info.RoomType;
  686. pRoomActionInfo->strRoomName = info.strRoomName;
  687. pRoomActionInfo->listCameraID.push_back(info.CameraID);
  688. listRoomActionInfo.push_back(pRoomActionInfo);
  689. }
  690. }
  691. /* 清空算法对应的摄像机列表 */
  692. void ListRoomActionInfo::clearCameraList()
  693. {
  694. for(auto& it0 : listRoomActionInfo)
  695. {
  696. it0->listCameraID.clear();
  697. }
  698. }
  699. /* 清理设置为STOP或者ERROR的RoomAction */
  700. // void ListRoomActionInfo::clearStopRoomAction()
  701. // {
  702. // for(auto it0 = listRoomActionInfo.begin(); it0 != listRoomActionInfo.end();)
  703. // {
  704. // if(( (*it0)->RunState == RunTimeState::RUN_STATE_STOP) || ((*it0)->RunState == RunTimeState::RUN_STATE_ERROR))
  705. // {
  706. // delete *it0;
  707. // it0 = listRoomActionInfo.erase(it0);
  708. // }else {
  709. // ++it0;
  710. // }
  711. // }
  712. // }
  713. /* 查找算法ID是否已在列表中 */
  714. RoomActionInfo* ListRoomActionInfo::findActionIDInList(const int chnID, const int RoomID, const std::string& strActionID)
  715. {
  716. for(const auto& it0 : listRoomActionInfo)
  717. {
  718. if((it0->RoomID == RoomID) && (it0->ActionID == strActionID) && (it0->ChannelID == chnID))
  719. {
  720. return it0;
  721. }
  722. }
  723. return nullptr;
  724. }
  725. FuncActionInfo::FuncActionInfo()
  726. {
  727. ChannelID = -1;
  728. appFunction = AppFunction::APP_NONE;
  729. RunState = RunTimeState::RUN_STATE_NONE;
  730. strFunctionName = "";
  731. StartTime = QDateTime::currentDateTime();
  732. EndTime = QDateTime::currentDateTime();
  733. listRoomCamActInfo.clear();
  734. }
  735. FuncActionInfo& FuncActionInfo::operator=(FuncActionInfo& other)
  736. {
  737. if(this != &other)
  738. {
  739. ChannelID = other.ChannelID;
  740. appFunction = other.appFunction;
  741. RunState = other.RunState;
  742. strFunctionName = other.strFunctionName;
  743. StartTime = other.StartTime;
  744. EndTime = other.EndTime;
  745. listRoomCamActInfo = other.listRoomCamActInfo;
  746. }
  747. return *this;
  748. }
  749. /* 添加算法信息 */
  750. bool FuncActionInfo::addActionInfo(const ActionInfo& info)
  751. {
  752. /* 根据此类的功能,添加算法信息 */
  753. if(appFunction == AppFunction::APP_NONE)
  754. {
  755. return false;
  756. }
  757. /* 将其添加到对应的房间 */
  758. bool isFind = false;
  759. for(auto& it0 : listRoomCamActInfo)
  760. {
  761. if((it0.RoomID == info.RoomID) && (it0.RoomType == info.RoomType))
  762. {
  763. isFind = true;
  764. it0.mapCameraAction.insert(std::make_pair(info.CameraID, info.ActionID));
  765. }
  766. }
  767. /* 没找到这个房间,就创建 */
  768. if(!isFind)
  769. {
  770. RoomCamActInfo roomCamActInfo;
  771. roomCamActInfo.RoomID = info.RoomID;
  772. roomCamActInfo.RoomType = info.RoomType;
  773. roomCamActInfo.mapCameraAction.insert(std::make_pair(info.CameraID, info.ActionID));
  774. listRoomCamActInfo.push_back(roomCamActInfo);
  775. }
  776. return true;
  777. }
  778. /* 清空算法信息 */
  779. void FuncActionInfo::clearActionList()
  780. {
  781. listRoomCamActInfo.clear();
  782. }
  783. /**
  784. * @brief 添加应用信息,一个应用功能在一个频道内只有一个实例
  785. * 这里是添加应用功能和时间段信息
  786. *
  787. * @param func
  788. * @return true
  789. * @return false
  790. */
  791. bool ListFuncActInfo::addFuncActionInfo(const AppAndTimeInfo& func)
  792. {
  793. if(func.AppType == 0)
  794. {
  795. return false;
  796. }
  797. /* 解出这条信息里包含几个App,AppType按位计算,总共8个应用信息 */
  798. for(int i = 0; i < 8; ++i)
  799. {
  800. if(func.AppType & 0x01)
  801. {
  802. /* 查找有没有这个应用 */
  803. auto pFuncActionInfo = findAppFunction(func.ChannelID, AppFunction::APP_ONWORK);
  804. if(pFuncActionInfo != nullptr)
  805. {
  806. /* 更新时间信息 */
  807. pFuncActionInfo->StartTime = func.StartTime;
  808. pFuncActionInfo->EndTime = func.EndTime;
  809. continue;
  810. }
  811. FuncActionInfo* fa = new FuncActionInfo;
  812. fa->ChannelID = func.ChannelID;
  813. fa->appFunction = AppFunction::APP_ONWORK;
  814. fa->strFunctionName = "人员在岗识别";
  815. fa->StartTime = func.StartTime;
  816. fa->EndTime = func.EndTime;
  817. listFuncActionInfo.push_back(fa);
  818. }
  819. else if(func.AppType & 0x02)
  820. {
  821. auto pFuncActionInfo = findAppFunction(func.ChannelID, AppFunction::APP_CONTRABAND);
  822. if(pFuncActionInfo != nullptr)
  823. {
  824. /* 更新时间信息 */
  825. pFuncActionInfo->StartTime = func.StartTime;
  826. pFuncActionInfo->EndTime = func.EndTime;
  827. continue;
  828. }
  829. FuncActionInfo* fa = new FuncActionInfo;
  830. fa->ChannelID = func.ChannelID;
  831. fa->appFunction = AppFunction::APP_CONTRABAND;
  832. fa->strFunctionName = "违禁品识别";
  833. fa->StartTime = func.StartTime;
  834. fa->EndTime = func.EndTime;
  835. listFuncActionInfo.push_back(fa);
  836. }
  837. else if (func.AppType & 0x04)
  838. {
  839. auto pFuncActionInfo = findAppFunction(func.ChannelID, AppFunction::APP_ILLEGAL);
  840. if(pFuncActionInfo != nullptr)
  841. {
  842. /* 更新时间信息 */
  843. pFuncActionInfo->StartTime = func.StartTime;
  844. pFuncActionInfo->EndTime = func.EndTime;
  845. continue;
  846. }
  847. FuncActionInfo* fa = new FuncActionInfo;
  848. fa->ChannelID = func.ChannelID;
  849. fa->appFunction = AppFunction::APP_ILLEGAL;
  850. fa->strFunctionName = "非法入侵检测";
  851. fa->StartTime = func.StartTime;
  852. fa->EndTime = func.EndTime;
  853. listFuncActionInfo.push_back(fa);
  854. }
  855. else if (func.AppType & 0x08)
  856. {
  857. auto pFuncActionInfo = findAppFunction(func.ChannelID, AppFunction::APP_FATIGUE);
  858. if(pFuncActionInfo != nullptr)
  859. {
  860. /* 更新时间信息 */
  861. pFuncActionInfo->StartTime = func.StartTime;
  862. pFuncActionInfo->EndTime = func.EndTime;
  863. continue;
  864. }
  865. FuncActionInfo* fa = new FuncActionInfo;
  866. fa->ChannelID = func.ChannelID;
  867. fa->appFunction = AppFunction::APP_FATIGUE;
  868. fa->strFunctionName = "疲劳检测";
  869. fa->StartTime = func.StartTime;
  870. fa->EndTime = func.EndTime;
  871. listFuncActionInfo.push_back(fa);
  872. }
  873. else if (func.AppType & 0x10)
  874. {
  875. auto pFuncActionInfo = findAppFunction(func.ChannelID, AppFunction::APP_REGIONAL);
  876. if(pFuncActionInfo != nullptr)
  877. {
  878. /* 更新时间信息 */
  879. pFuncActionInfo->StartTime = func.StartTime;
  880. pFuncActionInfo->EndTime = func.EndTime;
  881. continue;
  882. }
  883. FuncActionInfo* fa = new FuncActionInfo;
  884. fa->ChannelID = func.ChannelID;
  885. fa->appFunction = AppFunction::APP_REGIONAL;
  886. fa->strFunctionName = "区域人员检测";
  887. fa->StartTime = func.StartTime;
  888. fa->EndTime = func.EndTime;
  889. listFuncActionInfo.push_back(fa);
  890. }
  891. else if (func.AppType & 0x20)
  892. {
  893. auto pFuncActionInfo = findAppFunction(func.ChannelID, AppFunction::APP_MOUSE);
  894. if(pFuncActionInfo != nullptr)
  895. {
  896. /* 更新时间信息 */
  897. pFuncActionInfo->StartTime = func.StartTime;
  898. pFuncActionInfo->EndTime = func.EndTime;
  899. continue;
  900. }
  901. FuncActionInfo* fa = new FuncActionInfo;
  902. fa->ChannelID = func.ChannelID;
  903. fa->appFunction = AppFunction::APP_MOUSE;
  904. fa->strFunctionName = "老鼠识别";
  905. fa->StartTime = func.StartTime;
  906. fa->EndTime = func.EndTime;
  907. listFuncActionInfo.push_back(fa);
  908. }
  909. else if (func.AppType & 0x40)
  910. {
  911. auto pFuncActionInfo = findAppFunction(func.ChannelID, AppFunction::APP_PLAYPHONE);
  912. if(pFuncActionInfo != nullptr)
  913. {
  914. /* 更新时间信息 */
  915. pFuncActionInfo->StartTime = func.StartTime;
  916. pFuncActionInfo->EndTime = func.EndTime;
  917. continue;
  918. }
  919. FuncActionInfo* fa = new FuncActionInfo;
  920. fa->ChannelID = func.ChannelID;
  921. fa->appFunction = AppFunction::APP_PLAYPHONE;
  922. fa->strFunctionName = "玩手机识别";
  923. fa->StartTime = func.StartTime;
  924. fa->EndTime = func.EndTime;
  925. listFuncActionInfo.push_back(fa);
  926. }
  927. else if (func.AppType & 0x80)
  928. {
  929. auto pFuncActionInfo = findAppFunction(func.ChannelID, AppFunction::APP_NOMASK);
  930. if(pFuncActionInfo != nullptr)
  931. {
  932. /* 更新时间信息 */
  933. pFuncActionInfo->StartTime = func.StartTime;
  934. pFuncActionInfo->EndTime = func.EndTime;
  935. continue;
  936. }
  937. FuncActionInfo* fa = new FuncActionInfo;
  938. fa->ChannelID = func.ChannelID;
  939. fa->appFunction = AppFunction::APP_NOMASK;
  940. fa->strFunctionName = "未戴口罩识别";
  941. fa->StartTime = func.StartTime;
  942. fa->EndTime = func.EndTime;
  943. listFuncActionInfo.push_back(fa);
  944. }
  945. else if (func.AppType & 0x0100)
  946. {
  947. auto pFuncActionInfo = findAppFunction(func.ChannelID, AppFunction::APP_ALLDOWN);
  948. if(pFuncActionInfo != nullptr)
  949. {
  950. /* 更新时间信息 */
  951. pFuncActionInfo->StartTime = func.StartTime;
  952. pFuncActionInfo->EndTime = func.EndTime;
  953. continue;
  954. }
  955. FuncActionInfo* fa = new FuncActionInfo;
  956. fa->ChannelID = func.ChannelID;
  957. fa->appFunction = AppFunction::APP_ALLDOWN;
  958. fa->strFunctionName = "摔倒识别";
  959. fa->StartTime = func.StartTime;
  960. fa->EndTime = func.EndTime;
  961. listFuncActionInfo.push_back(fa);
  962. }
  963. }
  964. return true;
  965. }
  966. /**
  967. * @brief 添加算法信息,根据传进来的算法ID,将其加入到对应的功能中
  968. *
  969. * @param info
  970. * @return true
  971. * @return false
  972. */
  973. bool ListFuncActInfo::addActionInfo(const ActionInfo& info)
  974. {
  975. if(info.ActionID.empty())
  976. {
  977. return false;
  978. }
  979. /* 人脸识别算法(人员在岗识别、非法入侵检测需要) */
  980. if(info.ActionID == g_actionList.ActFace)
  981. {
  982. /* 人员在岗识别 */
  983. auto pFuncActionInfo = findAppFunction(info.ChannelID, AppFunction::APP_ONWORK);
  984. if(pFuncActionInfo != nullptr)
  985. {
  986. pFuncActionInfo->addActionInfo(info);
  987. }
  988. /* 非法入侵检测 */
  989. pFuncActionInfo = findAppFunction(info.ChannelID, AppFunction::APP_ILLEGAL);
  990. if(pFuncActionInfo != nullptr)
  991. {
  992. pFuncActionInfo->addActionInfo(info);
  993. }
  994. }
  995. /* 人员计数 */
  996. else if (info.ActionID == g_actionList.ActPersonNumber)
  997. {
  998. auto pFuncActionInfo = findAppFunction(info.ChannelID, AppFunction::APP_REGIONAL);
  999. if(pFuncActionInfo != nullptr)
  1000. {
  1001. pFuncActionInfo->addActionInfo(info);
  1002. }
  1003. }
  1004. /* 违禁物品 */
  1005. else if (info.ActionID == g_actionList.ActContraband)
  1006. {
  1007. auto pFuncActionInfo = findAppFunction(info.ChannelID, AppFunction::APP_CONTRABAND);
  1008. if(pFuncActionInfo != nullptr)
  1009. {
  1010. pFuncActionInfo->addActionInfo(info);
  1011. }
  1012. }
  1013. /* 玩手机 */
  1014. else if (info.ActionID == g_actionList.ActPlayPhone)
  1015. {
  1016. auto pFuncActionInfo = findAppFunction(info.ChannelID, AppFunction::APP_PLAYPHONE);
  1017. if(pFuncActionInfo != nullptr)
  1018. {
  1019. pFuncActionInfo->addActionInfo(info);
  1020. }
  1021. }
  1022. /* 睡岗识别 */
  1023. else if (info.ActionID == g_actionList.ActSleep)
  1024. {
  1025. auto pFuncActionInfo = findAppFunction(info.ChannelID, AppFunction::APP_FATIGUE);
  1026. if(pFuncActionInfo != nullptr)
  1027. {
  1028. pFuncActionInfo->addActionInfo(info);
  1029. }
  1030. }
  1031. /* 疲劳检测 */
  1032. else if(info.ActionID == g_actionList.ActFatigueDetection)
  1033. {
  1034. auto pFuncActionInfo = findAppFunction(info.ChannelID, AppFunction::APP_FATIGUE);
  1035. if(pFuncActionInfo != nullptr)
  1036. {
  1037. pFuncActionInfo->addActionInfo(info);
  1038. }
  1039. }
  1040. /* 动物识别 */
  1041. else if (info.ActionID == g_actionList.ActAnimalDetect)
  1042. {
  1043. auto pFuncActionInfo = findAppFunction(info.ChannelID, AppFunction::APP_MOUSE);
  1044. if(pFuncActionInfo != nullptr)
  1045. {
  1046. pFuncActionInfo->addActionInfo(info);
  1047. }
  1048. }
  1049. /* 老鼠识别 */
  1050. else if (info.ActionID == g_actionList.ActMouseDetect)
  1051. {
  1052. auto pFuncActionInfo = findAppFunction(info.ChannelID, AppFunction::APP_MOUSE);
  1053. if(pFuncActionInfo != nullptr)
  1054. {
  1055. pFuncActionInfo->addActionInfo(info);
  1056. }
  1057. }
  1058. /* 口罩识别 */
  1059. else if (info.ActionID == g_actionList.ActMask)
  1060. {
  1061. auto pFuncActionInfo = findAppFunction(info.ChannelID, AppFunction::APP_NOMASK);
  1062. if(pFuncActionInfo != nullptr)
  1063. {
  1064. pFuncActionInfo->addActionInfo(info);
  1065. }
  1066. }
  1067. else {
  1068. SPDLOG_WARN("未知的算法ID: {}", info.ActionID);
  1069. return false;
  1070. }
  1071. return true;
  1072. }
  1073. /**
  1074. * @brief 清空无用的功能信息
  1075. * 摄像机和算法信息为空的,或者运行状态为STOP,都会被清理掉
  1076. *
  1077. */
  1078. void ListFuncActInfo::clearNoneFuncActionInfo()
  1079. {
  1080. for(auto it0 = listFuncActionInfo.begin(); it0 != listFuncActionInfo.end();)
  1081. {
  1082. if((*it0)->listRoomCamActInfo.empty() || ((*it0)->RunState == RunTimeState::RUN_STATE_STOP))
  1083. {
  1084. delete *it0;
  1085. it0 = listFuncActionInfo.erase(it0);
  1086. }else {
  1087. ++it0;
  1088. }
  1089. }
  1090. }
  1091. /* 清空算法列表 */
  1092. void ListFuncActInfo::clearActionList()
  1093. {
  1094. for(auto& it0 : listFuncActionInfo)
  1095. {
  1096. it0->listRoomCamActInfo.clear();
  1097. }
  1098. }
  1099. /* 查找应用信息 */
  1100. bool ListFuncActInfo::findAppFunction(const AppFunction func)
  1101. {
  1102. for(const auto& it0 : listFuncActionInfo)
  1103. {
  1104. if(it0->appFunction == func)
  1105. {
  1106. return true;
  1107. }
  1108. }
  1109. return false;
  1110. }
  1111. /* 根据频率和功能查找实例 */
  1112. FuncActionInfo* ListFuncActInfo::findAppFunction(const int ChannelID, const AppFunction func)
  1113. {
  1114. for(const auto& it0 : listFuncActionInfo)
  1115. {
  1116. if( (it0->appFunction == func) && (it0->ChannelID == ChannelID) )
  1117. {
  1118. return it0;
  1119. }
  1120. }
  1121. return nullptr;
  1122. }
  1123. /**
  1124. * @brief 查找这个应用信息
  1125. *
  1126. * @param func
  1127. * @return FuncActionInfo*
  1128. */
  1129. FuncActionInfo* ListFuncActInfo::findAppFunction(const FuncActionInfo& func)
  1130. {
  1131. for(const auto& it0 : listFuncActionInfo)
  1132. {
  1133. if(it0->ChannelID == func.ChannelID && it0->appFunction == func.appFunction)
  1134. {
  1135. return it0;
  1136. }
  1137. }
  1138. return nullptr;
  1139. }
  1140. /* ====================================================================================
  1141. * ************************** GlobalConfig成员函数 ******************************
  1142. * ====================================================================================*/
  1143. /* 创建实例 */
  1144. GlobalConfig g_config;
  1145. GlobalConfig::GlobalConfig()
  1146. {
  1147. ThreadSleepMS = 300;
  1148. }
  1149. /* 读取配置文件 */
  1150. bool GlobalConfig::readConfig(const QString& strConfigFile)
  1151. {
  1152. if(strConfigFile.isEmpty())
  1153. {
  1154. SPDLOG_ERROR("读取配置文件失败! 配置文件名为空");
  1155. return false;
  1156. }
  1157. SPDLOG_DEBUG("读取配置文件: {}", strConfigFile.toStdString());
  1158. QSettings settings(strConfigFile, QSettings::IniFormat);
  1159. settings.setIniCodec("UTF-8");
  1160. settings.beginGroup("System");
  1161. AppUpdateOnWorkTimeInterval = settings.value("WorkOnInfoSecond", 600).toInt(); /* 更新在岗信息的时间间隔 */
  1162. AppPeopleOnWork = settings.value("APPPEPOLEONWORK", 300).toInt(); /* 离岗时间 */
  1163. Contraband = settings.value("APPBADTHING", 50).toInt(); /* 违禁物品出现的时间 */
  1164. AppBadMan = settings.value("APPBADMAN", 50).toInt(); /* 非法入侵 */
  1165. AppTired = settings.value("APPTIRED", 50).toInt(); /* 疲劳检测时间 */
  1166. AppPeopleCont = settings.value("APPPEPOLECONT", 50).toInt(); /* 人员聚集时间 */
  1167. AppPlayPhone = settings.value("APPPLAYPHONE", 50).toInt(); /* 玩手机识别 */
  1168. AppMouse = settings.value("APPMOUSE", 50).toInt(); /* 手势识别 */
  1169. AppMask = settings.value("APPMASK", 5).toInt(); /* 戴口罩识别 */
  1170. CheckSet = settings.value("CHECKSET", 300).toInt(); /* 服务端多久检测一次配置 */
  1171. EventTimeValid = settings.value("EventTimeValid", 300).toInt(); /* 事件时间有效期 */
  1172. Key = settings.value("Key").toString().toStdString(); /* Key */
  1173. Secret = settings.value("Secret").toString().toStdString(); /* Secret */
  1174. settings.endGroup();
  1175. if(Key.empty() || Secret.empty())
  1176. {
  1177. SPDLOG_ERROR("读取配置文件失败! Key或Secret为空");
  1178. return false;
  1179. }
  1180. return true;
  1181. }
  1182. /* 打印读取到的值 */
  1183. void GlobalConfig::printValue()
  1184. {
  1185. SPDLOG_INFO("APPPEPOLEONWORK: {}", AppPeopleOnWork);
  1186. SPDLOG_INFO("APPBADTHING: {}", Contraband);
  1187. SPDLOG_INFO("APPBADMAN: {}", AppBadMan);
  1188. SPDLOG_INFO("APPTIRED: {}", AppTired);
  1189. SPDLOG_INFO("APPPEOPLECONT: {}", AppPeopleCont);
  1190. SPDLOG_INFO("APPPLAYPHONE: {}", AppPlayPhone);
  1191. SPDLOG_INFO("APPMOUSE: {}", AppMouse);
  1192. SPDLOG_INFO("APPMASK: {}", AppMask);
  1193. SPDLOG_INFO("CHECKSET: {}", CheckSet);
  1194. SPDLOG_INFO("EventTimeValid: {}", EventTimeValid);
  1195. }