Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
af3
AF3
Commits
b0f60958
Commit
b0f60958
authored
Jan 26, 2018
by
Simon Barner
Browse files
- Adjust getTaskInterfaces() to updated Task MM
refs 3067
parent
45882248
Changes
2
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.task/trunk/src/org/fortiss/af3/task/util/.ratings
View file @
b0f60958
TaskAllocationUtils.java a656e4c8082afce931f3e10b2a2afe4c887c893f YELLOW
TaskArchitectureUtils.java
a1e124025794234ee09e3e91829432731a6afc77
YELLOW
TaskArchitectureUtils.java
2b56a1561ae0ebb7e5f4b737f7a527242879c8a6
YELLOW
TaskModelElementFactory.java 918d64692e3c29550d5b4d67bbd8b8f620e72296 RED
org.fortiss.af3.task/trunk/src/org/fortiss/af3/task/util/TaskArchitectureUtils.java
View file @
b0f60958
...
...
@@ -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.
allocatedCsToTask
.
stream
().
forEach
(
c
->
inPorts
.
addAll
(
c
.
getInputPorts
()));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment