public class ReportSlaveIDResponse extends ModbusResponse
ModbusResponse.AuxiliaryMessageTypes| Constructor and Description |
|---|
ReportSlaveIDResponse()
Constructs a new ReportSlaveIDResponse
instance.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getData()
getData -- get the device-depending data for the slave.
|
byte[] |
getMessage()
getMessage -- format the message into a byte array.
|
int |
getSlaveID()
getSlaveID -- return the slave identifier field.
|
boolean |
getStatus()
getStatus -- get the slave's "run" status.
|
void |
readData(DataInput din)
readData -- input the Modbus message from din.
|
void |
setData(byte[] data)
setData -- initialize the slave's device dependent data when
initializing a response.
|
void |
setSlaveID(int unitID)
setSlaveID -- initialize the slave identifier when constructing
a response message.
|
void |
setStatus(boolean b)
setStatus -- initialize the slave's "run" status when constructing
a response message.
|
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 ReportSlaveIDResponse()
public int getSlaveID()
public void setSlaveID(int unitID)
unitID - UnitID of the slavepublic boolean getStatus()
public void setStatus(boolean b)
b - Status valuepublic byte[] getData()
public void setData(byte[] data)
data - byte arraypublic 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.