Avena Webapp API - v0.0.1
    Preparing search index...

    One channel of the plot page.

    Index

    Constructors

    • Parameters

      • channel: number

        LabJack channel number.

      • autoTimeWindowSec: number

        Automatic X window; the default X window and post trigger window.

      Returns ChannelView

    Properties

    axis: AxisSettings = ...

    Axis settings. Replaced, never changed in place.

    axisError: string = ...

    Why the last typed axis limit was rejected, or "".

    capture: TriggerCapture | null = ...

    The current trigger capture, if any. advanceTrigger extends it in place; the plot reads its data again on each snapshot.

    channel: number

    LabJack channel number.

    filter: LiveChannelFilter | null = null

    The channel's noise filters, or null when none runs at the configured rate. Not reactive; see live-filter.ts.

    filterDescription: string = ...

    Short description of the configured filters, e.g. despike, −10 Hz; "" for none.

    filterPlan: FilterPlan | null = ...

    What runs at the configured rate, for the filter notes; null without filters.

    live: LiveChannel = ...

    Rolling live buffer and stream state. Not reactive: changed in place on every message. Sorted by sample time with no duplicates (see stream.ts).

    liveData: DataPoint[] = ...

    Copy of the newest part of the live buffer, drawn by the plot.

    mode: ChannelPlotMode = ...

    Plot mode, chosen in the Plot Mode select.

    prebufferReady: boolean = ...

    True when the buffer spans the pre-trigger window. Set true in free run.

    showFiltered: boolean = ...

    Filtered / Raw switch of the plot. Not saved.

    streamStatus: ChannelStreamStatus | null = ...

    Stream counters shown in Data Statistics; null until the first snapshot.

    trigger: TriggerSettings = ...

    Trigger settings. Replaced, never changed in place.

    triggered: boolean = ...

    True while a trigger capture is held.

    triggerTime: number = ...

    Time of the last trigger in Unix ms, or 0 when not triggered.

    Methods

    • Applies a typed Y Min, Y Max or X Window.

      Any finite number is accepted, including 0, as long as Y Min stays below Y Max and the X window is above 0 (see applyAxisLimitInput). Otherwise the reason is kept in axisError.

      Parameters

      • field: keyof AxisLimits

        Limit being edited.

      • text: string

        Text typed in the input.

      Returns string | null

      null when applied, else the value to put back into the input.

    • Applies a typed trigger threshold or post-trigger window. Any finite threshold is accepted, including 0; the post window must be at least 0.01 s.

      Parameters

      • field: "threshold" | "postTriggerWindowSec"

        Setting being edited.

      • text: string

        Text typed in the input.

      Returns string | null

      null when applied, else the value to put back into the input.

    • Sets up the channel's noise filters from its config.

      Parameters

      • settings: ChannelFilterSettings | undefined

        The channel's sensor_settings.filters entry, if any.

      • calibration: CalibrationSpec

        The channel's calibration.

      • scanRateHz: number

        Configured scan rate, used for the notes; the filter itself follows the rate of the data.

      Returns void

    • Empties the buffer, stream state, counters, snapshot and trigger capture, so the next data starts a fresh trace.

      Returns void

    • Changes the plot mode.

      Switching between the two trigger modes keeps the current capture; any other change clears it. The pre-buffer flag is recomputed from the live buffer.

      Parameters

      Returns boolean

      false when the mode did not change.

    • Sets the pre-trigger share from typed text: an integer clamped to 0 to 95, and 0 for anything that is not a number.

      Parameters

      • text: string

        Text typed in the input.

      Returns void

    • Switches the plot between filtered and raw (calibrated) values. The live buffer is switched in place and the trigger is re-armed, since its level was crossed by the other trace.

      Parameters

      • show: boolean

        true for filtered.

      Returns void

    • Sets the trigger edge.

      Parameters

      • type: "rising" | "falling"

        rising or falling.

      Returns void

    • Merges changes into the axis settings and clears the axis input message, which described an earlier rejected value.

      Parameters

      Returns void