StoreProcessTask.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // Created by zx on 2020/7/7.
  3. //
  4. #ifndef NNXX_TESTS_STOREPROCESS_H
  5. #define NNXX_TESTS_STOREPROCESS_H
  6. #include <parkspace_allocation_message.pb.h>
  7. #include "TaskQueue/BaseTask.h"
  8. #include "Locate_communicator.h"
  9. class StoreProcessTask :public tq::BaseTask{
  10. public:
  11. StoreProcessTask();
  12. virtual ~StoreProcessTask();
  13. Error_manager init_task(unsigned int command_id, unsigned int terminor_id,
  14. message::Locate_information locate_info,message::Car_info car_info);
  15. /*
  16. * 分配车位
  17. */
  18. Error_manager alloc_space();
  19. protected:
  20. virtual void Main();
  21. /*
  22. * 定位
  23. */
  24. Error_manager locate_step();
  25. /*
  26. * 车位解锁,当停车失败时需要车位解锁
  27. */
  28. Error_manager release_space_step();
  29. protected:
  30. unsigned int m_command_id;
  31. unsigned int m_terminor_id;
  32. message::Car_info m_car_info; //当前流程的车辆标识(车牌号)
  33. //停车请求发送过来的测量数据,终端位置的测量数据
  34. message::Locate_information m_locate_info;
  35. //以下的流程中产生的数据
  36. message::Measure_response_msg m_measure_response_msg; //测量模块的测量数据
  37. message::Parkspace_allocation_response_msg m_parcspace_alloc_response_msg; //分配的车位数据
  38. public:
  39. bool mb_completed;
  40. };
  41. #endif //NNXX_TESTS_STOREPROCESS_H