public class ExceptionResponse extends ModbusResponse
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
createModbusResponse, setMessagegetDataLength, getFunctionCode, getHexMessage, getOutputLength, getProtocolID, getTransactionID, getUnitID, isHeadless, readFrom, setDataLength, setFunctionCode, setHeadless, setHeadless, setProtocolID, setTransactionID, setUnitID, writeTopublic 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.public int getExceptionCode()
public 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.