diff --git a/templates/common_macros.html.j2 b/templates/common_macros.html.j2 index 23c249c..527fa27 100644 --- a/templates/common_macros.html.j2 +++ b/templates/common_macros.html.j2 @@ -88,7 +88,7 @@ {%- endfor -%} {%- set realized_objects = object[realized_attrs | first] if realized_attrs else None -%} {%- set realizing_objects = object[realizing_attrs | first] if realizing_attrs else None -%} - +
{{ object.name }} realizes the following objects:
@@ -133,3 +133,21 @@ {% endfor %} {% endif %} {% endmacro %} + + +{% set filters = { + 'EX_ITEMS':'show.exchange.items.filter', + 'FEX_EX_ITEMS':'show.functional.exchanges.exchange.items.filter', + 'FEX_OR_EX_ITEMS':'capellambse_context_diagrams-show.functional.exchanges.or.exchange.items.filter', + 'NO_UUID':'capellambse_context_diagrams-hide.uuids.filter' + } +%} +{% macro printNoContent(text="None") %}{{text}}{% endmacro %} +{% macro printDiagram(diagram, filter=None) %} + {% if filter in filters %} + {% if diagram.filters.clear() %}{% endif %} + {% if diagram.filters.add(filters['NO_UUID']) %}{% endif %} + {% if diagram.filters.add(filters[filter]) %}{% endif %} + {% endif %} + {{ diagram.as_svg | safe }} +{% endmacro %} diff --git a/templates/system-analysis/system-definition.html.j2 b/templates/system-analysis/system-definition.html.j2 index 0683754..c9d2500 100644 --- a/templates/system-analysis/system-definition.html.j2 +++ b/templates/system-analysis/system-definition.html.j2 @@ -3,11 +3,442 @@ SPDX-License-Identifier: Apache-2.0 #} -{% from 'common_macros.html.j2' import show_other_attributes %} +{% from 'common_macros.html.j2' import show_other_attributes, printNoContent, printDiagram %} {% set object = model.sa.root_component%} + +
Revision | +Date | +Changes | +
---|---|---|
v0.1 (rev xxxx) | +dd.mm.yyyy | +initial version | +
+ Abbreviation + | ++ Meaning + | +
---|---|
x | +x | +
Note: The term definition table might be deleted. Another possibility could be to refer to a project specific term definition within this section or to add a reference to a term definition list to the +"referenced documents section".
+This note can be deleted. ++ Term + | ++ Meaning + | +
---|---|
x | +x | +
The purpose of the System Definition (phase 2) as per [1] is to provide a basis of information about the system (SoI / +SuC) to enable RAMS and security analysis (phase 3). This section also contains information to enable system +requirements creation (phase 4).
+Provide a high level description of the system and its objectives (purpose/goals/benefits), as first outlined during concept +of operation/project target definition/stakeholder discussion. +Stakeholder level documents / operational concept documents may be referenced here.
++ +List the different modes of operation (i.e. normal, abnormal/degraded, maintenance mode), states, transitions and their interactions, if they could have an impact on the systems functionality and safety. + +
+########### SYSTEM FUNCTIONS START #################### 2.1.3. +The system is expected to perform the following functions:
++
Description: {{ fnc.description | replace('
', '') | safe }} +
Rationale: {% if fnc.requirements|length == 0 %}{{ printNoContent() }}{% endif %} + {% if fnc.requirements|length > 0 %} +
No functions allocated to the system.
+{% endif %} +{% if object.diagrams %} +The following diagrams provide additional details on the system
+ {% for diagram in object.diagrams %} +
+
+Describe active operation missions / mission profiles for the respective life cycle phases, e.g.:
+
+
+
+
+ +Describe the physical environment, e.g. climatic conditions, mechanical conditions, altitude. +Note: Consider to define such details in a separate document and reference it only to improve the maintainability of the +System Definition document. + +
+########### ALLE ACTORS START #################### 2.2.2 ++ {{ printDiagram(actor.context_diagram) |safe }} +
++
Description: {{ actor.description }}
+Functions: {% if actor.allocated_functions | length == 0 %}{{ printNoContent() }}{% endif %} + {% if actor.allocated_functions | length > 0 %} +
Rationale: {% if actor.requirements|length == 0 %}{{ printNoContent() }}{% endif %} + {% if actor.requirements|length > 0 %} +
+ +List the actors (as far as available and necessary) by name, description, rationale and allocation of actor functions (create +system context diagram) that interface with the system to be developed or modified. + +
++ +List the external systems (as far as available and necessary) by name, description, rationale and allocation of actor +functions (create system context diagram) that interface with the system to be developed or modified. + +
+
+
+List the other railway duty holders interacting with the system, such as
+
+
+
+
+ {{ printDiagram(inter.context_diagram) |safe }} +
++
Description: {{ inter.description or printNoContent() }}
+Functions: {% if inter.allocated_functions | length == 0 %}{{ printNoContent() }}{% endif %} + {% if inter.allocated_functions | length > 0 %} +
Rationale: {% if inter.requirements|length == 0 %}{{ printNoContent() }}{% endif %} + {% if inter.requirements|length > 0 %} +
+
+List the external interfaces and interactions with
+
+
+
respectively providing (as far as already known)
+
+
+
+
+Note: In addition to the functional interfaces, the location(s) of the system parts and their interfaces can influence
+neighboring systems and environment.
+
+
+ +List constraints by existing infrastructure. + +
++ +List known safety and RAM related related operating conditions/constraints, including by environment (e.g. shock, +thermal flow). + +
++ +List maintenance conditions required either by system details (as far as already known) or legal requirements. + +
++ +List known key points regarding logistics of the new system. + +
++ +This section has to list any predecessor reference system(s), providing identification of the system(s) and related +documents. + +
+
+
+Please provide provide a list of system factors (e.g. gforce, noise levels) that have an impact on:
+
+
+
+Note: Describe relevant mitigation measures, if available.
+
+
+ +Describe existing operating procedures, identification of personnel permitted to carry out these actions and indication of +the skills, qualifications and time-resources required, if part of the system operating conditions and constraints. +Note: If no human activities have been included in the analysis, the reasons for this should be clearly stated. +Note: Consider also the different modes of operation (i.e. normal, abnormal/degraded, maintenance mode), states and +transitions and their interactions as introduced above 2.1.2 - System modes and states , if they could have an impact on +operating procedures. + +
++ +List the existing safety requirements, measures, as well as the existing and new assumptions, which determine the limits +for the risk assessment. +Consider also external requirements e.g. external safety requirements, resulting from the overall safety policy of the +railway duty holder, from prevailing legal considerations, or from standards. + +
++ +Identify the system to be developed and the related documents, including assumptions made about particular +functions or subsystems that are different from an existing reference version, explicitly stating and +justifying the deviations. + +
++ +List all preceding project documents from which the system definition has been derived, e.g. concept of operation / +system concept etc. + +
+ Reference No. + | ++ Document ID + | ++ Version + | ++ Dated + (release date) + | ++ Title + | ++ link (informative) + | +
---|---|---|---|---|---|
1 | +ExampleDoc | +... | +... | +... | +... | +
+ +List standards and legislates that this specification must refer to. The entries in this list serve as examples. They can be +removed as needed and, if more feasible, the user may choose to state a reference to an external list of references +instead. +This note must be deleted. + +
++ Reference No. + | ++ Document ID + | ++ Version + | ++ Dated + (release date) + | ++ Title + | ++ link (informative) + | +
---|---|---|---|---|---|
1 | +EN 50126-1 | +2017 (E) | +1.10.2017 | +Railway Applications - The Specification and Demonstration of + Reliability, Availability, Maintainability and Safety (RAMS) - Part + 1: Generic RAMS Process | +... | +
+ Inputs +
+{% set cache.InfoIsPrinted = False %} +{% if object.inputs|length == 0 %}No exchanges consumed by function {{object.name}}.{% endif %}
+{% for inp in object.inputs %}{% for iExch in inp.exchanges|sort(attribute='name', reverse=False) %}{# FOR 1, 2 ##} +{% if not cache.InfoIsPrinted %} +{% set cache.InfoIsPrinted = True %} +The following exchanges are consumed by the function {{object.name}}:
+{% endif%} +{% endfor %}{% endfor %}{# FOR 1, 2 ##}
++ Outputs +
+{% set cache.InfoIsPrinted = False %} +{% if object.outputs|length == 0 %}No exchanges are provided by function {{object.name}}.{% endif %} +{% for outp in object.outputs %}{% for iExch in outp.exchanges %}{# FOR 1, 2 ##} +{% if not cache.InfoIsPrinted %} +{% set cache.InfoIsPrinted = True %} +The following exchanges are provided by the function {{object.name}}:
+{% endif%} +