Package jisa.visa.drivers
Class VISADriver
- java.lang.Object
-
- jisa.visa.drivers.VISADriver
-
- All Implemented Interfaces:
Driver
- Direct Known Subclasses:
AGVISADriver
,NIVISADriver
,RSVISADriver
public abstract class VISADriver extends java.lang.Object implements Driver
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
VISADriver.VISAConnection
class
VISADriver.VISAGPIBConnection
class
VISADriver.VISALXIConnection
class
VISADriver.VISASerialConnection
class
VISADriver.VISATCPIPConnection
class
VISADriver.VISAUSBConnection
-
Field Summary
Fields Modifier and Type Field Description protected static int
_VI_ERROR
protected static java.lang.String
ENCODING
protected static java.util.List<java.lang.Integer>
SUCCESS_CODES
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 VISADriver()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
initialise()
protected abstract VISANativeInterface
lib()
void
newRM()
Connection
open(Address address)
Attempts to open a connection to the instrument at the given address.void
reset()
protected com.sun.jna.NativeLong
rm()
java.util.List<Address>
search()
Use this driver to find instruments.protected static java.nio.ByteBuffer
stringToByteBuffer(java.lang.String source)
protected static java.nio.ByteBuffer
stringToByteBuffer(java.lang.String source, java.nio.charset.Charset charset)
boolean
worksWith(Address address)
-
-
-
Field Detail
-
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
-
SUCCESS_CODES
protected static final java.util.List<java.lang.Integer> SUCCESS_CODES
-
ENCODING
protected static final java.lang.String ENCODING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VISADriver
public VISADriver() throws VISAException
- Throws:
VISAException
-
-
Method Detail
-
stringToByteBuffer
protected static java.nio.ByteBuffer stringToByteBuffer(java.lang.String source, java.nio.charset.Charset charset)
-
stringToByteBuffer
protected static java.nio.ByteBuffer stringToByteBuffer(java.lang.String source)
-
reset
public void reset() throws VISAException
- Specified by:
reset
in interfaceDriver
- Throws:
VISAException
-
rm
protected com.sun.jna.NativeLong rm()
-
lib
protected abstract VISANativeInterface lib()
-
initialise
protected abstract void initialise() throws VISAException
- Throws:
VISAException
-
newRM
public void newRM() throws VISAException
- Throws:
VISAException
-
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<Address> search() throws VISAException
Description copied from interface:Driver
Use this driver to find instruments.- Specified by:
search
in interfaceDriver
- Returns:
- Array of found instrument addresses.
- Throws:
VISAException
- If it goes wrong
-
-