public abstract class ModbusRequest extends ModbusMessageImpl
| Constructor and Description |
|---|
ModbusRequest() |
| Modifier and Type | Method and Description |
|---|---|
ModbusResponse |
createExceptionResponse(int EXCEPTION_CODE)
Factory method for creating exception responses with the
given exception code.
|
static ModbusRequest |
createModbusRequest(int functionCode)
Factory method creating the required specialized ModbusRequest
instance.
|
abstract ModbusResponse |
createResponse()
Returns the ModbusResponse that
represents the answer to this ModbusRequest.
|
getDataLength, getFunctionCode, getHexMessage, getOutputLength, getProtocolID, getTransactionID, getUnitID, isHeadless, readData, readFrom, setDataLength, setFunctionCode, setHeadless, setHeadless, setProtocolID, setTransactionID, setUnitID, writeData, writeTopublic abstract ModbusResponse createResponse()
The implementation should take care about assembling the reply to this ModbusRequest.
public ModbusResponse createExceptionResponse(int EXCEPTION_CODE)
EXCEPTION_CODE - the code of the exception.public static ModbusRequest createModbusRequest(int functionCode)
functionCode - the function code of the request as int.Copyright © 2017. All rights reserved.