@Override ModbusResponse handleImpl(ProcessImage processImage) throws ModbusTransportException { processImage.writeCoil(writeOffset, writeValue); return new WriteCoilResponse(slaveId, writeOffset, writeValue); }
@Override ModbusResponse handleImpl(ProcessImage processImage) throws ModbusTransportException { boolean[] bdata = convertToBooleans(data); for (int i = 0; i < numberOfBits; i++) processImage.writeCoil(startOffset + i, bdata[i]); return new WriteCoilsResponse(slaveId, startOffset, numberOfBits); }