Browse Source

增加
//区域速度门限
double m_over_speed_vehicle;

daiyueteng 6 years ago
parent
commit
834e34e2f8
2 changed files with 8 additions and 0 deletions
  1. 5 0
      area.cpp
  2. 3 0
      area.h

+ 5 - 0
area.cpp

@@ -315,6 +315,9 @@ void area_list::init_from_db(int id/*=-1*/)
         int over_time_vehicle = 0;
         DBRes.GetField( "over_time_vehicle",over_time_vehicle, Error );
 
+        double over_speed_vehicle=0;
+        DBRes.GetField( "over_speed_vehicle",over_speed_vehicle, Error );
+
         std::string path;
         DBRes.GetField( "path",path, Error );
 
@@ -331,6 +334,7 @@ void area_list::init_from_db(int id/*=-1*/)
             std::shared_ptr<area> ap = create(area_type_id,area_id,over_count_person,over_time_person, scale,map_id,b_type);
             ap->m_limit_vehicle_second = over_time_vehicle;
             ap->m_limit_vehicle_count = over_count_vehicle;
+            ap->m_over_speed_vehicle = over_speed_vehicle;
 
             ap->m_bound=init_path(path);
             for(const auto &p : ap->m_bound)
@@ -349,6 +353,7 @@ void area_list::init_from_db(int id/*=-1*/)
             }
             tmp_ptr->update(over_count_person, over_time_person,scale,map_id,area_type_id, over_count_vehicle,over_time_vehicle);
             tmp_ptr->m_bound=init_path(path);
+            tmp_ptr->m_over_speed_vehicle = over_speed_vehicle;
             for(const auto &p : tmp_ptr->m_bound)
                 log_info("point:area_id:%d--x:%.2f,y:%.2f",area_id,p.x,p.y);
 //               CheckAreaType(tmp_ptr,area_type_id,tmp_ptr->m_area_type);

+ 3 - 0
area.h

@@ -91,6 +91,9 @@ public:
     std::atomic<int> m_person_count;
     ///区域车卡数
     std::atomic<int> m_vehicle_count;
+
+    //区域速度门限
+    double m_over_speed_vehicle;
 };
 
 struct area_list:single_base<area_list,int,std::shared_ptr<area>>