You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
550 B
33 lines
550 B
|
|
#ifndef _WWSerialPortApi_H
|
|
#define _WWSerialPortApi_H
|
|
|
|
#include "WWSerialPort.h"
|
|
|
|
#ifndef LX_DLL_CLASS_EXPORTS
|
|
#define CPP_DLL_API __declspec(dllexport)
|
|
#else
|
|
#define CPP_DLL_API __declspec(dllimport)
|
|
#endif
|
|
|
|
class CPP_DLL_API WWSerialPortApi
|
|
{
|
|
public:
|
|
WWSerialPortApi();
|
|
~WWSerialPortApi();
|
|
|
|
// 打开串口,成功返回true,失败返回false
|
|
// portname(串口名): 在Windows下是"COM1""COM2"
|
|
bool open(const char* portname);
|
|
//关闭串口
|
|
void close();
|
|
|
|
void setBeamDir(int angle);
|
|
void getBeamDir();
|
|
|
|
private:
|
|
WWSerialPort mSerialPort;
|
|
|
|
};
|
|
|
|
#endif
|