|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wimpi.modbus.msg.ModbusMessageImpl
net.wimpi.modbus.msg.ModbusRequest
public abstract class ModbusRequest
Abstract class implementing a ModbusRequest. This class provides specialised implementations with the functionality they have in common.
| Constructor Summary | |
|---|---|
ModbusRequest()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class net.wimpi.modbus.msg.ModbusMessageImpl |
|---|
getDataLength, getFunctionCode, getHexMessage, getOutputLength, getProtocolID, getTransactionID, getUnitID, isHeadless, readData, readFrom, setDataLength, setHeadless, setProtocolID, setTransactionID, setUnitID, writeData, writeTo |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModbusRequest()
| Method Detail |
|---|
public 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||