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