NMEA Web Serial
    Preparing search index...

    Interface NmeaMachineConfig<TData, TPackets>

    Configuration for creating an NMEA machine.

    interface NmeaMachineConfig<
        TData,
        TPackets extends Record<string, PacketStub | undefined>,
    > {
        adapter: (packets: TPackets) => TData;
        allowedSentenceIds?: readonly string[];
        initialData: TData;
        initialPackets: TPackets;
    }

    Type Parameters

    • TData

      The type of computed/translated data stored in context.

    • TPackets extends Record<string, PacketStub | undefined>

      The type of stored packets (typically a record of sentence ID to packet).

    Index

    Properties

    adapter: (packets: TPackets) => TData

    Function that transforms stored packets into the computed data type.

    allowedSentenceIds?: readonly string[]

    Optional list of sentence IDs to filter and store. If not provided, all parsed sentences are stored.

    initialData: TData

    Initial computed data value.

    initialPackets: TPackets

    Initial stored packets value.