Serial Port Configuration
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
port Name
The name of the port to open
baud Rate
The Baud Rate to open this port at
data Bits
The number of data bits
stop Bits
The number of stop bits
parity
The parity of the line
flow Control
The flow control of the line
control Flags
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)