<p>ptrkrysik <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/gr-gsm/+/24094">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  ptrkrysik: Looks good to me, approved; Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">trx: Removing old and unused grc based radio_if<br><br>Change-Id: I7d43e6f2962b21ff03601cf1b1aafc222f2c4661<br>---<br>M python/trx/CMakeLists.txt<br>D python/trx/radio_if_grc.py<br>2 files changed, 0 insertions(+), 269 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/python/trx/CMakeLists.txt b/python/trx/CMakeLists.txt</span><br><span>index 697687b..1069db8 100644</span><br><span>--- a/python/trx/CMakeLists.txt</span><br><span>+++ b/python/trx/CMakeLists.txt</span><br><span>@@ -26,7 +26,6 @@</span><br><span>     radio_if.py</span><br><span>     radio_if_uhd.py</span><br><span>     radio_if_lms.py</span><br><span style="color: hsl(0, 100%, 40%);">-    radio_if_grc.py</span><br><span>     transceiver.py</span><br><span>     dict_toggle_sign.py</span><br><span>     DESTINATION ${GR_PYTHON_DIR}/grgsm/trx</span><br><span>diff --git a/python/trx/radio_if_grc.py b/python/trx/radio_if_grc.py</span><br><span>deleted file mode 100755</span><br><span>index fb9b100..0000000</span><br><span>--- a/python/trx/radio_if_grc.py</span><br><span>+++ /dev/null</span><br><span>@@ -1,268 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-#!/usr/bin/env python2</span><br><span style="color: hsl(0, 100%, 40%);">-# -*- coding: utf-8 -*-</span><br><span style="color: hsl(0, 100%, 40%);">-##################################################</span><br><span style="color: hsl(0, 100%, 40%);">-# GNU Radio Python Flow Graph</span><br><span style="color: hsl(0, 100%, 40%);">-# Title: Trx radio interface</span><br><span style="color: hsl(0, 100%, 40%);">-# Author: (C) Piotr Krysik 2017</span><br><span style="color: hsl(0, 100%, 40%);">-# Description: Alpha version of trx radio interface</span><br><span style="color: hsl(0, 100%, 40%);">-# Generated: Fri Dec  1 10:49:25 2017</span><br><span style="color: hsl(0, 100%, 40%);">-##################################################</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-from dict_toggle_sign import dict_toggle_sign</span><br><span style="color: hsl(0, 100%, 40%);">-from gnuradio import blocks</span><br><span style="color: hsl(0, 100%, 40%);">-from gnuradio import digital</span><br><span style="color: hsl(0, 100%, 40%);">-from gnuradio import eng_notation</span><br><span style="color: hsl(0, 100%, 40%);">-from gnuradio import filter</span><br><span style="color: hsl(0, 100%, 40%);">-from gnuradio import gr</span><br><span style="color: hsl(0, 100%, 40%);">-from gnuradio import uhd</span><br><span style="color: hsl(0, 100%, 40%);">-from gnuradio.eng_option import eng_option</span><br><span style="color: hsl(0, 100%, 40%);">-from gnuradio.filter import firdes</span><br><span style="color: hsl(0, 100%, 40%);">-from grgsm import gsm_gmsk_mod</span><br><span style="color: hsl(0, 100%, 40%);">-from optparse import OptionParser</span><br><span style="color: hsl(0, 100%, 40%);">-import grgsm</span><br><span style="color: hsl(0, 100%, 40%);">-import math</span><br><span style="color: hsl(0, 100%, 40%);">-import time</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-class RadioInterfaceGRC(gr.top_block):</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def __init__(self, delay_correction=285.616e-6, osr=4, ppm=-0.799427, rx_freq=935e6+36*0.2e6, rx_gain=40, samp_rate=13e6/12.0, timing_advance=0, trx_base_port="5710", trx_remote_addr="127.0.0.1", tx_freq=935e6+36*0.2e6-45e6, tx_gain=40, uplink_shift=-(6.0/1625000*(156.25)*3)):</span><br><span style="color: hsl(0, 100%, 40%);">-        gr.top_block.__init__(self, "Trx radio interface")</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-        ##################################################</span><br><span style="color: hsl(0, 100%, 40%);">-        # Parameters</span><br><span style="color: hsl(0, 100%, 40%);">-        ##################################################</span><br><span style="color: hsl(0, 100%, 40%);">-        self.delay_correction = delay_correction</span><br><span style="color: hsl(0, 100%, 40%);">-        self.osr = osr</span><br><span style="color: hsl(0, 100%, 40%);">-        self.ppm = ppm</span><br><span style="color: hsl(0, 100%, 40%);">-        self.rx_freq = rx_freq</span><br><span style="color: hsl(0, 100%, 40%);">-        self.rx_gain = rx_gain</span><br><span style="color: hsl(0, 100%, 40%);">-        self.samp_rate = samp_rate</span><br><span style="color: hsl(0, 100%, 40%);">-        self.timing_advance = timing_advance</span><br><span style="color: hsl(0, 100%, 40%);">-        self.trx_base_port = trx_base_port</span><br><span style="color: hsl(0, 100%, 40%);">-        self.trx_remote_addr = trx_remote_addr</span><br><span style="color: hsl(0, 100%, 40%);">-        self.tx_freq = tx_freq</span><br><span style="color: hsl(0, 100%, 40%);">-        self.tx_gain = tx_gain</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uplink_shift = uplink_shift</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-        ##################################################</span><br><span style="color: hsl(0, 100%, 40%);">-        # Blocks</span><br><span style="color: hsl(0, 100%, 40%);">-        ##################################################</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_source_0 = uhd.usrp_source(</span><br><span style="color: hsl(0, 100%, 40%);">-               ",".join(("", "")),</span><br><span style="color: hsl(0, 100%, 40%);">-               uhd.stream_args(</span><br><span style="color: hsl(0, 100%, 40%);">-                        cpu_format="fc32",</span><br><span style="color: hsl(0, 100%, 40%);">-                    channels=range(1),</span><br><span style="color: hsl(0, 100%, 40%);">-              ),</span><br><span style="color: hsl(0, 100%, 40%);">-        )</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_source_0.set_clock_rate(26e6, uhd.ALL_MBOARDS)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_source_0.set_samp_rate(samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_source_0.set_center_freq(rx_freq, 0)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_source_0.set_gain(rx_gain, 0)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_source_0.set_antenna("RX2", 0)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_sink_0 = uhd.usrp_sink(</span><br><span style="color: hsl(0, 100%, 40%);">-          ",".join(("", "")),</span><br><span style="color: hsl(0, 100%, 40%);">-               uhd.stream_args(</span><br><span style="color: hsl(0, 100%, 40%);">-                        cpu_format="fc32",</span><br><span style="color: hsl(0, 100%, 40%);">-                    channels=range(1),</span><br><span style="color: hsl(0, 100%, 40%);">-              ),</span><br><span style="color: hsl(0, 100%, 40%);">-              "packet_len",</span><br><span style="color: hsl(0, 100%, 40%);">-        )</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_sink_0.set_clock_rate(26e6, uhd.ALL_MBOARDS)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_sink_0.set_subdev_spec("A:B", 0)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_sink_0.set_samp_rate(samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_sink_0.set_center_freq(tx_freq, 0)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_sink_0.set_gain(tx_gain, 0)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_sink_0.set_antenna("TX/RX", 0)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.ts_filter = grgsm.burst_timeslot_filter(0)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.low_pass_filter_0_0 = filter.fir_filter_ccf(1, firdes.low_pass(</span><br><span style="color: hsl(0, 100%, 40%);">-               1, samp_rate, 125e3, 5e3, firdes.WIN_HAMMING, 6.76))</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_txtime_setter_0 = grgsm.txtime_setter(None if (None is not None) else 0xffffffff, 0, 0, 0, 0, timing_advance, delay_correction+uplink_shift)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_trx_burst_if_0 = grgsm.trx_burst_if(trx_remote_addr, trx_base_port)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_receiver_0 = grgsm.receiver(4, ([0]), ([4]), False)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_preprocess_tx_burst_0 = grgsm.preprocess_tx_burst()</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_msg_to_tag_0_0 = grgsm.msg_to_tag()</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_msg_to_tag_0 = grgsm.msg_to_tag()</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_gmsk_mod_0 = gsm_gmsk_mod(</span><br><span style="color: hsl(0, 100%, 40%);">-            BT=0.3,</span><br><span style="color: hsl(0, 100%, 40%);">-            pulse_duration=4,</span><br><span style="color: hsl(0, 100%, 40%);">-            sps=osr,</span><br><span style="color: hsl(0, 100%, 40%);">-        )</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_controlled_rotator_cc_0_0 = grgsm.controlled_rotator_cc(-ppm/1.0e6*2*math.pi*tx_freq/samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_controlled_rotator_cc_0 = grgsm.controlled_rotator_cc(ppm/1.0e6*2*math.pi*rx_freq/samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_clock_offset_control_0 = grgsm.clock_offset_control(rx_freq, samp_rate, osr)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_burst_type_filter_0 = grgsm.burst_type_filter(([3]))</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_burst_to_fn_time_0 = grgsm.burst_to_fn_time()</span><br><span style="color: hsl(0, 100%, 40%);">-        self.digital_burst_shaper_xx_0 = digital.burst_shaper_cc((firdes.window(firdes.WIN_HANN, 16, 0)), 0, 20, False, "packet_len")</span><br><span style="color: hsl(0, 100%, 40%);">-        self.dict_toggle_sign = dict_toggle_sign()</span><br><span style="color: hsl(0, 100%, 40%);">-        self.blocks_pdu_to_tagged_stream_0_0 = blocks.pdu_to_tagged_stream(blocks.byte_t, "packet_len")</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-        ##################################################</span><br><span style="color: hsl(0, 100%, 40%);">-        # Connections</span><br><span style="color: hsl(0, 100%, 40%);">-        ##################################################</span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.dict_toggle_sign, 'dict_out'), (self.gsm_msg_to_tag_0_0, 'msg'))</span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.gsm_burst_to_fn_time_0, 'fn_time_out'), (self.gsm_txtime_setter_0, 'fn_time'))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.gsm_burst_type_filter_0, 'bursts_out'), (self.gsm_burst_to_fn_time_0, 'bursts_in'))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.gsm_clock_offset_control_0, 'ctrl'), (self.dict_toggle_sign, 'dict_in'))</span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.gsm_clock_offset_control_0, 'ctrl'), (self.gsm_msg_to_tag_0, 'msg'))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.gsm_preprocess_tx_burst_0, 'bursts_out'), (self.blocks_pdu_to_tagged_stream_0_0, 'pdus'))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.gsm_receiver_0, 'C0'), (self.gsm_burst_type_filter_0, 'bursts_in'))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.gsm_receiver_0, 'measurements'), (self.gsm_clock_offset_control_0, 'measurements'))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.gsm_receiver_0, 'C0'), (self.ts_filter, 'in'))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.gsm_trx_burst_if_0, 'bursts'), (self.gsm_txtime_setter_0, 'bursts_in'))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.gsm_txtime_setter_0, 'bursts_out'), (self.gsm_preprocess_tx_burst_0, 'bursts_in'))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.msg_connect((self.ts_filter, 'out'), (self.gsm_trx_burst_if_0, 'bursts'))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.connect((self.blocks_pdu_to_tagged_stream_0_0, 0), (self.gsm_gmsk_mod_0, 0))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.connect((self.digital_burst_shaper_xx_0, 0), (self.gsm_msg_to_tag_0_0, 0))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.connect((self.gsm_controlled_rotator_cc_0, 0), (self.low_pass_filter_0_0, 0))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.connect((self.gsm_controlled_rotator_cc_0_0, 0), (self.uhd_usrp_sink_0, 0))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.connect((self.gsm_gmsk_mod_0, 0), (self.digital_burst_shaper_xx_0, 0))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.connect((self.gsm_msg_to_tag_0, 0), (self.gsm_controlled_rotator_cc_0, 0))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.connect((self.gsm_msg_to_tag_0_0, 0), (self.gsm_controlled_rotator_cc_0_0, 0))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.connect((self.low_pass_filter_0_0, 0), (self.gsm_receiver_0, 0))    </span><br><span style="color: hsl(0, 100%, 40%);">-        self.connect((self.uhd_usrp_source_0, 0), (self.gsm_msg_to_tag_0, 0))    </span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_delay_correction(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.delay_correction</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_delay_correction(self, delay_correction):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.delay_correction = delay_correction</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_txtime_setter_0.set_delay_correction(self.delay_correction+self.uplink_shift)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_osr(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.osr</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_osr(self, osr):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.osr = osr</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_gmsk_mod_0.set_sps(self.osr)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_ppm(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.ppm</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_ppm(self, ppm):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.ppm = ppm</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_controlled_rotator_cc_0.set_phase_inc(self.ppm/1.0e6*2*math.pi*self.rx_freq/self.samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_controlled_rotator_cc_0_0.set_phase_inc(-self.ppm/1.0e6*2*math.pi*self.tx_freq/self.samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_rx_freq(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.rx_freq</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_rx_freq(self, rx_freq):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.rx_freq = rx_freq</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_controlled_rotator_cc_0.set_phase_inc(self.ppm/1.0e6*2*math.pi*self.rx_freq/self.samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_source_0.set_center_freq(self.rx_freq, 0)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_rx_gain(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.rx_gain</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_rx_gain(self, rx_gain):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.rx_gain = rx_gain</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_source_0.set_gain(self.rx_gain, 0)</span><br><span style="color: hsl(0, 100%, 40%);">-             </span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_samp_rate(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.samp_rate</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_samp_rate(self, samp_rate):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.samp_rate = samp_rate</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_controlled_rotator_cc_0.set_phase_inc(self.ppm/1.0e6*2*math.pi*self.rx_freq/self.samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_controlled_rotator_cc_0_0.set_phase_inc(-self.ppm/1.0e6*2*math.pi*self.tx_freq/self.samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.low_pass_filter_0_0.set_taps(firdes.low_pass(1, self.samp_rate, 125e3, 5e3, firdes.WIN_HAMMING, 6.76))</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_source_0.set_samp_rate(self.samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_timing_advance(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.timing_advance</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_timing_advance(self, timing_advance):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.timing_advance = timing_advance</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_txtime_setter_0.set_timing_advance(self.timing_advance)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_trx_base_port(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.trx_base_port</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_trx_base_port(self, trx_base_port):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.trx_base_port = trx_base_port</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_trx_remote_addr(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.trx_remote_addr</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_trx_remote_addr(self, trx_remote_addr):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.trx_remote_addr = trx_remote_addr</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_tx_freq(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.tx_freq</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_tx_freq(self, tx_freq):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.tx_freq = tx_freq</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_controlled_rotator_cc_0_0.set_phase_inc(-self.ppm/1.0e6*2*math.pi*self.tx_freq/self.samp_rate)</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_sink_0.set_center_freq(self.tx_freq, 0)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_tx_gain(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.tx_gain</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_tx_gain(self, tx_gain):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.tx_gain = tx_gain</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uhd_usrp_sink_0.set_gain(self.tx_gain, 0)</span><br><span style="color: hsl(0, 100%, 40%);">-            </span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def get_uplink_shift(self):</span><br><span style="color: hsl(0, 100%, 40%);">-        return self.uplink_shift</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    def set_uplink_shift(self, uplink_shift):</span><br><span style="color: hsl(0, 100%, 40%);">-        self.uplink_shift = uplink_shift</span><br><span style="color: hsl(0, 100%, 40%);">-        self.gsm_txtime_setter_0.set_delay_correction(self.delay_correction+self.uplink_shift)</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-def argument_parser():</span><br><span style="color: hsl(0, 100%, 40%);">-    parser = OptionParser(option_class=eng_option, usage="%prog: [options]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "", "--delay-correction", dest="delay_correction", type="eng_float", default=eng_notation.num_to_str(285.616e-6),</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set delay_correction [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "", "--osr", dest="osr", type="intx", default=4,</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set OSR [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "", "--ppm", dest="ppm", type="eng_float", default=eng_notation.num_to_str(-0.799427),</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set Clock offset correction [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "-d", "--rx-freq", dest="rx_freq", type="eng_float", default=eng_notation.num_to_str(935e6+36*0.2e6),</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set rx_freq [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "-g", "--rx-gain", dest="rx_gain", type="eng_float", default=eng_notation.num_to_str(40),</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set rx_gain [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "", "--samp-rate", dest="samp_rate", type="eng_float", default=eng_notation.num_to_str(13e6/12.0),</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set samp_rate [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "", "--timing-advance", dest="timing_advance", type="eng_float", default=eng_notation.num_to_str(0),</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set timing_advance [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "", "--trx-base-port", dest="trx_base_port", type="string", default="5710",</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set 5710 [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "", "--trx-remote-addr", dest="trx_remote_addr", type="string", default="127.0.0.1",</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set 127.0.0.1 [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "-u", "--tx-freq", dest="tx_freq", type="eng_float", default=eng_notation.num_to_str(935e6+36*0.2e6-45e6),</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set tx_freq [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "-r", "--tx-gain", dest="tx_gain", type="eng_float", default=eng_notation.num_to_str(40),</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set tx_gain [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    parser.add_option(</span><br><span style="color: hsl(0, 100%, 40%);">-        "", "--uplink-shift", dest="uplink_shift", type="eng_float", default=eng_notation.num_to_str(-(6.0/1625000*(156.25)*3)),</span><br><span style="color: hsl(0, 100%, 40%);">-        help="Set uplink_shift [default=%default]")</span><br><span style="color: hsl(0, 100%, 40%);">-    return parser</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-def main(top_block_cls=RadioInterfaceGRC, options=None):</span><br><span style="color: hsl(0, 100%, 40%);">-    if options is None:</span><br><span style="color: hsl(0, 100%, 40%);">-        options, _ = argument_parser().parse_args()</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-    tb = top_block_cls(delay_correction=options.delay_correction, osr=options.osr, ppm=options.ppm, rx_freq=options.rx_freq, rx_gain=options.rx_gain, samp_rate=options.samp_rate, timing_advance=options.timing_advance, trx_base_port=options.trx_base_port, trx_remote_addr=options.trx_remote_addr, tx_freq=options.tx_freq, tx_gain=options.tx_gain, uplink_shift=options.uplink_shift)</span><br><span style="color: hsl(0, 100%, 40%);">-    tb.start()</span><br><span style="color: hsl(0, 100%, 40%);">-    tb.wait()</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-if __name__ == '__main__':</span><br><span style="color: hsl(0, 100%, 40%);">-    main()</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/gr-gsm/+/24094">change 24094</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/gr-gsm/+/24094"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: gr-gsm </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7d43e6f2962b21ff03601cf1b1aafc222f2c4661 </div>
<div style="display:none"> Gerrit-Change-Number: 24094 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: ptrkrysik <ptrkrysik@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: ptrkrysik <ptrkrysik@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>