enb: incorporate number of carriers into ue_max_rate() API

this allows the enb to calculate the max rate in a single
spot rather than each test individually

Change-Id: Id225a986e0b271cf9c057c74c9aefd6c7f3d39d6
diff --git a/src/osmo_gsm_tester/obj/enb.py b/src/osmo_gsm_tester/obj/enb.py
index 85aca35..6384f15 100644
--- a/src/osmo_gsm_tester/obj/enb.py
+++ b/src/osmo_gsm_tester/obj/enb.py
@@ -213,7 +213,7 @@
         pass
 
     @abstractmethod
-    def ue_max_rate(self, downlink=True):
+    def ue_max_rate(self, downlink=True, num_carriers=1):
         pass
 
     @abstractmethod
diff --git a/src/osmo_gsm_tester/obj/enb_amarisoft.py b/src/osmo_gsm_tester/obj/enb_amarisoft.py
index 657cb2e..f2d328d 100644
--- a/src/osmo_gsm_tester/obj/enb_amarisoft.py
+++ b/src/osmo_gsm_tester/obj/enb_amarisoft.py
@@ -251,7 +251,7 @@
         rfemu_obj = rfemu.get_instance_by_type(rfemu_cfg['type'], rfemu_cfg)
         return rfemu_obj
 
-    def ue_max_rate(self, downlink=True):
+    def ue_max_rate(self, downlink=True, num_carriers=1):
         # The max rate for a single UE per PRB configuration in TM1 with MCS 28 QAM64
         max_phy_rate_tm1_dl = { 6 : 3.2e6,
                                15 : 9.2e6,
@@ -278,6 +278,9 @@
             if self._txmode >= 2 and self.num_prb() <= 25:
                 max_rate *= 0.85
 
+        # Assume we schedule all carriers
+        max_rate *= num_carriers
+
         return max_rate
 
 # vim: expandtab tabstop=4 shiftwidth=4
diff --git a/src/osmo_gsm_tester/obj/enb_srs.py b/src/osmo_gsm_tester/obj/enb_srs.py
index aa2ec87..7556f92 100644
--- a/src/osmo_gsm_tester/obj/enb_srs.py
+++ b/src/osmo_gsm_tester/obj/enb_srs.py
@@ -249,10 +249,11 @@
         rfemu_cfg = cell_list[cell].get('dl_rfemu', None)
         if rfemu_cfg is None:
             raise log.Error('rfemu attribute not found in cell_list item!')
+
         rfemu_obj = rfemu.get_instance_by_type(rfemu_cfg['type'], rfemu_cfg)
         return rfemu_obj
 
-    def ue_max_rate(self, downlink=True):
+    def ue_max_rate(self, downlink=True, num_carriers=1):
         # The max rate for a single UE per PRB configuration in TM1 with MCS 28 QAM64
         max_phy_rate_tm1_dl = { 6 : 3.5e6,
                                15 : 11e6,
@@ -280,6 +281,9 @@
             if self._txmode >= 2 and self.num_prb() == 6:
                 max_rate *= 0.85
 
+        # Assume we schedule all carriers
+        max_rate *= num_carriers
+
         return max_rate
 
 # vim: expandtab tabstop=4 shiftwidth=4