{#- -*- mode: sgml; tab-width: 1; indent-tabs-mode: nil -*-
 #
 # SPDX-License-Identifier: MIT
-#}

{%- import('macros/printElementId.xml.jinja2') as peid %}

{%- 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}}" />
 {%- if eopdu.max_number_of_items is not none %}
 <MAX-NUMBER-OF-ITEMS>{{eopdu.max_number_of_items}}</MAX-NUMBER-OF-ITEMS>
 {%- endif %}
 {%- if eopdu.min_number_of_items is not none %}
 <MIN-NUMBER-OF-ITEMS>{{eopdu.min_number_of_items}}</MIN-NUMBER-OF-ITEMS>
 {%- endif %}
</END-OF-PDU-FIELD>
{%- endmacro -%}
