Commit 22af390d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0851eb81
{#- XXX ORS -> provide defaults for: slave_instance_list -#}
{#- XXX icell vs cell / iru vs ru everyhere #}
{%- import 'lte.jinja2' as lte -%}
......@@ -16,11 +17,11 @@
{#- jcell_ru_ref returns RU reference linked from a cell.
if the cell embeds RU definition, its reference comes as `_<cell_ref>_ru`. #}
{%- macro jcell_ru_ref(cell) %}
{{- _jcell_ru_ref(cell, []) }}
{%- macro jcell_ru_ref(icell) %}
{{- _jcell_ru_ref(icell, []) }}
{%- endmacro %}
{%- macro _jcell_ru_ref(cell, seen) %}
{%- set cell_ref = J(jref_of_shared(cell)) %}
{%- macro _jcell_ru_ref(icell, seen) %}
{%- set cell_ref = J(jref_of_shared(icell)) %}
{%- if cell_ref in seen %}
{%- for x in seen %}
{%- do error(x, "%s form a cycle via RU references" % seen) %}
......@@ -28,7 +29,7 @@
{#- XXX what to return ? #}
{%- else %}
{%- do seen.append(cell_ref) %}
{%- set ru = cell['_']['ru'] %}
{%- set ru = icell['_']['ru'] %}
{%- if ru['ru_type'] == 'ru_ref' %}
{{- ru['ru_ref'] | tojson }}
{%- elif ru['ru_type'] == 'ruincell_ref' %}
......@@ -36,7 +37,7 @@
{{- _jcell_ru_ref(cell_dict[ru['ruincell_ref']], seen) }}
{%- else %}
{#- ru definition is embedded into cell #}
{{- ('_%s_ru' % J(jref_of_shared(cell))) | tojson }}
{{- ('_%s_ru' % J(jref_of_shared(icell))) | tojson }}
{%- endif %}
{%- endif %}
{%- endmacro %}
......@@ -89,10 +90,10 @@
{#- verify that there is no dangling cell->ru references #}
{#- XXX also verify that there is no dangling cell -> cell refs in ruincell_ref #}
{%- for _, cell in cell_dict|dictsort %}
{%- set ru_ref = J(jcell_ru_ref(cell)) %}
{%- for _, icell in cell_dict|dictsort %}
{%- set ru_ref = J(jcell_ru_ref(icell)) %}
{%- if ru_ref not in ru_dict %}
{%- do error(cell, "referred RU %s does not exist" % ru_ref) %}
{%- do error(icell, "referred RU %s does not exist" % ru_ref) %}
{%- endif %}
{%- endfor %}
......@@ -122,8 +123,8 @@
{%- set dev_argv = [] %}
{%- set ru_cpri_dict = {} %} {# dev -> ru for ru with link_kind = cpri #}
{%- for rf_port, (ru_ref, ru) in enumerate(ru_dict|dictsort) %}
{%- set ru = ru['_'] %}
{%- for rf_port, (ru_ref, iru) in enumerate(ru_dict|dictsort) %}
{%- set ru = iru['_'] %}
{%- do ru.update({'.rf_port': rf_port}) %}
{%- if ru['ru_type'] == 'sdr' %}
XXX move to ru/sdr ?
......@@ -212,12 +213,16 @@
enb_id: {{ slapparameter_dict.get('enb_id', '0x1A2D0') }},
{{ print('\n3333\n') }}
# LTE cells
cell_list: [
{%- for cell_ref, cell in cell_dict|dictsort %}
{%- for cell_ref, icell in cell_dict|dictsort %}
{% set cell = icell['_'] %}
{%- if cell['cell_type'] == 'lte' %}
{%- set ru_ref = J(jcell_ru_ref(cell)) %}
{%- set ru = ru_dict[ru_ref] %}
{%- set ru_ref = J(jcell_ru_ref(icell)) %}
{%- set iru = ru_dict[ru_ref] %}
{%- set ru = iru['_'] %}
{
rf_port: {{ ru['.rf_port'] }},
n_antenna_dl: {{ ru['n_antenna_dl'] }},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment