1
0

mine_business.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef __MINE__BUSINESS__HPP__
  2. #define __MINE__BUSINESS__HPP__
  3. #include <atomic>
  4. #include <ctime>
  5. #include <memory>
  6. #include "point.h"
  7. class staffer_num_business;
  8. class reverse_alarm_business;
  9. class rear_end_collision_prevented_business;
  10. class card_location_base;
  11. struct mine_business
  12. {
  13. mine_business(const mine_business&)=delete;
  14. mine_business & operator=(const mine_business&)=delete;
  15. static mine_business *inst();
  16. void run_business();
  17. //人员数量曲线功
  18. void fetch_add(bool);
  19. //天线反向功能
  20. void load();
  21. void make_reverse_condition(uint64_t type,uint32_t id,int32_t antid,uint32_t ct,uint64_t tof,uint32_t sid);
  22. //车辆防追尾告警
  23. void put(const std::shared_ptr<card_location_base>&);
  24. void make_arg(uint64_t cid,const point &p,uint64_t t);
  25. void clear_vehicle();
  26. uint32_t get_mine_display_staff_num();
  27. private:
  28. mine_business();
  29. void handle_reverse_alarm();
  30. void record_staffer_num();
  31. void handle_rear_end();
  32. std::unique_ptr<staffer_num_business> m_staffer_num_ptr;
  33. std::unique_ptr<reverse_alarm_business> m_reverse_alarm_ptr;
  34. std::unique_ptr<rear_end_collision_prevented_business> m_rear_ended_ptr;
  35. };
  36. #endif