|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.wimpi.modbus.msg.ModbusMessageImpl net.wimpi.modbus.msg.ModbusRequest net.wimpi.modbus.msg.IllegalFunctionRequest
public class IllegalFunctionRequest
Provides an implementation of a ModbusRequest which is created for illegal or non implemented function codes.
This is just a helper class to keep the implementation patterns the same for all cases.
Constructor Summary | |
---|---|
IllegalFunctionRequest(int fc)
Constructs a new IllegalFunctionRequest instance for a given function code. |
Method Summary | |
---|---|
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. |
Methods inherited from class net.wimpi.modbus.msg.ModbusRequest |
---|
createExceptionResponse, createModbusRequest |
Methods inherited from class net.wimpi.modbus.msg.ModbusMessageImpl |
---|
getDataLength, getFunctionCode, getHexMessage, getOutputLength, getProtocolID, getTransactionID, getUnitID, isHeadless, readFrom, setDataLength, setHeadless, setProtocolID, setTransactionID, setUnitID, writeTo |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IllegalFunctionRequest(int fc)
fc
- the function code as int.Method Detail |
---|
public ModbusResponse createResponse()
ModbusRequest
The implementation should take care about assembling the reply to this ModbusRequest.
createResponse
in class ModbusRequest
public void writeData(DataOutput dout) throws IOException
ModbusMessageImpl
writeData
in class ModbusMessageImpl
dout
- the DataOutput to be written to.
IOException
- if an I/O related error occurs.public void readData(DataInput din) throws IOException
ModbusMessageImpl
readData
in class ModbusMessageImpl
din
- the DataInput to read from.
IOException
- if an I/O related error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |