Class WaitTask
java.lang.Object
io.openems.edge.bridge.modbus.api.task.WaitTask
- All Implemented Interfaces:
Task
,ManagedTask
- Direct Known Subclasses:
WaitTask.Delay
,WaitTask.Mutex
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.openems.edge.bridge.modbus.api.task.Task
Task.ExecuteState
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
_execute()
final void
This is called on deactivate of the Modbus-Bridge.final Task.ExecuteState
execute
(AbstractModbusBridge bridge) Executes the tasks - i.e.final ModbusElement[]
Gets the ModbusElements.final int
Gets the length from first to last Modbus register address.Gets the parent.final Priority
Gets thePriority
of thisManagedTask
.final int
Gets the start Modbus register address.final void
Sets the parent.
-
Constructor Details
-
WaitTask
public WaitTask()
-
-
Method Details
-
setParent
Description copied from interface:Task
Sets the parent.- Specified by:
setParent
in interfaceTask
- Parameters:
parent
- the parentAbstractOpenemsModbusComponent
.
-
getParent
Description copied from interface:Task
Gets the parent. -
getPriority
Description copied from interface:ManagedTask
Gets thePriority
of thisManagedTask
.- Specified by:
getPriority
in interfaceManagedTask
- Returns:
- the
Priority
-
getElements
Description copied from interface:Task
Gets the ModbusElements.- Specified by:
getElements
in interfaceTask
- Returns:
- an array of ModbusElements
-
getStartAddress
public final int getStartAddress()Description copied from interface:Task
Gets the start Modbus register address.- Specified by:
getStartAddress
in interfaceTask
- Returns:
- the address
-
getLength
public final int getLength()Description copied from interface:Task
Gets the length from first to last Modbus register address. -
deactivate
public final void deactivate()Description copied from interface:Task
This is called on deactivate of the Modbus-Bridge. It can be used to clear any references like listeners.- Specified by:
deactivate
in interfaceTask
-
execute
Description copied from interface:Task
Executes the tasks - i.e. sends the query of a ReadTask or writes a WriteTask.- Specified by:
execute
in interfaceTask
- Parameters:
bridge
- the Modbus-Bridge- Returns:
Task.ExecuteState
-
_execute
- Throws:
InterruptedException
-