odxtools 10.1.1__py3-none-any.whl → 10.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odxtools/addrdeffilter.py +33 -0
- odxtools/addrdefphyssegment.py +33 -0
- odxtools/checksum.py +67 -0
- odxtools/checksumresult.py +7 -0
- odxtools/database.py +24 -4
- odxtools/datablock.py +153 -0
- odxtools/datafile.py +23 -0
- odxtools/dataformat.py +39 -0
- odxtools/dataformatselection.py +9 -0
- odxtools/description.py +2 -5
- odxtools/diagdatadictionaryspec.py +1 -3
- odxtools/diaglayers/diaglayer.py +31 -11
- odxtools/diaglayers/ecuvariant.py +12 -19
- odxtools/diaglayers/hierarchyelement.py +5 -5
- odxtools/diaglayers/protocol.py +14 -0
- odxtools/direction.py +7 -0
- odxtools/ecumem.py +71 -0
- odxtools/ecumemconnector.py +136 -0
- odxtools/encryptcompressmethod.py +39 -0
- odxtools/encryptcompressmethodtype.py +13 -0
- odxtools/expectedident.py +40 -0
- odxtools/externflashdata.py +34 -0
- odxtools/filter.py +32 -0
- odxtools/flash.py +88 -0
- odxtools/flashclass.py +32 -0
- odxtools/flashdata.py +70 -0
- odxtools/fwchecksum.py +7 -0
- odxtools/fwsignature.py +7 -0
- odxtools/identdesc.py +54 -0
- odxtools/identvalue.py +32 -0
- odxtools/identvaluetype.py +14 -0
- odxtools/internflashdata.py +33 -0
- odxtools/loadfile.py +1 -1
- odxtools/mem.py +80 -0
- odxtools/modification.py +3 -2
- odxtools/negoffset.py +21 -0
- odxtools/odxlink.py +4 -2
- odxtools/ownident.py +38 -0
- odxtools/physicaltype.py +12 -10
- odxtools/physmem.py +52 -0
- odxtools/physsegment.py +42 -0
- odxtools/posoffset.py +21 -0
- odxtools/security.py +42 -0
- odxtools/securitymethod.py +7 -0
- odxtools/segment.py +63 -0
- odxtools/session.py +88 -0
- odxtools/sessiondesc.py +101 -0
- odxtools/sessionsubelemtype.py +14 -0
- odxtools/sizedeffilter.py +33 -0
- odxtools/sizedefphyssegment.py +33 -0
- odxtools/specialdata.py +2 -1
- odxtools/subcomponentparamconnector.py +1 -1
- odxtools/targetaddroffset.py +13 -0
- odxtools/templates/comparam-spec.odx-c.xml.jinja2 +1 -0
- odxtools/templates/comparam-subset.odx-cs.xml.jinja2 +1 -0
- odxtools/templates/diag_layer_container.odx-d.xml.jinja2 +2 -1
- odxtools/templates/flash.odx-f.xml.jinja2 +42 -0
- odxtools/templates/macros/printAdminData.xml.jinja2 +4 -4
- odxtools/templates/macros/printAudience.xml.jinja2 +3 -3
- odxtools/templates/macros/printChecksum.xml.jinja2 +36 -0
- odxtools/templates/macros/printComparam.xml.jinja2 +1 -1
- odxtools/templates/macros/printComparamRef.xml.jinja2 +1 -3
- odxtools/templates/macros/printCompuMethod.xml.jinja2 +1 -1
- odxtools/templates/macros/printDOP.xml.jinja2 +3 -3
- odxtools/templates/macros/printDatablock.xml.jinja2 +78 -0
- odxtools/templates/macros/printDiagComm.xml.jinja2 +2 -2
- odxtools/templates/macros/printDiagLayer.xml.jinja2 +2 -1
- odxtools/templates/macros/printDiagVariable.xml.jinja2 +4 -4
- odxtools/templates/macros/printDynDefinedSpec.xml.jinja2 +3 -3
- odxtools/templates/macros/printDynamicEndmarkerField.xml.jinja2 +2 -2
- odxtools/templates/macros/printDynamicLengthField.xml.jinja2 +2 -2
- odxtools/templates/macros/printEcuMem.xml.jinja2 +24 -0
- odxtools/templates/macros/printEcuMemConnector.xml.jinja2 +58 -0
- odxtools/templates/macros/printEndOfPdu.xml.jinja2 +1 -1
- odxtools/templates/macros/printEnvDataDesc.xml.jinja2 +1 -1
- odxtools/templates/macros/printExpectedIdent.xml.jinja2 +21 -0
- odxtools/templates/macros/printFlashdata.xml.jinja2 +43 -0
- odxtools/templates/macros/printIdentDesc.xml.jinja2 +17 -0
- odxtools/templates/macros/printMem.xml.jinja2 +35 -0
- odxtools/templates/macros/printMux.xml.jinja2 +3 -3
- odxtools/templates/macros/printOdxCategory.xml.jinja2 +4 -4
- odxtools/templates/macros/printOwnIdent.xml.jinja2 +17 -0
- odxtools/templates/macros/printParam.xml.jinja2 +4 -4
- odxtools/templates/macros/printParentRef.xml.jinja2 +1 -5
- odxtools/templates/macros/printPhysMem.xml.jinja2 +20 -0
- odxtools/templates/macros/printPhysSegment.xml.jinja2 +33 -0
- odxtools/templates/macros/printPreConditionStateRef.xml.jinja2 +1 -1
- odxtools/templates/macros/printProtStack.xml.jinja2 +1 -1
- odxtools/templates/macros/printProtocol.xml.jinja2 +1 -1
- odxtools/templates/macros/printSecurity.xml.jinja2 +37 -0
- odxtools/templates/macros/printSegment.xml.jinja2 +31 -0
- odxtools/templates/macros/printService.xml.jinja2 +3 -3
- odxtools/templates/macros/printSession.xml.jinja2 +45 -0
- odxtools/templates/macros/printSessionDesc.xml.jinja2 +40 -0
- odxtools/templates/macros/printSingleEcuJob.xml.jinja2 +3 -3
- odxtools/templates/macros/printSpecialData.xml.jinja2 +2 -2
- odxtools/templates/macros/printStateTransitionRef.xml.jinja2 +1 -1
- odxtools/templates/macros/printStaticField.xml.jinja2 +1 -1
- odxtools/templates/macros/printSubComponent.xml.jinja2 +3 -3
- odxtools/templates/macros/printTable.xml.jinja2 +6 -6
- odxtools/templates/macros/printUnitSpec.xml.jinja2 +2 -2
- odxtools/text.py +2 -6
- odxtools/utils.py +22 -1
- odxtools/validityfor.py +30 -0
- odxtools/version.py +2 -2
- odxtools/writepdxfile.py +70 -21
- {odxtools-10.1.1.dist-info → odxtools-10.2.1.dist-info}/METADATA +1 -1
- {odxtools-10.1.1.dist-info → odxtools-10.2.1.dist-info}/RECORD +112 -55
- {odxtools-10.1.1.dist-info → odxtools-10.2.1.dist-info}/WHEEL +1 -1
- {odxtools-10.1.1.dist-info → odxtools-10.2.1.dist-info}/entry_points.txt +0 -0
- {odxtools-10.1.1.dist-info → odxtools-10.2.1.dist-info}/licenses/LICENSE +0 -0
- {odxtools-10.1.1.dist-info → odxtools-10.2.1.dist-info}/top_level.txt +0 -0
@@ -8,7 +8,7 @@
|
|
8
8
|
{%- macro printDynamicLengthField(dlf) -%}
|
9
9
|
<DYNAMIC-LENGTH-FIELD {{-peid.printElementIdAttribs(dlf)}}>
|
10
10
|
{{ peid.printElementIdSubtags(dlf)|indent(1) }}
|
11
|
-
<BASIC-STRUCTURE-REF
|
11
|
+
<BASIC-STRUCTURE-REF {{make_ref_attribs(dlf.structure_ref)}} />
|
12
12
|
<OFFSET>{{dlf.offset}}</OFFSET>
|
13
13
|
<DETERMINE-NUMBER-OF-ITEMS>
|
14
14
|
{%- set dni = dlf.determine_number_of_items %}
|
@@ -16,7 +16,7 @@
|
|
16
16
|
{%- if dni.bit_position is not none %}
|
17
17
|
<BIT-POSITION>{{dni.bit_position}}</BIT-POSITION>
|
18
18
|
{%- endif %}
|
19
|
-
<DATA-OBJECT-PROP-REF
|
19
|
+
<DATA-OBJECT-PROP-REF {{make_ref_attribs(dni.dop_ref)}} />
|
20
20
|
</DETERMINE-NUMBER-OF-ITEMS>
|
21
21
|
</DYNAMIC-LENGTH-FIELD>
|
22
22
|
{%- endmacro -%}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
1{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printAdminData.xml.jinja2') as pad %}
|
7
|
+
{%- import('macros/printElementId.xml.jinja2') as peid %}
|
8
|
+
{%- import('macros/printMem.xml.jinja2') as pm %}
|
9
|
+
{%- import('macros/printPhysMem.xml.jinja2') as ppm %}
|
10
|
+
{%- import('macros/printSpecialData.xml.jinja2') as psd %}
|
11
|
+
|
12
|
+
{%- macro printEcuMem(ecu_mem) -%}
|
13
|
+
<ECU-MEM {{peid.printElementIdAttribs(ecu_mem) | indent(1) }}>
|
14
|
+
{{peid.printElementIdSubtags(ecu_mem)|indent(2) }}
|
15
|
+
{%- if ecu_mem.admin_data is not none %}
|
16
|
+
{{ pad.printAdminData(ecu_mem.admin_data)|indent(2) }}
|
17
|
+
{%- endif %}
|
18
|
+
{{ pm.printMem(ecu_mem.mem)|indent(2) }}
|
19
|
+
{%- if ecu_mem.phys_mem is not none %}
|
20
|
+
{{ ppm.printPhysMem(ecu_mem.phys_mem)|indent(2) }}
|
21
|
+
{%- endif %}
|
22
|
+
{{- psd.printSpecialDataGroups(ecu_mem.sdgs)|indent(2, first=True) }}{#- #}
|
23
|
+
</ECU-MEM>
|
24
|
+
{%- endmacro -%}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
1{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printAdminData.xml.jinja2') as pad %}
|
7
|
+
{%- import('macros/printElementId.xml.jinja2') as peid %}
|
8
|
+
{%- import('macros/printIdentDesc.xml.jinja2') as pidd %}
|
9
|
+
{%- import('macros/printSpecialData.xml.jinja2') as psd %}
|
10
|
+
{%- import('macros/printSessionDesc.xml.jinja2') as psesd %}
|
11
|
+
|
12
|
+
{%- macro printEcuMemConnector(ecu_mem_connector) -%}
|
13
|
+
<ECU-MEM-CONNECTOR {{peid.printElementIdAttribs(ecu_mem_connector)}}>
|
14
|
+
{{peid.printElementIdSubtags(ecu_mem_connector)|indent(2) }}
|
15
|
+
{%- if ecu_mem_connector.admin_data is not none %}
|
16
|
+
{{ pad.printAdminData(ecu_mem_connector.admin_data)|indent(2) }}
|
17
|
+
{%- endif %}
|
18
|
+
{%- if ecu_mem_connector.flash_classes %}
|
19
|
+
<FLASH-CLASSS>
|
20
|
+
{%- for flash_class in ecu_mem_connector.flash_classes %}
|
21
|
+
<FLASH-CLASS {{peid.printElementIdAttribs(flash_class)}}>
|
22
|
+
{{peid.printElementIdSubtags(flash_class)|indent(6) }}
|
23
|
+
</FLASH-CLASS>
|
24
|
+
{%- endfor %}
|
25
|
+
</FLASH-CLASSS>
|
26
|
+
{%- endif %}
|
27
|
+
{%- if ecu_mem_connector.session_descs %}
|
28
|
+
<SESSION-DESCS>
|
29
|
+
{%- for session_desc in ecu_mem_connector.session_descs %}
|
30
|
+
{{psesd.printSessionDesc(session_desc)}}
|
31
|
+
{%- endfor %}
|
32
|
+
</SESSION-DESCS>
|
33
|
+
{%- endif %}
|
34
|
+
{%- if ecu_mem_connector.ident_descs %}
|
35
|
+
<IDENT-DESCS>
|
36
|
+
{%- for ident_desc in ecu_mem_connector.ident_descs %}
|
37
|
+
{{pidd.printIdentDesc(ident_desc)}}
|
38
|
+
{%- endfor %}
|
39
|
+
</IDENT-DESCS>
|
40
|
+
{%- endif %}
|
41
|
+
<ECU-MEM-REF {{make_ref_attribs(ecu_mem_connector.ecu_mem_ref)}} />
|
42
|
+
{%- if ecu_mem_connector.layer_refs %}
|
43
|
+
<LAYER-REFS>
|
44
|
+
{%- for layer_ref in ecu_mem_connector.layer_refs %}
|
45
|
+
<LAYER-REF {{make_ref_attribs(layer_ref)}} />
|
46
|
+
{%- endfor %}
|
47
|
+
</LAYER-REFS>
|
48
|
+
{%- endif %}
|
49
|
+
{%- if ecu_mem_connector.all_variant_refs %}
|
50
|
+
<ALL-VARIANT-REFS>
|
51
|
+
{%- for all_variant_ref in ecu_mem_connector.all_variant_refs %}
|
52
|
+
<ALL-VARIANT-REF {{make_ref_attribs(all_variant_ref)}} />
|
53
|
+
{%- endfor %}
|
54
|
+
</ALL-VARIANT-REFS>
|
55
|
+
{%- endif %}
|
56
|
+
{{- psd.printSpecialDataGroups(ecu_mem_connector.sdgs)|indent(2, first=True) }}{#- #}
|
57
|
+
</ECU-MEM-CONNECTOR>
|
58
|
+
{%- endmacro -%}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
{%- macro printEndOfPdu(eopdu) -%}
|
9
9
|
<END-OF-PDU-FIELD {{-peid.printElementIdAttribs(eopdu)}}>
|
10
10
|
{{ peid.printElementIdSubtags(eopdu)|indent(1) }}
|
11
|
-
<BASIC-STRUCTURE-REF
|
11
|
+
<BASIC-STRUCTURE-REF {{make_ref_attribs(eopdu.structure_ref)}} />
|
12
12
|
{%- if eopdu.max_number_of_items is not none %}
|
13
13
|
<MAX-NUMBER-OF-ITEMS>{{eopdu.max_number_of_items}}</MAX-NUMBER-OF-ITEMS>
|
14
14
|
{%- endif %}
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<PARAM-SNREF SHORT-NAME="{{env_data_desc.param_snref}}"/>
|
12
12
|
<ENV-DATA-REFS>
|
13
13
|
{%- for env_data_ref in env_data_desc.env_data_refs %}
|
14
|
-
<ENV-DATA-REF
|
14
|
+
<ENV-DATA-REF {{make_ref_attribs(env_data_ref)}}/>
|
15
15
|
{%- endfor %}
|
16
16
|
</ENV-DATA-REFS>
|
17
17
|
</ENV-DATA-DESC>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printElementId.xml.jinja2') as peid %}
|
7
|
+
|
8
|
+
{%- macro printExpectedIdent(expected_ident) -%}
|
9
|
+
<EXPECTED-IDENT {{-peid.printElementIdAttribs(expected_ident)}} >
|
10
|
+
{{ peid.printElementIdSubtags(expected_ident)}}
|
11
|
+
<IDENT-VALUES>
|
12
|
+
{%- for ident_value in expected_ident.ident_values %}
|
13
|
+
<IDENT-VALUE
|
14
|
+
{%- if ident_value.value_type is not none %}
|
15
|
+
{#- #} TYPE="{{ ident_value.value_type.value }}"
|
16
|
+
{%- endif %}
|
17
|
+
{#- #}>{{ident_value.value}}</IDENT-VALUE>
|
18
|
+
{%- endfor %}
|
19
|
+
</IDENT-VALUES>
|
20
|
+
</EXPECTED-IDENT>
|
21
|
+
{%- endmacro -%}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printElementId.xml.jinja2') as peid %}
|
7
|
+
{%- import('macros/printOwnIdent.xml.jinja2') as poi %}
|
8
|
+
{%- import('macros/printSegment.xml.jinja2') as pseg %}
|
9
|
+
{%- import('macros/printSpecialData.xml.jinja2') as psd %}
|
10
|
+
|
11
|
+
{%- macro printFlashdata(flashdata) -%}
|
12
|
+
<FLASHDATA {{peid.printElementIdAttribs(flashdata)}}
|
13
|
+
{%- if flashdata.datafile is defined %}
|
14
|
+
{#- #} xsi:type="EXTERN-FLASHDATA"
|
15
|
+
{%- elif flashdata.data is defined %}
|
16
|
+
{#- #} xsi:type="INTERN-FLASHDATA"
|
17
|
+
{%- endif %}
|
18
|
+
{#- #}>
|
19
|
+
{{ peid.printElementIdSubtags(flashdata)|indent(2) }}
|
20
|
+
{%- if flashdata.size_length is not none %}
|
21
|
+
<SIZE-LENGTH>{{flashdata.size_length}}</SIZE-LENGTH>
|
22
|
+
{%- endif %}
|
23
|
+
{%- if flashdata.address_length is not none %}
|
24
|
+
<ADDRESS-LENGTH>{{flashdata.address_length}}</ADDRESS-LENGTH>
|
25
|
+
{%- endif %}
|
26
|
+
<DATAFORMAT {{ make_xml_attrib("SELECTION", flashdata.dataformat.selection.value) }}
|
27
|
+
{#- #} {{ make_xml_attrib("USER-SELECTION", flashdata.dataformat.user_selection) }} />
|
28
|
+
{%- if flashdata.encrypt_compress_method is not none %}
|
29
|
+
<ENCRYPT-COMPRESS-METHOD
|
30
|
+
{%- if flashdata.encrypt_compress_method.value_type is not none %}
|
31
|
+
{#- #} TYPE="{{ flashdata.encrypt_compress_method.value_type.value }}"
|
32
|
+
{%- endif %}
|
33
|
+
{#- #}>{{flashdata.encrypt_compress_method.value}}</ENCRYPT-COMPRESS-METHOD>
|
34
|
+
{%- endif %}
|
35
|
+
{%- if flashdata.datafile is defined %}
|
36
|
+
<DATAFILE {{ make_bool_xml_attrib("LATEBOUND-DATAFILE", flashdata.latebound_datafile) }}>
|
37
|
+
{#- #}{{flashdata.datafile.value}}
|
38
|
+
{#- #}</DATAFILE>
|
39
|
+
{%- elif flashdata.data is defined %}
|
40
|
+
<DATA>{{flashdata.data}}</DATA>
|
41
|
+
{%- endif %}
|
42
|
+
</FLASHDATA>
|
43
|
+
{%- endmacro -%}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- macro printIdentDesc(ident_desc) -%}
|
7
|
+
<IDENT-DESC>
|
8
|
+
<DIAG-COMM-SNREF SHORT-NAME="{{ident_desc.diag_comm_snref}}" />
|
9
|
+
<IDENT-IF-SNREF SHORT-NAME="{{ident_desc.ident_if_snref}}" />
|
10
|
+
{%- if ident_desc.out_param_if_snref is not none %}
|
11
|
+
<OUT-PARAM-IF-SNREF SHORT-NAME="{{ident_desc.out_param_if_snref}}" />
|
12
|
+
{%- endif %}
|
13
|
+
{%- if ident_desc.out_param_if_snpathref is not none %}
|
14
|
+
<OUT-PARAM-IF-SNPATHREF SHORT-NAME-PATH="{{ident_desc.out_param_if_snpathref}}" />
|
15
|
+
{%- endif %}
|
16
|
+
</IDENT-DESC>
|
17
|
+
{%- endmacro -%}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printDatablock.xml.jinja2') as pdbl %}
|
7
|
+
{%- import('macros/printFlashdata.xml.jinja2') as pfd %}
|
8
|
+
{%- import('macros/printSession.xml.jinja2') as pses %}
|
9
|
+
{%- import('macros/printSpecialData.xml.jinja2') as psd %}
|
10
|
+
|
11
|
+
{%- macro printMem(mem) -%}
|
12
|
+
<MEM>
|
13
|
+
{%- if mem.sessions %}
|
14
|
+
<SESSIONS>
|
15
|
+
{%- for session in mem.sessions %}
|
16
|
+
{{ pses.printSession(session) | indent(4) }}
|
17
|
+
{%- endfor %}
|
18
|
+
</SESSIONS>
|
19
|
+
{%- endif %}
|
20
|
+
{%- if mem.datablocks %}
|
21
|
+
<DATABLOCKS>
|
22
|
+
{%- for datablock in mem.datablocks %}
|
23
|
+
{{ pdbl.printDatablock(datablock) | indent(4) }}
|
24
|
+
{%- endfor %}
|
25
|
+
</DATABLOCKS>
|
26
|
+
{%- endif %}
|
27
|
+
{%- if mem.flashdatas %}
|
28
|
+
<FLASHDATAS>
|
29
|
+
{%- for flashdata in mem.flashdatas %}
|
30
|
+
{{ pfd.printFlashdata(flashdata) | indent(4) }}
|
31
|
+
{%- endfor %}
|
32
|
+
</FLASHDATAS>
|
33
|
+
{%- endif %}
|
34
|
+
</MEM>
|
35
|
+
{%- endmacro -%}
|
@@ -18,13 +18,13 @@
|
|
18
18
|
{%- if mux.switch_key.bit_position is not none %}
|
19
19
|
<BIT-POSITION>{{mux.switch_key.bit_position}}</BIT-POSITION>
|
20
20
|
{%- endif %}
|
21
|
-
<DATA-OBJECT-PROP-REF
|
21
|
+
<DATA-OBJECT-PROP-REF {{make_ref_attribs(mux.switch_key.dop_ref)}}/>
|
22
22
|
</SWITCH-KEY>
|
23
23
|
{%- if mux.default_case is not none %}
|
24
24
|
<DEFAULT-CASE>
|
25
25
|
{{ peid.printElementIdSubtags(mux.default_case)|indent(4) }}
|
26
26
|
{%- if mux.default_case.structure_ref is not none %}
|
27
|
-
<STRUCTURE-REF
|
27
|
+
<STRUCTURE-REF {{make_ref_attribs(mux.default_case.structure_ref)}}/>
|
28
28
|
{%- endif %}
|
29
29
|
{%- if mux.default_case.structure_snref is not none %}
|
30
30
|
<STRUCTURE-SNREF SHORT_NAME="{{mux.default_case.structure_snref}}"/>
|
@@ -37,7 +37,7 @@
|
|
37
37
|
<CASE>
|
38
38
|
{{ peid.printElementIdSubtags(case)|indent(6) }}
|
39
39
|
{%- if case.structure_ref is not none %}
|
40
|
-
<STRUCTURE-REF
|
40
|
+
<STRUCTURE-REF {{make_ref_attribs(case.structure_ref)}}/>
|
41
41
|
{%- endif %}
|
42
42
|
{%- if case.structure_snref is not none %}
|
43
43
|
<STRUCTURE-SNREF SHORT_NAME="{{case.structure_snref}}"/>
|
@@ -12,17 +12,17 @@
|
|
12
12
|
{#- #} {{- peid.printElementIdAttribs(obj) }}
|
13
13
|
{%- endmacro -%}
|
14
14
|
|
15
|
-
{%- macro printOdxCategorySubtags(obj)
|
15
|
+
{%- macro printOdxCategorySubtags(obj) %}
|
16
16
|
{{ peid.printElementIdSubtags(obj) }}
|
17
17
|
{%- if obj.admin_data %}
|
18
|
-
{{pad.printAdminData(obj.admin_data)
|
18
|
+
{{pad.printAdminData(obj.admin_data)}}
|
19
19
|
{%- endif %}
|
20
20
|
{%- if obj.company_datas %}
|
21
21
|
<COMPANY-DATAS>
|
22
22
|
{%- for cd in obj.company_datas %}
|
23
|
-
{{pcd.printCompanyData(cd)|indent(
|
23
|
+
{{pcd.printCompanyData(cd)|indent(2)}}
|
24
24
|
{%- endfor %}
|
25
25
|
</COMPANY-DATAS>
|
26
26
|
{%- endif %}
|
27
|
-
{{- psd.printSpecialDataGroups(obj.sdgs)
|
27
|
+
{{- psd.printSpecialDataGroups(obj.sdgs) }}{#- #}
|
28
28
|
{%- endmacro -%}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printElementId.xml.jinja2') as peid %}
|
7
|
+
|
8
|
+
{%- macro printOwnIdent(own_ident) -%}
|
9
|
+
<OWN-IDENT {{-peid.printElementIdAttribs(own_ident)}} >
|
10
|
+
{{ peid.printElementIdSubtags(own_ident)}}
|
11
|
+
<IDENT-VALUE
|
12
|
+
{%- if own_ident.ident_value.value_type is not none %}
|
13
|
+
{#- #} TYPE="{{ own_ident.ident_value.value_type.value }}"
|
14
|
+
{%- endif %}
|
15
|
+
{#- #}>{{own_ident.ident_value.value}}</IDENT-VALUE>
|
16
|
+
</OWN-IDENT>
|
17
|
+
{%- endmacro -%}
|
@@ -49,7 +49,7 @@
|
|
49
49
|
<PHYSICAL-DEFAULT-VALUE>{{param.physical_default_value_raw | e}}</PHYSICAL-DEFAULT-VALUE>
|
50
50
|
{%- endif %}
|
51
51
|
{%- if param.dop_ref %}
|
52
|
-
<DOP-REF
|
52
|
+
<DOP-REF {{make_ref_attribs(param.dop_ref)}}/>
|
53
53
|
{%- elif param.dop_snref %}
|
54
54
|
<DOP-SNREF SHORT-NAME="{{param.dop_snref}}"/>
|
55
55
|
{%- elif param.diag_coded_type is defined %}
|
@@ -59,7 +59,7 @@
|
|
59
59
|
{%- endif %}
|
60
60
|
{%- if param.parameter_type == "TABLE-KEY" %}
|
61
61
|
{%- if param.table_ref %}
|
62
|
-
<TABLE-REF
|
62
|
+
<TABLE-REF {{make_ref_attribs(param.table_ref)}}/>
|
63
63
|
{%- endif %}
|
64
64
|
{%- if param.table_snref %}
|
65
65
|
<TABLE-SNREF SHORT-NAME="{{param.table_snref}}"/>
|
@@ -68,12 +68,12 @@
|
|
68
68
|
<TABLE-ROW-SNREF SHORT-NAME="{{param.table_row_snref}}"/>
|
69
69
|
{%- endif %}
|
70
70
|
{%- if param.table_row_ref %}
|
71
|
-
<TABLE-ROW-REF
|
71
|
+
<TABLE-ROW-REF {{make_ref_attribs(param.table_row_ref)}}/>
|
72
72
|
{%- endif %}
|
73
73
|
{%- endif %}
|
74
74
|
{%- if param.parameter_type == "TABLE-STRUCT" %}
|
75
75
|
{%- if param.table_key_ref %}
|
76
|
-
<TABLE-KEY-REF
|
76
|
+
<TABLE-KEY-REF {{make_ref_attribs(param.table_key_ref)}}/>
|
77
77
|
{%- endif %}
|
78
78
|
{%- if param.table_key_snref %}
|
79
79
|
<TABLE-KEY-SNREF SHORT-NAME="{{param.table_key_snref}}"/>
|
@@ -4,11 +4,7 @@
|
|
4
4
|
-#}
|
5
5
|
|
6
6
|
{%- macro printParentRef(par) -%}
|
7
|
-
<PARENT-REF
|
8
|
-
{%- if par.layer_ref.ref_docs|length == 1 %}
|
9
|
-
DOCREF="{{par.layer_ref.ref_docs[0].doc_name}}"
|
10
|
-
DOCTYPE="CONTAINER"
|
11
|
-
{%- endif %}
|
7
|
+
<PARENT-REF {{make_ref_attribs(par.layer_ref)}}
|
12
8
|
xsi:type="{{par.layer.variant_type.value}}-REF">
|
13
9
|
{%- if par.not_inherited_diag_comms %}
|
14
10
|
<NOT-INHERITED-DIAG-COMMS>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printElementId.xml.jinja2') as peid %}
|
7
|
+
{%- import('macros/printPhysSegment.xml.jinja2') as ppseg %}
|
8
|
+
|
9
|
+
{%- macro printPhysMem(phys_mem) -%}
|
10
|
+
<PHYS-MEM {{peid.printElementIdAttribs(phys_mem)}}>
|
11
|
+
{{ peid.printElementIdSubtags(phys_mem)|indent(1) }}
|
12
|
+
{%- if phys_mem.phys_segments %}
|
13
|
+
<PHYS-SEGMENTS>
|
14
|
+
{%- for phys_segment in phys_mem.phys_segments %}
|
15
|
+
{{ ppseg.printPhysSegment(phys_segment)|indent(4) }}
|
16
|
+
{%- endfor %}
|
17
|
+
</PHYS-SEGMENTS>
|
18
|
+
{%- endif %}
|
19
|
+
</PHYS-MEM>
|
20
|
+
{%- endmacro -%}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printElementId.xml.jinja2') as peid %}
|
7
|
+
|
8
|
+
{%- macro printPhysSegment(phys_segment) -%}
|
9
|
+
<PHYS-SEGMENT {{-peid.printElementIdAttribs(phys_segment)}}
|
10
|
+
{%- if phys_segment.size is defined %}
|
11
|
+
{#- #}xsi:type="SIZEDEF-PHYS-SEGMENT"
|
12
|
+
{%- elif phys_segment.end_address is defined %}
|
13
|
+
{#- #}xsi:type="ADDRDEF-PHYS-SEGMENT"
|
14
|
+
{%- endif %}
|
15
|
+
{#- #}>
|
16
|
+
{{ peid.printElementIdSubtags(phys_segment)|indent(2) }}
|
17
|
+
{%- if phys_segment.fillbyte is not none %}
|
18
|
+
{%- set num_nibbles = (phys_segment.fillbyte.bit_length() + 7) // 8 * 2 %}
|
19
|
+
<FILLBYTE>{{ ("%%0%dX" | format(num_nibbles | int)) | format(phys_segment.fillbyte | int) }}</FILLBYTE>
|
20
|
+
{%- endif %}
|
21
|
+
{%- if phys_segment.block_size is not none %}
|
22
|
+
<BLOCK-SIZE>{{ phys_segment.block_size }}</BLOCK-SIZE>
|
23
|
+
{%- endif %}
|
24
|
+
{%- set num_nibbles = (phys_segment.start_address.bit_length() + 7) // 8 * 2 %}
|
25
|
+
<START-ADDRESS>{{ ("%%0%dX" | format(num_nibbles | int)) | format(phys_segment.start_address | int) }}</START-ADDRESS>
|
26
|
+
{%- if phys_segment.size is defined %}
|
27
|
+
<SIZE>{{phys_segment.size}}</SIZE>
|
28
|
+
{%- elif phys_segment.end_address is defined %}
|
29
|
+
{%- set num_nibbles = (phys_segment.end_address.bit_length() + 7) // 8 * 2 %}
|
30
|
+
<END-ADDRESS>{{ ("%%0%dX" | format(num_nibbles | int)) | format(phys_segment.end_address | int) }}</END-ADDRESS>
|
31
|
+
{%- endif %}
|
32
|
+
</PHYS-SEGMENT>
|
33
|
+
{%- endmacro -%}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
{%- if ps.comparam_subset_refs %}
|
15
15
|
<COMPARAM-SUBSET-REFS>
|
16
16
|
{%- for csr in ps.comparam_subset_refs %}
|
17
|
-
<COMPARAM-SUBSET-REF
|
17
|
+
<COMPARAM-SUBSET-REF {{make_ref_attribs(csr)}}/>
|
18
18
|
{%- endfor %}
|
19
19
|
</COMPARAM-SUBSET-REFS>
|
20
20
|
{%- endif %}
|
@@ -13,7 +13,7 @@
|
|
13
13
|
{%- set dlr = protocol.protocol_raw %}
|
14
14
|
|
15
15
|
{%- set cps_docfrag = dlr.comparam_spec_ref.ref_docs[-1] %}
|
16
|
-
<COMPARAM-SPEC-REF
|
16
|
+
<COMPARAM-SPEC-REF {{make_ref_attribs(dlr.comparam_spec_ref)}} />
|
17
17
|
|
18
18
|
{%- if dlr.prot_stack_snref is not none %}
|
19
19
|
<PROT-STACK-SNREF SHORT-NAME="{{ dlr.prot_stack_snref }}" />
|
@@ -0,0 +1,37 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- macro printSecurity(security) -%}
|
7
|
+
<SECURITY>
|
8
|
+
{%- if security.security_method is not none %}
|
9
|
+
<SECURITY-METHOD
|
10
|
+
{%- if security.security_method.value_type is not none %}
|
11
|
+
{#- #} TYPE="{{ security.security_method.value_type.value }}"
|
12
|
+
{%- endif %}
|
13
|
+
{#- #}>{{security.security_method.value}}</SECURITY-METHOD>
|
14
|
+
{%- endif %}
|
15
|
+
{%- if security.fw_signature is not none %}
|
16
|
+
<FW-SIGNATURE
|
17
|
+
{%- if security.fw_signature.value_type is not none %}
|
18
|
+
{#- #} TYPE="{{ security.fw_signature.value_type.value }}"
|
19
|
+
{%- endif %}
|
20
|
+
{#- #}>{{security.fw_signature.value}}</FW-SIGNATURE>
|
21
|
+
{%- endif %}
|
22
|
+
{%- if security.fw_checksum is not none %}
|
23
|
+
<FW-CHECKSUM
|
24
|
+
{%- if security.fw_checksum.value_type is not none %}
|
25
|
+
{#- #} TYPE="{{ security.fw_checksum.value_type.value }}"
|
26
|
+
{%- endif %}
|
27
|
+
{#- #}>{{security.fw_checksum.value}}</FW-CHECKSUM>
|
28
|
+
{%- endif %}
|
29
|
+
{%- if security.validity_for is not none %}
|
30
|
+
<VALIDITY-FOR
|
31
|
+
{%- if security.validity_for.value_type is not none %}
|
32
|
+
{#- #} TYPE="{{ security.validity_for.value_type.value }}"
|
33
|
+
{%- endif %}
|
34
|
+
{#- #}>{{security.validity_for.value}}</VALIDITY-FOR>
|
35
|
+
{%- endif %}
|
36
|
+
</SECURITY>
|
37
|
+
{%- endmacro -%}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printElementId.xml.jinja2') as peid %}
|
7
|
+
|
8
|
+
{%- macro printSegment(segment) -%}
|
9
|
+
<SEGMENT {{peid.printElementIdAttribs(segment)}}>
|
10
|
+
{{ peid.printElementIdSubtags(segment)|indent(1) }}
|
11
|
+
{%- set num_nibbles = (segment.source_start_address.bit_length() + 7) // 8 * 2 %}
|
12
|
+
<SOURCE-START-ADDRESS>{{("%%0%dX" | format(num_nibbles | int)) | format(segment.source_start_address | int)}}</SOURCE-START-ADDRESS>
|
13
|
+
{%- if segment.compressed_size is not none %}
|
14
|
+
<COMPRESSED-SIZE>{{segment.compressed_size}}</COMPRESSED-SIZE>
|
15
|
+
{%- endif %}
|
16
|
+
{%- if segment.uncompressed_size is not none %}
|
17
|
+
<UNCOMPRESSED-SIZE>{{segment.uncompressed_size}}</UNCOMPRESSED-SIZE>
|
18
|
+
{%- endif %}
|
19
|
+
{%- if segment.source_end_address is not none %}
|
20
|
+
{%- set num_nibbles = (segment.source_end_address.bit_length() + 7) // 8 * 2 %}
|
21
|
+
<SOURCE-END-ADDRESS>{{("%%0%dX" | format(num_nibbles | int)) | format(segment.source_end_address | int)}}</SOURCE-END-ADDRESS>
|
22
|
+
{%- endif %}
|
23
|
+
{%- if segment.encrypt_compress_method is not none %}
|
24
|
+
<ENCRYPT-COMPRESS-METHOD
|
25
|
+
{%- if segment.encrypt_compress_method.value_type is not none %}
|
26
|
+
{#- #} TYPE="{{ segment.encrypt_compress_method.value_type.value }}"
|
27
|
+
{%- endif %}
|
28
|
+
{#- #}>{{segment.encrypt_compress_method.value}}</ENCRYPT-COMPRESS-METHOD>
|
29
|
+
{%- endif %}
|
30
|
+
</SEGMENT>
|
31
|
+
{%- endmacro -%}
|
@@ -56,19 +56,19 @@
|
|
56
56
|
</COMPARAM-REFS>
|
57
57
|
{%- endif%}
|
58
58
|
{%- if service.request_ref %}
|
59
|
-
<REQUEST-REF
|
59
|
+
<REQUEST-REF {{make_ref_attribs(service.request_ref)}}/>
|
60
60
|
{%- endif %}
|
61
61
|
{%- if service.pos_response_refs %}
|
62
62
|
<POS-RESPONSE-REFS>
|
63
63
|
{%- for ref in service.pos_response_refs %}
|
64
|
-
<POS-RESPONSE-REF
|
64
|
+
<POS-RESPONSE-REF {{make_ref_attribs(ref)}} />
|
65
65
|
{%- endfor %}
|
66
66
|
</POS-RESPONSE-REFS>
|
67
67
|
{%- endif%}
|
68
68
|
{%- if service.neg_response_refs %}
|
69
69
|
<NEG-RESPONSE-REFS>
|
70
70
|
{%- for ref in service.neg_response_refs %}
|
71
|
-
<NEG-RESPONSE-REF
|
71
|
+
<NEG-RESPONSE-REF {{make_ref_attribs(ref)}} />
|
72
72
|
{%- endfor %}
|
73
73
|
</NEG-RESPONSE-REFS>
|
74
74
|
{%- endif%}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printChecksum.xml.jinja2') as pcs %}
|
7
|
+
{%- import('macros/printElementId.xml.jinja2') as peid %}
|
8
|
+
{%- import('macros/printExpectedIdent.xml.jinja2') as pei %}
|
9
|
+
{%- import('macros/printSecurity.xml.jinja2') as psec %}
|
10
|
+
{%- import('macros/printSpecialData.xml.jinja2') as psd %}
|
11
|
+
|
12
|
+
{%- macro printSession(session) -%}
|
13
|
+
<SESSION {{-peid.printElementIdAttribs(session)|indent(2) }}{# -#}>
|
14
|
+
{{ peid.printElementIdSubtags(session)|indent(2) }}
|
15
|
+
{%- if session.expected_idents %}
|
16
|
+
<EXPECTED-IDENTS>
|
17
|
+
{%- for expected_ident in session.expected_idents %}
|
18
|
+
{{ pei.printExpectedIdent(expected_ident)|indent(4) }}
|
19
|
+
{%- endfor %}
|
20
|
+
</EXPECTED-IDENTS>
|
21
|
+
{%- endif %}
|
22
|
+
{%- if session.checksums %}
|
23
|
+
<CHECKSUMS>
|
24
|
+
{%- for checksum in session.checksums %}
|
25
|
+
{{ pcs.printChecksum(checksum)|indent(4) }}
|
26
|
+
{%- endfor %}
|
27
|
+
</CHECKSUMS>
|
28
|
+
{%- endif %}
|
29
|
+
{%- if session.securities %}
|
30
|
+
<SECURITYS>
|
31
|
+
{%- for security in session.securities %}
|
32
|
+
{{ psec.printSecurity(security)|indent(4) }}
|
33
|
+
{%- endfor %}
|
34
|
+
</SECURITYS>
|
35
|
+
{%- endif %}
|
36
|
+
{%- if session.datablock_refs %}
|
37
|
+
<DATABLOCK-REFS>
|
38
|
+
{%- for datablock_ref in session.datablock_refs %}
|
39
|
+
<DATABLOCK-REF {{make_ref_attribs(datablock_ref)}} />
|
40
|
+
{%- endfor %}
|
41
|
+
</DATABLOCK-REFS>
|
42
|
+
{%- endif %}
|
43
|
+
{{- psd.printSpecialDataGroups(session.sdgs)|indent(2, first=True) }}
|
44
|
+
</SESSION>
|
45
|
+
{%- endmacro -%}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
|
2
|
+
#
|
3
|
+
# SPDX-License-Identifier: MIT
|
4
|
+
-#}
|
5
|
+
|
6
|
+
{%- import('macros/printAudience.xml.jinja2') as paud %}
|
7
|
+
{%- import('macros/printElementId.xml.jinja2') as peid %}
|
8
|
+
{%- import('macros/printOwnIdent.xml.jinja2') as poid %}
|
9
|
+
{%- import('macros/printSpecialData.xml.jinja2') as psd %}
|
10
|
+
|
11
|
+
{%- macro printSessionDesc(session_desc) -%}
|
12
|
+
<SESSION-DESC {#- #} {{- make_xml_attrib("OID", session_desc.oid) -}}
|
13
|
+
{#- #} DIRECTION="{{session_desc.direction.value}}">
|
14
|
+
{{ peid.printElementIdSubtags(session_desc)}}
|
15
|
+
{%- if session_desc.partnumber is not none %}
|
16
|
+
<PARTNUMBER>{{session_desc.partnumber}}</PARTNUMBER>
|
17
|
+
{%- endif %}
|
18
|
+
{%- if session_desc.priority is not none %}
|
19
|
+
<PRIORITY>{{session_desc.priority}}</PRIORITY>
|
20
|
+
{%- endif %}
|
21
|
+
<SESSION-SNREF SHORT-NAME="{{ session_desc.session_snref }}" />
|
22
|
+
{%- if session_desc.diag_comm_snref is not none %}
|
23
|
+
<DIAG-COMM-SNREF SHORT-NAME="{{ session_desc.diag_comm_snref }}" />
|
24
|
+
{%- endif %}
|
25
|
+
{%- if session_desc.flash_class_refs %}
|
26
|
+
<FLASH-CLASS-REFS>
|
27
|
+
{%- for flash_class_ref in session_desc.flash_class_refs %}
|
28
|
+
<FLASH-CLASS-REF {{make_ref_attribs(flash_class_ref)}} />
|
29
|
+
{%- endfor %}
|
30
|
+
</FLASH-CLASS-REFS>
|
31
|
+
{%- endif %}
|
32
|
+
{{- psd.printSpecialDataGroups(session_desc.sdgs)|indent(2, first=True) }}{#- #}
|
33
|
+
{%- if session_desc.audience is not none %}
|
34
|
+
{{ paud.printAudience(session_desc.audience) | indent(2) }}
|
35
|
+
{%- endif %}
|
36
|
+
{%- if session_desc.own_ident is not none %}
|
37
|
+
{{poid.printOwnIdent(session_desc.own_ident) | indent(2)}}
|
38
|
+
{%- endif %}
|
39
|
+
</SESSION-DESC>
|
40
|
+
{%- endmacro -%}
|
@@ -47,7 +47,7 @@
|
|
47
47
|
{%- if param.physical_default_value is not none %}
|
48
48
|
<PHYSICAL-DEFAULT-VALUE>{{param.physical_default_value | e}}</PHYSICAL-DEFAULT-VALUE>
|
49
49
|
{%- endif %}
|
50
|
-
<DOP-BASE-REF
|
50
|
+
<DOP-BASE-REF {{make_ref_attribs(param.dop_base_ref)}} />
|
51
51
|
</INPUT-PARAM>
|
52
52
|
{%- endmacro -%}
|
53
53
|
|
@@ -56,7 +56,7 @@
|
|
56
56
|
{{-make_xml_attrib("OID", param.oid)}}
|
57
57
|
{{-make_xml_attrib("SEMANTIC", param.semantic)}}>
|
58
58
|
{{ peid.printElementIdSubtags(param)|indent(1) }}
|
59
|
-
<DOP-BASE-REF
|
59
|
+
<DOP-BASE-REF {{make_ref_attribs(param.dop_base_ref)}} />
|
60
60
|
</OUTPUT-PARAM>
|
61
61
|
{%- endmacro -%}
|
62
62
|
|
@@ -64,6 +64,6 @@
|
|
64
64
|
{%- macro printNegOutputParam(param) -%}
|
65
65
|
<NEG-OUTPUT-PARAM>
|
66
66
|
{{ peid.printElementIdSubtags(param)|indent(1) }}
|
67
|
-
<DOP-BASE-REF
|
67
|
+
<DOP-BASE-REF {{make_ref_attribs(param.dop_base_ref)}} />
|
68
68
|
</NEG-OUTPUT-PARAM>
|
69
69
|
{%- endmacro -%}
|