Package 

Class SerialPortConnection

    • Constructor Detail

    • Method Detail

      • getReadFlow

         final Flow<ByteArray> getReadFlow()

        A hot flow that emits data as it arrives from the serial port. This flow runs on Dispatchers.IO.

        Note: This is a hot flow - collectors that join after data has been emitted will miss that data. Consider using SharedFlow if you need multiple collectors.

      • write

         final <ERROR CLASS> write(ByteArray data)

        Writes data to the serial port in a thread-safe manner (handled by OS/Stream). This function suspends to offload the blocking I/O to Dispatchers.IO.