StoreProcessTask.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 "dispatch_communicator.h"
  8. #include "TaskQueue/BaseTask.h"
  9. #include "Locate_communicator.h"
  10. class StoreProcessTask :public tq::BaseTask{
  11. public:
  12. StoreProcessTask();
  13. virtual ~StoreProcessTask();
  14. Error_manager init_task(unsigned int command_id, unsigned int terminor_id,
  15. message::Locate_information locate_info,message::Car_info car_info);
  16. /*
  17. * 分配车位
  18. */
  19. Error_manager alloc_space();
  20. protected:
  21. virtual void Main();
  22. /*
  23. * 定位
  24. */
  25. Error_manager locate_step();
  26. /*
  27. * 调度
  28. */
  29. Error_manager dispatch_step();
  30. /*
  31. * 车位解锁,当停车失败时需要车位解锁
  32. */
  33. Error_manager release_space_step();
  34. protected:
  35. unsigned int m_command_id;
  36. unsigned int m_terminor_id;
  37. message::Car_info m_car_info; //当前流程的车辆标识(车牌号)
  38. //停车请求发送过来的测量数据,终端位置的测量数据
  39. message::Locate_information m_locate_info;
  40. //以下的流程中产生的数据
  41. message::Measure_response_msg m_measure_response_msg; //测量模块的测量数据
  42. message::Parkspace_allocation_response_msg m_parcspace_alloc_response_msg; //分配的车位数据
  43. message::Dispatch_response_msg m_dispatch_response_msg; //调度模块的反馈数据
  44. public:
  45. bool mb_completed;
  46. };
  47. #endif //NNXX_TESTS_STOREPROCESS_H