简体   繁体   English

是否有可以枚举端口的跨平台c ++串口库?

[英]Is there a cross platform c++ serial port library that can enumerate ports?

I am looking for a c++ library that can connect to and communicate with serial port devices. 我正在寻找一个可以连接到串口设备并与之通信的c ++库。 I need one that can be used on windows and linux. 我需要一个可以在Windows和Linux上使用的。 I have found "serialib" already but this has no feature for enumerating the available ports. 我已经找到了“serialib”,但是没有枚举可用端口的功能。

So I either need a cross platform "port enumerator" library or a whole new cross platform serial port library. 所以我要么需要一个跨平台的“端口枚举器”库,要么需要一个全新的跨平台串口库。

Does anyone know of a good one? 有谁知道一个好的?

Thanks, Dan. 谢谢,丹。

http://wjwwood.io/serial/ http://wjwwood.io/serial/

https://github.com/wjwwood/serial https://github.com/wjwwood/serial

This is a cross-platform serial port library, which is MIT licensed and has no external dependencies for runtime. 这是一个跨平台的串行端口库,它是MIT许可的,并且没有运行时的外部依赖性。

The QextSerialPort project is a cross-platform serial port library that includes port enumeration. QextSerialPort项目是一个包含端口枚举的跨平台串行端口库。 Here is their example of doing a simple enumeration of all serial ports. 是他们对所有串行端口进行简单枚举的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM