Package jisa.visa.drivers
Class GPIBDriver
- java.lang.Object
-
- jisa.visa.drivers.GPIBDriver
-
- All Implemented Interfaces:
Driver
- Direct Known Subclasses:
LinuxGPIBDriver
,NIGPIBDriver
public abstract class GPIBDriver extends java.lang.Object implements Driver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
GPIBDriver.GPIBConnection
Implementation of Connection for GPIB-based connections
-
Field Summary
Fields Modifier and Type Field Description protected static int
_VI_ERROR
protected static java.util.HashMap<java.lang.Long,com.sun.jna.NativeLong>
instruments
protected static java.lang.String
OS_NAME
protected static java.lang.String
responseEncoding
protected static int
VI_FALSE
protected static int
VI_NULL
protected static int
VI_SUCCESS
protected static int
VI_TRUE
protected static long
VISA_ERROR
-
Constructor Summary
Constructors Constructor Description GPIBDriver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract int
getIBCNT()
protected abstract int
getIBERR()
protected abstract int
getIBSTA()
protected abstract void
initialise()
protected abstract GPIBNativeInterface
lib()
Connection
open(Address address)
Attempts to open a connection to the instrument at the given address.void
reset()
java.util.List<GPIBAddress>
search()
Use this driver to find instruments.java.util.List<GPIBAddress>
search(int board)
protected boolean
wasError()
boolean
worksWith(Address address)
-
-
-
Field Detail
-
OS_NAME
protected static final java.lang.String OS_NAME
-
responseEncoding
protected static final java.lang.String responseEncoding
- See Also:
- Constant Field Values
-
VISA_ERROR
protected static final long VISA_ERROR
- See Also:
- Constant Field Values
-
_VI_ERROR
protected static final int _VI_ERROR
- See Also:
- Constant Field Values
-
VI_SUCCESS
protected static final int VI_SUCCESS
- See Also:
- Constant Field Values
-
VI_NULL
protected static final int VI_NULL
- See Also:
- Constant Field Values
-
VI_TRUE
protected static final int VI_TRUE
- See Also:
- Constant Field Values
-
VI_FALSE
protected static final int VI_FALSE
- See Also:
- Constant Field Values
-
instruments
protected static java.util.HashMap<java.lang.Long,com.sun.jna.NativeLong> instruments
-
-
Constructor Detail
-
GPIBDriver
public GPIBDriver() throws VISAException
- Throws:
VISAException
-
-
Method Detail
-
initialise
protected abstract void initialise() throws VISAException
- Throws:
VISAException
-
lib
protected abstract GPIBNativeInterface lib()
-
wasError
protected boolean wasError()
-
getIBSTA
protected abstract int getIBSTA()
-
getIBERR
protected abstract int getIBERR()
-
getIBCNT
protected abstract int getIBCNT()
-
open
public Connection open(Address address) throws VISAException
Description copied from interface:Driver
Attempts to open a connection to the instrument at the given address. Returns a Connection object if successful.- Specified by:
open
in interfaceDriver
- Parameters:
address
- Address of the instrument to open- Returns:
- Connection object representing newly opened connection
- Throws:
VISAException
- If it goes wrong
-
search
public java.util.List<GPIBAddress> search()
Description copied from interface:Driver
Use this driver to find instruments.
-
search
public java.util.List<GPIBAddress> search(int board) throws VISAException
- Throws:
VISAException
-
-