rtuport.h 571 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef RTUPORT_H
  2. #define RTUPORT_H
  3. #include <QObject>
  4. #include "QDebug"
  5. #include <QSerialPort>
  6. #include "QTimer"
  7. #include "globalinfo.h"
  8. #include "handle/seriport/serialbasehandle.h"
  9. class RtuPort : public QObject
  10. {
  11. Q_OBJECT
  12. public:
  13. RtuPort();
  14. void start(QString & name, int band, SerialBaseHandle * handle);
  15. inline bool isStart() const {return stard;}
  16. private slots:
  17. void receiveInfo();
  18. void portWrite();
  19. private:
  20. QSerialPort *m_serialPort;
  21. QTimer *timer;
  22. SerialBaseHandle * _handle;
  23. bool stard;
  24. };
  25. #endif // RTUPORT_H