fgen

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: 4

Documentation

Overview

Package fgen provides the Defined Values and other structs, methods, etc. that are common among all intstruments meeting the IVI-4.3: IviFgen Class Specification.

Files are split based on the class capability groups.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base added in v0.3.0

type Base interface {
	// Channels() ([]*BaseChannel, error)
	// Channel(name string) (*BaseChannel, error)
	// ChannelByID(id int) (*BaseChannel, error)
	// ChannelCount() int
	OutputCount() int
}

Base provides the interface required for the IviFgenBase capability group.

type BaseChannel added in v0.3.0

type BaseChannel interface {
	// Name() string
	// VirtualName() string
	OperationMode() (OperationMode, error)
	SetOperationMode(mode OperationMode) error
	OutputEnabled() (bool, error)
	SetOutputEnabled(b bool) error
	DisableOutput() error
	EnableOutput() error
	OutputImpedance() (float64, error)
	SetOutputImpedance(impedance float64) error
}

BaseChannel provides the interface for the channel repeated capability for the IviFgenBase capability group.

type Burst

type Burst interface {
}

Burst provides the interface required for the IviFgenBurst capability group.

type BurstChannel added in v0.3.0

type BurstChannel interface {
	BurstCount() (int, error)
	SetBurstCount(count int) error
}

BurstChannel provides the interface for the channel repeated capability for the IviFgenBurst capability group.

type Channel

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

Channel models a generic FGen channel

func NewChannel

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

NewChannel returns a Channel for a function generator.

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 ClockSource added in v0.3.0

type ClockSource int

ClockSource models the defined values for the Reference Clock Source defined in Section 4.2.7 of IVI-4.3 IviFgenClass Specification.

const (
	RefClockInternal ClockSource = iota
	RefClockExternal
	RefClockRTSIClock
)

Available reference clock source.

type IntTrigger added in v0.4.0

type IntTrigger interface {
	Channels() ([]*IntTriggerChannel, error)
	Channel(name string) (*IntTriggerChannel, error)
	ChannelByID(id int) (*IntTriggerChannel, error)
	ChannelCount() int
}

IntTrigger provides the interface required for the IviFgenInternalTrigger extension group.

type IntTriggerChannel added in v0.4.0

type IntTriggerChannel interface {
	InternalTriggerRate() (float64, error)
	SetInternalTriggerRate(rate float64) error
}

IntTriggerChannel provides the interface for the channel repeated capability for the IviFgenInternalTrigger capability group.

type OperationMode

type OperationMode int

OperationMode provides the defined values for the Operation Mode defined in Section 4.2.2 of IVI-4.3: IviFgen Class Specification.

const (
	ContinuousMode OperationMode = iota
	BurstMode
)

ContinuousMode and BurstMode are the available Operation Modes. "A burst consists of a discrete number of waveform cycles. the user uses the attribute of the IviFgenTrigger Extension Group to configure the trigger, and the attributes of the IviFgenBurst extension group to configure how the function generator produces bursts.

type OutputMode

type OutputMode int

OutputMode determines how the function generator produces waveforms. This attribute determines which extension group's functions and attributes are used to configure the waveform the function generator produces. OutputMode implements the defined values for the Output Mode read-write attribute defined in Section 4.2.5 of IVI-4.3: IviFgen Class Specification.

const (
	Function OutputMode = iota
	Arbitrary
	Sequence
)

Function indicates the IVI driver uses the attributes and functions of the IviFgenStdFunc extension group. Arbitrary indicates the IVI driver uses the attributes and functions of the IviFgenArbWfm extension group.

type StandardWaveform

type StandardWaveform int

StandardWaveform models the defined values for the Standard Waveform defined in Section 5.2.6 of IVI-4.3: IviFgen Class Specification.

const (
	Sine StandardWaveform = iota
	Square
	Triangle
	RampUp
	RampDown
	DC
)

These are the available standard waveforms.

func (StandardWaveform) String

func (wave StandardWaveform) String() string

type StdFunc added in v0.3.0

type StdFunc interface {
	Channels() ([]*StdFuncChannel, error)
	Channel(name string) (*StdFuncChannel, error)
	ChannelByID(id int) (*StdFuncChannel, error)
	ChannelCount() int
}

StdFunc provides the interface required for the IviFgenStdFunc capability group.

type StdFuncChannel added in v0.3.0

type StdFuncChannel interface {
	Amplitude() (float64, error)
	SetAmplitude(amp float64) error
	DCOffset() (float64, error)
	SetDCOffset(offset float64) error
	DutyCycleHigh() (float64, error)
	SetDutyCycleHigh(duty float64) error
	Frequency() (float64, error)
	SetFrequency(freq float64) error
	StartPhase() (float64, error)
	SetStartPhase(start float64) error
	StandardWaveform() (StandardWaveform, error)
	SetStandardWaveform(StandardWaveform) error
	ConfigureStandardWaveform(wave StandardWaveform, amp, offset, freq, phase float64) error
}

StdFuncChannel provides the interface for the channel repeated capability for the IviFgenStdFunc capability group.

type Trigger added in v0.4.0

type Trigger interface {
	Channels() ([]*TriggerChannel, error)
	Channel(name string) (*TriggerChannel, error)
	ChannelByID(id int) (*TriggerChannel, error)
	ChannelCount() int
}

Trigger provides the interface required for the IviFgenTrigger extension group.

type TriggerChannel added in v0.4.0

type TriggerChannel interface {
	TriggerSource() (TriggerSource, error)
	SetTriggerSource(TriggerSource) error
}

TriggerChannel provides the interface for the channel repeated capability for the IviFgenTrigger capability group.

type TriggerSource

type TriggerSource int

TriggerSource models the defined values for the Trigger Source defined in Section 9.2.1 of IVI-4.3: IviFgenClass Specification.

const (
	InternalTrigger TriggerSource = iota
	ExternalTrigger
	SoftwareTrigger
)

These are the available trigger sources.

Directories

Path Synopsis
keysight
key33220
Package key33220 implements the IVI Instrument driver for the Agilent 33220A function generator.
Package key33220 implements the IVI Instrument driver for the Agilent 33220A function generator.
srs
ds345
Package ds345 implements the IVI driver for the Stanford Research System DS345 function generator.
Package ds345 implements the IVI driver for the Stanford Research System DS345 function generator.

Jump to

Keyboard shortcuts

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