4 Star 13 Fork 7

阿衰0110 / 串口网络调试助手+qt6+qml

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
serial.h 836 Bytes
一键复制 编辑 原始数据 按行查看 历史
#ifndef SERIAL_H
#define SERIAL_H
#include <QObject>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include <QStringList>
#include <QString>
#include <QByteArray>
#include <QTextCodec>
class Serial : public QSerialPort
{
Q_OBJECT
public:
explicit Serial();
// 发送字节数
int txByte = 0;
// 接收字节数
int rxByte = 0;
// 数据缓存区
QByteArray dataBuf;
// 串口描述内容
QStringList serialDescription;
// 串口扫描函数
QStringList serialScan(void);
bool serialOpen(QString serialName, int baudRate);
void ReadData();
void sendData(QByteArray sendData);
void serialClose();
private:
QTextCodec *tc;
signals:
void readSignal(int recByte);
void sendSuccess(int sendByte);
public slots:
};
#endif // SERIAL_H
1
https://gitee.com/ashuai0110/AS_TOOL_QML_X64.git
git@gitee.com:ashuai0110/AS_TOOL_QML_X64.git
ashuai0110
AS_TOOL_QML_X64
串口网络调试助手+qt6+qml
master

搜索帮助