public class IllegalFunctionRequest extends ModbusRequest
This is just a helper class to keep the implementation patterns the same for all cases.
| Constructor and Description |
|---|
IllegalFunctionRequest(int fc)
Constructs a new IllegalFunctionRequest instance for
a given function code.
|
| Modifier and Type | Method and Description |
|---|---|
ModbusResponse |
createResponse()
Returns the ModbusResponse that
represents the answer to this ModbusRequest.
|
void |
readData(DataInput din)
Reads the subclass specific data from the given DataInput instance.
|
void |
writeData(DataOutput dout)
Writes the subclass specific data to the given DataOutput.
|
createExceptionResponse, createModbusRequestgetDataLength, getFunctionCode, getHexMessage, getOutputLength, getProtocolID, getTransactionID, getUnitID, isHeadless, readFrom, setDataLength, setFunctionCode, setHeadless, setHeadless, setProtocolID, setTransactionID, setUnitID, writeTopublic IllegalFunctionRequest(int fc)
fc - the function code as int.public ModbusResponse createResponse()
ModbusRequestThe implementation should take care about assembling the reply to this ModbusRequest.
createResponse in class ModbusRequestpublic void writeData(DataOutput dout) throws IOException
ModbusMessageImplwriteData in class ModbusMessageImpldout - the DataOutput to be written to.IOException - if an I/O related error occurs.public void readData(DataInput din) throws IOException
ModbusMessageImplreadData in class ModbusMessageImpldin - the DataInput to read from.IOException - if an I/O related error occurs.Copyright © 2017. All rights reserved.