Serial Port Manipulation


I’m rather new to serial port access on QNX and don’t know how to proceed with the following problem.

I have one application (a controller app) that talks to a device through a serial port (read and write).

Now, I’m writing a simulator which will emulate the device and run on a seperate computer. The problem I’m having is how to read and write data from the serial port buffer (without actually sending anything out), so that the controller thinks it’s talking to the device.



I’m confuse, if the simulator runs on different computer (which I assume are connected via a serial port) then why would you read and write data from the serial port buffer without wanting actually sending anything out? Seems to me like the simulators job would be to send and receive data just like the real device. As far as the controller app and computer there should be no change made to accomodate the simulator (isn’t that what simulator are for).

If you want to run the simulator software on the same machine, if you have two serials port just connect the two together the controller app using one and the simulator app using another.

If you don’t have an extra serial port, you need some sort of virtual serial port, it doesn’t exists under QNX you would need to write one yourself.