Commit fbb0d0c1 authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: enb+ue: Make ru_type and do_lte/do_nr to be accessible at instance level

Not only inside rendered enb.jinja2.cfg and ue.jinja2.cfg because we will need
that information in slaplte and slaplte is imported by instance-enb and
instance-ue.
parent 563a21ca
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
{%- set enb_mode = slap_configuration['slap-software-type'] %} {%- set enb_mode = slap_configuration['slap-software-type'] %}
{%- do assert(enb_mode in ('enb', 'gnb'), enb_mode) %} {%- do assert(enb_mode in ('enb', 'gnb'), enb_mode) %}
{%- set do_lte = (enb_mode == 'enb') %}
{%- set do_nr = (enb_mode == 'gnb') %}
{#- defaults for eNB radio parameters. {#- defaults for eNB radio parameters.
NOTE they are installed temporary and will go away after switch to generic multiRU. #} NOTE they are installed temporary and will go away after switch to generic multiRU. #}
{%- do RF.setdefault('tx_gain', slapparameter_dict.get('tx_gain', 0)) %} {%- do RF.setdefault('tx_gain', slapparameter_dict.get('tx_gain', 0)) %}
...@@ -200,7 +203,7 @@ context = ...@@ -200,7 +203,7 @@ context =
raw rf_mode {{ rf_mode }} raw rf_mode {{ rf_mode }}
raw trx {{ trx }} raw trx {{ trx }}
raw bbu {{ bbu }} raw bbu {{ bbu }}
raw ru_type {{ ru }} raw ru_type {{ ru_type }}
raw default_lte_bandwidth {{ default_lte_bandwidth }} raw default_lte_bandwidth {{ default_lte_bandwidth }}
raw default_lte_inactivity_timer {{ default_lte_inactivity_timer }} raw default_lte_inactivity_timer {{ default_lte_inactivity_timer }}
raw default_nr_bandwidth {{ default_nr_bandwidth }} raw default_nr_bandwidth {{ default_nr_bandwidth }}
...@@ -208,13 +211,8 @@ context = ...@@ -208,13 +211,8 @@ context =
raw default_nr_inactivity_timer {{ default_nr_inactivity_timer }} raw default_nr_inactivity_timer {{ default_nr_inactivity_timer }}
raw default_n_antenna_dl {{ default_n_antenna_dl }} raw default_n_antenna_dl {{ default_n_antenna_dl }}
raw default_n_antenna_ul {{ default_n_antenna_ul }} raw default_n_antenna_ul {{ default_n_antenna_ul }}
{%- if enb_mode == 'enb' %} json do_lte {{ do_lte | tojson }}
json do_lte true json do_nr {{ do_nr | tojson }}
json do_nr false
{%- elif enb_mode == 'gnb' %}
json do_lte false
json do_nr true
{%- endif %}
import netaddr netaddr import netaddr netaddr
${:extra-context} ${:extra-context}
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
{%- set rat = slap_configuration['slap-software-type'] .removeprefix('ue-') %} {%- set rat = slap_configuration['slap-software-type'] .removeprefix('ue-') %}
{%- do assert(rat in ('lte', 'nr'), rat) %} {%- do assert(rat in ('lte', 'nr'), rat) %}
{%- set do_lte = (rat == 'lte') %}
{%- set do_nr = (rat == 'nr') %}
[buildout] [buildout]
parts = parts =
directory directory
...@@ -107,13 +110,8 @@ context = ...@@ -107,13 +110,8 @@ context =
raw default_nr_imsi {{ default_nr_imsi }} raw default_nr_imsi {{ default_nr_imsi }}
raw default_lte_k {{default_lte_k}} raw default_lte_k {{default_lte_k}}
raw default_nr_k {{ default_nr_k }} raw default_nr_k {{ default_nr_k }}
{%- if rat == 'lte' %} json do_lte {{ do_lte | tojson }}
json do_lte true json do_nr {{ do_nr | tojson }}
json do_nr false
{%- elif rat == 'nr' %}
json do_lte false
json do_nr true
{%- endif %}
[lte-ue-config] [lte-ue-config]
<= config-base <= config-base
......
...@@ -38,7 +38,7 @@ context = ...@@ -38,7 +38,7 @@ context =
raw software_name ${rf-mode:software-name} raw software_name ${rf-mode:software-name}
raw trx ${rf-mode:trx} raw trx ${rf-mode:trx}
raw bbu ${rf-mode:bbu} raw bbu ${rf-mode:bbu}
raw ru ${rf-mode:ru} raw ru_type ${rf-mode:ru}
$${:extra-context} $${:extra-context}
import-list = import-list =
rawfile slaplte.jinja2 ${slaplte.jinja2:target} rawfile slaplte.jinja2 ${slaplte.jinja2:target}
......
...@@ -165,7 +165,7 @@ hash-files = ...@@ -165,7 +165,7 @@ hash-files =
{#- go through all RUs and for each RU emit generic promises and invoke {#- go through all RUs and for each RU emit generic promises and invoke
RU-specific buildout handler #} RU-specific buildout handler #}
{%- set ru_type = {'lopcomm': 'lopcomm', 'm2ru': 'sunwave'}.get(ru, 'sdr') %} {%- set ru_type = {'lopcomm': 'lopcomm', 'm2ru': 'sunwave'}.get(ru_type, 'sdr') %}
{%- set rudrv = rudrv_dict[ru_type] %} {%- set rudrv = rudrv_dict[ru_type] %}
{%- for i, (cell_ref, cell) in enumerate(cell_list|dictsort) %} {%- for i, (cell_ref, cell) in enumerate(cell_list|dictsort) %}
{%- set ru_ref = cell_ref if cell_ref != 'default' else 'RU' %} {%- set ru_ref = cell_ref if cell_ref != 'default' else 'RU' %}
......
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