public final class WriteSingleRegisterResponse extends ModbusResponse
| Constructor and Description |
|---|
WriteSingleRegisterResponse()
Constructs a new WriteSingleRegisterResponse
instance.
|
WriteSingleRegisterResponse(int reference,
int value)
Constructs a new WriteSingleRegisterResponse
instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getReference()
Returns the reference of the register
that has been written to.
|
int |
getRegisterValue()
Returns the value that has been returned in
this WriteSingleRegisterResponse.
|
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 WriteSingleRegisterResponse()
public WriteSingleRegisterResponse(int reference,
int value)
reference - the offset of the register written.value - the value of the register.public int getRegisterValue()
public int getReference()
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.