{# ── Macros ── #} {% macro qual_cell(qualifier) %}{{ qualifier if qualifier else '—' }}{% endmacro %} {# ── Header ── #}
{{ data.manufacturer }}

{{ data.model }} — {{ data.name }}

{% if data.description %}
{{ data.description }}
{% endif %} {% if data.interfaces %}
{% for iface in data.interfaces %}{{ iface }}{% endfor %}
{% endif %}
{# ── Summary Bar ── #}
{{ summary.capability_count }}
Capabilities
{{ summary.channel_count }}
Channels
{{ data.type | replace('_', ' ') | title }}
Type
{# ── Table of Contents ── #} {% if data.capabilities | length > 3 %}

Contents

{% if data.channels or data.attributes %}
Device: {% if data.channels %}Channels{% endif %} {% if data.attributes %}{% if data.channels %} · {% endif %}Attributes{% endif %}
{% endif %}
Capabilities: {% for cap in data.capabilities %}{% if not loop.first %} · {% endif %}{{ cap.function | replace('_', ' ') | title }}{% endfor %}
{% endif %} {# ── Related Datasheets ── #} {% if related %}

Related

{% for r in related %} {% endfor %}
RelationModelNameDatasheet
{% endif %} {# ── Channels ── #} {% if data.channels %} {% set has_optional = data.channels.values() | selectattr('optional') | list | length > 0 %}

Channels

{% if has_optional %}{% endif %} {% for ch_id, ch in data.channels.items() %} {% if has_optional %}{% endif %} {% endfor %}
IDLabelConnectorTerminalsGroundOptional
{{ ch_id }} {{ ch.label or '—' }} {{ ch.connector or '—' }} {{ ch.terminals | join(', ') if ch.terminals else '—' }} {{ ch.ground or '—' }}{{ 'yes' if ch.optional else '—' }}
{% endif %} {# ── Board-Level Attributes ── #} {% if data.attributes %}

Attributes

{% for name, attr in data.attributes.items() %}
{{ name | replace('_', ' ') }}{% if attr.qualifier %} ({{ attr.qualifier }}){% endif %}
{{ attr | fmt_attr }}
{% endfor %}
{% endif %} {# ── Capabilities ── #}

Capabilities

{% for cap in cap_renders %}
{{ cap.function | replace('_', ' ') | title }} {{ cap.direction }} {% if cap.channels %}ch: {{ cap.channels if cap.channels is string else cap.channels | join(', ') }}{% endif %}
{# ── Signals with smart SpecBand rendering ── #} {% if cap.signals %}

Signals

{% set vs = cap.visible_signals %} {% if vs.qualifier %}{% endif %} {% for sig_name, sig in cap.signals.items() %} {% set render = cap.signal_renders[sig_name] %} {% if vs.qualifier %}{{ qual_cell(sig.qualifier) }}{% endif %} {% endfor %}
SignalRangeAccuracyResolutionQualifier
{{ sig_name | replace('_', ' ') | title }} {{ render.headline.range }} {{ render.headline.accuracy }} {{ render.headline.resolution }}
{# ── Spec Band Tables (1D / 2D / Grouped) ── #} {% for sig_name, sig in cap.signals.items() %} {% set render = cap.signal_renders[sig_name] %} {% for tbl in render.tables %} {% if tbl.kind == "1d" %} {% for row in tbl.rows %} {% endfor %}
{{ tbl.title }}
{{ tbl.row_key }}{{ tbl.value_label }}
{{ row.label }}{{ row.value }}
{% elif tbl.kind == "2d" %} {% for ch in tbl.col_headers %}{% endfor %} {% for row in tbl.rows %} {% for cell in row.cells %}{% endfor %} {% endfor %}
{{ tbl.title }}
{{ tbl.row_key }} \ {{ tbl.col_key }}{{ ch }}
{{ row.label }}{{ cell }}
{% elif tbl.kind == "multi_col" %} {% for ck in tbl.col_keys %}{% endfor %}{% for vc in tbl.value_cols %}{% endfor %} {% for row in tbl.rows %} {% for c in row.conditions %}{% endfor %}{% for v in row.cells %}{% endfor %} {% endfor %}
{{ tbl.title }}
{{ ck }}{{ vc }}
{{ c }}{{ v }}
{% endif %} {% endfor %} {% endfor %}
{% endif %} {# ── Conditions ── #} {% if cap.conditions %}

Conditions

{% for cond_name, cond in cap.conditions.items() %} {% endfor %}
ConditionRange / Options
{{ cond_name | replace('_', ' ') | title }} {% if cond.range %}{{ cond.range | fmt_range }}{% elif cond.options %}{% for o in cond.options %}{% if not loop.first %}, {% endif %}{% if o is number and cond.units %}{{ o|fmt_si(cond.units) }}{% else %}{{ o }}{% endif %}{% endfor %}{% else %}—{% endif %}
{% endif %} {# ── Controls ── #} {% if cap.controls %}

Controls

{% set vc = cap.visible_controls %} {% if vc.resolution %}{% endif %}{% if vc.default %}{% endif %} {% for ctrl_name, ctrl in cap.controls.items() %} {% if vc.resolution %}{% endif %} {% if vc.default %}{% endif %} {% endfor %}
ControlRange / OptionsResolutionDefault
{{ ctrl_name | replace('_', ' ') | title }} {% if ctrl.range %}{{ ctrl.range | fmt_range }}{% elif ctrl.options %}{% for o in ctrl.options %}{% if not loop.first %}, {% endif %}{% if o is number and ctrl.units %}{{ o|fmt_si(ctrl.units) }}{% else %}{{ o }}{% endif %}{% endfor %}{% else %}—{% endif %}{% if ctrl.resolution %}{{ ctrl.resolution | fmt_resolution }}{% else %}—{% endif %}{{ ctrl.default if ctrl.default is not none else '—' }}
{% endif %} {# ── Capability Attributes ── #} {% if cap.attributes %}

Attributes

{# Constant attributes (no spec bands) in a summary table #} {% set const_attrs = [] %} {% for attr_name, attr in cap.attributes.items() %} {% set render = cap.attr_renders[attr_name] %} {% if not render.tables %}{% if const_attrs.append((attr_name, render.headline, attr.qualifier)) %}{% endif %}{% endif %} {% endfor %} {% if const_attrs %} {% set va = cap.visible_attrs %} {% if va.qualifier %}{% endif %} {% for attr_name, headline, attr_qual in const_attrs %} {% if va.qualifier %}{{ qual_cell(attr_qual) }}{% endif %} {% endfor %}
AttributeValueQualifier
{{ attr_name | replace('_', ' ') | title }} {{ headline }}
{% endif %} {# ── Attribute Spec Band Tables (in distinct section) ── #} {% set has_attr_tables = [] %} {% for attr_name, attr in cap.attributes.items() %} {% set render = cap.attr_renders[attr_name] %} {% if render.tables %}{% if has_attr_tables.append(1) %}{% endif %}{% endif %} {% endfor %} {% if has_attr_tables %}
{% for attr_name, attr in cap.attributes.items() %} {% set render = cap.attr_renders[attr_name] %} {% for tbl in render.tables %} {% if tbl.kind == "1d" %} {% for row in tbl.rows %} {% endfor %}
{{ tbl.title }}
{{ tbl.row_key }}{{ tbl.value_label }}
{{ row.label }}{{ row.value }}
{% elif tbl.kind == "2d" %} {% for ch in tbl.col_headers %}{% endfor %} {% for row in tbl.rows %} {% for cell in row.cells %}{% endfor %} {% endfor %}
{{ tbl.title }}
{{ tbl.row_key }} \ {{ tbl.col_key }}{{ ch }}
{{ row.label }}{{ cell }}
{% elif tbl.kind == "multi_col" %} {% for ck in tbl.col_keys %}{% endfor %}{% for vc in tbl.value_cols %}{% endfor %} {% for row in tbl.rows %} {% for c in row.conditions %}{% endfor %}{% for v in row.cells %}{% endfor %} {% endfor %}
{{ tbl.title }}
{{ ck }}{{ vc }}
{{ c }}{{ v }}
{% endif %} {% endfor %} {% endfor %}
{% endif %}
{% endif %}
{% endfor %}