Commit 1c79ee77 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7bad54b0
......@@ -97,25 +97,44 @@
name: "sdr",
{%- endif %}
{%- set dev_argv = [] %}
{%- for rf_port, (ru_ref, ru) in enumerate(ru_dict|dictsort) %}
{%- do ru['.rf_port'] = rf_port %}
{%- if ru['ru_type'] == 'sdr' %}
{%- for n in ru['dev_list'] %}
{%- dev_argv.append("dev%d=/dev/sdr%x" % (len(dev_argv), n)) %}
{%- endfor %}
rx_antenna:"tx_rx",
{%- set dev_argv = [] %}
{%- ru_cpri_dict = {} %} {# dev -> ru #}
{%- for rf_port, (ru_ref, ru) in enumerate(ru_dict|dictsort) %}
{%- do ru['.rf_port'] = rf_port %}
{%- if ru['ru_type'] == 'sdr' %}
XXX mov to ru/sdr ?
{%- for n in ru['dev_list'] %}
{%- do dev_argv.append("dev%d=/dev/sdr%d" % (len(dev_argv), n)) %}
{%- endfor %}
rx_antenna:"tx_rx", XXX -> ru/sdr ?
tdd_tx_mod: 1,
{%- elif ru['ru_link_type'] == 'cpri' %}
{%-
{%- elif ru['ru_type] == 'lopcomm' XXX %}
XXX
{%- elif ru['ru_link_type'] == 'cpri' %}
{%- do ru_cpri_dict[len(dev_argv)] = ru %}
{%- do dev_argv.append("dev%d=/dev/sdr%d@%d" % (len(dev_argv), ru['sdr_dev'], ru['sfp_port'])) %}
XXX set cpri parameters to default
{%- ru.setdefault('cpri_mapping', 'hw') %} ... <- should be preset set by ru ?
{%- else %}
{{ bug('unreachable') %}
{%- endif %}
{%- endfor %}
args: "{{dev_argv | join(',')}}",
{# emit cpri_* optins if a cpri ru is present #}
{# NOTE values for non-cpri links come as empty XXX recheck this is ok #}
{%- if ru_cpri_dict|length > 0 %}
{%- set vcpri = [None]*(dev_argv|length) %}
{%- for dev, ru in ru_cpri_dict %}
{%- do vcpri[dev] = ru %}
{%- endfor %}
cpri_mapping: "{{ vcpri | map(attribute='cpri_mapping') | join(',') }}",
cpri_mult: "{{ vcpri | map(attribute='cpri_mult') | join(',') }}",
cpri_rx_delay: "{{ vcpri | map(attribute='cpri_rx_delay') | join(',') }}",
cpri_tx_delay: "{{ vcpri | map(attribute='cpri_tx_delay') | join(',') }}",
cpri_tx_dbm: "{{ vcpri | map(attribute='cpri_tx_dbm') | join(',') }}",
ifname: "{{ vcpri | map(attribute='ifname') | join(',') }}",
{%- endif %}
}
......
......@@ -5,7 +5,9 @@ n_antenna_dl int
n_antenna_ul int
if ru_link_type = "cpri":
cpri_link: string # e.g. sdrX@Y
sdr_dev number # e.g. sdrX@Y
sfp_port number
//cpri_link: string # e.g. sdrX@Y
cpri_mult: int per port
cpri_mapping: standard|hw|spread|bf1) per port <- selected by ru model
......
......@@ -15,14 +15,14 @@
"rxa0cc00_bandwidth"
],
"properties": {
"$ref": "../common-input-schema.json",
"ru_type": {
"const": "lopcomm",
"template": "lopcomm",
"options": { "hidden": true }
},
"$ref": "../common-input-schema.json",
"mac_addr": {
"title": "RRH MAC address",
"description": "RRH MAC address used for DNSMASQ",
......
......@@ -8,12 +8,12 @@
],
"properties": {
"$ref": "../common-input-schema.json",
"ru_type": {
"const": "sunvawe",
"template": "sunvawe",
"options": { "hidden": true }
},
"$ref": "../common-input-schema.json"
}
}
}
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