I'm trying to use a Linux serial port (say /dev/ttyx) as a sting stream in C++. Just like std::cout is used.
Do you have experience with it, or do you know a decent example?
I'm trying to use a Linux serial port (say /dev/ttyx) as a sting stream in C++. Just like std::cout is used.
Do you have experience with it, or do you know a decent example?
Interesting question. I've not worked in this area, and don't have an example. However, I saw this:
https://www.nuget.org/packages/crozone.SerialPorts.LinuxSerialPort
It's quite old code. But am wondering if there is useful stuff there that could be resurrected as a serial port class with stream methods for accessing.
EDIT: forget that. I just peeked at the code, it's C# : (
EDIT 2: Looks like Qt supports streaming access: https://doc.qt.io/qt-6/qserialport.html
Don't know if you wish to add that much middleware to your app though.
There are other serial port stream implementations but they seem to be in other languages like Java : (
Interesting question. I've not worked in this area, and don't have an example. However, I saw this:
https://www.nuget.org/packages/crozone.SerialPorts.LinuxSerialPort
It's quite old code. But am wondering if there is useful stuff there that could be resurrected as a serial port class with stream methods for accessing.
EDIT: forget that. I just peeked at the code, it's C# : (
EDIT 2: Looks like Qt supports streaming access: https://doc.qt.io/qt-6/qserialport.html
Don't know if you wish to add that much middleware to your app though.
There are other serial port stream implementations but they seem to be in other languages like Java : (