area_business_person_dwell_checker.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. #ifndef _area_business_person_dwell_checker_hpp_
  2. #define _area_business_person_dwell_checker_hpp_
  3. #include"area_business.h"
  4. /*
  5. 判断当前区域a中的人卡停留时间
  6. 人员进入区域时间存储在area_hover对象中,在当前类on_enter/on_leave中进行更新
  7. 人员&车辆的代码重用,请自行设计
  8. */
  9. struct area_business_person_dwell_checker:area_business
  10. {
  11. int area_business_type()
  12. {
  13. return 2;
  14. }
  15. //服务器重启加载数据
  16. virtual void on_load_his(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr);
  17. //进入区域,记录进入时间
  18. void on_enter(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr);
  19. //判断是否超时
  20. void on_hover(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr);
  21. //如果有超时告警,取消超时告警
  22. void on_leave(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr);
  23. };
  24. #endif