Class TasksSupplierImpl
java.lang.Object
io.openems.edge.bridge.modbus.api.worker.internal.TasksSupplierImpl
- All Implemented Interfaces:
TasksSupplier
Supplies Tasks.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addProtocol
(String sourceId, ModbusProtocol protocol) Adds the protocol.getCycleTasks
(DefectiveComponents defectiveComponents) Supplies the Tasks for one Cycle.int
Gets the total number of tasks.void
removeProtocol
(String sourceId) Removes the protocol.
-
Constructor Details
-
TasksSupplierImpl
public TasksSupplierImpl()
-
-
Method Details
-
addProtocol
Adds the protocol.- Parameters:
sourceId
- Component-ID of the sourceprotocol
- the ModbusProtocol
-
removeProtocol
Removes the protocol.- Parameters:
sourceId
- Component-ID of the source
-
getCycleTasks
Description copied from interface:TasksSupplier
Supplies the Tasks for one Cycle.- Specified by:
getCycleTasks
in interfaceTasksSupplier
- Parameters:
defectiveComponents
- theDefectiveComponents
handler- Returns:
- a
CycleTasks
object
-
getTotalNumberOfTasks
public int getTotalNumberOfTasks()Description copied from interface:TasksSupplier
Gets the total number of tasks.- Specified by:
getTotalNumberOfTasks
in interfaceTasksSupplier
- Returns:
- total number of tasks
-