|
||||||||||
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.ModbusResponse net.wimpi.modbus.msg.ExceptionResponse
public class ExceptionResponse
Provides the aModbusResponse implementation that represents a Modbus exception.
Constructor Summary | |
---|---|
ExceptionResponse()
Constructs a new ExceptionResponse instance. |
|
ExceptionResponse(int fc)
Constructs a new ExceptionResponse instance with a given function code. |
|
ExceptionResponse(int fc,
int exc)
Constructs a new ExceptionResponse instance with a given function code and an exception code. |
Method Summary | |
---|---|
int |
getExceptionCode()
Returns the Modbus exception code of this ExceptionResponse. |
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.ModbusResponse |
---|
createModbusResponse |
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 ExceptionResponse()
public ExceptionResponse(int fc)
fc
- the function code as int.public ExceptionResponse(int fc, int exc)
fc
- the function code as int.exc
- the exception code as int.Method Detail |
---|
public int getExceptionCode()
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 |