2016-12-29 16:49:18 +08:00
|
|
|
#ifndef QQTSERIALPORT_H
|
|
|
|
#define QQTSERIALPORT_H
|
|
|
|
|
|
|
|
#include <QSerialPort>
|
2017-09-05 18:07:05 +08:00
|
|
|
#include "qqtcore.h"
|
2016-12-29 16:49:18 +08:00
|
|
|
#include "qqtprotocol.h"
|
|
|
|
#include "qqtserialmessage.h"
|
|
|
|
|
|
|
|
class QQTSerialPort : public QSerialPort
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit QQTSerialPort(QObject *parent = 0);
|
|
|
|
~QQTSerialPort();
|
|
|
|
|
|
|
|
void installProtocol(QQTProtocol* stack);
|
|
|
|
void uninstallProtocol(QQTProtocol* stack);
|
|
|
|
QQTProtocol* installedProtocol();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void readyReadData();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QQTProtocol* m_protocol;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QQTSERIALPORT_H
|