1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // 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<Notify_excutor>
- {
- friend Singleton<Notify_excutor>;
- 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<std::string,message::Notify_response_msg> 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
|