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 classVISADriver.VISAConnectionclassVISADriver.VISAGPIBConnectionclassVISADriver.VISALXIConnectionclassVISADriver.VISASerialConnectionclassVISADriver.VISATCPIPConnectionclassVISADriver.VISAUSBConnection
-
Field Summary
Fields Modifier and Type Field Description protected static int_VI_ERRORprotected static java.lang.StringENCODINGprotected static java.util.List<java.lang.Integer>SUCCESS_CODESprotected static intVI_FALSEprotected static intVI_NULLprotected static intVI_SUCCESSprotected static intVI_TRUEprotected static longVISA_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 voidinitialise()protected abstract VISANativeInterfacelib()voidnewRM()Connectionopen(Address address)Attempts to open a connection to the instrument at the given address.voidreset()protected com.sun.jna.NativeLongrm()java.util.List<Address>search()Use this driver to find instruments.protected static java.nio.ByteBufferstringToByteBuffer(java.lang.String source)protected static java.nio.ByteBufferstringToByteBuffer(java.lang.String source, java.nio.charset.Charset charset)booleanworksWith(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:
resetin 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:DriverAttempts to open a connection to the instrument at the given address. Returns a Connection object if successful.- Specified by:
openin 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:DriverUse this driver to find instruments.- Specified by:
searchin interfaceDriver- Returns:
- Array of found instrument addresses.
- Throws:
VISAException- If it goes wrong
-
-