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 void
close()
Closes the connection to the instrument.Address
getAddress()
Returns any Address object used to connect to this instrument.java.lang.String
read()
byte[]
readBytes()
double
readDouble()
int
readInt()
void
setTimeout(int mSec)
Sets the timeout for read/write operations to this instrument (if applicable).void
write(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.IOException
Description copied from interface:Instrument
Closes the connection to the instrument.- Specified by:
close
in interfaceInstrument
- Throws:
java.io.IOException
- Upon communications error
-
getAddress
public Address getAddress()
Description copied from interface:Instrument
Returns any Address object used to connect to this instrument.- Specified by:
getAddress
in 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:Instrument
Sets the timeout for read/write operations to this instrument (if applicable).- Specified by:
setTimeout
in interfaceInstrument
- Parameters:
mSec
- Timeout, in milliseconds
-
-