将框架搭好

This commit is contained in:
tangchao
2022-05-29 23:24:27 +08:00
parent 7de10cd461
commit 32ae01d710
10 changed files with 311 additions and 0 deletions

24
serialportbase.h Normal file
View File

@ -0,0 +1,24 @@
#ifndef SERIALPORTBASE_H
#define SERIALPORTBASE_H
#include <iostream>
using namespace std;
class SerialPortBase
{
public:
// SerialPortBase();
// ~SerialPortBase();
virtual int OpenSerialPort(string portName) = 0;
virtual int CloseSerialPort() = 0;
virtual int SetBaudrate(int baudrate) = 0;
virtual int SendData(const char chrMessage[], const unsigned short usLen) = 0;
virtual int ReadData() = 0;
protected:
private:
};
#endif // SERIALPORTBASE_H