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

自闭症网瘾萝莉.ら 提交于 2019-12-22 03:54:11

问题


I am looking for a c++ library that can connect to and communicate with serial port devices. I need one that can be used on windows and linux. I have found "serialib" already but this has no feature for enumerating the available ports.

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.


回答1:


http://wjwwood.io/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.




回答2:


The QextSerialPort project is a cross-platform serial port library that includes port enumeration. Here is their example of doing a simple enumeration of all serial ports.



来源:https://stackoverflow.com/questions/11467054/is-there-a-cross-platform-c-serial-port-library-that-can-enumerate-ports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!