Package jisa.visa

Class 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).
    • 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 interface Instrument
        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 interface Instrument
        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 interface Instrument
        Parameters:
        mSec - Timeout, in milliseconds