Package jisa.visa

Class NativeDevice<I extends com.sun.jna.Library>

  • All Implemented Interfaces:
    Instrument
    Direct Known Subclasses:
    USBTC08

    public abstract class NativeDevice<I extends com.sun.jna.Library>
    extends java.lang.Object
    implements Instrument
    • Field Detail

      • lib

        protected I extends com.sun.jna.Library lib
      • name

        protected java.lang.String name
    • Constructor Detail

      • NativeDevice

        public NativeDevice​(java.lang.String libraryName,
                            java.lang.Class<I> libraryInterface)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • NativeDevice

        public NativeDevice​(java.lang.String libraryName,
                            I library)
    • Method Detail

      • search

        public static java.util.List<NativeDevice<?>> search()
      • getIDN

        public abstract java.lang.String getIDN()
                                         throws java.io.IOException,
                                                DeviceException
        Description copied from interface: Instrument
        Returns an identifying String of the instrument.
        Specified by:
        getIDN in interface Instrument
        Returns:
        Identifying String
        Throws:
        java.io.IOException - Upon communications error
        DeviceException - Upon incompatibility with device
      • close

        public abstract void close()
                            throws java.io.IOException,
                                   DeviceException
        Description copied from interface: Instrument
        Closes the connection to the instrument.
        Specified by:
        close in interface Instrument
        Throws:
        java.io.IOException - Upon communications error
        DeviceException - Upon incompatibility with device