Piotr Krysik has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12675 )

Change subject: apps/grgsm_trx: add RadioInterface driver selection argument
......................................................................

apps/grgsm_trx: add RadioInterface driver selection argument

Change-Id: Ic11f878c176bad16b057f25725ab0cfecc01782f
---
M apps/grgsm_trx
M python/trx/__init__.py
2 files changed, 10 insertions(+), 4 deletions(-)

Approvals:
  Piotr Krysik: Looks good to me, approved; Verified



diff --git a/apps/grgsm_trx b/apps/grgsm_trx
index b911719..7da9e06 100755
--- a/apps/grgsm_trx
+++ b/apps/grgsm_trx
@@ -29,7 +29,6 @@
 from argparse import ArgumentTypeError
 from gnuradio import eng_notation

-from grgsm.trx import RadioInterfaceUHD
 from grgsm.trx import RadioInterface
 from grgsm.trx import Transceiver

@@ -58,8 +57,13 @@
                # Set up signal handlers
                signal.signal(signal.SIGINT, self.sig_handler)

+               if argv.driver == "uhd":
+                       from grgsm.trx.radio_if_uhd import RadioInterfaceUHD as 
Radio
+               else:
+                       raise ValueError("Unknown RadioInterface driver '%s'" % 
argv.driver)
+
                # Init Radio interface
-               self.radio = RadioInterfaceUHD(self.phy_args, 
self.phy_sample_rate,
+               self.radio = Radio(self.phy_args, self.phy_sample_rate,
                        self.phy_rx_gain, self.phy_tx_gain, self.phy_ppm,
                        self.phy_rx_antenna, self.phy_tx_antenna,
                        self.phy_freq_offset, self.bind_addr,
@@ -111,6 +115,10 @@

        # PHY specific
        phy_group = parser.add_argument_group("PHY parameters")
+       phy_group.add_argument("--driver",
+               dest = "driver", type = str, default = "uhd",
+               choices = ["uhd"],
+               help = "Set device driver (default %(default)s)")
        phy_group.add_argument("-a", "--args",
                dest = "args", type = str, default = "",
                help = "Set device arguments")
diff --git a/python/trx/__init__.py b/python/trx/__init__.py
index 17ff9d7..c8bddbe 100644
--- a/python/trx/__init__.py
+++ b/python/trx/__init__.py
@@ -23,9 +23,7 @@
 from udp_link import UDPLink
 from ctrl_if import CTRLInterface
 from ctrl_if_bb import CTRLInterfaceBB
-from radio_if_grc import RadioInterfaceGRC
 from radio_if import RadioInterface
-from radio_if import RadioInterfaceUHD
 from transceiver import Transceiver

 from dict_toggle_sign import dict_toggle_sign

--
To view, visit https://gerrit.osmocom.org/12675
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: gr-gsm
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic11f878c176bad16b057f25725ab0cfecc01782f
Gerrit-Change-Number: 12675
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <[email protected]>
Gerrit-Reviewer: Piotr Krysik <[email protected]>

Reply via email to