12345678910111213141516171819202122232425262728 |
- #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<CModbusTcpSensor>* modbus);
- void Start();
- void Stop();
-
- private:
- void Run();
- private:
- CMessageQueue* _message;
- SensorModbusTcp<CModbusTcpSensor> * _modbus;
- bool _run;
- std::thread _thread;
- };
|