Commit f44e2bb0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e7fbe934
......@@ -27,8 +27,8 @@ extra-context =
depends = $${activate-eggs:recipe}
context =
import json_module json
import earfcn_module xlte.earfcn
import nrarfcn_module nrarfcn
import xearfcn_module xlte.earfcn
import xnrarfcn_module xlte.nrarfcn
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
raw buildout_directory ${buildout:directory}
......
......@@ -92,14 +92,14 @@
{%- if cell.cell_type == 'lte' %}
{%- set dl_arfcn = cell.dl_earfcn %}
{%- set ul_arfcn = cell.ul_earfcn %}
{%- set dl_freq = int(earfcn_module.frequency(dl_arfcn) * 1e6) %}
{%- set ul_freq = int(earfcn_module.frequency(ul_arfcn) * 1e6) %}
{%- set dl_freq = int(xearfcn_module.frequency(dl_arfcn) * 1e6) %}
{%- set ul_freq = int(xearfcn_module.frequency(ul_arfcn) * 1e6) %}
{%- set bw = int(float(cell.bandwidth.removesuffix(' MHz')) * 1e6) %}
{%- elif cell.cell_type == 'nr' %}
{%- set dl_arfcn = cell.dl_nr_arfcn %}
{%- set ul_arfcn = cell.ul_nr_arfcn %}
{%- set dl_freq = int(nrarfcn_module.get_frequency(dl_arfcn) * 1e6) %}
{%- set ul_freq = int(nrarfcn_module.get_frequency(ul_arfcn) * 1e6) %}
{%- set dl_freq = int(xnrarfcn_module.frequency(dl_arfcn) * 1e6) %}
{%- set ul_freq = int(xnrarfcn_module.frequency(ul_arfcn) * 1e6) %}
{%- set bw = int(cell.bandwidth * 1e6) %}
{%- else %}
{%- do bug('unreachable') %}
......
......@@ -72,8 +72,8 @@ url = {{ ru_lopcomm_cu_config_template }}
{% endif %}
output = ${directory:etc}/{{ru_ref}}-cu_config.xml
extra-context =
import earfcn_module xlte.earfcn
import nrarfcn_module nrarfcn
import xearfcn_module xlte.earfcn
import xnrarfcn_module xlte.nrarfcn
json ru {{ ru | tojson }}
json cell {{ cell | tojson }}
......
......@@ -95,19 +95,19 @@
{#- jdefault_ul_earfcn returns default UL EARFCN corresponding to DL EARFCN. #}
{%- macro jdefault_ul_earfcn(dl_earfcn) %}
{{- earfcn_module.dl2ul(dl_earfcn) | tojson }}
{{- xearfcn_module.dl2ul(dl_earfcn) | tojson }}
{%- endmacro %}
{#- jdefault_ul_nr_arfcn returns default UL NR ARFCN corresponding to DL NR ARFCN and band. #}
{%- macro jdefault_ul_nr_arfcn(dl_nr_arfcn, nr_band) %}
{%- xnrarfcn_moule.dl2ul(dl_nr_arfcn, nr_band) | tojson %}
{{- xnrarfcn_module.dl2ul(dl_nr_arfcn, nr_band) | tojson }}
{%- endmacro %}
{#- jdefault_ssb_nr_arfcn returns default SSB NR ARFCN corresponding to DL NR ARFCN
and subcarrier spacing #}
{%- macro jdefault_ssb_nr_arfcn(dl_nr_arfcn, scs_khz) %}
{#- NOTE: computations rechecked wrt https://tech-academy.amarisoft.com/OutOfBox_UEsim_SA.html#Tips_SSB_Frequency #}
{%- xnrarfcn_module.dl2ssb(dl_nr_arfcn, nr_band, scs_khz, ....) | tojson %}
{{- xnrarfcn_module.dl2ssb(dl_nr_arfcn, scs_khz) | tojson }}
{%- endmacro %}
......
......@@ -18,8 +18,9 @@ def j2render(src, out, jcfg):
for k, v in ctx.items():
textctx += 'json %s %s\n' % (k, json.dumps(v))
textctx += 'import json_module json\n'
textctx += 'import earfcn_module xlte.earfcn\n'
textctx += 'import nrarfcn_module nrarfcn\n'
textctx += 'import xearfcn_module xlte.earfcn\n'
textctx += 'import xnrarfcn_module xlte.nrarfcn\n'
buildout = None # stub
r = jinja2_template.Recipe(buildout, "recipe", {
'extensions': 'jinja2.ext.do jinja2.ext.loopcontrols',
......
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