public class ReadSerialDiagnosticsResponse extends ModbusResponse
ModbusResponse.AuxiliaryMessageTypes| Constructor and Description |
|---|
ReadSerialDiagnosticsResponse()
Constructs a new Diagnostics response
instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getData()
getData
|
int |
getData(int index)
Deprecated.
|
int |
getFunction()
getFunction -- Get the DIAGNOSTICS sub-function.
|
byte[] |
getMessage()
getMessage -- Create the DIAGNOSTICS message paylaod.
|
int |
getWordCount()
getWordCount -- get the number of words in data.
|
void |
readData(DataInput din)
readData -- Read the function code and data value
|
void |
setData(int value)
setData -- Set the optional data value
|
void |
setData(int index,
int value)
Deprecated.
|
void |
setFunction(int function)
setFunction - Set the DIAGNOSTICS sub-function.
|
void |
writeData(DataOutput dout)
writeData -- output the completed Modbus message to dout
|
createModbusResponse, getAuxiliaryType, setAuxiliaryTypegetDataLength, getFunctionCode, getHexMessage, getOutputLength, getProtocolID, getTransactionID, getUnitID, isHeadless, readFrom, setDataLength, setHeadless, setHeadless, setProtocolID, setTransactionID, setUnitID, writeTopublic ReadSerialDiagnosticsResponse()
public int getFunction()
public void setFunction(int function)
function - - DIAGNOSTICS command sub-function.public int getWordCount()
public int getData()
public void setData(int value)
value - optional data value@Deprecated public int getData(int index)
index - - Unused, must be 0.@Deprecated public void setData(int index, int value)
index - - Unused, must be 0.value - - Optional data value for function.public void writeData(DataOutput dout) throws IOException
writeData in class ModbusMessageImpldout - the DataOutput to be written to.IOException - If the data cannot be writtenpublic void readData(DataInput din) throws IOException
readData in class ModbusMessageImpldin - the DataInput to read from.IOException - If the data cannot be readpublic byte[] getMessage()
Copyright © 2025. All Rights Reserved.