1234567891011121314151617181920212223242526272829 |
- //
- // Created by zx on 2020/7/16.
- //
- #ifndef NNXX_TESTS_PICKUP_TERMINAL_H
- #define NNXX_TESTS_PICKUP_TERMINAL_H
- #include <thread>
- #include "threadSafeQueue.h"
- #include "thread_condition.h"
- #include "error_code.h"
- #include "terminal_message.pb.h"
- class pickup_terminal {
- public:
- pickup_terminal(int terminal_id);
- ~pickup_terminal();
- Error_manager init(threadsafe_queue<message::Car_info>* queue);
- Error_manager pickup(message::Car_info& msg);
- protected:
- static void pickup_thread(pickup_terminal* pPickup);
- std::thread* m_pthread;
- int m_terminal_id;
- threadsafe_queue<message::Car_info>* m_thread_safe_queue;
- Thread_condition m_exit_cond;
- };
- #endif //NNXX_TESTS_PICKUP_TERMINAL_H
|