Documentation
¶
Overview ¶
Package ivi provides a Go-based implementation of the Interchangeable Virtual Instrument (IVI) standard. The IVI Specifications developed by the IVI Foundation provide standardized APIs for programming test instruments, such as oscilloscopes, power supplies, and function generators.
The main advantage of the ivi package is not having to learn the Standard Commands for Programmable Instruments (SCPI) commands for each individual piece of test equipment. Contrary to the name, SCPI commands differ from one piece of test equipment to another. For instance, with ivi both the Agilent 33220A and the Stanford Research Systems DS345 function generators can be programmed using one API.
Currently, ivi doesn't cache state. Every time an attribute is read directly from the instrument. Development focus is currently on fleshing out the APIs and creating a few IVI drivers for each instrument type.
Index ¶
- Variables
- func QueryID(q Querier) (string, error)
- func Set(sw StringWriter, format string, a ...interface{}) error
- type Commander
- type Inherent
- func (inherent *Inherent) Clear() error
- func (inherent *Inherent) Disable() error
- func (inherent *Inherent) FirmwareRevision() (string, error)
- func (inherent *Inherent) InstrumentManufacturer() (string, error)
- func (inherent *Inherent) InstrumentModel() (string, error)
- func (inherent *Inherent) InstrumentSerialNumber() (string, error)
- func (inherent *Inherent) Reset() error
- type InherentBase
- type Instrument
- type Number
- type Querier
- type StringWriter
- type Waveform
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Set ¶
func Set(sw StringWriter, format string, a ...interface{}) error
Set formats according to a format specifier and then writes the resulting string to the given StringWriter interface.
Types ¶
type Inherent ¶
type Inherent struct { InherentBase // contains filtered or unexported fields }
Inherent provides the inherent capabilities for all IVI instruments.
func NewInherent ¶
func NewInherent(inst Instrument, base InherentBase) Inherent
NewInherent creates a new Inherent struct using the given Instrument interface and the InherentBase struct.
func (*Inherent) Disable ¶
Disable places the instrument in a quiescent state as quickly as possible. Disable provides the method described in Section 6.4 of IVI-3.2: Inherent Capabilities Specification.
func (*Inherent) FirmwareRevision ¶
FirmwareRevision queries the instrument and returns the firmware revision of the instrument. FirmwareRevision is the getter for the read-only inherent attribute Instrument Firmware Revision described in Section 5.18 of IVI-3.2: Inherent Capabilities Specification.
func (*Inherent) InstrumentManufacturer ¶
InstrumentManufacturer queries the instrument and returns the manufacturer of the instrument. InstrumentManufacturer is the getter for the read-only inherent attribute Instrument Manufacturer described in Section 5.19 of IVI-3.2: Inherent Capabilities Specification.
func (*Inherent) InstrumentModel ¶
InstrumentModel queries the instrument and returns the model of the instrument. InstrumentModel is the getter for the read-only inherent attribute Instrument Model described in Section 5.20 of IVI-3.2: Inherent Capabilities Specification.
func (*Inherent) InstrumentSerialNumber ¶
InstrumentSerialNumber queries the instrument and returns the S/N of the instrument.
type InherentBase ¶
type InherentBase struct { ClassSpecRevision string IDNString string GroupCapabilities []string SupportedInstrumentModels []string SupportedBusInterfaces []string ClassSpecMajorVersion int ClassSpecMinorVersion int ResetDelay time.Duration ClearDelay time.Duration }
InherentBase provides the exported properties for the inherent capabilities of all IVI instruments.
type Instrument ¶
type Instrument interface { Read(p []byte) (n int, err error) Write(p []byte) (n int, err error) WriteString(s string) (n int, err error) Command(format string, a ...any) error Query(s string) (value string, err error) }
Instrument provides the interface required for all IVI Instruments.
type Querier ¶
Querier provides the interface to query using a given string and provide the resultant string.
type StringWriter ¶
StringWriter provides the interface to write a string.
Directories
¶
Path | Synopsis |
---|---|
Package com provides information about communication ports (Ethernet, serial, etc.) for various IVI devices.
|
Package com provides information about communication ports (Ethernet, serial, etc.) for various IVI devices. |
Package dcpwr provides the defined values, interfaces, structs, methods, and enums that are common among all intstruments meeting the IVI-4.4: IviDCPwr Class Specification, Revision 3.0 dated September 24, 2015.
|
Package dcpwr provides the defined values, interfaces, structs, methods, and enums that are common among all intstruments meeting the IVI-4.4: IviDCPwr Class Specification, Revision 3.0 dated September 24, 2015. |
keysight/e36xx
Package e36xx implements the IVI driver for the Keysight/Agilent E3600 series of power supplies.
|
Package e36xx implements the IVI driver for the Keysight/Agilent E3600 series of power supplies. |
kikusui/pmx
Package pmx implements the IVI driver for the KIKUSUI PMX series of regulated DC power supplies.
|
Package pmx implements the IVI driver for the KIKUSUI PMX series of regulated DC power supplies. |
rigol/dp800
Package dp800 implements the IVI driver for the Rigol DP800 series of programmable linear DC power supplies.
|
Package dp800 implements the IVI driver for the Rigol DP800 series of programmable linear DC power supplies. |
Package dmm provides the defined values, interfaces, structs, methods, and enums that are common among all instruments meeting the IVI-4.2: IviFDmm Class Specification, Revision 4.1 dated October 14, 2016.
|
Package dmm provides the defined values, interfaces, structs, methods, and enums that are common among all instruments meeting the IVI-4.2: IviFDmm Class Specification, Revision 4.1 dated October 14, 2016. |
fluke/fluke45
Package fluke45 implements the IVI driver for the Fluke 45 DMM.
|
Package fluke45 implements the IVI driver for the Fluke 45 DMM. |
keysight/key3446x
Package key3446x implements the IVI Instrument driver for the Keysight 3446x family of DMM.
|
Package key3446x implements the IVI Instrument driver for the Keysight 3446x family of DMM. |
Package dsa provides the Defined Values and other structs, methods, etc.
|
Package dsa provides the Defined Values and other structs, methods, etc. |
Package fgen provides the defined values, interfaces, structs, methods, and enums that are common among all instruments meeting the IVI-4.3: IviFgen Class Specification, Revision 5.2 dated October 14, 2016.
|
Package fgen provides the defined values, interfaces, structs, methods, and enums that are common among all instruments meeting the IVI-4.3: IviFgen Class Specification, Revision 5.2 dated October 14, 2016. |
keysight/key33220
Package key33220 implements the IVI driver for the Keysight/Agilent 33220A and 33210A function/arbitrary waveform generators.
|
Package key33220 implements the IVI driver for the Keysight/Agilent 33220A and 33210A function/arbitrary waveform generators. |
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. |
Package load provides the Defined Values and other structs, methods, etc.
|
Package load provides the Defined Values and other structs, methods, etc. |
siglent/sdl10xx
Package sdl10xx implements the IVI driver for the Signlent SDL1000X and SDL1030X DC electronic loads.
|
Package sdl10xx implements the IVI driver for the Signlent SDL1000X and SDL1030X DC electronic loads. |
Package scope provides the defined values, interfaces, structs, methods, and enums that are common among all instruments meeting the IVI-4.1: IviScope Class Specification, Revision 4.1 dated October 14, 2016.
|
Package scope provides the defined values, interfaces, structs, methods, and enums that are common among all instruments meeting the IVI-4.1: IviScope Class Specification, Revision 4.1 dated October 14, 2016. |
keysight/infiniivision
Package infiniivision implements the IVI driver for various Keysight oscilloscopes.
|
Package infiniivision implements the IVI driver for various Keysight oscilloscopes. |
Package specan provides the defined values, interfaces, structs, methods, and enums that are common among all instruments meeting the IVI-4.8: IviSpecAn Class Specification, Revision 2.0 dated March 3, 2017.
|
Package specan provides the defined values, interfaces, structs, methods, and enums that are common among all instruments meeting the IVI-4.8: IviSpecAn Class Specification, Revision 2.0 dated March 3, 2017. |
keysight/esa
Package esa implements the IVI driver for the Agilent ESA series spectrum analyzers.
|
Package esa implements the IVI driver for the Agilent ESA series spectrum analyzers. |
Package swtch provides the defined values, interfaces, structs, methods, and enums that are common among all instruments meeting the IVI-4.6: IviSwtch Class Specification, Revision 4.0 dated March 3, 2017.
|
Package swtch provides the defined values, interfaces, structs, methods, and enums that are common among all instruments meeting the IVI-4.6: IviSwtch Class Specification, Revision 4.0 dated March 3, 2017. |
keysight/u2751a
Package u2751a implements the IVI driver for the Keysight U2751A 4x8 2-wire switch matrix.
|
Package u2751a implements the IVI driver for the Keysight U2751A 4x8 2-wire switch matrix. |