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 -%} - +

Traceability

{% if realized_objects %}

{{ 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%} + +

System Definition Template

+ + +

System Definition Template

+
+List of figures (optional) +
+Example:
+
    +
  1. 1. Figure of the DBS strategy roadmap
  2. +
  3. 2. Figure of safety roles within the project
  4. +
+ This note can be deleted. +
+ +List of tables (optional) +
+Example:
+
    +
  1. 1. List of process roles
  2. +
  3. 2. List of deliverables
  4. +
+ This note can be deleted. +
+ +

Preamble

+

Change history

+ + + + + + + + + + + +
RevisionDateChanges
v0.1 (rev xxxx)dd.mm.yyyyinitial version
+ +

Confidentiality classification

+ +

Organisational scope

+ +

Document purpose and structure

+ +

Glossary

+ +

General abbreviations

+ +

Document specific abbreviations

+ + + + + + + + + +
+ Abbreviation + + Meaning +
xx
+ +

Term definition

+
+

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 +
xx
+

System Definition

+

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).

+

System objective (intended purpose) and mission profile

+

System description

+

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.

+

System modes and states

+

+ +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. +

System functions

+{% if object.allocated_functions | length > 0 %} +

The system is expected to perform the following functions:

+ +{% else %} +

No functions allocated to the system.

+{% endif %} +{% if object.diagrams %} +

Diagrams

+

The following diagrams provide additional details on the system

+ {% for diagram in object.diagrams %} +

{{diagram.name}}

+ {{ printDiagram(diagram, filter='FEX_OR_EX_ITEMS') |safe }} + {% endfor %} +{% endif %} +########### SYSTEM FUNCTIONS ENDE #################### 2.1.3. +

Life cycle strategy and conditions (mission profiles)

+

+ +Describe active operation missions / mission profiles for the respective life cycle phases, e.g.: +

+ +

+########### CONTEXT DIAGRAM DBS REFERENCE START #################### 2.2. +

System boundary

+{{ object.context_diagram.as_svg | safe}} +########### CONTEXT DIAGRAM DBS REFERENCE ENDE #################### 2.2. +

Physical environment

+

+ +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 +

(External) actors

+{% set actors = model.sa.all_actors %} +{% if actors|length > 0 %} + +{% endif %} +########### ALLE ACTORS ENDE #################### 2.2.2 +

+ +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. + +

+

External systems

+

+ +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. + +

+

Other railway duty holders

+

+ +List the other railway duty holders interacting with the system, such as +

+ +

+

Interfaces and interactions

+########### ALLE INTERFACES START #################### 2.2.5.
+{#% set interfaces = model.la.all_component_exchanges %#} +{% set interfaces = model.sa.actor_exchanges|sort(attribute='name') %} +{% if interfaces|length > 0 %} + +{% endif %} +########### ALLE INTERFACES ENDE #################### 2.2.5.
+

+ +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. +
+

+

Scope of operational requirements and constraints

+

Constraints by existing infrastructure

+

+ +List constraints by existing infrastructure. + +

+

Operating conditions and constraints

+

+ +List known safety and RAM related related operating conditions/constraints, including by environment (e.g. shock, +thermal flow). + +

+

Maintenance conditions

+

+ +List maintenance conditions required either by system details (as far as already known) or legal requirements. + +

+

Logistic support considerations

+

+ +List known key points regarding logistics of the new system. + +

+

Past experience data of similar systems

+

+ +This section has to list any predecessor reference system(s), providing identification of the system(s) and related +documents. + +

+

System influence on humans and environment

+

+ +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. +
+

+

Operating procedures

+

+ +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. + +

+

Existing safety requirements, measures and assumptions

+

+ +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. + +

+

Identification of the system and related documents

+

+ +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. + +

+

Appendix

+

Input Documents

+

+ +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) +
1ExampleDoc............
+

+

Referenced documents

+

+ +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) +
1EN 50126-12017 (E)1.10.2017Railway Applications - The Specification and Demonstration of + Reliability, Availability, Maintainability and Safety (RAMS) - Part + 1: Generic RAMS Process...
+ diff --git a/templates/system-analysis/system_function.html.j2 b/templates/system-analysis/system_function.html.j2 index b60b099..ed9781b 100644 --- a/templates/system-analysis/system_function.html.j2 +++ b/templates/system-analysis/system_function.html.j2 @@ -36,6 +36,44 @@ {{ object.context_diagram.as_svg | safe }} +

Inputs and Outputs

+{% set cache = namespace(currentLevel='1', hnr=1, h1=0, h2=0, h3=0, h4=0, h5=0, h6=0, temp0=[], primaryId='', found=false) %} +

+ 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%} + +{% endfor %}{% endfor %}{# FOR 1, 2 ##} + + + + + +

Other properties of "{{ object.name }}"

-{% set excluded = ["context_diagram", "description", "name", "owner", "xtype"] %} +{% set excluded = ["context_diagram", "description", "name", "owner", "xtype","inputs","outputs"] %} {{ show_other_attributes(object, excluded) | safe}}