Documentation ¶
Overview ¶
Package swtch provides the Defined Values and other structs, interfaces, methods, etc. that are common among all instruments meeting the IVI-4.6: IviSwtch Class Specification.
Files are split based on the class capability groups.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrPathExists = errors.New("path exists") ErrPathUnsupported = errors.New("path unsupported") ErrResourceInUse = errors.New("resource in use") ErrSourceConflict = errors.New("source conflict") ErrChannelNotAvailable = errors.New("channel not available") )
Error values for the PathCapability Parameter used in the CanConnect method as defined in Section 4.3.1 of IVI-4.6: IviSwtch Class Specification.
var ( ErrExplicitConnectionExists = errors.New("explicit connection exists") ErrIsConfigChannel = errors.New("is config channel") ErrAttemptToConnectSources = errors.New("attempt to connect sources") ErrCannotConnectToSelf = errors.New("cannot connect to self") ErrPathNotFound = errors.New("path not found") )
Error values that can be returned by the Connect method as defined in Section 4.3.2 of IVI-6.4: IviSwtch Class Specification.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base interface { CanConnect(ch1, ch2 string) error Channel(name string) (BaseChannel, error) ChannelByID(id int) (BaseChannel, error) ChannelCount() int Channels() ([]BaseChannel, error) Connect(ch1, ch2 string) error Disconnect(ch1, ch2 string) error DisconnectAll() error GetPath(ch1, ch2 string) ([]string, error) SetPath(chs []string) error WaitForDebounce(maxTime time.Duration) error SetVirtualNames(names []string) error }
Base provides the interface required for the IviSwtchBase capability group.
type BaseChannel ¶
type BaseChannel interface { ACCurrentCarryMax() float64 ACCurrentSwitchingMax() float64 ACPowerCarryMax() float64 ACPowerSwitchingMax() float64 ACVoltageMax() float64 Bandwidth() float64 DCCurrentCarryMax() float64 DCCurrentSwitchingMax() float64 DCPowerCarryMax() float64 DCPowerSwitchingMax() float64 DCVoltageMax() float64 DisableConfigChannel() error DisableSourceChannel() error EnableConfigChannel() error EnableSourceChannel() error Impedance() float64 IsConfigChannel() bool IsDebounced() bool IsSourceChannel() bool Name() string SetConfigChannel(b bool) error SetSourceChannel(b bool) error SettlingTime() time.Duration VirtualName() string WireMode() int }
BaseChannel provides the interface for the channel repeated capability for the IviSwtchBase capability group.
type Channel ¶
type Channel struct {
// contains filtered or unexported fields
}
Channel models the repeated capability of a generic channel.
func NewChannel ¶
func NewChannel(id int, name string, inst ivi.Instrument) Channel
NewChannel returns a Channel for a switch.
func (*Channel) QueryFloat64 ¶
QueryFloat64 queries the channel and returns a float64.
func (*Channel) QueryString ¶
QueryString queries the channel and returns a string.