Natwar Singh
Natwar Singh

Reputation: 2273

how can i access serial port data in c++ using wxwidgets

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)

Upvotes: 3

Views: 6652

Answers (3)

VZ.
VZ.

Reputation: 22688

I've never used it myself but there is wxCTB.

Upvotes: 0

ravenspoint
ravenspoint

Reputation: 20576

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!

Upvotes: 0

Jon Trauntvein
Jon Trauntvein

Reputation: 4554

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)

Upvotes: 3

Related Questions