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

2017-04-05 Thread Majid Kamali
You can emit readyRead signal explicitly where you are using that class. mySerialPort msp; emit msp.readyRead(YourByteArray); because signal is defined as public. But this may not be a good way for testing On Wed, Mar 29, 2017 at 4:32 PM, Murphy, Sean wrote: > > I have to

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

2017-03-29 Thread Murphy, Sean
> I have to ask, why is it such a sin to have a stand alone program with a > null modem cable and mini-tester as a testing tool. I have been working > with serial ports off and on since the days of DOS 3.x and have always > tested in this manner. The first piece of code one writes on a project >

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

2017-03-29 Thread Stéphane Fabry
You can also simulate via external software like https://docklight.de/ or create serial port pairs (search for virtual serial port) Le 28-03-17 à 13:42, Murphy, Sean a écrit : First of all your parsing class should only do the parsing, so it shouldn't derive from QSerialPort. instead it

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

2017-03-28 Thread Konrad Rosenbaum
Hi, On Tuesday 28 March 2017 13:23:01 Roland Hughes wrote: > I have to ask, why is it such a sin to have a stand alone program with a > null modem cable and mini-tester as a testing tool. I have been working > with serial ports off and on since the days of DOS 3.x and have always > tested in this

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

2017-03-28 Thread Roland Hughes
I have to ask, why is it such a sin to have a stand alone program with a null modem cable and mini-tester as a testing tool. I have been working with serial ports off and on since the days of DOS 3.x and have always tested in this manner. The first piece of code one writes on a project which

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

2017-03-28 Thread Murphy, Sean
> First of all your parsing class should only do the parsing, so it > shouldn't derive from QSerialPort. > instead it should take a QSerialPort pointer as a parameter, eg: > QSerialPort port(...); > port.open(...) > Parser parser(); > Result result = parser.parse(); > or > Parser parser; >

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

2017-03-28 Thread Konrad Rosenbaum
On Tue, March 28, 2017 00:54, Henry Skoglund wrote: > Hi, I faced a simular situation last summer, and I used this: > http://com0com.sourceforge.net/ > > Rgrds Henry > P.S. I think it only works on Windows, though. Correct. On Linux/Unix/MacOS you can use a simple pseudo TTY: write a small

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

2017-03-27 Thread Ch'Gans
On 28 March 2017 at 12:58, Murphy, Sean wrote: >> What about writing a “virtual serial port” ? >> >> QSerialPort is a QIODevice, so one thing you can do is to replace it with a >> custom QIODevice where you can write what you from e.g. a “console >> widget” to evaluate what

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

2017-03-27 Thread Murphy, Sean
> What about writing a “virtual serial port” ? > > QSerialPort is a QIODevice, so one thing you can do is to replace it with a > custom QIODevice where you can write what you from e.g. a “console > widget” to evaluate what you want from your application. So you're suggesting when I want to debug

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

2017-03-27 Thread Samuel Gaist
> On 28 Mar 2017, at 00:48, Murphy, Sean wrote: > > 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

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

2017-03-27 Thread Henry Skoglund
Hi, I faced a simular situation last summer, and I used this: http://com0com.sourceforge.net/ Rgrds Henry P.S. I think it only works on Windows, though. On 2017-03-28 00:48, Murphy, Sean wrote: I've got a class that inherits from QSerialPort. The bulk of the code in the class is parsing that