web-serial-rxjs API Documentation
    Preparing search index...

    Interface SerialSessionFeatureOptions

    Library-specific options for createSerialSession that are not passed to W3C port.open.

    Responsibility split (Issue #488):

    Connection parameters (baudRate, dataBits, …) live on SerialConnectionOptions and are composed into SerialSessionOptions. Minimal callers typically only set baudRate; other fields keep safe defaults.

    interface SerialSessionFeatureOptions {
        filters?: SerialPortFilter[];
        lineBuffer?: LineBufferOptions;
        terminalBuffer?: TerminalBufferOptions;
    }

    Hierarchy (View Summary)

    Index
    filters?: SerialPortFilter[]

    Filters for port selection when requesting a port.

    When specified, the port selection dialog will only show devices matching these filters. Each filter can specify usbVendorId and/or usbProductId. Not passed to port.open.

    lineBuffer?: LineBufferOptions

    Limits for the incomplete line tail held by SerialSession.lines$ framing. When exceeded, leading characters are discarded and a non-fatal SerialErrorCode.LINE_BUFFER_OVERFLOW is emitted on SerialSession.errors$. Character counts use UTF-16 string length.

    Pass 0 for maxChars to disable the limit (unlimited). Negative values, non-integers, NaN, and Infinity are rejected at factory time.

    { maxChars: 1048576 } (see DEFAULT_SERIAL_SESSION_OPTIONS)

    terminalBuffer?: TerminalBufferOptions

    Limits for SerialSession.terminalText$ display memory. Oldest completed lines and leading characters are dropped when exceeded. Character counts use UTF-16 string length (JavaScript .length).

    Pass 0 for maxLines or maxChars to disable that limit (unlimited). Negative values, non-integers, NaN, and Infinity are rejected at factory time.

    { maxLines: 10000, maxChars: 1048576, stripAnsi: true } (see DEFAULT_SERIAL_SESSION_OPTIONS)