aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Puschmann <andre@softwareradiosystems.com>2020-04-07 14:38:27 +0200
committerAndre Puschmann <andre@softwareradiosystems.com>2020-04-07 17:23:37 +0200
commita7f19836584897246fe4fe8086aabc95cdcaeafe (patch)
tree673f47b10bb80e16c0950d1ce27324b07a1d0046
parent9a5be2c8fd749ae1a2ab2b949f6c8a1753d9e4b3 (diff)
enb: add measurement modifier to scenario files
this commit adds basic support for configuring measurements in the eNB config. It currently support A1, A2, and A3 events. By default UE measurements are turned off and need to be enabled by configuring an event with: +mod-enb-meas-event@{name},{report_type},{value},{hysterisis},{time to trigger} For example one can update the a2 and a3 event with: +mod-enb-meas-event@a2,rsrq,-40,2,480+mod-enb-meas-event@a3,rsrp,6,1,512 Change-Id: Ia7657be2396886840570bc41645450a268b4cfff
-rw-r--r--example/defaults.conf13
-rw-r--r--example/scenarios/mod-enb-meas-event@.conf7
-rw-r--r--src/osmo_gsm_tester/amarisoft_enb.py5
-rw-r--r--src/osmo_gsm_tester/resource.py13
-rw-r--r--src/osmo_gsm_tester/templates/amarisoft_enb.cfg.tmpl25
5 files changed, 63 insertions, 0 deletions
diff --git a/example/defaults.conf b/example/defaults.conf
index 5cda132..f3994bb 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -110,6 +110,19 @@ enb:
mnc: 70
transmission_mode: 1
num_cells: 1
+ enable_measurements: false
+ a1_report_type: rsrp
+ a1_report_value: -105
+ a1_hysteresis: 0
+ a1_time_to_trigger: 640
+ a2_report_type: rsrp
+ a2_report_value: -110
+ a2_hysteresis: 0
+ a2_time_to_trigger: 640
+ a3_report_type: rsrp
+ a3_report_value: 6
+ a3_hysteresis: 0
+ a3_time_to_trigger: 480
srsenb:
num_prb: 100
diff --git a/example/scenarios/mod-enb-meas-event@.conf b/example/scenarios/mod-enb-meas-event@.conf
new file mode 100644
index 0000000..44f4fcd
--- /dev/null
+++ b/example/scenarios/mod-enb-meas-event@.conf
@@ -0,0 +1,7 @@
+modifiers:
+ enb:
+ - enable_measurements: true
+ ${param1}_report_type: ${param2}
+ ${param1}_report_value: ${param3}
+ ${param1}_hysteresis: ${param4}
+ ${param1}_time_to_trigger: ${param5}
diff --git a/src/osmo_gsm_tester/amarisoft_enb.py b/src/osmo_gsm_tester/amarisoft_enb.py
index e6e214f..df8e0db 100644
--- a/src/osmo_gsm_tester/amarisoft_enb.py
+++ b/src/osmo_gsm_tester/amarisoft_enb.py
@@ -77,6 +77,7 @@ class AmarisoftENB(enb.eNodeB):
self.remote_config_rf_file = None
self.remote_config_drb_file = None
self.remote_log_file = None
+ self.enable_measurements = False
self.suite_run = suite_run
self.remote_user = conf.get('remote_user', None)
if not rf_type_valid(conf.get('rf_dev_type', None)):
@@ -167,6 +168,10 @@ class AmarisoftENB(enb.eNodeB):
self._num_cells = int(values['enb'].get('num_cells', None))
assert self._num_cells
+ # Convert parsed boolean string to Python boolean:
+ self.enable_measurements = util.str2bool(values['enb'].get('enable_measurements', 'false'))
+ config.overlay(values, dict(enb={'enable_measurements': self.enable_measurements}))
+
# We need to set some specific variables programatically here to match IP addresses:
if self._conf.get('rf_dev_type') == 'zmq':
base_srate = num_prb2base_srate(self.num_prb())
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index ea1b543..c58bdc7 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -94,6 +94,19 @@ RESOURCES_SCHEMA = {
'enb[].rf_dev_type': schema.STR,
'enb[].rf_dev_args': schema.STR,
'enb[].additional_args': schema.STR,
+ 'enb[].enable_measurements': schema.BOOL_STR,
+ 'enb[].a1_report_type': schema.STR,
+ 'enb[].a1_report_value': schema.INT,
+ 'enb[].a1_hysteresis': schema.INT,
+ 'enb[].a1_time_to_trigger': schema.INT,
+ 'enb[].a2_report_type': schema.STR,
+ 'enb[].a2_report_value': schema.INT,
+ 'enb[].a2_hysteresis': schema.INT,
+ 'enb[].a2_time_to_trigger': schema.INT,
+ 'enb[].a3_report_type': schema.STR,
+ 'enb[].a3_report_value': schema.INT,
+ 'enb[].a3_hysteresis': schema.INT,
+ 'enb[].a3_time_to_trigger': schema.INT,
'arfcn[].arfcn': schema.INT,
'arfcn[].band': schema.BAND,
'modem[].type': schema.STR,
diff --git a/src/osmo_gsm_tester/templates/amarisoft_enb.cfg.tmpl b/src/osmo_gsm_tester/templates/amarisoft_enb.cfg.tmpl
index 763af08..d87e66a 100644
--- a/src/osmo_gsm_tester/templates/amarisoft_enb.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/amarisoft_enb.cfg.tmpl
@@ -229,5 +229,30 @@
/* DRB configuration */
drb_config: "amarisoft_drb.cfg",
+
+% if enb.enable_measurements:
+ /* measurement configuration */
+ meas_config_desc: {
+ a1_report_type: "${enb.a1_report_type}",
+ a1_${enb.a1_report_type}: ${enb.a1_report_value},
+ a1_hysteresis: ${enb.a1_hysteresis},
+ a1_time_to_trigger: ${enb.a1_time_to_trigger},
+ a2_report_type: "${enb.a2_report_type}",
+ a2_${enb.a2_report_type}: ${enb.a2_report_value},
+ a2_hysteresis: ${enb.a2_hysteresis},
+ a2_time_to_trigger: ${enb.a2_time_to_trigger},
+ a3_report_type: "${enb.a3_report_type}",
+ a3_offset: ${enb.a3_report_value},
+ a3_hysteresis: ${enb.a3_hysteresis},
+ a3_time_to_trigger: ${enb.a3_time_to_trigger},
+ },
+
+ /* measurement gap configuration */
+ meas_gap_config: "gp0",
+
+ /* if true, initiate a handover when a suitable measurement report
+ is received */
+ ho_from_meas: true,
+% endif
},
}