Package jisa.visa
Class PipeDevice
- java.lang.Object
-
- jisa.visa.PipeDevice
-
- All Implemented Interfaces:
Instrument
public abstract class PipeDevice extends java.lang.Object implements Instrument
Abstract base class for creating device drivers that communicate using Windows Named Pipes (eugh).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jisa.devices.interfaces.Instrument
Instrument.AutoQuantity<S>, Instrument.OptionalQuantity<S>, Instrument.Parameter<S>, Instrument.Setter<S>, Instrument.TableQuantity
-
-
Constructor Summary
Constructors Constructor Description PipeDevice(Address address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the connection to the instrument.AddressgetAddress()Returns any Address object used to connect to this instrument.java.lang.Stringread()byte[]readBytes()doublereadDouble()intreadInt()voidsetTimeout(int mSec)Sets the timeout for read/write operations to this instrument (if applicable).voidwrite(java.lang.String toWrite, java.lang.Object... params)-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jisa.devices.interfaces.Instrument
getConfigurationParameters, getConfigurationParameters, getIDN, getLockObject, getName
-
-
-
-
Constructor Detail
-
PipeDevice
public PipeDevice(Address address) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
close
public void close() throws java.io.IOExceptionDescription copied from interface:InstrumentCloses the connection to the instrument.- Specified by:
closein interfaceInstrument- Throws:
java.io.IOException- Upon communications error
-
getAddress
public Address getAddress()
Description copied from interface:InstrumentReturns any Address object used to connect to this instrument.- Specified by:
getAddressin interfaceInstrument- Returns:
- Address object, null if none
-
read
public java.lang.String read() throws java.io.IOException- Throws:
java.io.IOException
-
readInt
public int readInt() throws java.io.IOException- Throws:
java.io.IOException
-
readDouble
public double readDouble() throws java.io.IOException- Throws:
java.io.IOException
-
readBytes
public byte[] readBytes() throws java.io.IOException- Throws:
java.io.IOException
-
write
public void write(java.lang.String toWrite, java.lang.Object... params) throws java.io.IOException- Throws:
java.io.IOException
-
setTimeout
public void setTimeout(int mSec)
Description copied from interface:InstrumentSets the timeout for read/write operations to this instrument (if applicable).- Specified by:
setTimeoutin interfaceInstrument- Parameters:
mSec- Timeout, in milliseconds
-
-