-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from andlaus/write_dynamic_length_fields
write dynamic length fields
- Loading branch information
Showing
23 changed files
with
92 additions
and
175 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
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
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
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
22 changes: 22 additions & 0 deletions
22
odxtools/templates/macros/printDynamicLengthField.xml.jinja2
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*- | ||
# | ||
# SPDX-License-Identifier: MIT | ||
-#} | ||
|
||
{%- import('macros/printElementID.xml.jinja2') as peid %} | ||
|
||
{%- macro printDynamicLengthField(dlf) -%} | ||
<DYNAMIC-LENGTH-FIELD ID="{{dlf.odx_id.local_id}}"> | ||
{{ peid.printElementID(dlf)|indent(1) }} | ||
<BASIC-STRUCTURE-REF ID-REF="{{dlf.structure_ref.ref_id}}" /> | ||
<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}}" /> | ||
</DETERMINE-NUMBER-OF-ITEMS> | ||
</DYNAMIC-LENGTH-FIELD> | ||
{%- endmacro -%} |
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.