#pragma once #include "../common/comm.h" #include "../common/notifier.h" #include "../common/iobuffer.h" #include "../common/sensor_socket.h" class CMessageQueue; class CModbusTcpSensor { public: CModbusTcpSensor(CMessageQueue *q); void Notify(uint16_t * buffer); void SetModbusTcpSensor(SensorModbusTcp* modbus); void Start(); void Stop(); private: void Run(); private: CMessageQueue* _message; SensorModbusTcp * _modbus; bool _run; std::thread _thread; };