// // Created by zx on 2020/7/16. // #ifndef NNXX_TESTS_STORE_TERMINAL_H #define NNXX_TESTS_STORE_TERMINAL_H #include #include "threadSafeQueue.h" #include "thread_condition.h" #include "error_code.h" #include "terminal_message.pb.h" class store_terminal { public: store_terminal(int terminal_id); ~store_terminal(); Error_manager init(threadsafe_queue* input, threadsafe_queue* output); Error_manager storing(message::Car_info& msg); protected: static void storing_thread(store_terminal* pStore); std::thread* m_pthread; int m_terminal_id; threadsafe_queue* m_thread_safe_queue; Thread_condition m_exit_cond; threadsafe_queue* m_thread_safe_output_queue; }; #endif //NNXX_TESTS_STORE_TERMINAL_H