Skip to main content

Serial

Use the Outstation::createSerialSession method to create an outstation bound to a serial port. In addition to the common components, this method requires the following serial port parameters:

  • Path of the serial device (e.g., COM3 on Windows or /dev/ttyS3 on Linux)
  • SerialPortSettings struct:
    • Baud rate
    • Data bits
    • Stop bits
    • Parity
    • Flow control

The method will then either open the port or fail if the port doesn't exist or is already in use. The returned Outstation class behaves identically to other transport types.

note

The LinkErrorMode is internally set to Discard for serial communication channels since serial ports do not provide data integrity.