1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //
- // Created by zx on 2020/8/20.
- //
- #ifndef NNXX_TESTS_ERROR_HANDLING_H
- #define NNXX_TESTS_ERROR_HANDLING_H
- #include "message_communicator.h"
- #include "central_control_message.pb.h"
- #include "thread_safe_map.h"
- #include "StoreProcessTask.h"
- #include "PickupProcessTask.h"
- class Exception_solver :public Singleton<Exception_solver>
- {
- friend Singleton<Exception_solver>;
- public:
- virtual ~Exception_solver();
- /*
- * 添加流程的任务取消标志位
- * license:车牌号,作为流程任务的唯一标识
- */
- Error_manager add_task_cancel_condition(std::string license,Process_task* task);
- /*
- * 删除流程的任务取消标志位
- * license:车牌号,作为流程任务的唯一标识
- */
- Error_manager delete_task_cancel_condition(std::string license);
- /*
- * 处理故障
- */
- Error_manager solve_exception(Error_manager code,Process_task* task);
- /*
- * 等待手动消息
- */
- Error_manager waitfor_manual_operate_msg(Process_task* task,message::Process_manual_operation_msg& msg);
- /*
- * 消息消费函数
- */
- Error_manager consume_msg(Communication_message* p_msg);
- //车位分配错误处理
- Error_manager parking_alloc_error_handling(Error_manager code,Process_task* task);
- protected:
- Exception_solver();
- private:
- thread_safe_map<std::string,tq::BaseTask*> m_ptask_map;
- thread_safe_map<std::string,message::Process_manual_operation_msg> m_manual_msg_map;
- };
- #endif //NNXX_TESTS_ERROR_HANDLING_H
|