Package jisa.visa
Class ModbusRTUDevice
- java.lang.Object
-
- jisa.visa.ModbusRTUDevice
-
- All Implemented Interfaces:
Instrument
- Direct Known Subclasses:
ET2408
public class ModbusRTUDevice extends java.lang.Object implements Instrument
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classModbusRTUDevice.ROCoilclassModbusRTUDevice.RORegisterclassModbusRTUDevice.RWCoilclassModbusRTUDevice.RWRegister-
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 ModbusRTUDevice(Address address, com.intelligt.modbus.jlibmodbus.serial.SerialPort.BaudRate baud, int dataBits, int stopBits, com.intelligt.modbus.jlibmodbus.serial.SerialPort.Parity parity)
-
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.StringgetIDN()Returns an identifying String of the instrument.java.lang.StringgetName()Returns the name of the instrument or channel.voidsetTimeout(int msec)Sets the timeout for read/write operations to this instrument (if applicable).-
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, getLockObject
-
-
-
-
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.IOExceptionDeviceException
-
-
Method Detail
-
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
-
getIDN
public java.lang.String getIDN() throws java.io.IOExceptionDescription copied from interface:InstrumentReturns an identifying String of the instrument.- Specified by:
getIDNin interfaceInstrument- Returns:
- Identifying String
- Throws:
java.io.IOException- Upon communications error
-
getName
public java.lang.String getName()
Description copied from interface:InstrumentReturns the name of the instrument or channel.- Specified by:
getNamein interfaceInstrument- Returns:
- Name
-
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
-
-