public final class WriteCoilResponse extends ModbusResponse
| Constructor and Description |
|---|
WriteCoilResponse()
Constructs a new WriteCoilResponse
instance.
|
WriteCoilResponse(int reference,
boolean b)
Constructs a new WriteCoilResponse
instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getCoil()
Gets the state that has been returned
in this WriteCoilRequest.
|
int |
getReference()
Returns the reference of the register of the coil
that has been written to with the request.
|
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 WriteCoilResponse()
public WriteCoilResponse(int reference,
boolean b)
reference - the offset were writing was started from.b - the state of the coil; true set, false reset.public boolean getCoil()
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.