wjwwood / serial

Cross-platform, Serial Port library written in C++
http://wjwwood.github.com/serial/
MIT License
2.16k stars 1.05k forks source link

Can this library also do the reverse? #286

Open HerrNamenlos123 opened 1 year ago

HerrNamenlos123 commented 1 year ago

I might have a bit strange question: Can this library be used to do the opposite of what most people use it for? I am thinking about simulating a serial port. You could have one C++ instance connecting to a device, and another C++ instance pretending it IS the device, I think this would involve opening a Virtual COM port and simulating a real device, then both of them could talk to each other on the same PC, almost like a serial localhost. I hope that makes sense. I would use it to simulate a microcontroller interface, to test the code on a PC before actually loading the code onto a real microcontroller.

Is this kind of operation possible using this library? Or is there another modern library which is able to do that? Thank you!