Table of Contents

Class WaveformView

Namespace
Bonsai.Dsp.Design
Assembly
Bonsai.Dsp.Design.dll

Represents a dynamic waveform oscilloscope style control used to display multi-dimensional matrices where each row represents an independent channel.

public class WaveformView : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl
Inheritance
WaveformView
Implements
Inherited Members

Constructors

WaveformView()

Initializes a new instance of the WaveformView class.

public WaveformView()

Properties

AutoScaleX

Gets or sets a value indicating whether to compute the range of the x-axis automatically based on the range of the data that is included in the graph.

public bool AutoScaleX { get; set; }

Property Value

bool

AutoScaleY

Gets or sets a value indicating whether to compute the range of the y-axis automatically based on the range of the data that is included in the graph.

public bool AutoScaleY { get; set; }

Property Value

bool

ChannelOffset

Gets or sets a value which will be added to the samples of each channel, proportional to channel index, for the purposes of visualization.

public double ChannelOffset { get; set; }

Property Value

double

ChannelsPerPage

Gets or sets the maximum number of channels which should be included in a single page.

public int ChannelsPerPage { get; set; }

Property Value

int

HistoryLength

Gets or sets a value specifying how many previous data buffers to store and display in the graph.

public int HistoryLength { get; set; }

Property Value

int

Remarks

Each buffer can contain multiple samples, which means the total number of samples displayed in the graph will be HistoryLength * BufferLength, where BufferLength is the number of samples per buffer.

OverlayChannels

Gets or sets a value indicating whether to overlay the traces of all the channels in the page into a single waveform graph. If this value is false, channels will be displayed individually in separate graph panes.

public bool OverlayChannels { get; set; }

Property Value

bool

SelectedChannels

Gets a collection of indices to the channels to display when the control is in overlay mode.

public Collection<int> SelectedChannels { get; }

Property Value

Collection<int>

SelectedPage

Gets or sets the currently selected channel page. Channels in the currently selected page will be the ones displayed in the graph.

public int SelectedPage { get; set; }

Property Value

int

WaveformBufferLength

Gets or sets a value specifying how many previous traces to overlay for each channel.

public int WaveformBufferLength { get; set; }

Property Value

int

Remarks

This allows overlaying historical traces rather than appending them in time.

XMax

Gets or sets the upper bound of the x-axis displayed in the graph.

public double XMax { get; set; }

Property Value

double

XMin

Gets or sets the lower bound of the x-axis displayed in the graph.

public double XMin { get; set; }

Property Value

double

YMax

Gets or sets the upper bound of the y-axis displayed in the graph.

public double YMax { get; set; }

Property Value

double

YMin

Gets or sets the lower bound of the y-axis displayed in the graph.

public double YMin { get; set; }

Property Value

double

Methods

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if managed resources should be disposed; otherwise, false.

InvalidateWaveform()

Invalidates the entire waveform graph and causes the underlying control to be redrawn.

public void InvalidateWaveform()

OnAxisChanged(EventArgs)

Raises the AxisChanged event.

protected virtual void OnAxisChanged(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

OnSelectedPageChanged(EventArgs)

Raises the SelectedPageChanged event.

protected virtual void OnSelectedPageChanged(EventArgs e)

Parameters

e EventArgs

An EventArgs that contains the event data.

ProcessDialogKey(Keys)

Processes a dialog key.

protected override bool ProcessDialogKey(Keys keyData)

Parameters

keyData Keys

One of the Keys values that represents the key to process.

Returns

bool

true if the key was processed by the control; otherwise, false.

Events

AutoScaleXChanged

Occurs when the AutoScaleX property changes.

public event EventHandler AutoScaleXChanged

Event Type

EventHandler

AutoScaleYChanged

Occurs when the AutoScaleY property changes.

public event EventHandler AutoScaleYChanged

Event Type

EventHandler

AxisChanged

Occurs when the scale ranges of the axes of the waveform view are recalculated.

public event EventHandler AxisChanged

Event Type

EventHandler

SelectedPageChanged

Occurs when the SelectedPage property changes.

public event EventHandler SelectedPageChanged

Event Type

EventHandler