#pragma once #include "../common/comm.h" #include "../common/notifier.h" #include "../common/iobuffer.h" #include "../common/sensor_socket.h" class CMessageQueue; class CSerialSensor { public: CSerialSensor(CMessageQueue *q); void Notify(uint8_t * buffer,int32_t size); void SetSerialSensor(SensorSerial* serial); void Start(); void Stop(); private: void Run(); private: CMessageQueue* _message; SensorSerial * _serial; bool _run; std::thread _thread; };