// // Created by zx on 2020/7/21. // #ifndef NNXX_NOTIFY_EXCUTOR_COMMUNICATOR_H #define NNXX_NOTIFY_EXCUTOR_COMMUNICATOR_H #include "message_communicator.h" #include "singleton.h" #include "notify_message.pb.h" #include "thread_safe_map.h" class Notify_excutor :public Singleton { friend Singleton; public: virtual ~Notify_excutor(); Error_manager notify_request(message::Notify_request_msg& request, message::Notify_response_msg& response,Thread_condition& cancel_condition); /* * 提前取消请求 */ Error_manager cancel_request(message::Notify_request_msg& request); //检查节点状态 Error_manager check_node_statu(); //消费本模块的接收消息 Error_manager consume_msg(Communication_message* p_msg); protected: Notify_excutor(); private: thread_safe_map m_response_table; //取车调度模块状态 message::Notify_status_msg m_notify_statu_msg; std::chrono::system_clock::time_point m_notify_statu_time; }; #endif //NNXX_TESTS_DISPATCH_COMMUNICATOR_H