I'm trying to understand the termio.h header file. However, all information I find is quite old and everything seems to happen in C code instead of C++. Is there any modern way to communicate with a serial link?
The termio.h c_cflag field also specifies CBAUD to a maximum of 38400, which would be too low for my program.
TL;DR: how to use termio.h, or is there a modern alternative?
Indeed, I found that I'm able to use termios.h as well.
I need to communicate with a laser range finder. There's certain packages I need to sent to log in, set measurement options, or to actually receive measurements. Then, I need to capture the replies and interpret them.
I believe my best option is trial and error; luckily I have a sample of the driver for the Ethernet connection. So all I really need to know is the best practice of sending and receiving information over a serial cable.
In that case - I doubt you'll find anything that's not written in C (low level stuff like this usually is). And unless the world of serial io changed a lot in the past 2 decades, you may not find anything much more recent than this. The maximum set for the baud rate shouldn't pose too much of a problem, you can probably extend it.
I am by no means an expert (or even knowledgeable) in this field, so take what I say with a grain of salt.
Waw, this Boost.Asio is indeed exactly what I needed! Since the project already uses Boost.Random, there shouldn't be a problem including this. Thank you!