org.avineas.modbus
public class ReadHoldingRegistersRequest extends ModbusRequest
| Modifier and Type | Field and Description |
|---|---|
static int |
FUNCTION |
| Constructor and Description |
|---|
ReadHoldingRegistersRequest(int startAddress,
int numRegisters)
Construct a read request.
|
ReadHoldingRegistersRequest(ModbusRequest request)
Construct a read request from a received request in slave mode.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfRegisters()
Get the number of registers as present/requested by this request.
|
int |
getStartAddress()
Get the start address as present in this request.
|
decode, encode, getFunction, toBytespublic static final int FUNCTION
public ReadHoldingRegistersRequest(int startAddress,
int numRegisters)
startAddress - The start address where to readnumRegisters - The number of registers to readpublic ReadHoldingRegistersRequest(ModbusRequest request) throws java.lang.IllegalArgumentException
request - The received requestjava.lang.IllegalArgumentException - In case request isn't a read request