123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- //
- // Created by zx on 2020/7/7.
- //
- #ifndef NNXX_TESTS_TAKEPROCESS_H
- #define NNXX_TESTS_TAKEPROCESS_H
- #include <parkspace_allocation_message.pb.h>
- #include "process_message.pb.h"
- #include "error_code.h"
- #include "process_task.h"
- #include "dispatch_excutor.h"
- #include "terminal_message.pb.h"
- class PickupProcessTask :public Process_task{
- public:
- PickupProcessTask(unsigned int terminal_id,message::Car_info car_info);
- virtual ~PickupProcessTask();
- Error_manager init_task();
- // 获取任务类型
- virtual message::Process_type get_process_type()const{return message::ePicking;};
- /*
- * 控制流程到下一步
- */
- virtual Error_manager next_step();
- /*
- * 根据当前流程状态,修改状态消息
- */
- void updata_step_statu(message::Step_statu statu);
- protected:
- virtual void Main();
- /*
- * 查询车位
- */
- Error_manager search_space_step();
- /*
- * 回退查询车位
- */
- Error_manager back_search_space_step();
- /*
- * 执行取车动作请求,并等待执行完成
- */
- Error_manager dispatch_step();
- /*
- * 回退执行取车动作请求,并等待执行完成
- */
- Error_manager back_dispatch_step();
- /*
- * 等待车辆离开
- */
- Error_manager wait_for_leave_step();
- /*
- * 回退等待车辆离开
- */
- Error_manager back_wait_for_leave_step();
- /*
- * 清除车位表中对应的车位
- */
- Error_manager release_space_step();
- virtual void publish_step_status();
- /*
- * 初始化 接收到的消息
- */
- void reset_msg();
- protected:
- private:
- //查询到的车位信息
- message::Parkspace_search_request_msg m_search_request_msg;
- message::Parkspace_search_response_msg m_search_response_msg;
- message::Parkspace_release_request_msg m_release_request_msg;
- message::Parkspace_release_response_msg m_release_response_msg;
- //取车调度反馈信息
- message::Pickup_command_response_msg m_command_response_msg;
- message::Dispatch_request_msg m_dispatch_request_msg;
- message::Dispatch_response_msg m_dispatch_response_msg;
- message::Picking_process_statu_msg m_process_msg;
- };
- #endif //NNXX_TESTS_TAKEPROCESS_H
|