@mikaello/emit-punch-cards-communication - v1.0.1
    Preparing search index...

    Class EmitEscanUnpacker

    This class unpacks Uint8Arrays and sends frames and time objects when gained enough data.

    Credits: https://github.com/mdn/dom-examples/blob/master/streams/png-transform-stream/png-transform-stream.js

    Index

    Constructors

    Properties

    data: Uint8Array

    Ringbuffer

    onChunk: ((chunk: UsbFrame | DumpTagFrame) => void) | null

    Everytime a new frame is compiled, this function will get it

    readPosition: number

    Current reading position

    writePosition: number

    New data will be written to this position

    Methods

    • Adds more binary data to unpack.

      Parameters

      • uint8Array: Uint8Array

        The data to add.

      Returns void

    • Checks whether new chunks can be found within the binary data.

      Parameters

      • completeReadingPosition: number

      Returns void

    • Parameters

      • frameData: Uint8Array

      Returns DumpTagFrame

    • Parameters

      • frameData: Uint8Array

      Returns UsbFrame