-
public final class SerialPortRepresents a serial port configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSerialPort.Companion
-
Method Summary
Modifier and Type Method Description final StringgetPath()final IntegergetBaudRate()final IntegergetDataBits()final IntegergetStopBits()final IntegergetParity()final SerialPortConnectionopen()Opens and configures the serial port. -
-
Constructor Detail
-
SerialPort
SerialPort(String path, Integer baudRate, Integer dataBits, Integer stopBits, Integer parity)
- Parameters:
path- The device path (e.g.baudRate- The baud rate (use BAUDRATE_* constants)dataBits- Number of data bits (5, 6, 7, or 8)stopBits- Number of stop bits (1 or 2)parity- Parity mode (PARITY_NONE, PARITY_ODD, or PARITY_EVEN)
-
-
Method Detail
-
getBaudRate
final Integer getBaudRate()
-
getDataBits
final Integer getDataBits()
-
getStopBits
final Integer getStopBits()
-
open
final SerialPortConnection open()
Opens and configures the serial port.
-
-
-
-