I develop a program on QNX which controls 4 trains running on a railroad model. This program uses a serial port (/dev/ser1) to communicate with the railroad model. But before using this program in real, I have to simulate this one in order to verify that any train will collide with another one.
So, I develop a simulator which runs on the same computer as the program (I only have one computer). This sumulator uses the second serial port (/dev/ser2).
So, in order to establish the communication between the simulator and the program, I have to create a kind of virtual link between /dev/ser1 and /dev/ser2.
I have found nullmodem (src) by Rinas which creates a virtual network of pseudo-terminals. I think it could help me. For the portability, I just have to replace the â€œgetopt_longâ€