abla/serial

Generated from source.

Import with import "abla/serial".

Source: abla/serial/entry.ab

Re-exports abla/device.

SerialSettings (class)

class SerialSettings(
    val baud: int = 9600,
    val dataBits: int = 8,
    val parity: string = "none",
    val stopBits: int = 1,
    val raw: bool = true,
    val flowControl: string = "none"
)

Configures a serial connection's baud rate, framing, raw mode and flow control.

SerialSettings.isValid (extension fun)

fun SerialSettings.isValid(): bool

Returns whether the baud rate, data bits, parity, stop bits and flow control are supported.

DeviceConnection.configureSerial (extension fun)

fun DeviceConnection.configureSerial(settings: SerialSettings): NetworkError

Applies serial settings and returns the status, including an error if the device is closed or the settings are invalid.

serialOpen (fun)

fun serialOpen(
    path: string,
    settings: SerialSettings = SerialSettings(),
    readWrite: bool = false
): DeviceConnection

Opens and configures a serial device, returning a closed connection with the error if either step fails.

Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.