public final class WriteMultipleCoilsResponse extends ModbusResponse
Coils are understood as bits that can be manipulated (i.e. set or unset).
| Constructor and Description |
|---|
WriteMultipleCoilsResponse()
Constructs a new WriteMultipleCoilsResponse
instance.
|
WriteMultipleCoilsResponse(int ref,
int count)
Constructs a new WriteMultipleCoilsResponse
instance with a given count of coils (i.e. bits).
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBitCount()
Returns the number of bits (i.e. coils)
read with the request.
|
int |
getReference()
Returns the reference of the register to to start
reading from with this WriteMultipleCoilsRequest.
|
void |
readData(DataInput din)
Reads the subclass specific data from the given DataInput instance.
|
void |
setBitCount(int count)
Sets the number of bits (i.e. coils)
that will be in a response.
|
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 WriteMultipleCoilsResponse()
public WriteMultipleCoilsResponse(int ref,
int count)
ref - the offset to begin writing from.count - the number of bits to be read.public int getReference()
public int getBitCount()
public void setBitCount(int count)
count - the number of bits in the response.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.