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).
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.bridge.modbus.api.task.Task
Task.ExecuteState
-
Field Summary
Fields inherited from class io.openems.edge.bridge.modbus.api.task.AbstractTask
elements, length, name, responseClazz, startAddress
-
Constructor Summary
ConstructorDescriptionFC2ReadInputsTask
(int startAddress, Priority priority, CoilElement... elements) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.ghgande.j2mod.modbus.msg.ReadInputDiscretesRequest
Factory for aModbusRequest
.protected com.ghgande.j2mod.modbus.util.BitVector
parseBitResponse
(com.ghgande.j2mod.modbus.msg.ReadInputDiscretesResponse response) Methods inherited from class io.openems.edge.bridge.modbus.api.task.AbstractReadDigitalInputsTask
calculateNextPosition, handleResponse, parseResponse, payloadToString, toBooleanArray
Methods inherited from class io.openems.edge.bridge.modbus.api.task.AbstractReadTask
execute, getPriority, payloadToString
Methods inherited from class io.openems.edge.bridge.modbus.api.task.AbstractTask
deactivate, debug, executeRequest, getElements, getLength, getLogVerbosity, getParent, getStartAddress, logError, logInfo, logRequest, setParent, toLogMessage, toLogMessage, toLogMessage, toLogMessage
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.openems.edge.bridge.modbus.api.task.Task
deactivate, getElements, getLength, getParent, getStartAddress, setParent
-
Constructor Details
-
FC2ReadInputsTask
-
-
Method Details
-
createModbusRequest
protected com.ghgande.j2mod.modbus.msg.ReadInputDiscretesRequest createModbusRequest()Description copied from class:AbstractReadTask
Factory for aModbusRequest
.- Specified by:
createModbusRequest
in classAbstractReadTask<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 classAbstractReadDigitalInputsTask<com.ghgande.j2mod.modbus.msg.ReadInputDiscretesRequest,
com.ghgande.j2mod.modbus.msg.ReadInputDiscretesResponse>
-