SerialPortConfiguration

data class SerialPortConfiguration(val portName: String, val baudRate: BaudRate = BaudRate.B115200, val dataBits: PortDataBits = PortDataBits.DataBits8, val stopBits: PortStopBits = PortStopBits.StopBits1, val parity: PortParity = PortParity.None, val flowControl: PortFlowControl = PortFlowControl.None, val controlFlags: Int = SerialPort.NO_CONTROL_LINE_CHANGE)

Provides a Builder pattern to make constructing a SerialPort easy. Defaults to 115200-8-N-1.

Parameters

portName

The name of the port to open

baudRate

The Baud Rate to open this port at

dataBits

The number of data bits

stopBits

The number of stop bits

parity

The parity of the line

flowControl

The flow control of the line

controlFlags

The control flags to listen for changes for. This is a bitwise-OR of CONTROL_LINE_XXX_CHANGE, or NO_CONTROL_LINE_CHANGE if you don't care about getting notified about the control line changes.

Constructors

Link copied to clipboard
constructor(portName: String, baudRate: BaudRate = BaudRate.B115200, dataBits: PortDataBits = PortDataBits.DataBits8, stopBits: PortStopBits = PortStopBits.StopBits1, parity: PortParity = PortParity.None, flowControl: PortFlowControl = PortFlowControl.None, controlFlags: Int = SerialPort.NO_CONTROL_LINE_CHANGE)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String