| 12345678910111213141516171819202122232425262728293031323334 |
- #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(QObject * p);
- void start(QString & name, int band, SerialBaseHandle * handle);
- inline bool isStart() const {return stard;}
- inline SerialBaseHandle * handle() {return _handle;}
- private slots:
- void receiveInfo();
- void portWrite();
- private:
- QSerialPort *m_serialPort;
- QTimer *timer;
- SerialBaseHandle * _handle;
- bool stard;
- };
- #endif // RTUPORT_H
|