-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,37 @@ | ||
{% macro description(obj) %} | ||
{% if obj.description %} | ||
<p>{{ obj.description }}</p> | ||
{% else %} | ||
<p style="color:red">No description available.</p> | ||
{% endif %} | ||
{% endmacro %} | ||
|
||
<h1>{{ object.name }}</h1> | ||
{% if object.description %} | ||
<p>{{ object.description }}</p> | ||
{% else %} | ||
<p style="color:red">No description available.</p> | ||
{% endif %} | ||
{{ description(object) }} | ||
|
||
<h2>Logical Component Context</h2> | ||
|
||
<p> | ||
The figure below provides an overview of the logical subsystem and external entities that either require the functionality of <b>{{ object.name }}</b> (expect outputs) or enable it (provide inputs). The figure also identifies the interfaces between the subsystem and its environment. | ||
</p> | ||
|
||
{{ object.context_diagram.as_svg|safe }} | ||
|
||
<h3>Logical interface partners of {{object.name}}</h2> | ||
|
||
{% set lexcs = [] %}{% for port in object.ports %}{% for lexc in port.exchanges %} | ||
{% set _ = lexcs.append([lexc, lexc.source.owner if lexc.source.owner != subsystem else lexc.target.owner]) %} | ||
{% endfor %}{% endfor %} | ||
|
||
{% for partner_cmp_name in lexcs | map(attribute=1) | map(attribute="name") | unique %} | ||
{% set partner = lexcs | map(attribute=1) | selectattr("name", "equalto", partner_cmp_name) | first %} | ||
<h3>{{ partner.name }}</h3> | ||
<p>{{ description(partner) }}</p> | ||
{% set spp = lexcs | map(attribute=0) | selectattr("source.owner", "equalto", partner) | list %} | ||
{% set tpp = lexcs | map(attribute=0) | selectattr("target.owner", "equalto", partner) | list %} | ||
{% for lexc in (spp + tpp) %} | ||
<h4>Logical interface {{ lexc.name }}</h4> | ||
{{ lexc.context_diagram.as_svg|safe }} | ||
{{ 8/0 }} | ||
{% endfor %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters