Class ModbusReader


  • public class ModbusReader
    extends java.lang.Object
    Implements Modbus read commands.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ModbusReaderResponse read​(com.smartgridready.driver.api.modbus.GenDriverAPI4Modbus drv4Modbus, short unitIdentifier, com.smartgridready.ns.v0.RegisterType regType, int regAddr, boolean isFirstRegAddrOne, int length)
      Reads from Modbus transport.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • read

        public static ModbusReaderResponse read​(com.smartgridready.driver.api.modbus.GenDriverAPI4Modbus drv4Modbus,
                                                short unitIdentifier,
                                                com.smartgridready.ns.v0.RegisterType regType,
                                                int regAddr,
                                                boolean isFirstRegAddrOne,
                                                int length)
                                         throws com.smartgridready.driver.api.common.GenDriverException,
                                                com.smartgridready.driver.api.modbus.GenDriverModbusException,
                                                com.smartgridready.driver.api.modbus.GenDriverSocketException
        Reads from Modbus transport.
        Parameters:
        drv4Modbus - the Modbus driver instance
        unitIdentifier - the slave identifier
        regType - the type of Modbus register
        regAddr - the starting address
        isFirstRegAddrOne - address offset of one when true
        length - the number of elements to read
        Returns:
        an instance of ModbusReaderResponse
        Throws:
        com.smartgridready.driver.api.common.GenDriverException - when any other error occurred
        com.smartgridready.driver.api.modbus.GenDriverModbusException - when a protocol error occurred
        com.smartgridready.driver.api.modbus.GenDriverSocketException - when a network error occurred