// // Created by zx on 2020/7/7. // #ifndef NNXX_TESTS_STOREPROCESS_H #define NNXX_TESTS_STOREPROCESS_H #include #include "dispatch_communicator.h" #include "TaskQueue/BaseTask.h" #include "Locate_communicator.h" class StoreProcessTask :public tq::BaseTask{ public: StoreProcessTask(); virtual ~StoreProcessTask(); Error_manager init_task(unsigned int command_id, unsigned int terminor_id, message::Locate_information locate_info,message::Car_info car_info); /* * 分配车位 */ Error_manager alloc_space(); protected: virtual void Main(); /* * 定位 */ Error_manager locate_step(); /* * 调度 */ Error_manager dispatch_step(); /* * 车位解锁,当停车失败时需要车位解锁 */ Error_manager release_space_step(); protected: unsigned int m_command_id; unsigned int m_terminor_id; message::Car_info m_car_info; //当前流程的车辆标识(车牌号) //停车请求发送过来的测量数据,终端位置的测量数据 message::Locate_information m_locate_info; //以下的流程中产生的数据 message::Measure_response_msg m_measure_response_msg; //测量模块的测量数据 message::Parkspace_allocation_response_msg m_parcspace_alloc_response_msg; //分配的车位数据 message::Dispatch_response_msg m_dispatch_response_msg; //调度模块的反馈数据 public: bool mb_completed; }; #endif //NNXX_TESTS_STOREPROCESS_H