Kvaser CanKing GUI Extensions SDK - v7.4.0
    Preparing search index...

    Function useSignalData

    • A hook for extracting signal data from the measurement context. Will return the latest measurement data for the specified signal names.

      Parameters

      • id: number

        The unique id of the view. This is passed to the view component as the id prop.

      • subscriptionName: string

        The subscription name for the data. Must be unique per view. To avoid conflicts, use a descriptive name.

      • subscribedSignals: { qualifiedName: string; sourceId?: string }[]

        The signals to extract data for, including optional source identifiers. To avoid unnecessary re-renders, make sure to memoize this object.

      Returns ISignalData[]

      The extracted signal data. If an empty array is returned, then all previously received data is invalid and should be discarded.

      This hook buffers incoming frame data during initialization (before frame keys and historical data are ready) and merges it with historical data once available. This ensures no data is lost during the startup phase.