SerialPortInfoBase.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. * @file SerialPortInfoBase.h
  3. * @author itas109 (itas109@qq.com) \n\n
  4. * Blog : https://blog.csdn.net/itas109 \n
  5. * Github : https://github.com/itas109 \n
  6. * QQ Group : 12951803
  7. * @brief the CSerialPortInfo Base class 串口信息辅助类基类
  8. * @date 2020-04-29
  9. * @copyright The CSerialPort is Copyright (C) 2021 itas109. \n
  10. * Contact: itas109@qq.com \n\n
  11. * You may use, distribute and copy the CSerialPort under the terms of \n
  12. * GNU Lesser General Public License version 3, which is displayed below.
  13. */
  14. #ifndef __CSERIALPORTINFOBASE_H__
  15. #define __CSERIALPORTINFOBASE_H__
  16. #include <string>
  17. #include <vector>
  18. #include <list>
  19. using namespace std;
  20. struct SerialPortInfo
  21. {
  22. std::string portName;
  23. std::string description;
  24. };
  25. /**
  26. * @brief the CSerialPortInfo Base class 串口信息辅助类基类
  27. *
  28. */
  29. class CSerialPortInfoBase
  30. {
  31. public:
  32. /**
  33. * @brief Construct a new CSerialPortInfoBase object 构造函数
  34. *
  35. */
  36. CSerialPortInfoBase(){}
  37. /**
  38. * @brief Destroy the CSerialPortInfoBase object 析构函数
  39. *
  40. */
  41. ~CSerialPortInfoBase(){}
  42. /**
  43. * @brief availablePortInfos 获取串口信息列表
  44. * @return return available port infolist 返回可用串口名称列表
  45. */
  46. static std::vector<SerialPortInfo> availablePortInfos(void){}
  47. };
  48. #endif //__CSERIALPORTINFOBASE_H__