FrameReassembler

Reassembles incoming byte streams into complete frames using a FrameParser.

This class provides a thread-safe way to process incoming BLE data and emit complete frames through a Flow interface.

Parameters

parser

The frame parser to use for extracting complete frames from byte streams

Constructors

Link copied to clipboard
constructor(parser: FrameParser)

Properties

Link copied to clipboard
val frames: Flow<ByteArray>

Functions

Link copied to clipboard

Synchronous form: appends data and returns the complete frames it produced, in order. Frames returned here are not emitted on frames. Prefer this from sync protocols.

Link copied to clipboard
Link copied to clipboard

Flow form: appends data and emits the resulting complete frames on frames.

Link copied to clipboard
fun reset()