28 lines
554 B
C++
28 lines
554 B
C++
#ifndef CSERIALPORT_SERIALPORTINFO_H
|
|
#define CSERIALPORT_SERIALPORTINFO_H
|
|
|
|
#include <vector>
|
|
#include <cstring>
|
|
|
|
namespace itas109 {
|
|
|
|
struct SerialPortInfo {
|
|
char portName[256];
|
|
char description[256];
|
|
|
|
SerialPortInfo() {
|
|
std::memset(portName, 0, sizeof(portName));
|
|
std::memset(description, 0, sizeof(description));
|
|
}
|
|
};
|
|
|
|
class CSerialPortInfo {
|
|
public:
|
|
// 枚举系统上所有可用串口
|
|
static std::vector<SerialPortInfo> availablePortInfos();
|
|
};
|
|
|
|
} // namespace itas109
|
|
|
|
#endif // CSERIALPORT_SERIALPORTINFO_H
|