PickupProcessTask.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //
  2. // Created by zx on 2020/7/7.
  3. //
  4. #ifndef NNXX_TESTS_TAKEPROCESS_H
  5. #define NNXX_TESTS_TAKEPROCESS_H
  6. #include <parkspace_allocation_message.pb.h>
  7. #include "process_message.pb.h"
  8. #include "error_code.h"
  9. #include "process_task.h"
  10. #include "dispatch_communicator.h"
  11. class PickupProcessTask :public Process_task{
  12. public:
  13. PickupProcessTask(unsigned int terminal_id,message::Car_info car_info);
  14. virtual ~PickupProcessTask();
  15. Error_manager init_task();
  16. virtual tq::TaskCategory GetCategory() const{ return message::ePicking;}
  17. /*
  18. * 查询车位
  19. */
  20. Error_manager search_space();
  21. /*
  22. * 回退查询车位
  23. */
  24. Error_manager back_search_space_step();
  25. protected:
  26. virtual void Main();
  27. /*
  28. * 执行取车动作请求,并等待执行完成
  29. */
  30. Error_manager dispatch_step();
  31. /*
  32. * 回退执行取车动作请求,并等待执行完成
  33. */
  34. Error_manager back_dispatch_step();
  35. /*
  36. * 等待车辆离开
  37. */
  38. Error_manager wait_for_leave_step();
  39. /*
  40. * 回退等待车辆离开
  41. */
  42. Error_manager back_wait_for_leave_step();
  43. /*
  44. * 清除车位表中对应的车位
  45. */
  46. Error_manager release_space_step();
  47. /*
  48. * 回退清除车位表中对应的车位
  49. */
  50. Error_manager back_release_space_step();
  51. virtual void publish_step_status();
  52. /*
  53. * 根据当前流程状态,生成状态消息
  54. */
  55. void updata_step_statu_msg();
  56. void reset_recv_msg();
  57. protected:
  58. private:
  59. //查询到的车位信息
  60. message::Parkspace_search_request_msg m_search_request_msg;
  61. message::Parkspace_search_response_msg m_search_response_msg;
  62. //取车调度反馈信息
  63. message::Dispatch_request_msg m_dispatch_request_msg;
  64. message::Dispatch_response_msg m_dispatch_response_msg;
  65. message::Picking_process_statu_msg m_process_msg;
  66. };
  67. #endif //NNXX_TESTS_TAKEPROCESS_H