pamoja for TypeScript - v0.1.17
    Preparing search index...

    Reassembles whole SLIP frames from the chunks a serial port delivers.

    const decoder = new SlipDecoder()
    port.on('data', (chunk) => {
    for (const frame of decoder.feed(chunk)) handle(frame)
    })
    Index
    • get discarded(): number

      How many corrupt frames this decoder has discarded.

      Returns number

    • Feeds a chunk of the stream.

      Parameters

      • chunk: Uint8Array

        The bytes just read from the port.

      Returns Buffer<ArrayBufferLike>[]

      Every frame this chunk completed, in order, which is often none.

    • Discards any partly assembled frame.

      Returns void