Commit b0f60958 authored by Simon Barner's avatar Simon Barner
Browse files

- Adjust getTaskInterfaces() to updated Task MM

refs 3067
parent 45882248 a656e4c8082afce931f3e10b2a2afe4c887c893f YELLOW a1e124025794234ee09e3e91829432731a6afc77 YELLOW 2b56a1561ae0ebb7e5f4b737f7a527242879c8a6 YELLOW 918d64692e3c29550d5b4d67bbd8b8f620e72296 RED
......@@ -19,7 +19,6 @@ import static org.fortiss.af3.allocation.utils.AllocationUtils.addAllocationEntr
import static org.fortiss.af3.allocation.utils.AllocationUtils.getOrCreateAllocationTable;
import static org.fortiss.af3.component.utils.ComponentArchitectureUtils.isAtomicComponent;
import static org.fortiss.af3.component.utils.ComponentUtils.getAllSubComponentsRecursively;
import static org.fortiss.af3.task.util.TaskAllocationUtils.getAllocatedComponentsTo;
import static org.fortiss.af3.task.util.TaskModelElementFactory.createSignal;
import static org.fortiss.af3.task.util.TaskModelElementFactory.createTask;
import static org.fortiss.af3.task.util.TaskModelElementFactory.createTaskArchitecture;
......@@ -66,16 +65,18 @@ public class TaskArchitectureUtils {
* @param task
* for which the respective interface {@link Port}s to other {@link Task}s shall be
* identified.
* @param ca2ta
* Underlying {@link Component} to {@link Task} mapping
* @return Collection of {@link Port}s that would be connected to other {@link Task}s.
public static Collection<Port> getTaskInterfaces(Task task) {
public static Collection<Port>
getTaskInterfaces(Task task, ComponentToTaskAllocationTable ca2ta) {
List<Port> result = new ArrayList<>();
List<InputPort> inPorts = new ArrayList<>();
List<OutputPort> outPorts = new ArrayList<>();
// Tasks are contained in the TaskArchitecture.
TaskArchitecture taskArch = (TaskArchitecture)task.getContainer();
Collection<Component> allocatedCsToTask = getAllocatedComponentsTo(taskArch, task);
Collection<Component> allocatedCsToTask = ca2ta.getComponents(task);
// at first, add all input and output ports. -> inPorts.addAll(c.getInputPorts()));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment