将框架搭好
This commit is contained in:
24
serialportbase.h
Normal file
24
serialportbase.h
Normal 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
|
Reference in New Issue
Block a user