1234567891011121314151617181920212223242526272829303132333435363738 |
- //
- // Created by zx on 2020/6/18.
- //
- #ifndef NNXX_TESTS_LOCATE_COMMUNICATOR_H
- #define NNXX_TESTS_LOCATE_COMMUNICATOR_H
- #include <mutex>
- #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<Locate_communicator>, public Communication_socket_base
- {
- friend Singleton<Locate_communicator>;
- 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<int,message::Measure_response_msg> m_response_table;
- Communication_message m_measure_statu_msg;
- };
- #endif //NNXX_TESTS_LOCATE_COMMUNICATOR_H
|