The Serial Port service is designed to allow easy access to a serial port (COM port) for basic data exchange. (You have to design your own protocol).
The following operations are available:
You can set the configuration in a config file rather than having to send a SetConfig request. The config can also specify that the serial port is opened on startup, so you do not need to send an Open request explicitly.
The service can operate in two modes: Asynchronous or Synchronous. In Asynchronous mode a ReceiveByte notification is sent for every byte received on the serial port. In Synchronous mode, you must explicitly issue one of the Readxxx requests. (No notifications are sent in Synchronous mode). For both modes the Writexxx operations are synchronous, i.e. they do not send back a response until the data has been sent.
Note that ReadString and WriteString use the .NET ReadLine and WriteLine methods. This means that the data must be terminated by a Linefeed (Ctrl-J) for ReadString to complete (not a Carriage Return or Enter) and WriteString will append a Carriage Return and Linefeed.
Full service description generated using DssInfo:
Service Description
Download the source code here:
Serial Port ZIP file