// // Created by zx on 2020/6/18. // #ifndef NNXX_TESTS_LOCATE_COMMUNICATOR_H #define NNXX_TESTS_LOCATE_COMMUNICATOR_H #include #include "communication_socket_base.h" #include "singleton.h" #include "measure_message.pb.h" #include "error_code.h" #include "thread_safe_map.h" class Locate_communicator: public Singleton, public Communication_socket_base { friend Singleton; public: virtual ~Locate_communicator(); Error_manager locate_request(message::Measure_request_msg& request,message::Measure_response_msg& result); message::Measure_status_msg get_statu(); protected: Locate_communicator(); virtual Error_manager encapsulate_msg(Communication_message* message); virtual Error_manager execute_msg(Communication_message* p_msg); protected: thread_safe_map m_response_table; Communication_message m_measure_statu_msg; }; #endif //NNXX_TESTS_LOCATE_COMMUNICATOR_H