[Interest] Is there a way to simulate serial port data?

Murphy, Sean smurphy at walbro.com
Tue Mar 28 00:48:30 CEST 2017


I've got a class that inherits from QSerialPort. The bulk of the code in the class is parsing that I'm doing in a slot that is connected to QSerialPort's readyRead() signal. I want to inject known data  into this class as if it's actually coming across the serial port to validate my parsing code, is there any way to do that? Ideally I'd be able to write data in and have it trigger the readyRead() signal, but I'm not seeing any way to do that.

I know I could write a separate application that writes out one serial port, and then I could cable that back to my other serial port, but I was just looking for a way to do it all in code.

Sean




More information about the Interest mailing list