3

我是电子和通信工程专业的学生。我正在做一个项目,其中微控制器将数据发送到计算机的串行端口(异步)。我目前正在为我的 GUI 工作学习 wxWidgets。

我的问题-是否可以使用 wxWidgets 来获取数据和显示。是不是很难实现。我搜索它,但没有直接回答如何实现它。所以建议我为此阅读我需要阅读的内容。以及有什么替代方法可以做到这一点。我用的是 Windows 7。

我还需要将此数据上传到网络服务器(稍后需要)

4

3 回答 3

3

wxWidgets, to the best of my knowledge, does not implement serial I/O facilities. There are other libraries available that provide this. One of the best choices is probably boost::asio (see http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/overview/serial_ports.html)

于 2012-08-13T17:59:48.483 回答
0

wxWidgets 是一个跨平台的 GUI 框架。

读取串口与 GUI 无关,与跨平台无关。

所以wxWidgets与读取串口无关。

您可以使用 Windows API 读取/写入串行端口。

CreateFile打开端口

ReadFile从端口读取数据

难的?有点!

于 2012-08-13T22:25:10.090 回答
0

我自己从未使用过它,但有wxCTB

于 2012-08-14T20:37:19.043 回答