Browse Source

三率告警回调设置

chensongchao 6 years ago
parent
commit
a89877cb8a
1 changed files with 4 additions and 4 deletions
  1. 4 4
      main.cpp

+ 4 - 4
main.cpp

@@ -27,11 +27,11 @@ void handlereader(uint32_t readerid,bool duration,uint32_t t)
 
 }
 //三率模块中告警回调
-/*void Handle_ThreeRates_Event_Callback(const int evType, const int evId, uint64_t id
+void Handle_ThreeRates_Event_Callback(const int evType, const int evId, uint64_t id
         , double limitVal, double curVal, bool bFalg)
 {
-
-}*/
+    event_tool::instance()->handle_event(evType,evId,id,limitVal,curVal,bFalg);
+}
 
 struct Init_Setting
 {
@@ -89,7 +89,7 @@ struct Init_Setting
 		std_info("three_rates ...................");
 		init_para ip;
 		ip.send_pt = handlereader;
-		ip.driving_face_alarm = nullptr;//Handle_ThreeRates_Event_Callback;
+		ip.driving_face_alarm = Handle_ThreeRates_Event_Callback;
 		three_rates::get_instance()->init(ip,dbs);
 		three_rates::get_instance()->start();
 	}