public class WriteMultipleRegistersResponse extends ModbusResponse
ModbusResponse.AuxiliaryMessageTypes| Constructor and Description |
|---|
WriteMultipleRegistersResponse()
Constructs a new WriteMultipleRegistersResponse instance.
|
WriteMultipleRegistersResponse(int reference,
int wordCount)
Constructs a new WriteMultipleRegistersResponse instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getByteCount()
Returns the number of bytes that have been written.
|
byte[] |
getMessage()
Returns the raw message as an array of bytes.
|
int |
getReference()
Returns the reference of the register to start writing to with this
WriteMultipleRegistersResponse.
|
int |
getWordCount()
Returns the number of words that have been written.
|
void |
readData(DataInput din)
Reads the subclass specific data from the given DataInput instance.
|
void |
setReference(int ref)
Sets the reference of the register to start writing to with this
WriteMultipleRegistersResponse.
|
void |
setWordCount(int count)
Sets the number of words that have been returned.
|
void |
writeData(DataOutput dout)
Writes the subclass specific data to the given DataOutput.
|
createModbusResponse, getAuxiliaryType, setAuxiliaryTypegetDataLength, getFunctionCode, getHexMessage, getOutputLength, getProtocolID, getTransactionID, getUnitID, isHeadless, readFrom, setDataLength, setHeadless, setHeadless, setProtocolID, setTransactionID, setUnitID, writeTopublic WriteMultipleRegistersResponse()
public WriteMultipleRegistersResponse(int reference,
int wordCount)
reference - the offset to start writing from.wordCount - the number of words (registers) to be written.public int getReference()
public void setReference(int ref)
ref - the reference of the register to start writing to as
int.public int getByteCount()
public int getWordCount()
public void setWordCount(int count)
count - the number of words as int.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.public byte[] getMessage()
ModbusMessageCopyright © 2025. All Rights Reserved.