实现了任工需要设置的所有参数

This commit is contained in:
tangchao
2022-05-31 22:44:39 +08:00
parent 32ae01d710
commit 5a040caf18
8 changed files with 849 additions and 143 deletions

View File

@ -1,31 +0,0 @@
#ifndef QTSERIALPORT_H
#define QTSERIALPORT_H
#include "serialportbase.h"
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
class QtSerialport :public SerialPortBase
{
// Q_OBJECT
public:
// QtSerialport();
// ~QtSerialport();
int OpenSerialPort(string portName);
int CloseSerialPort();
int SetBaudrate(int baudrate);
int SendData(const char chrMessage[], const unsigned short usLen);
int ReadData();
protected:
private:
QSerialPort * m_serial;
};
#endif // QTSERIALPORT_H