testutil

package
v0.0.0-...-c5b67ef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferRecorder

type BufferRecorder struct {
	// contains filtered or unexported fields
}

BufferRecorder is a buffer that implements the scope.DataRecorder interface. Users should call Wait() to get the data that was recorded in the buffer.

func NewBufferRecorder

func NewBufferRecorder(tb scope.Duration) *BufferRecorder

NewBufferRecorder creates a new test data recorder with timebase equal to tb.

func (*BufferRecorder) Error

func (r *BufferRecorder) Error(err error)

Error reports an acquisition error to the data recorder.

func (*BufferRecorder) Reset

func (r *BufferRecorder) Reset(i scope.Duration, ch <-chan []scope.ChannelData)

Reset prepares a new recording with sample interval i, reading samples from ch.

func (*BufferRecorder) TimeBase

func (r *BufferRecorder) TimeBase() scope.Duration

TimeBase returns the configured timebase (sweep length) of the recorder.

func (*BufferRecorder) Wait

func (r *BufferRecorder) Wait() ([][]scope.Voltage, error)

Wait waits until the source finishes writing data to the recorder. It then returns recorded data and last error reported (if any).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL