func (d *Driver) OpenAllChans() (status vi.Status) {
	b := []byte("OPEN:ALL")
	_, status = d.Write(b, uint32(len(b)))
	return
}
OpenAllChans Opens all channels.
package keithley
import (
	"fmt"
	"os"
	vi "github.com/jpoirier/visa"
)
type Driver struct {
	vi.Driver
}
func OpenGpib(rm vi.Session, ctrl, addr, mode, timeout uint32) (*Driver, vi.Status) {
	name := fmt.Sprintf("GPIB%d::%d", ctrl, addr)
	instr, status := rm.Open(name, mode, timeout)
	if status < vi.SUCCESS {
		fmt.Println("Error, OpenGpib failed with error: ", status)
		os.Exit(0)
	}
	return &Driver{instr}, status
}
func OpenTCP(rm vi.Session, ip string, mode, timeout uint32) (*Driver, vi.Status) {
	if len(ip) == 0 {
		fmt.Println("Error, empty ip address string.")
		os.Exit(0)
	}
	name := fmt.Sprintf("TCPIP::%s::INSTR", ip)
	instr, status := rm.Open(name, mode, timeout)
	if status < vi.SUCCESS {
		fmt.Println("Error, OpenGpib failed with error: ", status)
		os.Exit(0)
	}
	return &Driver{instr}, status
}
func (d *Driver) Reset() (status vi.Status) {
	b := []byte("*RST")
	_, status = d.Write(b, uint32(len(b)))
	return
}
func (d *Driver) OpenChan(ch uint32) (status vi.Status) {
	b := fmt.Sprintf("OPEN (@%d)", ch)
	_, status = d.Write([]byte(b), uint32(len(b)))
	return
}