Package jisa.visa

Class ModbusRTUDevice

  • All Implemented Interfaces:
    Instrument
    Direct Known Subclasses:
    ET2408

    public class ModbusRTUDevice
    extends java.lang.Object
    implements Instrument
    • Constructor Detail

      • ModbusRTUDevice

        public ModbusRTUDevice​(Address address,
                               com.intelligt.modbus.jlibmodbus.serial.SerialPort.BaudRate baud,
                               int dataBits,
                               int stopBits,
                               com.intelligt.modbus.jlibmodbus.serial.SerialPort.Parity parity)
                        throws java.io.IOException,
                               DeviceException
        Throws:
        java.io.IOException
        DeviceException
    • Method Detail

      • 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
      • getIDN

        public java.lang.String getIDN()
                                throws java.io.IOException
        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
      • getName

        public java.lang.String getName()
        Description copied from interface: Instrument
        Returns the name of the instrument or channel.
        Specified by:
        getName in interface Instrument
        Returns:
        Name
      • 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