Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions odxtools/templates/comparam-spec.odx-c.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!-- Written using odxtools {{odxtools_version}} -->
<ODX MODEL-VERSION="2.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="odx.xsd">
{{- set_category_docfrag(comparam_spec.short_name, "COMPARAM-SPEC") }}
<COMPARAM-SPEC {{- poc.printOdxCategoryAttribs(comparam_spec) }}>
{{- poc.printOdxCategorySubtags(comparam_spec)|indent(3) }}
{%- if comparam_spec.prot_stacks %}
Expand Down
1 change: 1 addition & 0 deletions odxtools/templates/comparam-subset.odx-cs.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!-- Written using odxtools {{odxtools_version}} -->
<ODX MODEL-VERSION="2.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="odx.xsd">
{{- set_category_docfrag(comparam_subset.short_name, "COMPARAM-SUBSET") }}
<COMPARAM-SUBSET {{- poc.printOdxCategoryAttribs(comparam_subset) }} {{make_xml_attrib("CATEGORY", comparam_subset.category)}}>
{{- poc.printOdxCategorySubtags(comparam_subset)|indent(3) }}
{%- if comparam_subset.comparams %}
Expand Down
3 changes: 2 additions & 1 deletion odxtools/templates/diag_layer_container.odx-d.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!-- Written using odxtools {{odxtools_version}} -->
<ODX MODEL-VERSION="2.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="odx.xsd">
{{- set_category_docfrag(dlc.short_name, "CONTAINER") }}
<DIAG-LAYER-CONTAINER {{- poc.printOdxCategoryAttribs(dlc) }}>
{{- poc.printOdxCategorySubtags(dlc)|indent(3) }}
{%- if dlc.protocols %}
Expand Down Expand Up @@ -44,7 +45,7 @@
{%- endfor %}
</BASE-VARIANTS>
{%- endif %}
{%- if dlc.ecu_variants %}
{%- if dlc.ecu_variants %}
<ECU-VARIANTS>
{%- for dl in dlc.ecu_variants %}
{{pecuv.printEcuVariant(dl)|indent(3)}}
Expand Down
8 changes: 4 additions & 4 deletions odxtools/templates/macros/printAdminData.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<COMPANY-DOC-INFOS>
{%- for cdi in admin_data.company_doc_infos %}
<COMPANY-DOC-INFO>
<COMPANY-DATA-REF ID-REF="{{cdi.company_data_ref.ref_id}}" />
<COMPANY-DATA-REF {{make_ref_attribs(cdi.company_data_ref)}} />
{%- if cdi.team_member_ref is not none %}
<TEAM-MEMBER-REF ID-REF="{{cdi.team_member_ref.ref_id}}" />
<TEAM-MEMBER-REF {{make_ref_attribs(cdi.team_member_ref)}} />
{%- endif %}
{%- if cdi.doc_label is not none %}
<DOC-LABEL>{{cdi.doc_label|e}}</DOC-LABEL>
Expand All @@ -31,7 +31,7 @@
{%- for doc_revision in admin_data.doc_revisions %}
<DOC-REVISION>
{%- if doc_revision.team_member_ref is not none %}
<TEAM-MEMBER-REF ID-REF="{{doc_revision.team_member_ref.ref_id}}" />
<TEAM-MEMBER-REF {{make_ref_attribs(doc_revision.team_member_ref)}} />
{%- endif %}
{%- if doc_revision.revision_label is not none %}
<REVISION-LABEL>{{doc_revision.revision_label|e}}</REVISION-LABEL>
Expand All @@ -47,7 +47,7 @@
<COMPANY-REVISION-INFOS>
{%- for cri in doc_revision.company_revision_infos %}
<COMPANY-REVISION-INFO>
<COMPANY-DATA-REF ID-REF="{{cri.company_data_ref.ref_id}}" />
<COMPANY-DATA-REF {{make_ref_attribs(cri.company_data_ref)}} />
{%- if cri.revision_label is not none %}
<REVISION-LABEL>{{cri.revision_label|e}}</REVISION-LABEL>
{%- endif %}
Expand Down
4 changes: 2 additions & 2 deletions odxtools/templates/macros/printAudience.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
{%- if audience.enabled_audience_refs %}
<ENABLED-AUDIENCE-REFS>
{%- for ref in audience.enabled_audience_refs %}
<ENABLED-AUDIENCE-REF ID-REF="{{ref.ref_id}}" />
<ENABLED-AUDIENCE-REF {{make_ref_attribs(ref)}} />
{%- endfor %}
</ENABLED-AUDIENCE-REFS>
{%- endif%}
{%- if audience.disabled_audience_refs %}
<DISABLED-AUDIENCE-REFS>
{%- for ref in audience.disabled_audience_refs %}
<DISABLED-AUDIENCE-REF ID-REF="{{ref.ref_id}}" />
<DISABLED-AUDIENCE-REF {{make_ref_attribs(ref)}} />
{%- endfor %}
</DISABLED-AUDIENCE-REFS>
{%- endif%}
Expand Down
2 changes: 1 addition & 1 deletion odxtools/templates/macros/printComparam.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
CPUSAGE="{{cp.cpusage.value}}">
{{ peid.printElementIdSubtags(cp)|indent(1) }}
<PHYSICAL-DEFAULT-VALUE>{{cp.physical_default_value_raw}}</PHYSICAL-DEFAULT-VALUE>
<DATA-OBJECT-PROP-REF ID-REF="{{cp.dop_ref.ref_id}}" />
<DATA-OBJECT-PROP-REF {{make_ref_attribs(cp.dop_ref)}} />
</COMPARAM>
{%- endmacro %}

Expand Down
4 changes: 1 addition & 3 deletions odxtools/templates/macros/printComparamRef.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
{#- -#}

{%- macro printComparamRef(cp) %}
<COMPARAM-REF ID-REF="{{cp.spec_ref.ref_id}}"
DOCREF="{{cp.spec_ref.ref_docs[0].doc_name}}"
DOCTYPE="COMPARAM-SUBSET">
<COMPARAM-REF {{make_ref_attribs(cp.spec_ref)}}>
{%- if cp.value is string %}
<SIMPLE-VALUE>{{cp.value}}</SIMPLE-VALUE>
{{ pd.printDescription(cp.description) }}
Expand Down
2 changes: 1 addition & 1 deletion odxtools/templates/macros/printCompuMethod.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
{%- if pc.library_refs %}
<LIBRARY-REFS>
{%- for libref in pc.library_refs %}
<LIBRARY-REF ID-REF="{{libref.ref_id}}" />
<LIBRARY-REF {{make_ref_attribs(libref)}} />
{%- endfor %}
</LIBRARY-REFS>
{%- endif %}
Expand Down
6 changes: 3 additions & 3 deletions odxtools/templates/macros/printDOP.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
{{- printInternalConstr(dop.internal_constr, False)|indent(1) }}
{%- endif %}
{%- if dop.unit_ref %}
<UNIT-REF ID-REF="{{ dop.unit_ref.ref_id }}" />
<UNIT-REF {{make_ref_attribs(dop.unit_ref)}} />
{%- endif %}
{%- if dop.physical_constr %}
{{- printInternalConstr(dop.internal_constr, True)|indent(1) }}
Expand All @@ -131,7 +131,7 @@
<DTCS>
{%- for dtc in dop.dtcs_raw %}
{%- if hasattr(dtc, "ref_id") %}
<DTC-REF ID-REF="{{dtc.ref_id}}" />
<DTC-REF {{make_ref_attribs(dtc)}} />
{%- else %}
<DTC {{-peid.printElementIdAttribs(dtc)}}>
<SHORT-NAME>{{dtc.short_name}}</SHORT-NAME>
Expand Down Expand Up @@ -159,7 +159,7 @@
{%- endfor %}
</NOT-INHERITED-DTC-SNREFS>
{%- endif %}
<DTC-DOP-REF ID-REF="{{linked_dtc_dop.dtc_dop_ref.ref_id}}" />
<DTC-DOP-REF {{make_ref_attribs(linked_dtc_dop.dtc_dop_ref)}} />
</LINKED-DTC-DOP>
{%- endfor %}
</LINKED-DTC-DOPS>
Expand Down
4 changes: 2 additions & 2 deletions odxtools/templates/macros/printDiagComm.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{%- if dc.functional_class_refs %}
<FUNCT-CLASS-REFS>
{%- for ref in dc.functional_class_refs %}
<FUNCT-CLASS-REF ID-REF="{{ref.ref_id}}" />
<FUNCT-CLASS-REF {{make_ref_attribs(ref)}} />
{%- endfor %}
</FUNCT-CLASS-REFS>
{%- endif%}
Expand All @@ -45,7 +45,7 @@
{%- if dc.related_diag_comm_refs %}
<RELATED-DIAG-COMM-REFS>
{%- for ref in dc.related_diag_comm_refs %}
<RELATED-DIAG-COMM-REF ID-REF="{{ref.ref_id}}">
<RELATED-DIAG-COMM-REF {{make_ref_attribs(ref)}}>
<RELATION-TYPE>{{ref.relation_type}}</RELATION-TYPE>
</RELATED-DIAG-COMM-REF>
{%- endfor %}
Expand Down
3 changes: 2 additions & 1 deletion odxtools/templates/macros/printDiagLayer.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
{%- endmacro -%}

{%- macro printDiagLayerSubtags(dl) -%}
{{- set_layer_docfrag(dl.short_name) }}
{%- set dlr = dl.diag_layer_raw %}
{{ peid.printElementIdSubtags(dlr)|indent(1) }}
{%- if dlr.admin_data is not none %}
Expand Down Expand Up @@ -149,7 +150,7 @@

{%- if hasattr(dc, "ref_id") %}
{#- -> reference to a diag-comm object #}
<DIAG-COMM-REF ID-REF="{{dc.ref_id}}" />
<DIAG-COMM-REF {{make_ref_attribs(dc)}} />
{%- elif hasattr(dc, "request") %}
{#- -> service #}
{{ ps.printService(dc)|indent(2) }}
Expand Down
8 changes: 4 additions & 4 deletions odxtools/templates/macros/printDiagVariable.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{%- if diag_variable.admin_data is not none %}
{{ pad.printAdminData(diag_variable.admin_data)|indent(2) }}
{%- endif %}
<VARIABLE-GROUP-REF ID-REF="{{ diag_var.ref_id }}" />
<VARIABLE-GROUP-REF {{make_ref_attribs(diag_var)}} />
{%- if diag_variable.sw_variables %}
<SW-VARIABLES>
{%- for sw_var in diag_variable.sw_variables %}
Expand All @@ -34,19 +34,19 @@
{{ pd.printDescription(comm_relation.description) }}
<RELATION-TYPE>{{comm_relation.relation_type}}</RELATION-TYPE>
{%- if comm_relation.diag_comm_ref is not none %}
<DIAG-COMM-REF ID-REF="{{comm_relation.diag_comm_ref.ref_id}}" />
<DIAG-COMM-REF {{make_ref_attribs(comm_relation.diag_comm_ref)}} />
{%- endif %}
{%- if comm_relation.diag_comm_snref is not none %}
<DIAG-COMM-SNREF SHORT-NAME="{{comm_relation.diag_comm_snref}}" />
{%- endif %}
{%- if comm_relation.in_param_if_ref is not none %}
<IN-PARAM-IF-REF ID-REF="{{comm_relation.in_param_if_ref.ref_id}}" />
<IN-PARAM-IF-REF {{make_ref_attribs(comm_relation.in_param_if_ref)}} />
{%- endif %}
{%- if comm_relation.in_param_if_snref is not none %}
<IN-PARAM-IF-SNREF SHORT-NAME="{{comm_relation.in_param_if_snref}}" />
{%- endif %}
{%- if comm_relation.out_param_if_ref is not none %}
<OUT-PARAM-IF-REF ID-REF="{{comm_relation.out_param_if_ref.ref_id}}" />
<OUT-PARAM-IF-REF {{make_ref_attribs(comm_relation.out_param_if_ref)}} />
{%- endif %}
{%- if comm_relation.out_param_if_snref is not none %}
<OUT-PARAM-IF-SNREF SHORT-NAME="{{comm_relation.out_param_if_snref}}" />
Expand Down
6 changes: 3 additions & 3 deletions odxtools/templates/macros/printDynDefinedSpec.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<DYN-ID-DEF-MODE-INFO>
<DEF-MODE>{{ diddmi.def_mode }}</DEF-MODE>
{%- if diddmi.clear_dyn_def_message_ref is not none %}
<CLEAR-DYN-DEF-MESSAGE-REF ID-REF="{{diddmi.clear_dyn_def_message_ref.ref_id}}" />
<CLEAR-DYN-DEF-MESSAGE-REF {{make_ref_attribs(diddmi.clear_dyn_def_message_ref)}} />
{%- endif %}
{%- if diddmi.clear_dyn_def_message_snref is not none %}
<CLEAR-DYN-DEF-MESSAGE-SNREF SHORT-NAME="{{diddmi.clear_dyn_def_message_snref}}" />
{%- endif %}
{%- if diddmi.read_dyn_def_message_ref is not none %}
<READ-DYN-DEF-MESSAGE-REF ID-REF="{{diddmi.read_dyn_def_message_ref.ref_id}}" />
<READ-DYN-DEF-MESSAGE-REF {{make_ref_attribs(diddmi.read_dyn_def_message_ref)}} />
{%- endif %}
{%- if diddmi.read_dyn_def_message_snref is not none %}
<READ-DYN-DEF-MESSAGE-SNREF SHORT-NAME="{{diddmi.read_dyn_def_message_snref}}" />
Expand All @@ -33,7 +33,7 @@
<SELECTION-TABLE-REFS>
{%- for seltref in diddmi.selection_table_refs %}
{%- if hasattr(seltref, "ref_id") %}
<SELECTION-TABLE-REF ID-REF="{{ seltref.ref_id }}" />
<SELECTION-TABLE-REF {{make_ref_attribs(seltref)}} />
{%- else %}
<SELECTION-TABLE-SNREF SHORT-NAME="{{ seltref }}" />
{%- endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
{%- macro printStaticField(demf) -%}
<DYNAMIC-ENDMARKER-FIELD {{-peid.printElementIdAttribs(demf)}}>
{{ peid.printElementIdSubtags(demf)|indent(1) }}
<BASIC-STRUCTURE-REF ID-REF="{{demf.structure_ref.ref_id}}" />
<DYN-END-DOP-REF ID-REF="{{demf.dyn_end_dop_ref.ref_id}}">
<BASIC-STRUCTURE-REF {{make_ref_attribs(demf.structure_ref)}} />
<DYN-END-DOP-REF {{make_ref_attribs(demf.dyn_end_dop_ref)}}>
<TERMINATION-VALUE>{{demf.dyn_end_dop_ref.termination_value_raw}}</TERMINATION-VALUE>
</DYN-END-DOP-REF>
</DYNAMIC-ENDMARKER-FIELD>
Expand Down
4 changes: 2 additions & 2 deletions odxtools/templates/macros/printDynamicLengthField.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
{%- macro printDynamicLengthField(dlf) -%}
<DYNAMIC-LENGTH-FIELD {{-peid.printElementIdAttribs(dlf)}}>
{{ peid.printElementIdSubtags(dlf)|indent(1) }}
<BASIC-STRUCTURE-REF ID-REF="{{dlf.structure_ref.ref_id}}" />
<BASIC-STRUCTURE-REF {{make_ref_attribs(dlf.structure_ref)}} />
<OFFSET>{{dlf.offset}}</OFFSET>
<DETERMINE-NUMBER-OF-ITEMS>
{%- set dni = dlf.determine_number_of_items %}
<BYTE-POSITION>{{dni.byte_position}}</BYTE-POSITION>
{%- if dni.bit_position is not none %}
<BIT-POSITION>{{dni.bit_position}}</BIT-POSITION>
{%- endif %}
<DATA-OBJECT-PROP-REF ID-REF="{{dni.dop_ref.ref_id}}" />
<DATA-OBJECT-PROP-REF {{make_ref_attribs(dni.dop_ref)}} />
</DETERMINE-NUMBER-OF-ITEMS>
</DYNAMIC-LENGTH-FIELD>
{%- endmacro -%}
2 changes: 1 addition & 1 deletion odxtools/templates/macros/printEndOfPdu.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{%- macro printEndOfPdu(eopdu) -%}
<END-OF-PDU-FIELD {{-peid.printElementIdAttribs(eopdu)}}>
{{ peid.printElementIdSubtags(eopdu)|indent(1) }}
<BASIC-STRUCTURE-REF ID-REF="{{eopdu.structure_ref.ref_id}}" />
<BASIC-STRUCTURE-REF {{make_ref_attribs(eopdu.structure_ref)}} />
{%- if eopdu.max_number_of_items is not none %}
<MAX-NUMBER-OF-ITEMS>{{eopdu.max_number_of_items}}</MAX-NUMBER-OF-ITEMS>
{%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion odxtools/templates/macros/printEnvDataDesc.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PARAM-SNREF SHORT-NAME="{{env_data_desc.param_snref}}"/>
<ENV-DATA-REFS>
{%- for env_data_ref in env_data_desc.env_data_refs %}
<ENV-DATA-REF ID-REF="{{env_data_ref.ref_id}}"/>
<ENV-DATA-REF {{make_ref_attribs(env_data_ref)}}/>
{%- endfor %}
</ENV-DATA-REFS>
</ENV-DATA-DESC>
Expand Down
6 changes: 3 additions & 3 deletions odxtools/templates/macros/printMux.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
{%- if mux.switch_key.bit_position is not none %}
<BIT-POSITION>{{mux.switch_key.bit_position}}</BIT-POSITION>
{%- endif %}
<DATA-OBJECT-PROP-REF ID-REF="{{mux.switch_key.dop_ref.ref_id}}"/>
<DATA-OBJECT-PROP-REF {{make_ref_attribs(mux.switch_key.dop_ref)}}/>
</SWITCH-KEY>
{%- if mux.default_case is not none %}
<DEFAULT-CASE>
{{ peid.printElementIdSubtags(mux.default_case)|indent(4) }}
{%- if mux.default_case.structure_ref is not none %}
<STRUCTURE-REF ID-REF="{{mux.default_case.structure_ref.ref_id}}"/>
<STRUCTURE-REF {{make_ref_attribs(mux.default_case.structure_ref)}}/>
{%- endif %}
{%- if mux.default_case.structure_snref is not none %}
<STRUCTURE-SNREF SHORT_NAME="{{mux.default_case.structure_snref}}"/>
Expand All @@ -37,7 +37,7 @@
<CASE>
{{ peid.printElementIdSubtags(case)|indent(6) }}
{%- if case.structure_ref is not none %}
<STRUCTURE-REF ID-REF="{{case.structure_ref.ref_id}}"/>
<STRUCTURE-REF {{make_ref_attribs(case.structure_ref)}}/>
{%- endif %}
{%- if case.structure_snref is not none %}
<STRUCTURE-SNREF SHORT_NAME="{{case.structure_snref}}"/>
Expand Down
8 changes: 4 additions & 4 deletions odxtools/templates/macros/printParam.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<PHYSICAL-DEFAULT-VALUE>{{param.physical_default_value_raw | e}}</PHYSICAL-DEFAULT-VALUE>
{%- endif %}
{%- if param.dop_ref %}
<DOP-REF ID-REF="{{param.dop_ref.ref_id}}"/>
<DOP-REF {{make_ref_attribs(param.dop_ref)}}/>
{%- elif param.dop_snref %}
<DOP-SNREF SHORT-NAME="{{param.dop_snref}}"/>
{%- elif param.diag_coded_type is defined %}
Expand All @@ -59,7 +59,7 @@
{%- endif %}
{%- if param.parameter_type == "TABLE-KEY" %}
{%- if param.table_ref %}
<TABLE-REF ID-REF="{{param.table_ref.ref_id}}"/>
<TABLE-REF {{make_ref_attribs(param.table_ref)}}/>
{%- endif %}
{%- if param.table_snref %}
<TABLE-SNREF SHORT-NAME="{{param.table_snref}}"/>
Expand All @@ -68,12 +68,12 @@
<TABLE-ROW-SNREF SHORT-NAME="{{param.table_row_snref}}"/>
{%- endif %}
{%- if param.table_row_ref %}
<TABLE-ROW-REF ID-REF="{{param.table_row_ref.ref_id}}"/>
<TABLE-ROW-REF {{make_ref_attribs(param.table_row_ref)}}/>
{%- endif %}
{%- endif %}
{%- if param.parameter_type == "TABLE-STRUCT" %}
{%- if param.table_key_ref %}
<TABLE-KEY-REF ID-REF="{{param.table_key_ref.ref_id}}"/>
<TABLE-KEY-REF {{make_ref_attribs(param.table_key_ref)}}/>
{%- endif %}
{%- if param.table_key_snref %}
<TABLE-KEY-SNREF SHORT-NAME="{{param.table_key_snref}}"/>
Expand Down
6 changes: 1 addition & 5 deletions odxtools/templates/macros/printParentRef.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
-#}

{%- macro printParentRef(par) -%}
<PARENT-REF ID-REF="{{par.layer.odx_id.local_id}}"
{%- if par.layer_ref.ref_docs|length == 1 %}
DOCREF="{{par.layer_ref.ref_docs[0].doc_name}}"
DOCTYPE="CONTAINER"
{%- endif %}
<PARENT-REF {{make_ref_attribs(par.layer_ref)}}
xsi:type="{{par.layer.variant_type.value}}-REF">
{%- if par.not_inherited_diag_comms %}
<NOT-INHERITED-DIAG-COMMS>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-#}

{%- macro printPreConditionStateRef(ps_ref) -%}
<PRE-CONDITION-STATE-REF ID-REF="{{ps_ref.ref_id}}">
<PRE-CONDITION-STATE-REF {{make_ref_attribs(ps_ref)}}>
{%- if ps_ref.value is not none %}
<VALUE>{{ ps_ref.value }}</VALUE>
{%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion odxtools/templates/macros/printProtStack.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{%- if ps.comparam_subset_refs %}
<COMPARAM-SUBSET-REFS>
{%- for csr in ps.comparam_subset_refs %}
<COMPARAM-SUBSET-REF ID-REF="{{csr.ref_id}}" DOCREF="{{csr.ref_id}}" DOCTYPE="COMPARAM-SUBSET"/>
<COMPARAM-SUBSET-REF {{make_ref_attribs(csr)}}/>
{%- endfor %}
</COMPARAM-SUBSET-REFS>
{%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion odxtools/templates/macros/printProtocol.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{%- set dlr = protocol.protocol_raw %}

{%- set cps_docfrag = dlr.comparam_spec_ref.ref_docs[-1] %}
<COMPARAM-SPEC-REF ID-REF="{{dlr.comparam_spec_ref.ref_id}}" DOCREF="{{cps_docfrag.doc_name}}" DOCTYPE="{{cps_docfrag.doc_type.value}}" />
<COMPARAM-SPEC-REF {{make_ref_attribs(dlr.comparam_spec_ref)}} />

{%- if dlr.prot_stack_snref is not none %}
<PROT-STACK-SNREF SHORT-NAME="{{ dlr.prot_stack_snref }}" />
Expand Down
6 changes: 3 additions & 3 deletions odxtools/templates/macros/printService.xml.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@
</COMPARAM-REFS>
{%- endif%}
{%- if service.request_ref %}
<REQUEST-REF ID-REF="{{service.request_ref.ref_id}}"/>
<REQUEST-REF {{make_ref_attribs(service.request_ref)}}/>
{%- endif %}
{%- if service.pos_response_refs %}
<POS-RESPONSE-REFS>
{%- for ref in service.pos_response_refs %}
<POS-RESPONSE-REF ID-REF="{{ref.ref_id}}" />
<POS-RESPONSE-REF {{make_ref_attribs(ref)}} />
{%- endfor %}
</POS-RESPONSE-REFS>
{%- endif%}
{%- if service.neg_response_refs %}
<NEG-RESPONSE-REFS>
{%- for ref in service.neg_response_refs %}
<NEG-RESPONSE-REF ID-REF="{{ref.ref_id}}" />
<NEG-RESPONSE-REF {{make_ref_attribs(ref)}} />
{%- endfor %}
</NEG-RESPONSE-REFS>
{%- endif%}
Expand Down
Loading