Commit 08e22a8a authored by Joanne Hugé's avatar Joanne Hugé

wip

parent a75f4df2
...@@ -20,7 +20,7 @@ md5sum = 2e30c07c6436895ac0bc6c177cf7013d ...@@ -20,7 +20,7 @@ md5sum = 2e30c07c6436895ac0bc6c177cf7013d
[template-ors] [template-ors]
filename = instance-ors.cfg filename = instance-ors.cfg
md5sum = f5c76c3443b75569eb18503dce38e783 md5sum = f025ab93e016fa3609a1bb4de69245ec
[slaplte.jinja2] [slaplte.jinja2]
_update_hash_filename_ = slaplte.jinja2 _update_hash_filename_ = slaplte.jinja2
...@@ -94,13 +94,17 @@ md5sum = 7bc8aab138bed0de6f48283e86853cf6 ...@@ -94,13 +94,17 @@ md5sum = 7bc8aab138bed0de6f48283e86853cf6
_update_hash_filename_ = instance-ors-enb.jinja2.cfg _update_hash_filename_ = instance-ors-enb.jinja2.cfg
md5sum = 315633c8d09b84ef1c699094810c654a md5sum = 315633c8d09b84ef1c699094810c654a
[template-ors-ue]
_update_hash_filename_ = instance-ors-ue.jinja2.cfg
md5sum = cc4e7b37296ad9465fcb674747d04860
[template-core-network] [template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg _update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum = dab992c02a363e00cdc86f102a7ae489 md5sum = dab992c02a363e00cdc86f102a7ae489
[template-ue] [template-ue]
_update_hash_filename_ = instance-ue.jinja2.cfg _update_hash_filename_ = instance-ue.jinja2.cfg
md5sum = 574e525659bd73c5385c78469adadf91 md5sum = 66fc1abff955045c7441f02f940c309b
[template-obsolete] [template-obsolete]
_update_hash_filename_ = instance-obsolete.jinja2.cfg _update_hash_filename_ = instance-obsolete.jinja2.cfg
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth",
"type": "string",
"enum": [
"1.4 MHz",
"3 MHz",
"5 MHz",
"10 MHz",
"15 MHz",
"20 MHz"
],
"default": "20 MHz"
},
"n_antenna_dl": {
"$ref": "ru/common.json#/properties/n_antenna_dl",
"enum": [
1,
2
],
"default": 2
},
"n_antenna_ul": {
"$ref": "ru/common.json#/properties/n_antenna_ul",
"enum": [
1,
2
],
"default": 2
},
"rf_mode": {
"$ref": "cell/common.json#/properties/rf_mode",
"default": "tdd"
},
"dl_earfcn": {
"$ref": "cell/lte/input-schema.json#/properties/dl_earfcn"
},
"tx_gain": {
"$ref": "ru/common.json#/properties/tx_gain"
},
"rx_gain": {
"$ref": "ru/common.json#/properties/rx_gain"
},
"log_phy_debug": {
"$ref": "instance-enb-input-schema.json#/properties/log_phy_debug"
},
"disable_sdr": {
"default": false,
"title": "Disable SDR",
"description": "Disables radio",
"type": "boolean"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema",
"description": "Values returned by ORS UE instantiation (stub)",
"type": "object",
"properties": {}
}
{%- set ors_defaults = {
"bandwidth": "20 MHz",
"n_antenna_dl": 2,
"n_antenna_ul": 1,
"rf_mode": "tdd",
"plmn": "00101",
"disable_sdr": false
} %}
{%- for k,v in ors_defaults|dictsort %}
{%- do slapparameter_dict.setdefault(k, v) %}
{%- endfor %}
{#- make real ru/cell/peer/... shared instances to be rejected in ORS mode #}
{%- set ishared_list = slap_configuration.setdefault('slave-instance-list', []) %}
{%- for ishared in ishared_list %}
{%- set _ = json_module.loads(ishared['_']) %}
{%- if 'ru_type' in _ or 'cell_type' in _ %}
{%- do ishared.update({'_': {'REJECT': 1}|tojson}) %}
{%- endif %}
{%- endfor %}
{#- inject ru+cell synthesized from ORS-specific parameters #}
{%- macro iref(name) %}
{{- '%s.%s' % (slap_configuration['instance-title'], name) -}}
{%- endmacro %}
{%- do ishared_list.append({
'slave_title': iref('RU'),
'slave_reference': False,
'_': {
'ru_type': 'sdr',
'ru_link_type': 'sdr',
'sdr_dev_list': [0],
'n_antenna_dl': slapparameter_dict.n_antenna_dl,
'n_antenna_ul': slapparameter_dict.n_antenna_ul,
'tx_gain': ors_version['current-tx-gain'],
'rx_gain': ors_version['current-rx-gain'],
'txrx_active': 'ACTIVE' if (not slapparameter_dict.disable_sdr) else 'INACTIVE',
} |tojson
})
%}
{%- set cell = {
'cell_type': 'lte',
'dl_earfcn': ors_version['current-earfcn'],
'bandwidth': float(slapparameter_dict.bandwidth.removesuffix(' MHz')),
'tac': slapparameter_dict.tac,
'root_sequence_index': slapparameter_dict.root_sequence_index,
}
%}
{%- do cell.update({
'cell_kind': 'enb',
'rf_mode': slapparameter_dict.rf_mode,
'pci': slapparameter_dict.pci,
'cell_id': slapparameter_dict.cell_id,
'tdd_ul_dl_config': slapparameter_dict.tdd_ul_dl_config,
'inactivity_timer': slapparameter_dict.inactivity_timer,
'ru': { 'ru_type': 'ru_ref',
'ru_ref': iref('RU') }
})
%}
{%- do ishared_list.append({
'slave_title': iref('CELL'),
'slave_reference': False,
'_': cell | tojson
})
%}
# code of generic ue
{% include 'instance-ue-base.jinja2.cfg' %}
# let all templates know we are running in ORS mode
[config-base]
context -=
json ors false
context +=
key ors :ors
ors = {{ dumps(ors_version) }}
# add ORS-specific bits to published information
[publish-connection-information]
ors-version = {{ ors_version['ors-version'] }}
frequency-range-rating = {{ ors_version['range'] }}
current-tx-power-estimate = {{ ors_version['power-estimate'] }}
current-tx-gain = {{ ors_version['current-tx-gain'] }}
current-rx-gain = {{ ors_version['current-rx-gain'] }}
current-earfcn = {{ ors_version['current-earfcn'] }}
# hide ru-list, cell-list, peer-list and peer-cell-list from published information
[publish-connection-information]
depends += ${publish-connection-information-ors-cleanup:recipe}
[publish-connection-information-ors-cleanup]
recipe = slapos.recipe.build
init =
publish = self.buildout['publish-connection-information']
del publish['ru-list']
del publish['cell-list']
del publish['peer-list']
del publish['peer-cell-list']
...@@ -10,7 +10,7 @@ enb-epc = $${:obsolete} ...@@ -10,7 +10,7 @@ enb-epc = $${:obsolete}
gnb-epc = $${:obsolete} gnb-epc = $${:obsolete}
epc = $${:obsolete} epc = $${:obsolete}
mme = $${:obsolete} mme = $${:obsolete}
ue = ue = dynamic-template-ors-ue:output
[dynamic-template-obsolete] [dynamic-template-obsolete]
< = jinja2-template-base < = jinja2-template-base
...@@ -33,6 +33,16 @@ extra-context += ...@@ -33,6 +33,16 @@ extra-context +=
import-list += import-list +=
rawfile instance-enb-base.jinja2.cfg ${template-enb:target} rawfile instance-enb-base.jinja2.cfg ${template-enb:target}
[dynamic-template-ors-ue]
< = dynamic-template-ue
url = ${template-ors-ue:target}
filename = instance-ue.cfg
extra-context +=
section ors ors-version
section ors_version ors-version
import-list +=
rawfile instance-ue-base.jinja2.cfg ${template-ue:target}
[ors-version] [ors-version]
recipe = slapos.recipe.build recipe = slapos.recipe.build
configuration = $${slap-configuration:configuration} configuration = $${slap-configuration:configuration}
......
...@@ -69,7 +69,7 @@ inline = ...@@ -69,7 +69,7 @@ inline =
(echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting UE software..." && echo) >> ${:ue-log}; (echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting UE software..." && echo) >> ${:ue-log};
tail -c 1M ${:ue-log} > ${:ue-log}.tmp; tail -c 1M ${:ue-log} > ${:ue-log}.tmp;
mv ${:ue-log}.tmp ${:ue-log}; mv ${:ue-log}.tmp ${:ue-log};
{{ ue }}/lteue ${directory:etc}/ue.cfg >> ${:ue-log} 2>> ${:ue-log}; # {{ ue }}/lteue ${directory:etc}/ue.cfg >> ${:ue-log} 2>> ${:ue-log};
{% endif %} {% endif %}
### User Equipment (UE) ### User Equipment (UE)
......
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