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

    Function useSignalDataEnvelopes

    • A hook for extracting signal data envelopes to be used for graphical visualization. The envelopes contain min/max values for signals over time ranges, suitable for plotting.

      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 subscribed signals with their qualified names and optional source identifiers. To avoid unnecessary re-renders, make sure to memoize this object.

      • view: IEnvelopeView

        Optional view parameters to define the time range and width for the envelopes. If startTime and endTime are set then the envelopes will be fetched from history/cached data, otherwise only new/live envelope data will be provided.

      Returns ISignalDataEnvelope[]

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

      This hook subscribes to live envelope data when no view time range is provided. If a view with startTime and endTime is given, it fetches envelopes from historical/cached data instead.