Merge "Move the mapping to the setter function"
diff --git a/acts/framework/acts/controllers/rohdeschwarz_lib/cmw500_cellular_simulator.py b/acts/framework/acts/controllers/rohdeschwarz_lib/cmw500_cellular_simulator.py
index c773815..bc526b3 100644
--- a/acts/framework/acts/controllers/rohdeschwarz_lib/cmw500_cellular_simulator.py
+++ b/acts/framework/acts/controllers/rohdeschwarz_lib/cmw500_cellular_simulator.py
@@ -434,9 +434,6 @@
if not all([nrb_ul, nrb_dl, mcs_dl, mcs_ul]):
raise ValueError('All parameters are mandatory.')
- # Convert ul modulation type to CMW modulation type.
- self.ul_modulation = CMW_MODULATION_MAPPING[self.ul_modulation]
-
tbs = get_mcs_tbsi_map_ul[self.ul_modulation][mcs_ul]
bts.rb_configuration_ul = (nrb_ul, 0, self.ul_modulation, tbs)
@@ -445,9 +442,6 @@
time.sleep(1)
- # Convert dl modulation type to CMW modulation type.
- self.dl_modulation = CMW_MODULATION_MAPPING[self.dl_modulation]
-
if self.dl_modulation == cmw500.ModulationType.Q256:
tbs = get_mcs_tbsi_map_for_256qam_dl[
self.dl_modulation][mcs_dl]
@@ -470,27 +464,37 @@
def set_dl_modulation(self, bts_index, modulation):
""" Sets the DL modulation for the indicated base station.
+ This function does not actually configure the test equipment with this
+ setting, but stores the value to be used later on when setting the
+ scheduling type. This is because the CMW500 API only allows to set
+ this parameters together.
+
Args:
bts_index: the base station number
modulation: the new DL modulation
"""
+ # Convert dl modulation type to CMW modulation type.
+ self.dl_modulation = CMW_MODULATION_MAPPING[modulation]
- # This function is only used to store the values of modulation to
- # be inline with abstract class signature.
- self.dl_modulation = modulation
self.log.warning('Modulation config stored but not applied until '
'set_scheduling_mode called.')
def set_ul_modulation(self, bts_index, modulation):
""" Sets the UL modulation for the indicated base station.
+ This function does not actually configure the test equipment with this
+ setting, but stores the value to be used later on when setting the
+ scheduling type. This is because the CMW500 API only allows to set
+ this parameters together.
+
Args:
bts_index: the base station number
modulation: the new UL modulation
"""
- # This function is only used to store the values of modulation to
- # be inline with abstract class signature.
- self.ul_modulation = modulation
+
+ # Convert ul modulation type to CMW modulation type.
+ self.ul_modulation = CMW_MODULATION_MAPPING[modulation]
+
self.log.warning('Modulation config stored but not applied until '
'set_scheduling_mode called.')