Class FC2ReadInputsTask

java.lang.Object
io.openems.edge.bridge.modbus.api.task.AbstractTask<com.ghgande.j2mod.modbus.msg.ReadInputDiscretesRequest,com.ghgande.j2mod.modbus.msg.ReadInputDiscretesResponse>
io.openems.edge.bridge.modbus.api.task.AbstractReadTask<com.ghgande.j2mod.modbus.msg.ReadInputDiscretesRequest,com.ghgande.j2mod.modbus.msg.ReadInputDiscretesResponse,CoilElement,Boolean>
io.openems.edge.bridge.modbus.api.task.AbstractReadDigitalInputsTask<com.ghgande.j2mod.modbus.msg.ReadInputDiscretesRequest,com.ghgande.j2mod.modbus.msg.ReadInputDiscretesResponse>
io.openems.edge.bridge.modbus.api.task.FC2ReadInputsTask
All Implemented Interfaces:
ReadTask, Task, ManagedTask

public class FC2ReadInputsTask extends AbstractReadDigitalInputsTask<com.ghgande.j2mod.modbus.msg.ReadInputDiscretesRequest,com.ghgande.j2mod.modbus.msg.ReadInputDiscretesResponse>
Implements a Read Inputs Task, implementing Modbus function code 2 (http://www.simplymodbus.ca/FC02.htm).
  • Constructor Details

    • FC2ReadInputsTask

      public FC2ReadInputsTask(int startAddress, Priority priority, CoilElement... elements)
  • Method Details

    • createModbusRequest

      protected com.ghgande.j2mod.modbus.msg.ReadInputDiscretesRequest createModbusRequest()
      Description copied from class: AbstractReadTask
      Factory for a ModbusRequest.
      Specified by:
      createModbusRequest in class AbstractReadTask<com.ghgande.j2mod.modbus.msg.ReadInputDiscretesRequest,com.ghgande.j2mod.modbus.msg.ReadInputDiscretesResponse,CoilElement,Boolean>
      Returns:
      a new ModbusRequest
    • parseBitResponse

      protected com.ghgande.j2mod.modbus.util.BitVector parseBitResponse(com.ghgande.j2mod.modbus.msg.ReadInputDiscretesResponse response)
      Specified by:
      parseBitResponse in class AbstractReadDigitalInputsTask<com.ghgande.j2mod.modbus.msg.ReadInputDiscretesRequest,com.ghgande.j2mod.modbus.msg.ReadInputDiscretesResponse>