Package-level declarations

Types

Link copied to clipboard
open class LibSerial

Serial bindings. Java FFM (Java 25+) version. See termios.h, fcntl.h, sys/ioctl.h, poll.h

Link copied to clipboard

This interface lets the user do something when the serial line state changes. The state is defined by how the lines are currently set.

Link copied to clipboard
open class SerialInputStream(val handle: Int) : InputStream

Input stream for the serial port. Passes back the status of the control lines in the upper bits of read(), and thus must be parsed properly.

Link copied to clipboard
Link copied to clipboard
data class SerialLineState(val carrierDetect: Boolean = false, val clearToSend: Boolean = false, val dataSetReady: Boolean = false, val dataTerminalReady: Boolean = false, val ringIndicator: Boolean = false, val requestToSend: Boolean = false)

This class represents the current state of the lines on the serial port.

Link copied to clipboard
class SerialOutputStream(val handle: Int) : OutputStream

Output stream for the serial port.

Link copied to clipboard
Link copied to clipboard
class SerialPort(val configuration: SerialPortConfiguration, debug: Boolean = false, val throwIOExceptionOnInterrupt: Boolean = false) : SerialPortLike

Represents a serial port on the system. To open a serial port, launch this with appropriate port settings.

Link copied to clipboard
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.

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

Input stream for the serial port. Does not pass back the status of the control lines on the serial port - just the raw bytes.