Пример #1
0
 @Override
 ModbusResponse handleImpl(ProcessImage processImage) throws ModbusTransportException {
   processImage.writeCoil(writeOffset, writeValue);
   return new WriteCoilResponse(slaveId, writeOffset, writeValue);
 }
Пример #2
0
 @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);
 }