问题
i am electronics and communication engineering student. i am working on a project in which a microcontroller send data to serial port of computer (asynchronously). i currently learning wxWidgets for my GUI work.
my question- is it possible to do using wxWidgets to get data and display. is it very difficult to implement this. i search for it but not get direct answer that how to implement this. so suggest me what i need to read for this. and what alternative available to do this. i use windows 7.
i also need to upload this data to web server (it is needed later)
回答1:
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)
回答2:
wxWidgets is a cross-platform GUI framework.
Reading a serial port is nothing to do with the GUI, and not cross platform.
So wxWidgets has nothing to do with reading serial ports.
You can read/write from/to a serial port using the windows API.
CreateFile opens the port
ReadFile reads data from the port
Difficult? Kinda!
回答3:
I've never used it myself but there is wxCTB.
来源:https://stackoverflow.com/questions/11939513/how-can-i-access-serial-port-data-in-c-using-wxwidgets