Class FC5WriteCoilTask
java.lang.Object
io.openems.edge.bridge.modbus.api.task.AbstractTask<com.ghgande.j2mod.modbus.msg.WriteCoilRequest,com.ghgande.j2mod.modbus.msg.WriteCoilResponse>
io.openems.edge.bridge.modbus.api.task.AbstractWriteTask<com.ghgande.j2mod.modbus.msg.WriteCoilRequest,com.ghgande.j2mod.modbus.msg.WriteCoilResponse>
io.openems.edge.bridge.modbus.api.task.AbstractWriteTask.Single<com.ghgande.j2mod.modbus.msg.WriteCoilRequest,com.ghgande.j2mod.modbus.msg.WriteCoilResponse,CoilElement>
io.openems.edge.bridge.modbus.api.task.FC5WriteCoilTask
- All Implemented Interfaces:
Task
,WriteTask
,ManagedTask
public class FC5WriteCoilTask
extends AbstractWriteTask.Single<com.ghgande.j2mod.modbus.msg.WriteCoilRequest,com.ghgande.j2mod.modbus.msg.WriteCoilResponse,CoilElement>
Implements a Write Single Coil Task, using Modbus function code 5
(http://www.simplymodbus.ca/FC05.htm).
-
Nested Class Summary
Nested classes/interfaces inherited from class io.openems.edge.bridge.modbus.api.task.AbstractWriteTask
AbstractWriteTask.Single<REQUEST extends com.ghgande.j2mod.modbus.msg.ModbusRequest,
RESPONSE extends com.ghgande.j2mod.modbus.msg.ModbusResponse, ELEMENT extends ModbusElement> 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.AbstractWriteTask.Single
element
Fields inherited from class io.openems.edge.bridge.modbus.api.task.AbstractTask
elements, length, name, responseClazz, startAddress
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.ghgande.j2mod.modbus.msg.WriteCoilRequest
Factory for aModbusRequest
.protected String
payloadToString
(com.ghgande.j2mod.modbus.msg.WriteCoilRequest request) Converts the actual payload of the REQUEST to a human readable format suitable for logs; without header data (like Unit-ID, function code, checksum, etc).Methods inherited from class io.openems.edge.bridge.modbus.api.task.AbstractWriteTask.Single
execute
Methods inherited from class io.openems.edge.bridge.modbus.api.task.AbstractWriteTask
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
-
FC5WriteCoilTask
-
-
Method Details
-
createModbusRequest
protected com.ghgande.j2mod.modbus.msg.WriteCoilRequest createModbusRequest() throws OpenemsExceptionDescription copied from class:AbstractWriteTask.Single
Factory for aModbusRequest
.- Specified by:
createModbusRequest
in classAbstractWriteTask.Single<com.ghgande.j2mod.modbus.msg.WriteCoilRequest,
com.ghgande.j2mod.modbus.msg.WriteCoilResponse, CoilElement> - Returns:
- a new
ModbusRequest
- Throws:
OpenemsException
- on error
-
payloadToString
Description copied from class:AbstractTask
Converts the actual payload of the REQUEST to a human readable format suitable for logs; without header data (like Unit-ID, function code, checksum, etc).- Specified by:
payloadToString
in classAbstractTask<com.ghgande.j2mod.modbus.msg.WriteCoilRequest,
com.ghgande.j2mod.modbus.msg.WriteCoilResponse> - Parameters:
request
- the request- Returns:
- a string
-