1234567891011121314151617181920212223242526272829303132333435363738 |
- //
- // Created by zx on 2020/7/16.
- //
- #ifndef NNXX_TESTS_STORE_TERMINAL_H
- #define NNXX_TESTS_STORE_TERMINAL_H
- #include <thread>
- #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<message::Car_info>* input,
- threadsafe_queue<message::Car_info>* 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<message::Car_info>* m_thread_safe_queue;
- Thread_condition m_exit_cond;
- threadsafe_queue<message::Car_info>* m_thread_safe_output_queue;
- };
- #endif //NNXX_TESTS_STORE_TERMINAL_H
|