| 1234567891011121314151617181920212223242526272829303132 |
- #ifndef RTUPORT_H
- #define RTUPORT_H
- #include <QObject>
- #include "QDebug"
- #include <QSerialPort>
- #include "QTimer"
- #include "globalinfo.h"
- #include "handle/seriport/serialbasehandle.h"
- class RtuPort : public QObject
- {
- Q_OBJECT
- public:
- RtuPort();
- void start(QString & name, int band, SerialBaseHandle * handle);
- inline bool isStart() const {return stard;}
- private slots:
- void receiveInfo();
- void portWrite();
- private:
- QSerialPort *m_serialPort;
- QTimer *timer;
- SerialBaseHandle * _handle;
- bool stard;
- };
- #endif // RTUPORT_H
|