Class AbstractWriteTask.Single<REQUEST extends com.ghgande.j2mod.modbus.msg.ModbusRequest,RESPONSE extends com.ghgande.j2mod.modbus.msg.ModbusResponse,ELEMENT extends ModbusElement>

java.lang.Object
io.openems.edge.bridge.modbus.api.task.AbstractTask<REQUEST,RESPONSE>
io.openems.edge.bridge.modbus.api.task.AbstractWriteTask<REQUEST,RESPONSE>
io.openems.edge.bridge.modbus.api.task.AbstractWriteTask.Single<REQUEST,RESPONSE,ELEMENT>
All Implemented Interfaces:
Task, WriteTask, ManagedTask
Direct Known Subclasses:
FC5WriteCoilTask, FC6WriteRegisterTask
Enclosing class:
AbstractWriteTask<REQUEST extends com.ghgande.j2mod.modbus.msg.ModbusRequest,RESPONSE extends com.ghgande.j2mod.modbus.msg.ModbusResponse>

public abstract static class AbstractWriteTask.Single<REQUEST extends com.ghgande.j2mod.modbus.msg.ModbusRequest,RESPONSE extends com.ghgande.j2mod.modbus.msg.ModbusResponse,ELEMENT extends ModbusElement> extends AbstractWriteTask<REQUEST,RESPONSE>
  • Field Details

  • Constructor Details

  • Method Details

    • execute

      public final Task.ExecuteState execute(AbstractModbusBridge bridge)
      Description copied from class: AbstractTask
      Executes the tasks - i.e. sends the query of a ReadTask or writes a WriteTask.
      Specified by:
      execute in interface Task
      Specified by:
      execute in class AbstractTask<REQUEST extends com.ghgande.j2mod.modbus.msg.ModbusRequest,RESPONSE extends com.ghgande.j2mod.modbus.msg.ModbusResponse>
      Parameters:
      bridge - the Modbus-Bridge
      Returns:
      the number of executed Sub-Tasks
    • createModbusRequest

      protected abstract REQUEST createModbusRequest() throws OpenemsException
      Factory for a ModbusRequest.
      Returns:
      a new ModbusRequest
      Throws:
      OpenemsException - on error