rfemu: add max attenuation getter

this allows to query the maximum channel attenuation from within a test case

Change-Id: I35f7cb188790c59bbf2450f78c663fbc9440e406
diff --git a/src/osmo_gsm_tester/obj/rfemu.py b/src/osmo_gsm_tester/obj/rfemu.py
index b2add6b..ac34ee1 100644
--- a/src/osmo_gsm_tester/obj/rfemu.py
+++ b/src/osmo_gsm_tester/obj/rfemu.py
@@ -39,6 +39,11 @@
         """Set attenuation in dB on the configured channel"""
         pass
 
+    @abstractmethod
+    def get_max_attenuation(self):
+        """Get maximum channel attenuation"""
+        pass
+
 def get_instance_by_type(rfemu_type, rfemu_opt):
     """Allocate a RFemulation child class based on type. Opts are passed to the newly created object."""
     if rfemu_type == 'amarisoftctl':
diff --git a/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py b/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py
index 6ef25bb..17aa43a 100644
--- a/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py
+++ b/src/osmo_gsm_tester/obj/rfemu_amarisoftctrl.py
@@ -59,5 +59,7 @@
         result = self.ws.recv()
         self.dbg('Received CTRL msg: "%s"' % result)
 
+    def get_max_attenuation(self):
+        return 200 # maximum cell_gain value in Amarisoft
 
 # vim: expandtab tabstop=4 shiftwidth=4
diff --git a/src/osmo_gsm_tester/obj/rfemu_minicircuits.py b/src/osmo_gsm_tester/obj/rfemu_minicircuits.py
index eea3a0e..6214040 100644
--- a/src/osmo_gsm_tester/obj/rfemu_minicircuits.py
+++ b/src/osmo_gsm_tester/obj/rfemu_minicircuits.py
@@ -64,4 +64,8 @@
         self.dbg('Received response: "%s"' % data_str)
         if data_str != '1':
             raise log.Error('Mini-circuits attenuation device returned failure! %s' & data_str)
+
+    def get_max_attenuation(self):
+        return 95 # Maximum value of the Mini-Circuits RC4DAT-6G-95
+
 # vim: expandtab tabstop=4 shiftwidth=4