From 0ad1516d29d13796ae2355d83b04cbc9a23cbc7d Mon Sep 17 00:00:00 2001 From: xuxiuxi <554325746@qq.com> Date: 星期五, 15 三月 2019 09:49:32 +0800 Subject: [PATCH] Merge branch 'yw.1.2.fixbug' of http://192.168.1.226:10010/r/development/c++ into yw.1.2.fixbug --- QiaoJiaSystem/FaceSearchServer/AlarmServer.hpp | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/QiaoJiaSystem/FaceSearchServer/AlarmServer.hpp b/QiaoJiaSystem/FaceSearchServer/AlarmServer.hpp index 1fe1b9c..811f78a 100644 --- a/QiaoJiaSystem/FaceSearchServer/AlarmServer.hpp +++ b/QiaoJiaSystem/FaceSearchServer/AlarmServer.hpp @@ -1,4 +1,5 @@ // +// 瀵规瘮鎶ヨ鐨勫熀绫� // Created by ps on 2/26/18. // @@ -13,6 +14,9 @@ #include <basic/util/thread/MultiThread.h> #include <basic/util/BASE64/Base64.h> +/*** + * 闇�瑕佸姣旂殑涓�鏉¤褰� + */ struct AlarmData { int num; std::string tableName; @@ -20,6 +24,9 @@ float threshold; }; +/*** + * 鏁版嵁搴撲腑鏌ヨ鐨勪竴鏉¤褰� + */ struct FeatureData { long face_id; std::string uuid; @@ -29,6 +36,11 @@ std::string idcard; }; +/*** + * 瀛楃涓叉牴鎹鍙峰垎鍓插苟杩斿洖鏁版嵁 + * @param str_list + * @return + */ static std::vector<std::string> AlarmServerPropertyAnalyseByComma(std::string str_list) { std::vector<std::string> result; char *property_list = const_cast<char *>(str_list.c_str()); @@ -60,6 +72,9 @@ CPU_Number = 1 }; +/*** + * 鎶ヨ鏈嶅姟鍩虹被 + */ class AlarmServer { public: @@ -77,11 +92,19 @@ dataRemoveBuffer.clear(); } + /*** + * 鍒濆鍖栨椂浣跨敤绾跨▼鍔犺浇鏁版嵁搴� + * @param str_config + */ void initDB(std::string str_config) { std::thread thd(loadDBCahce, this, str_config); thd.detach(); } + /*** + * 绉婚櫎鏁版嵁 + * @param key + */ void removeData(std::string key) { std::lock_guard<std::mutex> guard(dataRemoveBufferMtx); dataRemoveBuffer.insert(key); -- Gitblit v1.8.0