I won't go into that much background story but I spent some time today reading and writing to COM ports using C#. This is extremely simple. Just create a new SerialPort (some parameters, like the name of it is good to set), open() it, and start writing stuff to it.
Unfortunately most modern computers come without any actual serial ports. But for testing purposes you can download a virtual port driver, like com0com, that works perfectly fine.
Set it up and you are soon ready to start testing your serial port application against a mock.
Unfortunately most modern computers come without any actual serial ports. But for testing purposes you can download a virtual port driver, like com0com, that works perfectly fine.
Set it up and you are soon ready to start testing your serial port application against a mock.
Kommentarer
Skicka en kommentar