SerialPortFR.readLoop

Read data by parts, sleep between checks.

Sleep time calculates from baud rate and count of bits in one byte.

class SerialPortFR
void[]
readLoop
(
void[] arr
,
Duration timeout = 1.seconds
,
Duration frameGap = 50.msecs
)

Parameters

arr void[]

buffer for reading

timeout Duration

timeout for first byte recive

frameGap Duration

detect new data frame (return current) by silence period

Return Value

Type: void[]

slice of arr

Throws

PortClosedException ReadException

See Also

SerialPort.read

Meta