| 1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef RTUPORT_H
- #define RTUPORT_H
- #include <QObject>
- #include "QDebug"
- #include "QtSerialPort/QSerialPort"
- #include "QtSerialPort/QSerialPortInfo"
- #include "QTimer"
- #include "logserialport.h"
- #include "globalinfo.h"
- class RtuPort : public QObject
- {
- Q_OBJECT
- public:
- RtuPort();
- void portStart();
- private slots:
- void receiveInfo();
- void portWrite();
- private:
- QSerialPort *m_serialPort;
- QStringList m_serialPortName;
- QTimer *timer;
- QTimer *portTimer;
- LogSerialPort log;
- QByteArray ret;
- };
- #endif // RTUPORT_H
|