dsa

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package dsa provides the Defined Values and other structs, methods, etc. that are common among all Dynamic Signal Analyzers (DSA). Note, DSAs are not included in one of the IVI specifications.

Index

Constants

This section is empty.

Variables

View Source
var SourceShapes = map[string]SourceShape{
	"SIN":  Sine,
	"RAND": Random,
	"BRAN": BurstRandom,
	"PCH":  PeriodicChirp,
	"BCH":  BurstChirp,
	"PINK": Pink,
}

SourceShapes maps the string value to the SourceShape.

Functions

This section is empty.

Types

type AmpUnits

type AmpUnits int

AmpUnits models the defined values for amplitude units.

const (
	DBVRMS AmpUnits = iota
	VPK
	DBVPK
	V
	DBV
	VRMS
)

These are the available amplitude units.

func (AmpUnits) String

func (a AmpUnits) String() string

type Channel

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

Channel models a generic DSA channel

func NewChannel

func NewChannel(id int, name string, inst ivi.Instrument) Channel

NewChannel returns a Channel for a DSA.

func (*Channel) QueryBool

func (ch *Channel) QueryBool(cmd string) (bool, error)

QueryBool queries the channel and returns a bool.

func (*Channel) QueryFloat64

func (ch *Channel) QueryFloat64(cmd string) (float64, error)

QueryFloat64 queries the channel and returns a float64.

func (*Channel) QueryInt

func (ch *Channel) QueryInt(cmd string) (int, error)

QueryInt queries the channel and returns an int.

func (*Channel) QueryString

func (ch *Channel) QueryString(cmd string) (string, error)

QueryString queries the channel and returns a string.

func (*Channel) Set

func (ch *Channel) Set(format string, a ...interface{}) error

Set writes the format string, using the given paarameters to the channel.

type SourceShape

type SourceShape string

SourceShape models the defined values for the Source Shape.

const (
	Sine          SourceShape = "SIN"  // Sinusoidal Waveform
	Random        SourceShape = "RAND" // Random Noise
	BurstRandom   SourceShape = "BRAN" // Burst Random Noise
	PeriodicChirp SourceShape = "PCH"  // Periodic Chirp
	BurstChirp    SourceShape = "BCH"  // Burst Chirp
	Pink          SourceShape = "PINK" // Pink Noise
)

These are the available source waveforms.

func (SourceShape) String

func (shape SourceShape) String() string

Directories

Path Synopsis
keysight

Jump to

Keyboard shortcuts

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