{# ── Signals with smart SpecBand rendering ── #}
{% if cap.signals %}
Signals
{% set vs = cap.visible_signals %}
| Signal | Range | Accuracy | Resolution | {% if vs.qualifier %}Qualifier | {% endif %}
{% for sig_name, sig in cap.signals.items() %}
{% set render = cap.signal_renders[sig_name] %}
| {{ sig_name | replace('_', ' ') | title }} |
{{ render.headline.range }} |
{{ render.headline.accuracy }} |
{{ render.headline.resolution }} |
{% if vs.qualifier %}{{ qual_cell(sig.qualifier) }}{% endif %}
{% endfor %}
{# ── 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" %}
{{ tbl.title }}
| {{ tbl.row_key }} | {{ tbl.value_label }} |
{% for row in tbl.rows %}
| {{ row.value }} |
{% endfor %}
{% elif tbl.kind == "2d" %}
{{ tbl.title }}
| {{ tbl.row_key }} \ {{ tbl.col_key }} | {% for ch in tbl.col_headers %}{{ ch }} | {% endfor %}
{% for row in tbl.rows %}
{% for cell in row.cells %}| {{ cell }} | {% endfor %}
{% endfor %}
{% elif tbl.kind == "multi_col" %}
{{ tbl.title }}
{% for ck in tbl.col_keys %}| {{ ck }} | {% endfor %}{% for vc in tbl.value_cols %}{{ vc }} | {% endfor %}
{% for row in tbl.rows %}
{% for c in row.conditions %}{% endfor %}{% for v in row.cells %}| {{ v }} | {% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{# ── Conditions ── #}
{% if cap.conditions %}
Conditions
| Condition | Range / Options |
{% for cond_name, cond in cap.conditions.items() %}
| {{ 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 %} |
{% endfor %}
{% endif %}
{# ── Controls ── #}
{% if cap.controls %}
Controls
{% set vc = cap.visible_controls %}
| Control | Range / Options | {% if vc.resolution %}Resolution | {% endif %}{% if vc.default %}Default | {% endif %}
{% for ctrl_name, ctrl in cap.controls.items() %}
| {{ 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 vc.resolution %}{% if ctrl.resolution %}{{ ctrl.resolution | fmt_resolution }}{% else %}—{% endif %} | {% endif %}
{% if vc.default %}{{ ctrl.default if ctrl.default is not none else '—' }} | {% endif %}
{% endfor %}
{% 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 %}
| Attribute | Value | {% if va.qualifier %}Qualifier | {% endif %}
{% for attr_name, headline, attr_qual in const_attrs %}
| {{ attr_name | replace('_', ' ') | title }} |
{{ headline }} |
{% if va.qualifier %}{{ qual_cell(attr_qual) }}{% endif %}
{% endfor %}
{% 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" %}
{{ tbl.title }}
| {{ tbl.row_key }} | {{ tbl.value_label }} |
{% for row in tbl.rows %}
| {{ row.value }} |
{% endfor %}
{% elif tbl.kind == "2d" %}
{{ tbl.title }}
| {{ tbl.row_key }} \ {{ tbl.col_key }} | {% for ch in tbl.col_headers %}{{ ch }} | {% endfor %}
{% for row in tbl.rows %}
{% for cell in row.cells %}| {{ cell }} | {% endfor %}
{% endfor %}
{% elif tbl.kind == "multi_col" %}
{{ tbl.title }}
{% for ck in tbl.col_keys %}| {{ ck }} | {% endfor %}{% for vc in tbl.value_cols %}{{ vc }} | {% endfor %}
{% for row in tbl.rows %}
{% for c in row.conditions %}{% endfor %}{% for v in row.cells %}| {{ v }} | {% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endif %}