summaryrefslogtreecommitdiff
path: root/gnuradio-examples
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-examples')
-rw-r--r--gnuradio-examples/grc/demod/digital_freq_lock.grc210
-rw-r--r--gnuradio-examples/grc/demod/pam_sync.grc222
-rwxr-xr-xgnuradio-examples/python/digital/benchmark_loopback.py5
-rwxr-xr-xgnuradio-examples/python/digital/benchmark_qt_loopback.py31
-rwxr-xr-xgnuradio-examples/python/digital/benchmark_qt_loopback2.py39
-rwxr-xr-xgnuradio-examples/python/digital/benchmark_qt_rx2.py23
-rwxr-xr-xgnuradio-examples/python/digital/benchmark_rx2.py114
-rwxr-xr-xgnuradio-examples/python/digital/benchmark_tx2.py135
-rw-r--r--gnuradio-examples/python/digital/pick_bitrate2.py154
-rw-r--r--gnuradio-examples/python/digital/qt_digital_window.py232
-rw-r--r--gnuradio-examples/python/digital/qt_digital_window.ui685
-rw-r--r--gnuradio-examples/python/digital/qt_digital_window2.py247
-rw-r--r--gnuradio-examples/python/digital/qt_digital_window2.ui873
-rw-r--r--gnuradio-examples/python/digital/qt_rx_window.py43
-rw-r--r--gnuradio-examples/python/digital/qt_rx_window.ui256
-rw-r--r--gnuradio-examples/python/digital/qt_rx_window2.py33
-rw-r--r--gnuradio-examples/python/digital/qt_rx_window2.ui237
-rw-r--r--gnuradio-examples/python/digital/receive_path.py4
-rw-r--r--gnuradio-examples/python/digital/transmit_path.py4
-rw-r--r--gnuradio-examples/python/digital/usrp_receive_path.py30
-rw-r--r--gnuradio-examples/python/digital/usrp_receive_path2.py96
-rw-r--r--gnuradio-examples/python/digital/usrp_transmit_path.py32
-rw-r--r--gnuradio-examples/python/digital/usrp_transmit_path2.py101
-rwxr-xr-xgnuradio-examples/python/network/audio_sink.py20
-rwxr-xr-xgnuradio-examples/python/network/audio_source.py21
-rwxr-xr-xgnuradio-examples/python/network/dial_tone_sink.py20
-rwxr-xr-xgnuradio-examples/python/network/dial_tone_source.py22
-rwxr-xr-xgnuradio-examples/python/network/vector_sink.py19
-rwxr-xr-xgnuradio-examples/python/network/vector_source.py20
-rwxr-xr-xgnuradio-examples/python/pfb/channelize.py4
30 files changed, 2186 insertions, 1746 deletions
diff --git a/gnuradio-examples/grc/demod/digital_freq_lock.grc b/gnuradio-examples/grc/demod/digital_freq_lock.grc
index 37ee8123e..36037febb 100644
--- a/gnuradio-examples/grc/demod/digital_freq_lock.grc
+++ b/gnuradio-examples/grc/demod/digital_freq_lock.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Fri Jan 29 18:10:00 2010</timestamp>
+ <timestamp>Sat Mar 6 17:17:12 2010</timestamp>
<block>
<key>options</key>
<param>
@@ -980,54 +980,50 @@
</param>
</block>
<block>
- <key>variable_slider</key>
+ <key>root_raised_cosine_filter</key>
<param>
<key>id</key>
- <value>alpha</value>
+ <value>root_raised_cosine_filter_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>label</key>
- <value>Freq Alpha</value>
- </param>
- <param>
- <key>value</key>
- <value>0</value>
+ <key>type</key>
+ <value>interp_fir_filter_ccf</value>
</param>
<param>
- <key>min</key>
- <value>0</value>
+ <key>decim</key>
+ <value>1</value>
</param>
<param>
- <key>max</key>
- <value>0.001</value>
+ <key>interp</key>
+ <value>spb_gen</value>
</param>
<param>
- <key>num_steps</key>
- <value>1000</value>
+ <key>gain</key>
+ <value>2*spb_gen</value>
</param>
<param>
- <key>style</key>
- <value>wx.SL_HORIZONTAL</value>
+ <key>samp_rate</key>
+ <value>1.0</value>
</param>
<param>
- <key>converver</key>
- <value>float_converter</value>
+ <key>sym_rate</key>
+ <value>1./spb_gen</value>
</param>
<param>
- <key>grid_pos</key>
- <value></value>
+ <key>alpha</key>
+ <value>rolloff</value>
</param>
<param>
- <key>notebook</key>
- <value></value>
+ <key>ntaps</key>
+ <value>44</value>
</param>
<param>
<key>_coordinate</key>
- <value>(552, 4)</value>
+ <value>(978, 157)</value>
</param>
<param>
<key>_rotation</key>
@@ -1035,105 +1031,81 @@
</param>
</block>
<block>
- <key>variable_slider</key>
+ <key>gr_fll_band_edge_cc</key>
<param>
<key>id</key>
- <value>beta</value>
+ <value>gr_fll_band_edge_cc_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>label</key>
- <value>Freq Beta</value>
- </param>
- <param>
- <key>value</key>
- <value>0</value>
- </param>
- <param>
- <key>min</key>
- <value>0.0</value>
- </param>
- <param>
- <key>max</key>
- <value>0.0001</value>
+ <key>type</key>
+ <value>cc</value>
</param>
<param>
- <key>num_steps</key>
- <value>1000</value>
+ <key>samps_per_sym</key>
+ <value>spb_gen</value>
</param>
<param>
- <key>style</key>
- <value>wx.SL_HORIZONTAL</value>
+ <key>rolloff</key>
+ <value>rolloff</value>
</param>
<param>
- <key>converver</key>
- <value>float_converter</value>
+ <key>filter_size</key>
+ <value>44</value>
</param>
<param>
- <key>grid_pos</key>
- <value></value>
+ <key>alpha</key>
+ <value>alpha</value>
</param>
<param>
- <key>notebook</key>
- <value></value>
+ <key>beta</key>
+ <value>beta</value>
</param>
<param>
<key>_coordinate</key>
- <value>(668, 5)</value>
+ <value>(874, 664)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>root_raised_cosine_filter</key>
+ <key>gr_channel_model</key>
<param>
<key>id</key>
- <value>root_raised_cosine_filter_0</value>
+ <value>gr_channel_model_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>interp_fir_filter_ccf</value>
- </param>
- <param>
- <key>decim</key>
- <value>1</value>
- </param>
- <param>
- <key>interp</key>
- <value>spb_gen</value>
+ <key>noise_voltage</key>
+ <value>noise_amp</value>
</param>
<param>
- <key>gain</key>
- <value>2*spb_gen</value>
+ <key>freq_offset</key>
+ <value>freq_offset</value>
</param>
<param>
- <key>samp_rate</key>
+ <key>epsilon</key>
<value>1.0</value>
</param>
<param>
- <key>sym_rate</key>
- <value>1./spb_gen</value>
- </param>
- <param>
- <key>alpha</key>
- <value>rolloff</value>
+ <key>taps</key>
+ <value>1.0</value>
</param>
<param>
- <key>ntaps</key>
- <value>44</value>
+ <key>seed</key>
+ <value>42</value>
</param>
<param>
<key>_coordinate</key>
- <value>(978, 157)</value>
+ <value>(618, 376)</value>
</param>
<param>
<key>_rotation</key>
@@ -1141,81 +1113,109 @@
</param>
</block>
<block>
- <key>gr_fll_band_edge_cc</key>
+ <key>variable_slider</key>
<param>
<key>id</key>
- <value>gr_fll_band_edge_cc_0</value>
+ <value>beta</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>cc</value>
+ <key>label</key>
+ <value>Freq Beta</value>
</param>
<param>
- <key>samps_per_sym</key>
- <value>spb_gen</value>
+ <key>value</key>
+ <value>0</value>
</param>
<param>
- <key>rolloff</key>
- <value>rolloff</value>
+ <key>min</key>
+ <value>0.0</value>
</param>
<param>
- <key>filter_size</key>
- <value>44</value>
+ <key>max</key>
+ <value>0.01</value>
</param>
<param>
- <key>alpha</key>
- <value>alpha</value>
+ <key>num_steps</key>
+ <value>1000</value>
</param>
<param>
- <key>beta</key>
- <value>beta</value>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
</param>
<param>
<key>_coordinate</key>
- <value>(874, 664)</value>
+ <value>(668, 5)</value>
</param>
<param>
<key>_rotation</key>
- <value>0</value>
+ <value>180</value>
</param>
</block>
<block>
- <key>gr_channel_model</key>
+ <key>variable_slider</key>
<param>
<key>id</key>
- <value>gr_channel_model_0</value>
+ <value>alpha</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>noise_voltage</key>
- <value>noise_amp</value>
+ <key>label</key>
+ <value>Freq Alpha</value>
</param>
<param>
- <key>freq_offset</key>
- <value>freq_offset</value>
+ <key>value</key>
+ <value>0</value>
</param>
<param>
- <key>epsilon</key>
- <value>1.0</value>
+ <key>min</key>
+ <value>0</value>
</param>
<param>
- <key>taps</key>
- <value>1.0</value>
+ <key>max</key>
+ <value>0.1</value>
</param>
<param>
- <key>seed</key>
- <value>42</value>
+ <key>num_steps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
</param>
<param>
<key>_coordinate</key>
- <value>(618, 376)</value>
+ <value>(552, 4)</value>
</param>
<param>
<key>_rotation</key>
diff --git a/gnuradio-examples/grc/demod/pam_sync.grc b/gnuradio-examples/grc/demod/pam_sync.grc
index 80a7aef0c..8571995a5 100644
--- a/gnuradio-examples/grc/demod/pam_sync.grc
+++ b/gnuradio-examples/grc/demod/pam_sync.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Mon Feb 1 18:58:32 2010</timestamp>
+ <timestamp>Sat Mar 6 17:17:22 2010</timestamp>
<block>
<key>options</key>
<param>
@@ -713,116 +713,6 @@
<key>variable_slider</key>
<param>
<key>id</key>
- <value>freq_beta</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>label</key>
- <value>Freq Beta</value>
- </param>
- <param>
- <key>value</key>
- <value>0</value>
- </param>
- <param>
- <key>min</key>
- <value>0.0</value>
- </param>
- <param>
- <key>max</key>
- <value>0.0001</value>
- </param>
- <param>
- <key>num_steps</key>
- <value>1000</value>
- </param>
- <param>
- <key>style</key>
- <value>wx.SL_HORIZONTAL</value>
- </param>
- <param>
- <key>converver</key>
- <value>float_converter</value>
- </param>
- <param>
- <key>grid_pos</key>
- <value></value>
- </param>
- <param>
- <key>notebook</key>
- <value></value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(836, 9)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>180</value>
- </param>
- </block>
- <block>
- <key>variable_slider</key>
- <param>
- <key>id</key>
- <value>freq_alpha</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>label</key>
- <value>Freq Alpha</value>
- </param>
- <param>
- <key>value</key>
- <value>0</value>
- </param>
- <param>
- <key>min</key>
- <value>0</value>
- </param>
- <param>
- <key>max</key>
- <value>0.001</value>
- </param>
- <param>
- <key>num_steps</key>
- <value>1000</value>
- </param>
- <param>
- <key>style</key>
- <value>wx.SL_HORIZONTAL</value>
- </param>
- <param>
- <key>converver</key>
- <value>float_converter</value>
- </param>
- <param>
- <key>grid_pos</key>
- <value></value>
- </param>
- <param>
- <key>notebook</key>
- <value></value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(734, 10)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>variable_slider</key>
- <param>
- <key>id</key>
<value>phase_alpha</value>
</param>
<param>
@@ -1621,6 +1511,116 @@
<value>0</value>
</param>
</block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>freq_alpha</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Freq Alpha</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>0.1</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(734, 10)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>freq_beta</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Freq Beta</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>0.01</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>1000</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(836, 9)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
<connection>
<source_block_id>random_source_x_0</source_block_id>
<sink_block_id>gr_uchar_to_float_0</sink_block_id>
diff --git a/gnuradio-examples/python/digital/benchmark_loopback.py b/gnuradio-examples/python/digital/benchmark_loopback.py
index 4cc4a7bee..47e4f2028 100755
--- a/gnuradio-examples/python/digital/benchmark_loopback.py
+++ b/gnuradio-examples/python/digital/benchmark_loopback.py
@@ -44,6 +44,11 @@ class my_top_block(gr.top_block):
noise_power = power_in_signal/SNR
noise_voltage = math.sqrt(noise_power)
+ # With new interface, sps does not get set by default, but
+ # in the loopback, we don't recalculate it; so just force it here
+ if(options.samples_per_symbol == None):
+ options.samples_per_symbol = 2
+
self.txpath = transmit_path(mod_class, options)
self.throttle = gr.throttle(gr.sizeof_gr_complex, options.sample_rate)
self.rxpath = receive_path(demod_class, rx_callback, options)
diff --git a/gnuradio-examples/python/digital/benchmark_qt_loopback.py b/gnuradio-examples/python/digital/benchmark_qt_loopback.py
index 35cc2e376..0ae0e4e51 100755
--- a/gnuradio-examples/python/digital/benchmark_qt_loopback.py
+++ b/gnuradio-examples/python/digital/benchmark_qt_loopback.py
@@ -167,7 +167,10 @@ class dialog_box(QtGui.QMainWindow):
# Pull these globals in from the main thread
global n_rcvd, n_right, pktno
- per = float(n_rcvd - n_right)/float(pktno)
+ if(pktno > 0):
+ per = float(n_rcvd - n_right)/float(pktno)
+ else:
+ per = 0
self.gui.pktsRcvdEdit.setText(QtCore.QString("%1").arg(n_rcvd))
self.gui.pktsCorrectEdit.setText(QtCore.QString("%1").arg(n_right))
self.gui.perEdit.setText(QtCore.QString("%1").arg(per))
@@ -186,6 +189,9 @@ class my_top_block(gr.top_block):
self._sample_rate = options.sample_rate
+ if(options.samples_per_symbol is None):
+ options.samples_per_symbol = 2
+
channelon = True;
self.gui_on = options.gui
@@ -202,7 +208,7 @@ class my_top_block(gr.top_block):
self.rxpath = receive_path(demod_class, rx_callback, options)
# FIXME: do better exposure to lower issues for control
- self._timing_gain_alpha = self.rxpath.packet_receiver._demodulator._timing_alpha
+ self._timing_gain_alpha = self.rxpath.packet_receiver._demodulator._mm_gain_mu
self._alpha = self.rxpath.packet_receiver._demodulator._costas_alpha
if channelon:
@@ -229,10 +235,10 @@ class my_top_block(gr.top_block):
fftsize = 2048
self.snk_tx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
- 0, 1,
+ 0, self._sample_rate,
"Tx", True, True, False, True, True)
self.snk_rx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
- 0, 1,
+ 0, self._sample_rate,
"Rx", True, True, False, True, True)
self.snk_tx.set_frequency_axis(-80, 0)
@@ -240,14 +246,11 @@ class my_top_block(gr.top_block):
# Connect to the QT sinks
# FIXME: make better exposure to receiver from rxpath
- self.freq_recov = self.rxpath.packet_receiver._demodulator.clock_recov
- self.time_recov = self.rxpath.packet_receiver._demodulator.time_recov
- self.freq_recov.set_alpha(0)
- self.freq_recov.set_beta(0)
- self.time_recov.set_alpha(2)
- self.time_recov.set_beta(0.02)
+ self.receiver = self.rxpath.packet_receiver._demodulator.receiver
+ self.receiver.set_alpha(2)
+ self.receiver.set_beta(0.02)
self.connect(self.channel, self.snk_tx)
- self.connect(self.time_recov, self.snk_rx)
+ self.connect(self.receiver, self.snk_rx)
pyTxQt = self.snk_tx.pyqwidget()
pyTx = sip.wrapinstance(pyTxQt, QtGui.QWidget)
@@ -312,7 +315,7 @@ class my_top_block(gr.top_block):
def set_rx_timing_gain_alpha(self, gain):
self._timing_gain_alpha = gain
- self.time_recov.set_gain(self._timing_gain_alpha)
+ self.receiver.set_gain_mu(self._timing_gain_alpha)
def rx_alpha(self):
return self._alpha
@@ -323,8 +326,8 @@ class my_top_block(gr.top_block):
def set_rx_alpha(self, alpha):
self._alpha = alpha
self.beta = .25 * self._alpha * self._alpha
- #self.freq_recov.set_alpha(self._alpha)
- #self.freq_recov.set_beta(self.beta)
+ self.receiver.set_alpha(self._alpha)
+ self.receiver.set_beta(self.beta)
diff --git a/gnuradio-examples/python/digital/benchmark_qt_loopback2.py b/gnuradio-examples/python/digital/benchmark_qt_loopback2.py
index 1cb95198e..02ae4b25f 100755
--- a/gnuradio-examples/python/digital/benchmark_qt_loopback2.py
+++ b/gnuradio-examples/python/digital/benchmark_qt_loopback2.py
@@ -1,6 +1,26 @@
#!/usr/bin/env python
-
-from gnuradio import gr, gru, modulation_utils
+#
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gru, modulation_utils2
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from optparse import OptionParser
@@ -223,13 +243,18 @@ class my_top_block(gr.top_block):
self._noise_voltage = self.get_noise_voltage(self._snr_dB)
+ # With new interface, sps does not get set by default, but
+ # in the loopback, we don't recalculate it; so just force it here
+ if(options.samples_per_symbol == None):
+ options.samples_per_symbol = 2
+
self.txpath = transmit_path(mod_class, options)
self.throttle = gr.throttle(gr.sizeof_gr_complex, self.sample_rate())
self.rxpath = receive_path(demod_class, rx_callback, options)
# FIXME: do better exposure to lower issues for control
self._gain_clock = self.rxpath.packet_receiver._demodulator._timing_alpha
- self._gain_phase = self.rxpath.packet_receiver._demodulator._costas_alpha
+ self._gain_phase = self.rxpath.packet_receiver._demodulator._phase_alpha
self._gain_freq = self.rxpath.packet_receiver._demodulator._freq_alpha
if channelon:
@@ -269,6 +294,7 @@ class my_top_block(gr.top_block):
self.phase_recov = self.rxpath.packet_receiver._demodulator.phase_recov
self.time_recov = self.rxpath.packet_receiver._demodulator.time_recov
self.freq_recov.set_alpha(self._gain_freq)
+ self.freq_recov.set_beta(self._gain_freq/10.0)
self.phase_recov.set_alpha(self._gain_phase)
self.phase_recov.set_beta(0.25*self._gain_phase*self._gain_phase)
self.time_recov.set_alpha(self._gain_clock)
@@ -367,6 +393,7 @@ class my_top_block(gr.top_block):
self._gain_freq = gain_freq
#self._gain_freq_beta = .25 * self._gain_freq * self._gain_freq
self.rxpath.packet_receiver._demodulator.freq_recov.set_alpha(self._gain_freq)
+ self.rxpath.packet_receiver._demodulator.freq_recov.set_beta(self._gain_freq/10.0)
#self.rxpath.packet_receiver._demodulator.freq_recov.set_beta(self._gain_fre_beta)
@@ -431,15 +458,15 @@ def main():
def send_pkt(payload='', eof=False):
return tb.txpath.send_pkt(payload, eof)
- mods = modulation_utils.type_1_mods()
- demods = modulation_utils.type_1_demods()
+ mods = modulation_utils2.type_1_mods()
+ demods = modulation_utils2.type_1_demods()
parser = OptionParser(option_class=eng_option, conflict_handler="resolve")
expert_grp = parser.add_option_group("Expert")
channel_grp = parser.add_option_group("Channel")
parser.add_option("-m", "--modulation", type="choice", choices=mods.keys(),
- default='dbpsk',
+ default='dbpsk2',
help="Select modulation from: %s [default=%%default]"
% (', '.join(mods.keys()),))
diff --git a/gnuradio-examples/python/digital/benchmark_qt_rx2.py b/gnuradio-examples/python/digital/benchmark_qt_rx2.py
index cabbecb6f..0c37f4c6a 100755
--- a/gnuradio-examples/python/digital/benchmark_qt_rx2.py
+++ b/gnuradio-examples/python/digital/benchmark_qt_rx2.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2005,2006,2007,2009 Free Software Foundation, Inc.
+# Copyright 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gru, modulation_utils
+from gnuradio import gr, gru, modulation_utils2
from gnuradio import usrp
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
@@ -33,7 +33,7 @@ import sys
# from current dir
from receive_path import receive_path
-from pick_bitrate import pick_rx_bitrate
+from pick_bitrate2 import pick_rx_bitrate
try:
from gnuradio.qtgui import qtgui
@@ -219,7 +219,7 @@ class my_top_block(gr.top_block):
# FIXME: do better exposure to lower issues for control
self._gain_clock = self.rxpath.packet_receiver._demodulator._timing_alpha
- self._gain_phase = self.rxpath.packet_receiver._demodulator._costas_alpha
+ self._gain_phase = self.rxpath.packet_receiver._demodulator._phase_alpha
self._gain_freq = self.rxpath.packet_receiver._demodulator._freq_alpha
self.connect(self.u, self.rxpath)
@@ -242,8 +242,8 @@ class my_top_block(gr.top_block):
# Connect to the QT sinks
# FIXME: make better exposure to receiver from rxpath
- #self.receiver = self.rxpath.packet_receiver._demodulator.phase_recov
- self.receiver = self.rxpath.packet_receiver._demodulator.freq_recov
+ self.receiver = self.rxpath.packet_receiver._demodulator.phase_recov
+ #self.receiver = self.rxpath.packet_receiver._demodulator.freq_recov
self.connect(self.u, self.snk_rxin)
self.connect(self.receiver, self.snk_rx)
@@ -267,9 +267,9 @@ class my_top_block(gr.top_block):
self.u.set_decim(self._decim)
(self._bitrate, self._samples_per_symbol, self._decim) = \
- pick_rx_bitrate(self._bitrate, self._demod_class.bits_per_symbol(), \
- self._samples_per_symbol, self._decim, adc_rate, \
- self.u.get_decim_rates())
+ pick_rx_bitrate(options.bitrate, self._demod_class.bits_per_symbol(), \
+ options.samples_per_symbol, options.decim, \
+ adc_rate, self.u.get_decim_rates())
self.u.set_decim(self._decim)
self.set_auto_tr(True) # enable Auto Transmit/Receive switching
@@ -353,6 +353,7 @@ class my_top_block(gr.top_block):
self._gain_freq = gain_freq
#self._gain_freq_beta = .25 * self._gain_freq * self._gain_freq
self.rxpath.packet_receiver._demodulator.freq_recov.set_alpha(self._gain_freq)
+ self.rxpath.packet_receiver._demodulator.freq_recov.set_beta(self._gain_freq/10.0)
#self.rxpath.packet_receiver._demodulator.freq_recov.set_beta(self._gain_fre_beta)
@@ -423,14 +424,14 @@ def main():
ok, pktno, n_rcvd, n_right)
- demods = modulation_utils.type_1_demods()
+ demods = modulation_utils2.type_1_demods()
# Create Options Parser:
parser = OptionParser (option_class=eng_option, conflict_handler="resolve")
expert_grp = parser.add_option_group("Expert")
parser.add_option("-m", "--modulation", type="choice", choices=demods.keys(),
- default='dbpsk',
+ default='dbpsk2',
help="Select modulation from: %s [default=%%default]"
% (', '.join(demods.keys()),))
diff --git a/gnuradio-examples/python/digital/benchmark_rx2.py b/gnuradio-examples/python/digital/benchmark_rx2.py
new file mode 100755
index 000000000..fe422be83
--- /dev/null
+++ b/gnuradio-examples/python/digital/benchmark_rx2.py
@@ -0,0 +1,114 @@
+#!/usr/bin/env python
+#
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gru, modulation_utils2
+from gnuradio import usrp
+from gnuradio import eng_notation
+from gnuradio.eng_option import eng_option
+from optparse import OptionParser
+
+import random
+import struct
+import sys
+
+# from current dir
+import usrp_receive_path2
+
+#import os
+#print os.getpid()
+#raw_input('Attach and press enter: ')
+
+class my_top_block(gr.top_block):
+ def __init__(self, demodulator, rx_callback, options):
+ gr.top_block.__init__(self)
+
+ # Set up receive path
+ self.rxpath = usrp_receive_path2.usrp_receive_path(demodulator, rx_callback, options)
+
+ self.connect(self.rxpath)
+
+# /////////////////////////////////////////////////////////////////////////////
+# main
+# /////////////////////////////////////////////////////////////////////////////
+
+global n_rcvd, n_right
+
+def main():
+ global n_rcvd, n_right
+
+ n_rcvd = 0
+ n_right = 0
+
+ def rx_callback(ok, payload):
+ global n_rcvd, n_right
+ (pktno,) = struct.unpack('!H', payload[0:2])
+ n_rcvd += 1
+ if ok:
+ n_right += 1
+
+ print "ok = %5s pktno = %4d n_rcvd = %4d n_right = %4d" % (
+ ok, pktno, n_rcvd, n_right)
+
+
+ demods = modulation_utils2.type_1_demods()
+
+ # Create Options Parser:
+ parser = OptionParser (option_class=eng_option, conflict_handler="resolve")
+ expert_grp = parser.add_option_group("Expert")
+
+ parser.add_option("-m", "--modulation", type="choice", choices=demods.keys(),
+ default='dbpsk2',
+ help="Select modulation from: %s [default=%%default]"
+ % (', '.join(demods.keys()),))
+
+ usrp_receive_path2.add_options(parser, expert_grp)
+
+ for mod in demods.values():
+ mod.add_options(expert_grp)
+
+ (options, args) = parser.parse_args ()
+
+ if len(args) != 0:
+ parser.print_help(sys.stderr)
+ sys.exit(1)
+
+ if options.rx_freq is None:
+ sys.stderr.write("You must specify -f FREQ or --freq FREQ\n")
+ parser.print_help(sys.stderr)
+ sys.exit(1)
+
+
+ # build the graph
+ tb = my_top_block(demods[options.modulation], rx_callback, options)
+
+ r = gr.enable_realtime_scheduling()
+ if r != gr.RT_OK:
+ print "Warning: Failed to enable realtime scheduling."
+
+ tb.start() # start flow graph
+ tb.wait() # wait for it to finish
+
+if __name__ == '__main__':
+ try:
+ main()
+ except KeyboardInterrupt:
+ pass
diff --git a/gnuradio-examples/python/digital/benchmark_tx2.py b/gnuradio-examples/python/digital/benchmark_tx2.py
new file mode 100755
index 000000000..6093dba61
--- /dev/null
+++ b/gnuradio-examples/python/digital/benchmark_tx2.py
@@ -0,0 +1,135 @@
+#!/usr/bin/env python
+#
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gru, modulation_utils2
+from gnuradio import usrp
+from gnuradio import eng_notation
+from gnuradio.eng_option import eng_option
+from optparse import OptionParser
+
+import random, time, struct, sys
+
+# from current dir
+import usrp_transmit_path2
+
+#import os
+#print os.getpid()
+#raw_input('Attach and press enter')
+
+class my_top_block(gr.top_block):
+ def __init__(self, modulator, options):
+ gr.top_block.__init__(self)
+
+ self.txpath = usrp_transmit_path2.usrp_transmit_path(modulator, options)
+
+ self.connect(self.txpath)
+
+# /////////////////////////////////////////////////////////////////////////////
+# main
+# /////////////////////////////////////////////////////////////////////////////
+
+def main():
+
+ def send_pkt(payload='', eof=False):
+ return tb.txpath.send_pkt(payload, eof)
+
+ def rx_callback(ok, payload):
+ print "ok = %r, payload = '%s'" % (ok, payload)
+
+ mods = modulation_utils2.type_1_mods()
+
+ parser = OptionParser(option_class=eng_option, conflict_handler="resolve")
+ expert_grp = parser.add_option_group("Expert")
+
+ parser.add_option("-m", "--modulation", type="choice", choices=mods.keys(),
+ default='dbpsk2',
+ help="Select modulation from: %s [default=%%default]"
+ % (', '.join(mods.keys()),))
+
+ parser.add_option("-s", "--size", type="eng_float", default=1500,
+ help="set packet size [default=%default]")
+ parser.add_option("-M", "--megabytes", type="eng_float", default=1.0,
+ help="set megabytes to transmit [default=%default]")
+ parser.add_option("","--discontinuous", action="store_true", default=False,
+ help="enable discontinous transmission (bursts of 5 packets)")
+ parser.add_option("","--from-file", default=None,
+ help="use file for packet contents")
+
+ usrp_transmit_path2.add_options(parser, expert_grp)
+
+ for mod in mods.values():
+ mod.add_options(expert_grp)
+
+ (options, args) = parser.parse_args ()
+
+ if len(args) != 0:
+ parser.print_help()
+ sys.exit(1)
+
+ if options.tx_freq is None:
+ sys.stderr.write("You must specify -f FREQ or --freq FREQ\n")
+ parser.print_help(sys.stderr)
+ sys.exit(1)
+
+ if options.from_file is not None:
+ source_file = open(options.from_file, 'r')
+
+ # build the graph
+ tb = my_top_block(mods[options.modulation], options)
+
+ r = gr.enable_realtime_scheduling()
+ if r != gr.RT_OK:
+ print "Warning: failed to enable realtime scheduling"
+
+ tb.start() # start flow graph
+
+ # generate and send packets
+ nbytes = int(1e6 * options.megabytes)
+ n = 0
+ pktno = 0
+ pkt_size = int(options.size)
+
+ while n < nbytes:
+ if options.from_file is None:
+ data = (pkt_size - 2) * chr(pktno & 0xff)
+ else:
+ data = source_file.read(pkt_size - 2)
+ if data == '':
+ break;
+
+ payload = struct.pack('!H', pktno & 0xffff) + data
+ send_pkt(payload)
+ n += len(payload)
+ sys.stderr.write('.')
+ if options.discontinuous and pktno % 5 == 4:
+ time.sleep(1)
+ pktno += 1
+
+ send_pkt(eof=True)
+
+ tb.wait() # wait for it to finish
+
+if __name__ == '__main__':
+ try:
+ main()
+ except KeyboardInterrupt:
+ pass
diff --git a/gnuradio-examples/python/digital/pick_bitrate2.py b/gnuradio-examples/python/digital/pick_bitrate2.py
new file mode 100644
index 000000000..92539560c
--- /dev/null
+++ b/gnuradio-examples/python/digital/pick_bitrate2.py
@@ -0,0 +1,154 @@
+#
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import eng_notation
+
+_default_bitrate = 500e3
+_sps_min = 2
+_sps_max = 100
+
+def _pick_bitrate(bitrate, bits_per_symbol, samples_per_symbol,
+ xrate, converter_rate, xrates):
+ """
+ @returns tuple (bitrate, samples_per_symbol, interp_rate_or_decim_rate)
+ """
+
+ if not isinstance(bits_per_symbol, int) or bits_per_symbol < 1:
+ raise ValueError, "bits_per_symbol must be an int >= 1"
+
+ converter_rate = float(converter_rate)
+ bits_per_symbol = float(bits_per_symbol)
+
+ # completely determined; if bitrate is specified, this overwrites it
+ if (samples_per_symbol is not None) and (xrate is not None):
+ bitrate = converter_rate / bits_per_symbol / xrate / samples_per_symbol
+
+ # If only SPS is given
+ if (bitrate is None) and (samples_per_symbol is not None) and (xrate is None):
+ xrate = max(xrates)
+ bitrate = converter_rate / bits_per_symbol / xrate / samples_per_symbol
+
+ # If only xrate is given, just set SPS to 2 and calculate bitrate
+ if (bitrate is None) and (samples_per_symbol is None) and (xrate is not None):
+ samples_per_symbol = 2.0
+ bitrate = converter_rate / bits_per_symbol / xrate / samples_per_symbol
+
+ # If no parameters are give, use the default bit rate
+ if (bitrate is None) and (samples_per_symbol is None) and (xrate is None):
+ bitrate = _default_bitrate
+
+ # If only bitrate is specified, return max xrate and appropriate
+ # samples per symbol (minimum of 2.0) to reach bit rate
+ if (samples_per_symbol is None) and (xrate is None):
+ xrates.sort()
+ for i in xrange(len(xrates)):
+ if((converter_rate / bits_per_symbol / xrates[i]) >= 2*bitrate):
+ rate = xrates[i]
+ else:
+ break
+
+ try:
+ xrate = rate
+ except UnboundLocalError:
+ raise ValueError("Requested bitrate out of bounds")
+
+ samples_per_symbol = converter_rate / bits_per_symbol / rate / bitrate
+ bitrate = converter_rate / bits_per_symbol / xrate / samples_per_symbol
+
+ # If bitrate and xrate are specified
+ if(samples_per_symbol is None):
+ samples_per_symbol = converter_rate / xrate / bits_per_symbol / bitrate
+
+ # If bitrate and SPS are specified
+ if(xrate is None):
+ xrate = converter_rate / samples_per_symbol / bits_per_symbol / bitrate
+ if((xrate in xrates) == False):
+ # Find the closest avaiable rate larger than the calculated one
+ xrates.sort()
+ for x in xrates:
+ if(x > xrate):
+ xrate = x
+ break
+ if(xrate > max(xrates)):
+ xrate = max(xrates)
+
+ bitrate = converter_rate / bits_per_symbol / xrate / samples_per_symbol
+ print "Could not find suitable rate for specified SPS and Bitrate"
+ print "Using rate = %d for bitrate of %sbps" % \
+ (xrate, (eng_notation.num_to_str(bitrate)))
+
+ if((xrate in xrates) == False):
+ raise ValueError(("Invalid rate (rate = %d)" % xrate))
+ if((samples_per_symbol < _sps_min) or (samples_per_symbol > _sps_max)):
+ raise ValueError(("Invalid samples per symbol (sps = %.2f). Must be in [%.0f, %.0f]." \
+ % (samples_per_symbol, _sps_min, _sps_max)))
+
+ return (bitrate, samples_per_symbol, int(xrate))
+
+
+def pick_tx_bitrate(bitrate, bits_per_symbol, samples_per_symbol,
+ interp_rate, converter_rate, possible_interps):
+ """
+ Given the 4 input parameters, return at configuration that matches
+
+ @param bitrate: desired bitrate or None
+ @type bitrate: number or None
+ @param bits_per_symbol: E.g., BPSK -> 1, QPSK -> 2, 8-PSK -> 3
+ @type bits_per_symbol: integer >= 1
+ @param samples_per_symbol: samples/baud (aka samples/symbol)
+ @type samples_per_symbol: number or None
+ @param interp_rate: USRP interpolation factor
+ @type interp_rate: integer or None
+ @param converter_rate: converter sample rate in Hz
+ @type converter_rate: number
+ @param possible_interps: a list of possible rates
+ @type possible_interps: a list of integers
+
+ @returns tuple (bitrate, samples_per_symbol, interp_rate)
+ """
+
+ return _pick_bitrate(bitrate, bits_per_symbol, samples_per_symbol,
+ interp_rate, converter_rate, possible_interps)
+
+
+def pick_rx_bitrate(bitrate, bits_per_symbol, samples_per_symbol,
+ decim_rate, converter_rate, possible_decims):
+ """
+ Given the 4 input parameters, return at configuration that matches
+
+ @param bitrate: desired bitrate or None
+ @type bitrate: number or None
+ @param bits_per_symbol: E.g., BPSK -> 1, QPSK -> 2, 8-PSK -> 3
+ @type bits_per_symbol: integer >= 1
+ @param samples_per_symbol: samples/baud (aka samples/symbol)
+ @type samples_per_symbol: number or None
+ @param decim_rate: USRP decimation factor
+ @type decim_rate: integer or None
+ @param converter_rate: converter sample rate in Hz
+ @type converter_rate: number
+ @param possible_decims: a list of possible rates
+ @type possible_decims: a list of integers
+
+ @returns tuple (bitrate, samples_per_symbol, decim_rate)
+ """
+
+ return _pick_bitrate(bitrate, bits_per_symbol, samples_per_symbol,
+ decim_rate, converter_rate, possible_decims)
diff --git a/gnuradio-examples/python/digital/qt_digital_window.py b/gnuradio-examples/python/digital/qt_digital_window.py
index 6e0f25212..b47ed0c2b 100644
--- a/gnuradio-examples/python/digital/qt_digital_window.py
+++ b/gnuradio-examples/python/digital/qt_digital_window.py
@@ -2,8 +2,8 @@
# Form implementation generated from reading ui file 'qt_digital_window.ui'
#
-# Created: Tue Oct 6 11:27:37 2009
-# by: PyQt4 UI code generator 4.4.4
+# Created: Tue May 11 20:58:35 2010
+# by: PyQt4 UI code generator 4.6.1
#
# WARNING! All changes made in this file will be lost!
@@ -12,63 +12,58 @@ from PyQt4 import QtCore, QtGui
class Ui_DigitalWindow(object):
def setupUi(self, DigitalWindow):
DigitalWindow.setObjectName("DigitalWindow")
- DigitalWindow.resize(1019, 754)
+ DigitalWindow.resize(1059, 754)
self.centralwidget = QtGui.QWidget(DigitalWindow)
self.centralwidget.setObjectName("centralwidget")
- self.gridLayout = QtGui.QGridLayout(self.centralwidget)
- self.gridLayout.setObjectName("gridLayout")
- self.verticalLayout_3 = QtGui.QVBoxLayout()
- self.verticalLayout_3.setObjectName("verticalLayout_3")
- self.rxBox = QtGui.QGroupBox(self.centralwidget)
+ self.verticalLayout_4 = QtGui.QVBoxLayout(self.centralwidget)
+ self.verticalLayout_4.setObjectName("verticalLayout_4")
+ self.sinkLayout = QtGui.QHBoxLayout()
+ self.sinkLayout.setObjectName("sinkLayout")
+ self.verticalLayout_4.addLayout(self.sinkLayout)
+ self.horizontalLayout = QtGui.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ self.verticalLayout_2 = QtGui.QVBoxLayout()
+ self.verticalLayout_2.setObjectName("verticalLayout_2")
+ self.sysBox = QtGui.QGroupBox(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.rxBox.sizePolicy().hasHeightForWidth())
- self.rxBox.setSizePolicy(sizePolicy)
- self.rxBox.setMinimumSize(QtCore.QSize(180, 90))
- self.rxBox.setMaximumSize(QtCore.QSize(180, 16777215))
- self.rxBox.setObjectName("rxBox")
- self.formLayoutWidget_3 = QtGui.QWidget(self.rxBox)
- self.formLayoutWidget_3.setGeometry(QtCore.QRect(10, 20, 141, 61))
- self.formLayoutWidget_3.setObjectName("formLayoutWidget_3")
- self.formLayout_3 = QtGui.QFormLayout(self.formLayoutWidget_3)
- self.formLayout_3.setSizeConstraint(QtGui.QLayout.SetFixedSize)
- self.formLayout_3.setObjectName("formLayout_3")
- self.gainMuLabel = QtGui.QLabel(self.formLayoutWidget_3)
- self.gainMuLabel.setObjectName("gainMuLabel")
- self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.gainMuLabel)
- self.alphaLabel = QtGui.QLabel(self.formLayoutWidget_3)
- self.alphaLabel.setObjectName("alphaLabel")
- self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.alphaLabel)
- self.gainMuEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
- self.gainMuEdit.setMinimumSize(QtCore.QSize(60, 0))
- self.gainMuEdit.setMaximumSize(QtCore.QSize(80, 16777215))
- self.gainMuEdit.setObjectName("gainMuEdit")
- self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.gainMuEdit)
- self.alphaEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
- self.alphaEdit.setMinimumSize(QtCore.QSize(60, 0))
- self.alphaEdit.setMaximumSize(QtCore.QSize(80, 16777215))
- self.alphaEdit.setObjectName("alphaEdit")
- self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.alphaEdit)
- self.verticalLayout_3.addWidget(self.rxBox)
- spacerItem = QtGui.QSpacerItem(20, 30, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.verticalLayout_3.addItem(spacerItem)
- self.gridLayout.addLayout(self.verticalLayout_3, 2, 2, 1, 1)
- self.verticalLayout = QtGui.QVBoxLayout()
- self.verticalLayout.setObjectName("verticalLayout")
- self.pauseButton = QtGui.QPushButton(self.centralwidget)
- self.pauseButton.setMinimumSize(QtCore.QSize(80, 0))
- self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215))
- self.pauseButton.setObjectName("pauseButton")
- self.verticalLayout.addWidget(self.pauseButton)
- spacerItem1 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.verticalLayout.addItem(spacerItem1)
- self.closeButton = QtGui.QPushButton(self.centralwidget)
- self.closeButton.setMinimumSize(QtCore.QSize(80, 0))
- self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215))
- self.closeButton.setObjectName("closeButton")
- self.verticalLayout.addWidget(self.closeButton)
- self.gridLayout.addLayout(self.verticalLayout, 2, 5, 1, 1)
+ sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth())
+ self.sysBox.setSizePolicy(sizePolicy)
+ self.sysBox.setMinimumSize(QtCore.QSize(240, 60))
+ self.sysBox.setMaximumSize(QtCore.QSize(240, 16777215))
+ self.sysBox.setObjectName("sysBox")
+ self.formLayoutWidget = QtGui.QWidget(self.sysBox)
+ self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 211, 31))
+ self.formLayoutWidget.setObjectName("formLayoutWidget")
+ self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
+ self.formLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
+ self.formLayout.setVerticalSpacing(20)
+ self.formLayout.setObjectName("formLayout")
+ self.sampleRateEdit = QtGui.QLineEdit(self.formLayoutWidget)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.sampleRateEdit.sizePolicy().hasHeightForWidth())
+ self.sampleRateEdit.setSizePolicy(sizePolicy)
+ self.sampleRateEdit.setMinimumSize(QtCore.QSize(60, 26))
+ self.sampleRateEdit.setMaximumSize(QtCore.QSize(80, 26))
+ self.sampleRateEdit.setObjectName("sampleRateEdit")
+ self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateEdit)
+ self.sampleRateLabel = QtGui.QLabel(self.formLayoutWidget)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.sampleRateLabel.sizePolicy().hasHeightForWidth())
+ self.sampleRateLabel.setSizePolicy(sizePolicy)
+ self.sampleRateLabel.setMinimumSize(QtCore.QSize(0, 20))
+ self.sampleRateLabel.setMaximumSize(QtCore.QSize(16777215, 20))
+ self.sampleRateLabel.setObjectName("sampleRateLabel")
+ self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel)
+ self.verticalLayout_2.addWidget(self.sysBox)
+ spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ self.verticalLayout_2.addItem(spacerItem)
+ self.horizontalLayout.addLayout(self.verticalLayout_2)
self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@@ -109,49 +104,39 @@ class Ui_DigitalWindow(object):
self.timeEdit.setMaximumSize(QtCore.QSize(80, 16777215))
self.timeEdit.setObjectName("timeEdit")
self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, self.timeEdit)
- self.gridLayout.addWidget(self.channelModeBox, 2, 1, 1, 1)
- self.verticalLayout_2 = QtGui.QVBoxLayout()
- self.verticalLayout_2.setObjectName("verticalLayout_2")
- self.sysBox = QtGui.QGroupBox(self.centralwidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth())
- self.sysBox.setSizePolicy(sizePolicy)
- self.sysBox.setMinimumSize(QtCore.QSize(240, 60))
- self.sysBox.setMaximumSize(QtCore.QSize(240, 16777215))
- self.sysBox.setObjectName("sysBox")
- self.formLayoutWidget = QtGui.QWidget(self.sysBox)
- self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 211, 31))
- self.formLayoutWidget.setObjectName("formLayoutWidget")
- self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
- self.formLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
- self.formLayout.setVerticalSpacing(20)
- self.formLayout.setObjectName("formLayout")
- self.sampleRateEdit = QtGui.QLineEdit(self.formLayoutWidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.sampleRateEdit.sizePolicy().hasHeightForWidth())
- self.sampleRateEdit.setSizePolicy(sizePolicy)
- self.sampleRateEdit.setMinimumSize(QtCore.QSize(60, 26))
- self.sampleRateEdit.setMaximumSize(QtCore.QSize(80, 26))
- self.sampleRateEdit.setObjectName("sampleRateEdit")
- self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateEdit)
- self.sampleRateLabel = QtGui.QLabel(self.formLayoutWidget)
+ self.horizontalLayout.addWidget(self.channelModeBox)
+ self.rxBox = QtGui.QGroupBox(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.sampleRateLabel.sizePolicy().hasHeightForWidth())
- self.sampleRateLabel.setSizePolicy(sizePolicy)
- self.sampleRateLabel.setMinimumSize(QtCore.QSize(0, 20))
- self.sampleRateLabel.setMaximumSize(QtCore.QSize(16777215, 20))
- self.sampleRateLabel.setObjectName("sampleRateLabel")
- self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel)
- self.verticalLayout_2.addWidget(self.sysBox)
- spacerItem2 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.verticalLayout_2.addItem(spacerItem2)
- self.gridLayout.addLayout(self.verticalLayout_2, 2, 0, 1, 1)
+ sizePolicy.setHeightForWidth(self.rxBox.sizePolicy().hasHeightForWidth())
+ self.rxBox.setSizePolicy(sizePolicy)
+ self.rxBox.setMinimumSize(QtCore.QSize(220, 130))
+ self.rxBox.setMaximumSize(QtCore.QSize(180, 16777215))
+ self.rxBox.setObjectName("rxBox")
+ self.formLayoutWidget_3 = QtGui.QWidget(self.rxBox)
+ self.formLayoutWidget_3.setGeometry(QtCore.QRect(10, 20, 201, 101))
+ self.formLayoutWidget_3.setObjectName("formLayoutWidget_3")
+ self.formLayout_3 = QtGui.QFormLayout(self.formLayoutWidget_3)
+ self.formLayout_3.setSizeConstraint(QtGui.QLayout.SetFixedSize)
+ self.formLayout_3.setObjectName("formLayout_3")
+ self.gainMuLabel = QtGui.QLabel(self.formLayoutWidget_3)
+ self.gainMuLabel.setObjectName("gainMuLabel")
+ self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.gainMuLabel)
+ self.alphaLabel = QtGui.QLabel(self.formLayoutWidget_3)
+ self.alphaLabel.setObjectName("alphaLabel")
+ self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.alphaLabel)
+ self.gainMuEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+ self.gainMuEdit.setMinimumSize(QtCore.QSize(60, 0))
+ self.gainMuEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.gainMuEdit.setObjectName("gainMuEdit")
+ self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.gainMuEdit)
+ self.alphaEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+ self.alphaEdit.setMinimumSize(QtCore.QSize(60, 0))
+ self.alphaEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.alphaEdit.setObjectName("alphaEdit")
+ self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.alphaEdit)
+ self.horizontalLayout.addWidget(self.rxBox)
self.rxBox_2 = QtGui.QGroupBox(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@@ -162,7 +147,7 @@ class Ui_DigitalWindow(object):
self.rxBox_2.setMaximumSize(QtCore.QSize(265, 125))
self.rxBox_2.setObjectName("rxBox_2")
self.formLayoutWidget_4 = QtGui.QWidget(self.rxBox_2)
- self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 181, 92))
+ self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 201, 91))
self.formLayoutWidget_4.setObjectName("formLayoutWidget_4")
self.formLayout_4 = QtGui.QFormLayout(self.formLayoutWidget_4)
self.formLayout_4.setSizeConstraint(QtGui.QLayout.SetFixedSize)
@@ -191,31 +176,28 @@ class Ui_DigitalWindow(object):
self.perEdit.setMaximumSize(QtCore.QSize(80, 16777215))
self.perEdit.setObjectName("perEdit")
self.formLayout_4.setWidget(2, QtGui.QFormLayout.FieldRole, self.perEdit)
- self.gridLayout.addWidget(self.rxBox_2, 2, 3, 1, 1)
- spacerItem3 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.gridLayout.addItem(spacerItem3, 2, 4, 1, 1)
- self.verticalLayout_5 = QtGui.QVBoxLayout()
- self.verticalLayout_5.setObjectName("verticalLayout_5")
- self.sinkFrame = QtGui.QFrame(self.centralwidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth())
- self.sinkFrame.setSizePolicy(sizePolicy)
- self.sinkFrame.setMinimumSize(QtCore.QSize(500, 550))
- self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
- self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
- self.sinkFrame.setObjectName("sinkFrame")
- self.gridLayout_2 = QtGui.QGridLayout(self.sinkFrame)
- self.gridLayout_2.setObjectName("gridLayout_2")
- self.sinkLayout = QtGui.QHBoxLayout()
- self.sinkLayout.setObjectName("sinkLayout")
- self.gridLayout_2.addLayout(self.sinkLayout, 1, 0, 1, 1)
- self.verticalLayout_5.addWidget(self.sinkFrame)
- self.gridLayout.addLayout(self.verticalLayout_5, 0, 0, 1, 6)
+ self.horizontalLayout.addWidget(self.rxBox_2)
+ spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.horizontalLayout.addItem(spacerItem1)
+ self.verticalLayout = QtGui.QVBoxLayout()
+ self.verticalLayout.setObjectName("verticalLayout")
+ self.pauseButton = QtGui.QPushButton(self.centralwidget)
+ self.pauseButton.setMinimumSize(QtCore.QSize(80, 0))
+ self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.pauseButton.setObjectName("pauseButton")
+ self.verticalLayout.addWidget(self.pauseButton)
+ spacerItem2 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ self.verticalLayout.addItem(spacerItem2)
+ self.closeButton = QtGui.QPushButton(self.centralwidget)
+ self.closeButton.setMinimumSize(QtCore.QSize(80, 0))
+ self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.closeButton.setObjectName("closeButton")
+ self.verticalLayout.addWidget(self.closeButton)
+ self.horizontalLayout.addLayout(self.verticalLayout)
+ self.verticalLayout_4.addLayout(self.horizontalLayout)
DigitalWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(DigitalWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1019, 25))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1059, 23))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
@@ -237,21 +219,21 @@ class Ui_DigitalWindow(object):
def retranslateUi(self, DigitalWindow):
DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
- self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
- self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8))
- self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", None, QtGui.QApplication.UnicodeUTF8))
- self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
- self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8))
+ self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8))
+ self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8))
self.channelModeBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtGui.QApplication.UnicodeUTF8))
self.snrLabel.setText(QtGui.QApplication.translate("DigitalWindow", "SNR (dB)", None, QtGui.QApplication.UnicodeUTF8))
self.freqLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Frequency Offset (Hz)", None, QtGui.QApplication.UnicodeUTF8))
self.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", None, QtGui.QApplication.UnicodeUTF8))
- self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8))
- self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8))
+ self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
+ self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8))
+ self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", None, QtGui.QApplication.UnicodeUTF8))
self.rxBox_2.setTitle(QtGui.QApplication.translate("DigitalWindow", "Received Packet Info", None, QtGui.QApplication.UnicodeUTF8))
self.pktsRcvdLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Rcvd.", None, QtGui.QApplication.UnicodeUTF8))
self.pktsCorrectLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Correct", None, QtGui.QApplication.UnicodeUTF8))
self.perLabel.setText(QtGui.QApplication.translate("DigitalWindow", "PER", None, QtGui.QApplication.UnicodeUTF8))
+ self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
+ self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8))
self.menuFile.setTitle(QtGui.QApplication.translate("DigitalWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
self.actionExit.setText(QtGui.QApplication.translate("DigitalWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8))
diff --git a/gnuradio-examples/python/digital/qt_digital_window.ui b/gnuradio-examples/python/digital/qt_digital_window.ui
index a0af196ed..4b3857d87 100644
--- a/gnuradio-examples/python/digital/qt_digital_window.ui
+++ b/gnuradio-examples/python/digital/qt_digital_window.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>1019</width>
+ <width>1059</width>
<height>754</height>
</rect>
</property>
@@ -14,11 +14,124 @@
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
- <layout class="QGridLayout" name="gridLayout">
- <item row="2" column="2">
- <layout class="QVBoxLayout" name="verticalLayout_3">
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <layout class="QHBoxLayout" name="sinkLayout"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QGroupBox" name="rxBox">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QGroupBox" name="sysBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>240</width>
+ <height>60</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>240</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>System Parameters</string>
+ </property>
+ <widget class="QWidget" name="formLayoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>211</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <layout class="QFormLayout" name="formLayout">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <property name="verticalSpacing">
+ <number>20</number>
+ </property>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="sampleRateEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>26</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>26</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="sampleRateLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Sample Rate (sps)</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>60</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="channelModeBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -27,48 +140,67 @@
</property>
<property name="minimumSize">
<size>
- <width>180</width>
- <height>90</height>
+ <width>245</width>
+ <height>130</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>180</width>
+ <width>245</width>
<height>16777215</height>
</size>
</property>
<property name="title">
- <string>Receiver Parameters</string>
+ <string>Channel Model Parameters</string>
</property>
- <widget class="QWidget" name="formLayoutWidget_3">
+ <widget class="QWidget" name="formLayoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
- <width>141</width>
- <height>61</height>
+ <width>221</width>
+ <height>98</height>
</rect>
</property>
- <layout class="QFormLayout" name="formLayout_3">
+ <layout class="QFormLayout" name="formLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
<item row="0" column="0">
- <widget class="QLabel" name="gainMuLabel">
+ <widget class="QLabel" name="snrLabel">
<property name="text">
- <string>Gain mu</string>
+ <string>SNR (dB)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="snrEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
</property>
</widget>
</item>
<item row="1" column="0">
- <widget class="QLabel" name="alphaLabel">
+ <widget class="QLabel" name="freqLabel">
<property name="text">
- <string>Alpha</string>
+ <string>Frequency Offset (Hz)</string>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="gainMuEdit">
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="freqEdit">
<property name="minimumSize">
<size>
<width>60</width>
@@ -83,8 +215,15 @@
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="alphaEdit">
+ <item row="2" column="0">
+ <widget class="QLabel" name="timeLabel">
+ <property name="text">
+ <string>Timing Offset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="timeEdit">
<property name="minimumSize">
<size>
<width>60</width>
@@ -101,200 +240,98 @@
</item>
</layout>
</widget>
+ <zorder>formLayoutWidget_2</zorder>
+ <zorder>sysBox</zorder>
</widget>
</item>
<item>
- <spacer name="verticalSpacer_4">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>30</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="2" column="5">
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QPushButton" name="pauseButton">
- <property name="minimumSize">
- <size>
- <width>80</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Pause</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>60</height>
- </size>
+ <widget class="QGroupBox" name="rxBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="closeButton">
<property name="minimumSize">
<size>
- <width>80</width>
- <height>0</height>
+ <width>220</width>
+ <height>130</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>80</width>
+ <width>180</width>
<height>16777215</height>
</size>
</property>
- <property name="text">
- <string>Close</string>
+ <property name="title">
+ <string>Receiver Parameters</string>
</property>
+ <widget class="QWidget" name="formLayoutWidget_3">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>201</width>
+ <height>101</height>
+ </rect>
+ </property>
+ <layout class="QFormLayout" name="formLayout_3">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="gainMuLabel">
+ <property name="text">
+ <string>Gain mu</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="alphaLabel">
+ <property name="text">
+ <string>Alpha</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="gainMuEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="alphaEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
- </layout>
- </item>
- <item row="2" column="1">
- <widget class="QGroupBox" name="channelModeBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>245</width>
- <height>130</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>245</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="title">
- <string>Channel Model Parameters</string>
- </property>
- <widget class="QWidget" name="formLayoutWidget_2">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>221</width>
- <height>98</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_2">
- <property name="sizeConstraint">
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="snrLabel">
- <property name="text">
- <string>SNR (dB)</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="snrEdit">
- <property name="minimumSize">
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="freqLabel">
- <property name="text">
- <string>Frequency Offset (Hz)</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="freqEdit">
- <property name="minimumSize">
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="timeLabel">
- <property name="text">
- <string>Timing Offset</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="timeEdit">
- <property name="minimumSize">
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item row="2" column="0">
- <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QGroupBox" name="sysBox">
+ <widget class="QGroupBox" name="rxBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -303,79 +340,98 @@
</property>
<property name="minimumSize">
<size>
- <width>240</width>
- <height>60</height>
+ <width>220</width>
+ <height>125</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>240</width>
- <height>16777215</height>
+ <width>265</width>
+ <height>125</height>
</size>
</property>
<property name="title">
- <string>System Parameters</string>
+ <string>Received Packet Info</string>
</property>
- <widget class="QWidget" name="formLayoutWidget">
+ <widget class="QWidget" name="formLayoutWidget_4">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
- <width>211</width>
- <height>31</height>
+ <width>201</width>
+ <height>91</height>
</rect>
</property>
- <layout class="QFormLayout" name="formLayout">
+ <layout class="QFormLayout" name="formLayout_4">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
- <property name="verticalSpacing">
- <number>20</number>
- </property>
- <item row="0" column="1">
- <widget class="QLineEdit" name="sampleRateEdit">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="0" column="0">
+ <widget class="QLabel" name="pktsRcvdLabel">
+ <property name="text">
+ <string>Packets Rcvd.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="pktsCorrectLabel">
+ <property name="text">
+ <string>Packets Correct</string>
</property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="perLabel">
+ <property name="text">
+ <string>PER</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="pktsRcvdEdit">
<property name="minimumSize">
<size>
<width>60</width>
- <height>26</height>
+ <height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
- <height>26</height>
+ <height>16777215</height>
</size>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="sampleRateLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="pktsCorrectEdit">
<property name="minimumSize">
<size>
- <width>0</width>
- <height>20</height>
+ <width>60</width>
+ <height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>16777215</width>
- <height>20</height>
+ <width>80</width>
+ <height>16777215</height>
</size>
</property>
- <property name="text">
- <string>Sample Rate (sps)</string>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="perEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
</property>
</widget>
</item>
@@ -384,85 +440,25 @@
</widget>
</item>
<item>
- <spacer name="verticalSpacer_2">
+ <spacer name="horizontalSpacer">
<property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
+ <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>60</height>
+ <height>20</height>
</size>
</property>
</spacer>
</item>
- </layout>
- </item>
- <item row="2" column="3">
- <widget class="QGroupBox" name="rxBox_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>220</width>
- <height>125</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>265</width>
- <height>125</height>
- </size>
- </property>
- <property name="title">
- <string>Received Packet Info</string>
- </property>
- <widget class="QWidget" name="formLayoutWidget_4">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>181</width>
- <height>92</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_4">
- <property name="sizeConstraint">
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="pktsRcvdLabel">
- <property name="text">
- <string>Packets Rcvd.</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="pktsCorrectLabel">
- <property name="text">
- <string>Packets Correct</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="perLabel">
- <property name="text">
- <string>PER</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="pktsRcvdEdit">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPushButton" name="pauseButton">
<property name="minimumSize">
<size>
- <width>60</width>
+ <width>80</width>
<height>0</height>
</size>
</property>
@@ -472,29 +468,32 @@
<height>16777215</height>
</size>
</property>
+ <property name="text">
+ <string>Pause</string>
+ </property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="pktsCorrectEdit">
- <property name="minimumSize">
- <size>
- <width>60</width>
- <height>0</height>
- </size>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- <property name="maximumSize">
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
<size>
- <width>80</width>
- <height>16777215</height>
+ <width>20</width>
+ <height>60</height>
</size>
</property>
- </widget>
+ </spacer>
</item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="perEdit">
+ <item>
+ <widget class="QPushButton" name="closeButton">
<property name="minimumSize">
<size>
- <width>60</width>
+ <width>80</width>
<height>0</height>
</size>
</property>
@@ -504,70 +503,24 @@
<height>16777215</height>
</size>
</property>
+ <property name="text">
+ <string>Close</string>
+ </property>
</widget>
</item>
</layout>
- </widget>
- </widget>
- </item>
- <item row="2" column="4">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="0" colspan="6">
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <item>
- <widget class="QFrame" name="sinkFrame">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>500</width>
- <height>550</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="1" column="0">
- <layout class="QHBoxLayout" name="sinkLayout"/>
- </item>
- </layout>
- </widget>
</item>
</layout>
</item>
</layout>
- <zorder>channelModeBox</zorder>
- <zorder></zorder>
- <zorder>rxBox_2</zorder>
- <zorder>horizontalSpacer</zorder>
- <zorder></zorder>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1019</width>
- <height>25</height>
+ <width>1059</width>
+ <height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
diff --git a/gnuradio-examples/python/digital/qt_digital_window2.py b/gnuradio-examples/python/digital/qt_digital_window2.py
index 98745dfe8..2d10e3a7f 100644
--- a/gnuradio-examples/python/digital/qt_digital_window2.py
+++ b/gnuradio-examples/python/digital/qt_digital_window2.py
@@ -2,8 +2,8 @@
# Form implementation generated from reading ui file 'qt_digital_window2.ui'
#
-# Created: Sat Jan 2 16:42:30 2010
-# by: PyQt4 UI code generator 4.4.3
+# Created: Tue May 11 20:55:10 2010
+# by: PyQt4 UI code generator 4.6.1
#
# WARNING! All changes made in this file will be lost!
@@ -12,30 +12,58 @@ from PyQt4 import QtCore, QtGui
class Ui_DigitalWindow(object):
def setupUi(self, DigitalWindow):
DigitalWindow.setObjectName("DigitalWindow")
- DigitalWindow.resize(1019, 754)
+ DigitalWindow.resize(1059, 751)
self.centralwidget = QtGui.QWidget(DigitalWindow)
self.centralwidget.setObjectName("centralwidget")
- self.gridLayout = QtGui.QGridLayout(self.centralwidget)
- self.gridLayout.setObjectName("gridLayout")
- self.verticalLayout_5 = QtGui.QVBoxLayout()
- self.verticalLayout_5.setObjectName("verticalLayout_5")
- self.sinkFrame = QtGui.QFrame(self.centralwidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth())
- self.sinkFrame.setSizePolicy(sizePolicy)
- self.sinkFrame.setMinimumSize(QtCore.QSize(500, 550))
- self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
- self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
- self.sinkFrame.setObjectName("sinkFrame")
- self.gridLayout_2 = QtGui.QGridLayout(self.sinkFrame)
- self.gridLayout_2.setObjectName("gridLayout_2")
+ self.verticalLayout_3 = QtGui.QVBoxLayout(self.centralwidget)
+ self.verticalLayout_3.setObjectName("verticalLayout_3")
self.sinkLayout = QtGui.QHBoxLayout()
self.sinkLayout.setObjectName("sinkLayout")
- self.gridLayout_2.addLayout(self.sinkLayout, 1, 0, 1, 1)
- self.verticalLayout_5.addWidget(self.sinkFrame)
- self.gridLayout.addLayout(self.verticalLayout_5, 0, 0, 1, 6)
+ self.verticalLayout_3.addLayout(self.sinkLayout)
+ self.horizontalLayout = QtGui.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ self.verticalLayout_2 = QtGui.QVBoxLayout()
+ self.verticalLayout_2.setObjectName("verticalLayout_2")
+ self.sysBox = QtGui.QGroupBox(self.centralwidget)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth())
+ self.sysBox.setSizePolicy(sizePolicy)
+ self.sysBox.setMinimumSize(QtCore.QSize(240, 60))
+ self.sysBox.setMaximumSize(QtCore.QSize(240, 16777215))
+ self.sysBox.setObjectName("sysBox")
+ self.formLayoutWidget = QtGui.QWidget(self.sysBox)
+ self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 211, 31))
+ self.formLayoutWidget.setObjectName("formLayoutWidget")
+ self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
+ self.formLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
+ self.formLayout.setVerticalSpacing(20)
+ self.formLayout.setObjectName("formLayout")
+ self.sampleRateEdit = QtGui.QLineEdit(self.formLayoutWidget)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.sampleRateEdit.sizePolicy().hasHeightForWidth())
+ self.sampleRateEdit.setSizePolicy(sizePolicy)
+ self.sampleRateEdit.setMinimumSize(QtCore.QSize(60, 26))
+ self.sampleRateEdit.setMaximumSize(QtCore.QSize(80, 26))
+ self.sampleRateEdit.setObjectName("sampleRateEdit")
+ self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateEdit)
+ self.sampleRateLabel = QtGui.QLabel(self.formLayoutWidget)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.sampleRateLabel.sizePolicy().hasHeightForWidth())
+ self.sampleRateLabel.setSizePolicy(sizePolicy)
+ self.sampleRateLabel.setMinimumSize(QtCore.QSize(0, 20))
+ self.sampleRateLabel.setMaximumSize(QtCore.QSize(16777215, 20))
+ self.sampleRateLabel.setObjectName("sampleRateLabel")
+ self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel)
+ self.verticalLayout_2.addWidget(self.sysBox)
+ spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ self.verticalLayout_2.addItem(spacerItem)
+ self.horizontalLayout.addLayout(self.verticalLayout_2)
self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@@ -76,22 +104,46 @@ class Ui_DigitalWindow(object):
self.timeEdit.setMaximumSize(QtCore.QSize(80, 16777215))
self.timeEdit.setObjectName("timeEdit")
self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, self.timeEdit)
- self.gridLayout.addWidget(self.channelModeBox, 2, 1, 1, 1)
- self.verticalLayout = QtGui.QVBoxLayout()
- self.verticalLayout.setObjectName("verticalLayout")
- self.pauseButton = QtGui.QPushButton(self.centralwidget)
- self.pauseButton.setMinimumSize(QtCore.QSize(80, 0))
- self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215))
- self.pauseButton.setObjectName("pauseButton")
- self.verticalLayout.addWidget(self.pauseButton)
- spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.verticalLayout.addItem(spacerItem)
- self.closeButton = QtGui.QPushButton(self.centralwidget)
- self.closeButton.setMinimumSize(QtCore.QSize(80, 0))
- self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215))
- self.closeButton.setObjectName("closeButton")
- self.verticalLayout.addWidget(self.closeButton)
- self.gridLayout.addLayout(self.verticalLayout, 2, 5, 1, 1)
+ self.horizontalLayout.addWidget(self.channelModeBox)
+ self.rxBox = QtGui.QGroupBox(self.centralwidget)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.rxBox.sizePolicy().hasHeightForWidth())
+ self.rxBox.setSizePolicy(sizePolicy)
+ self.rxBox.setMinimumSize(QtCore.QSize(220, 130))
+ self.rxBox.setMaximumSize(QtCore.QSize(180, 16777215))
+ self.rxBox.setObjectName("rxBox")
+ self.formLayoutWidget_3 = QtGui.QWidget(self.rxBox)
+ self.formLayoutWidget_3.setGeometry(QtCore.QRect(10, 20, 201, 101))
+ self.formLayoutWidget_3.setObjectName("formLayoutWidget_3")
+ self.formLayout_3 = QtGui.QFormLayout(self.formLayoutWidget_3)
+ self.formLayout_3.setSizeConstraint(QtGui.QLayout.SetFixedSize)
+ self.formLayout_3.setObjectName("formLayout_3")
+ self.gainClockLabel = QtGui.QLabel(self.formLayoutWidget_3)
+ self.gainClockLabel.setObjectName("gainClockLabel")
+ self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.gainClockLabel)
+ self.gainPhaseLabel = QtGui.QLabel(self.formLayoutWidget_3)
+ self.gainPhaseLabel.setObjectName("gainPhaseLabel")
+ self.formLayout_3.setWidget(2, QtGui.QFormLayout.LabelRole, self.gainPhaseLabel)
+ self.gainClockEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+ self.gainClockEdit.setMinimumSize(QtCore.QSize(60, 0))
+ self.gainClockEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.gainClockEdit.setObjectName("gainClockEdit")
+ self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.gainClockEdit)
+ self.gainFreqEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+ self.gainFreqEdit.setMinimumSize(QtCore.QSize(60, 0))
+ self.gainFreqEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.gainFreqEdit.setObjectName("gainFreqEdit")
+ self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.gainFreqEdit)
+ self.gainPhaseEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+ self.gainPhaseEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.gainPhaseEdit.setObjectName("gainPhaseEdit")
+ self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.gainPhaseEdit)
+ self.gainPhaseLabel_2 = QtGui.QLabel(self.formLayoutWidget_3)
+ self.gainPhaseLabel_2.setObjectName("gainPhaseLabel_2")
+ self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.gainPhaseLabel_2)
+ self.horizontalLayout.addWidget(self.rxBox)
self.rxBox_2 = QtGui.QGroupBox(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@@ -102,7 +154,7 @@ class Ui_DigitalWindow(object):
self.rxBox_2.setMaximumSize(QtCore.QSize(265, 125))
self.rxBox_2.setObjectName("rxBox_2")
self.formLayoutWidget_4 = QtGui.QWidget(self.rxBox_2)
- self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 248, 188))
+ self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 201, 91))
self.formLayoutWidget_4.setObjectName("formLayoutWidget_4")
self.formLayout_4 = QtGui.QFormLayout(self.formLayoutWidget_4)
self.formLayout_4.setSizeConstraint(QtGui.QLayout.SetFixedSize)
@@ -132,93 +184,28 @@ class Ui_DigitalWindow(object):
self.perEdit.setMaximumSize(QtCore.QSize(80, 16777215))
self.perEdit.setObjectName("perEdit")
self.formLayout_4.setWidget(2, QtGui.QFormLayout.FieldRole, self.perEdit)
- self.gridLayout.addWidget(self.rxBox_2, 2, 3, 1, 1)
+ self.horizontalLayout.addWidget(self.rxBox_2)
spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.gridLayout.addItem(spacerItem1, 2, 4, 1, 1)
- self.verticalLayout_2 = QtGui.QVBoxLayout()
- self.verticalLayout_2.setObjectName("verticalLayout_2")
- self.sysBox = QtGui.QGroupBox(self.centralwidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth())
- self.sysBox.setSizePolicy(sizePolicy)
- self.sysBox.setMinimumSize(QtCore.QSize(240, 60))
- self.sysBox.setMaximumSize(QtCore.QSize(240, 16777215))
- self.sysBox.setObjectName("sysBox")
- self.formLayoutWidget = QtGui.QWidget(self.sysBox)
- self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 211, 31))
- self.formLayoutWidget.setObjectName("formLayoutWidget")
- self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
- self.formLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
- self.formLayout.setVerticalSpacing(20)
- self.formLayout.setObjectName("formLayout")
- self.sampleRateEdit = QtGui.QLineEdit(self.formLayoutWidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.sampleRateEdit.sizePolicy().hasHeightForWidth())
- self.sampleRateEdit.setSizePolicy(sizePolicy)
- self.sampleRateEdit.setMinimumSize(QtCore.QSize(60, 26))
- self.sampleRateEdit.setMaximumSize(QtCore.QSize(80, 26))
- self.sampleRateEdit.setObjectName("sampleRateEdit")
- self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateEdit)
- self.sampleRateLabel = QtGui.QLabel(self.formLayoutWidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.sampleRateLabel.sizePolicy().hasHeightForWidth())
- self.sampleRateLabel.setSizePolicy(sizePolicy)
- self.sampleRateLabel.setMinimumSize(QtCore.QSize(0, 20))
- self.sampleRateLabel.setMaximumSize(QtCore.QSize(16777215, 20))
- self.sampleRateLabel.setObjectName("sampleRateLabel")
- self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel)
- self.verticalLayout_2.addWidget(self.sysBox)
+ self.horizontalLayout.addItem(spacerItem1)
+ self.verticalLayout = QtGui.QVBoxLayout()
+ self.verticalLayout.setObjectName("verticalLayout")
+ self.pauseButton = QtGui.QPushButton(self.centralwidget)
+ self.pauseButton.setMinimumSize(QtCore.QSize(80, 0))
+ self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.pauseButton.setObjectName("pauseButton")
+ self.verticalLayout.addWidget(self.pauseButton)
spacerItem2 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.verticalLayout_2.addItem(spacerItem2)
- self.gridLayout.addLayout(self.verticalLayout_2, 2, 0, 1, 1)
- self.rxBox = QtGui.QGroupBox(self.centralwidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.rxBox.sizePolicy().hasHeightForWidth())
- self.rxBox.setSizePolicy(sizePolicy)
- self.rxBox.setMinimumSize(QtCore.QSize(180, 120))
- self.rxBox.setMaximumSize(QtCore.QSize(180, 16777215))
- self.rxBox.setObjectName("rxBox")
- self.formLayoutWidget_3 = QtGui.QWidget(self.rxBox)
- self.formLayoutWidget_3.setGeometry(QtCore.QRect(10, 10, 164, 101))
- self.formLayoutWidget_3.setObjectName("formLayoutWidget_3")
- self.formLayout_3 = QtGui.QFormLayout(self.formLayoutWidget_3)
- self.formLayout_3.setSizeConstraint(QtGui.QLayout.SetFixedSize)
- self.formLayout_3.setObjectName("formLayout_3")
- self.gainClockLabel = QtGui.QLabel(self.formLayoutWidget_3)
- self.gainClockLabel.setObjectName("gainClockLabel")
- self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.gainClockLabel)
- self.gainPhaseLabel = QtGui.QLabel(self.formLayoutWidget_3)
- self.gainPhaseLabel.setObjectName("gainPhaseLabel")
- self.formLayout_3.setWidget(2, QtGui.QFormLayout.LabelRole, self.gainPhaseLabel)
- self.gainClockEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
- self.gainClockEdit.setMinimumSize(QtCore.QSize(60, 0))
- self.gainClockEdit.setMaximumSize(QtCore.QSize(80, 16777215))
- self.gainClockEdit.setObjectName("gainClockEdit")
- self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.gainClockEdit)
- self.gainFreqEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
- self.gainFreqEdit.setMinimumSize(QtCore.QSize(60, 0))
- self.gainFreqEdit.setMaximumSize(QtCore.QSize(80, 16777215))
- self.gainFreqEdit.setObjectName("gainFreqEdit")
- self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.gainFreqEdit)
- self.gainPhaseEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
- self.gainPhaseEdit.setMaximumSize(QtCore.QSize(80, 16777215))
- self.gainPhaseEdit.setObjectName("gainPhaseEdit")
- self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.gainPhaseEdit)
- self.gainPhaseLabel_2 = QtGui.QLabel(self.formLayoutWidget_3)
- self.gainPhaseLabel_2.setObjectName("gainPhaseLabel_2")
- self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.gainPhaseLabel_2)
- self.gridLayout.addWidget(self.rxBox, 2, 2, 1, 1)
+ self.verticalLayout.addItem(spacerItem2)
+ self.closeButton = QtGui.QPushButton(self.centralwidget)
+ self.closeButton.setMinimumSize(QtCore.QSize(80, 0))
+ self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.closeButton.setObjectName("closeButton")
+ self.verticalLayout.addWidget(self.closeButton)
+ self.horizontalLayout.addLayout(self.verticalLayout)
+ self.verticalLayout_3.addLayout(self.horizontalLayout)
DigitalWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(DigitalWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1019, 24))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1059, 23))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
@@ -240,22 +227,22 @@ class Ui_DigitalWindow(object):
def retranslateUi(self, DigitalWindow):
DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
+ self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8))
+ self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8))
self.channelModeBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtGui.QApplication.UnicodeUTF8))
self.snrLabel.setText(QtGui.QApplication.translate("DigitalWindow", "SNR (dB)", None, QtGui.QApplication.UnicodeUTF8))
self.freqLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Frequency Offset (Hz)", None, QtGui.QApplication.UnicodeUTF8))
self.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", None, QtGui.QApplication.UnicodeUTF8))
- self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
- self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8))
- self.rxBox_2.setTitle(QtGui.QApplication.translate("DigitalWindow", "Received Packet Info", None, QtGui.QApplication.UnicodeUTF8))
- self.pktsRcvdLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Rcvd.", None, QtGui.QApplication.UnicodeUTF8))
- self.pktsCorrectLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Correct", None, QtGui.QApplication.UnicodeUTF8))
- self.perLabel.setText(QtGui.QApplication.translate("DigitalWindow", "PER", None, QtGui.QApplication.UnicodeUTF8))
- self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8))
- self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8))
self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
self.gainClockLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Clock Loop Gain", None, QtGui.QApplication.UnicodeUTF8))
self.gainPhaseLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Freq. Loop Gain", None, QtGui.QApplication.UnicodeUTF8))
self.gainPhaseLabel_2.setText(QtGui.QApplication.translate("DigitalWindow", "Phase Loop Gain", None, QtGui.QApplication.UnicodeUTF8))
+ self.rxBox_2.setTitle(QtGui.QApplication.translate("DigitalWindow", "Received Packet Info", None, QtGui.QApplication.UnicodeUTF8))
+ self.pktsRcvdLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Rcvd.", None, QtGui.QApplication.UnicodeUTF8))
+ self.pktsCorrectLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Correct", None, QtGui.QApplication.UnicodeUTF8))
+ self.perLabel.setText(QtGui.QApplication.translate("DigitalWindow", "PER", None, QtGui.QApplication.UnicodeUTF8))
+ self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
+ self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8))
self.menuFile.setTitle(QtGui.QApplication.translate("DigitalWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
self.actionExit.setText(QtGui.QApplication.translate("DigitalWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8))
diff --git a/gnuradio-examples/python/digital/qt_digital_window2.ui b/gnuradio-examples/python/digital/qt_digital_window2.ui
index 4e87ff058..544704668 100644
--- a/gnuradio-examples/python/digital/qt_digital_window2.ui
+++ b/gnuradio-examples/python/digital/qt_digital_window2.ui
@@ -1,592 +1,563 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>DigitalWindow</class>
- <widget class="QMainWindow" name="DigitalWindow" >
- <property name="geometry" >
+ <widget class="QMainWindow" name="DigitalWindow">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1019</width>
- <height>754</height>
+ <width>1059</width>
+ <height>751</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>MainWindow</string>
</property>
- <widget class="QWidget" name="centralwidget" >
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" colspan="6" >
- <layout class="QVBoxLayout" name="verticalLayout_5" >
- <item>
- <widget class="QFrame" name="sinkFrame" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>500</width>
- <height>550</height>
- </size>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QGridLayout" name="gridLayout_2" >
- <item row="1" column="0" >
- <layout class="QHBoxLayout" name="sinkLayout" />
- </item>
- </layout>
- </widget>
- </item>
- </layout>
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QHBoxLayout" name="sinkLayout"/>
</item>
- <item row="2" column="1" >
- <widget class="QGroupBox" name="channelModeBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>245</width>
- <height>130</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>245</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="title" >
- <string>Channel Model Parameters</string>
- </property>
- <widget class="QWidget" name="formLayoutWidget_2" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>20</y>
- <width>221</width>
- <height>98</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_2" >
- <property name="sizeConstraint" >
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <property name="fieldGrowthPolicy" >
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <item row="0" column="0" >
- <widget class="QLabel" name="snrLabel" >
- <property name="text" >
- <string>SNR (dB)</string>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QGroupBox" name="sysBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="snrEdit" >
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
- <width>60</width>
- <height>0</height>
+ <width>240</width>
+ <height>60</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>80</width>
+ <width>240</width>
<height>16777215</height>
</size>
</property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="freqLabel" >
- <property name="text" >
- <string>Frequency Offset (Hz)</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="freqEdit" >
- <property name="minimumSize" >
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
+ <property name="title">
+ <string>System Parameters</string>
</property>
+ <widget class="QWidget" name="formLayoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>211</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <layout class="QFormLayout" name="formLayout">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <property name="verticalSpacing">
+ <number>20</number>
+ </property>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="sampleRateEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>26</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>26</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="sampleRateLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Sample Rate (sps)</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="timeLabel" >
- <property name="text" >
- <string>Timing Offset</string>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="timeEdit" >
- <property name="minimumSize" >
- <size>
- <width>60</width>
- <height>0</height>
- </size>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
</property>
- <property name="maximumSize" >
+ <property name="sizeHint" stdset="0">
<size>
- <width>80</width>
- <height>16777215</height>
+ <width>20</width>
+ <height>60</height>
</size>
</property>
- </widget>
+ </spacer>
</item>
</layout>
- </widget>
- </widget>
- </item>
- <item row="2" column="5" >
- <layout class="QVBoxLayout" name="verticalLayout" >
+ </item>
<item>
- <widget class="QPushButton" name="pauseButton" >
- <property name="minimumSize" >
+ <widget class="QGroupBox" name="channelModeBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
<size>
- <width>80</width>
- <height>0</height>
+ <width>245</width>
+ <height>130</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>80</width>
+ <width>245</width>
<height>16777215</height>
</size>
</property>
- <property name="text" >
- <string>Pause</string>
+ <property name="title">
+ <string>Channel Model Parameters</string>
</property>
+ <widget class="QWidget" name="formLayoutWidget_2">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>221</width>
+ <height>98</height>
+ </rect>
+ </property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="snrLabel">
+ <property name="text">
+ <string>SNR (dB)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="snrEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="freqLabel">
+ <property name="text">
+ <string>Frequency Offset (Hz)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="freqEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="timeLabel">
+ <property name="text">
+ <string>Timing Offset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="timeEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
<item>
- <spacer name="verticalSpacer" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>60</height>
- </size>
+ <widget class="QGroupBox" name="rxBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="closeButton" >
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
- <width>80</width>
- <height>0</height>
+ <width>220</width>
+ <height>130</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>80</width>
+ <width>180</width>
<height>16777215</height>
</size>
</property>
- <property name="text" >
- <string>Close</string>
+ <property name="title">
+ <string>Receiver Parameters</string>
</property>
+ <widget class="QWidget" name="formLayoutWidget_3">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>201</width>
+ <height>101</height>
+ </rect>
+ </property>
+ <layout class="QFormLayout" name="formLayout_3">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="gainClockLabel">
+ <property name="text">
+ <string>Clock Loop Gain</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="gainPhaseLabel">
+ <property name="text">
+ <string>Freq. Loop Gain</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="gainClockEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="gainFreqEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="gainPhaseEdit">
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="gainPhaseLabel_2">
+ <property name="text">
+ <string>Phase Loop Gain</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
- </layout>
- </item>
- <item row="2" column="3" >
- <widget class="QGroupBox" name="rxBox_2" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>220</width>
- <height>125</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>265</width>
- <height>125</height>
- </size>
- </property>
- <property name="title" >
- <string>Received Packet Info</string>
- </property>
- <widget class="QWidget" name="formLayoutWidget_4" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>20</y>
- <width>248</width>
- <height>188</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_4" >
- <property name="sizeConstraint" >
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <property name="fieldGrowthPolicy" >
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <item row="0" column="0" >
- <widget class="QLabel" name="pktsRcvdLabel" >
- <property name="text" >
- <string>Packets Rcvd.</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="pktsRcvdEdit" >
- <property name="minimumSize" >
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="pktsCorrectLabel" >
- <property name="text" >
- <string>Packets Correct</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="pktsCorrectEdit" >
- <property name="minimumSize" >
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="perLabel" >
- <property name="text" >
- <string>PER</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="perEdit" >
- <property name="minimumSize" >
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- <zorder>pktsRcvdLabel</zorder>
- <zorder>pktsCorrectLabel</zorder>
- <zorder>perLabel</zorder>
- <zorder>pktsRcvdEdit</zorder>
- <zorder>pktsCorrectEdit</zorder>
- <zorder>perEdit</zorder>
- </widget>
- </widget>
- </item>
- <item row="2" column="4" >
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="0" >
- <layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
- <widget class="QGroupBox" name="sysBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QGroupBox" name="rxBox_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
- <width>240</width>
- <height>60</height>
+ <width>220</width>
+ <height>125</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>240</width>
- <height>16777215</height>
+ <width>265</width>
+ <height>125</height>
</size>
</property>
- <property name="title" >
- <string>System Parameters</string>
+ <property name="title">
+ <string>Received Packet Info</string>
</property>
- <widget class="QWidget" name="formLayoutWidget" >
- <property name="geometry" >
+ <widget class="QWidget" name="formLayoutWidget_4">
+ <property name="geometry">
<rect>
<x>10</x>
<y>20</y>
- <width>211</width>
- <height>31</height>
+ <width>201</width>
+ <height>91</height>
</rect>
</property>
- <layout class="QFormLayout" name="formLayout" >
- <property name="sizeConstraint" >
+ <layout class="QFormLayout" name="formLayout_4">
+ <property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
- <property name="verticalSpacing" >
- <number>20</number>
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="sampleRateEdit" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="0" column="0">
+ <widget class="QLabel" name="pktsRcvdLabel">
+ <property name="text">
+ <string>Packets Rcvd.</string>
</property>
- <property name="minimumSize" >
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="pktsRcvdEdit">
+ <property name="minimumSize">
<size>
<width>60</width>
- <height>26</height>
+ <height>0</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>80</width>
- <height>26</height>
+ <height>16777215</height>
</size>
</property>
</widget>
</item>
- <item row="0" column="0" >
- <widget class="QLabel" name="sampleRateLabel" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="1" column="0">
+ <widget class="QLabel" name="pktsCorrectLabel">
+ <property name="text">
+ <string>Packets Correct</string>
</property>
- <property name="minimumSize" >
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="pktsCorrectEdit">
+ <property name="minimumSize">
<size>
- <width>0</width>
- <height>20</height>
+ <width>60</width>
+ <height>0</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>16777215</width>
- <height>20</height>
+ <width>80</width>
+ <height>16777215</height>
</size>
</property>
- <property name="text" >
- <string>Sample Rate (sps)</string>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="perLabel">
+ <property name="text">
+ <string>PER</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="perEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
</property>
</widget>
</item>
</layout>
+ <zorder>pktsRcvdLabel</zorder>
+ <zorder>pktsCorrectLabel</zorder>
+ <zorder>perLabel</zorder>
+ <zorder>pktsRcvdEdit</zorder>
+ <zorder>pktsCorrectEdit</zorder>
+ <zorder>perEdit</zorder>
</widget>
</widget>
</item>
<item>
- <spacer name="verticalSpacer_2" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>60</height>
+ <height>20</height>
</size>
</property>
</spacer>
</item>
- </layout>
- </item>
- <item row="2" column="2" >
- <widget class="QGroupBox" name="rxBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>180</width>
- <height>120</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>180</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="title" >
- <string>Receiver Parameters</string>
- </property>
- <widget class="QWidget" name="formLayoutWidget_3" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>10</y>
- <width>164</width>
- <height>101</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_3" >
- <property name="sizeConstraint" >
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <item row="0" column="0" >
- <widget class="QLabel" name="gainClockLabel" >
- <property name="text" >
- <string>Clock Loop Gain</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="gainPhaseLabel" >
- <property name="text" >
- <string>Freq. Loop Gain</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="gainClockEdit" >
- <property name="minimumSize" >
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPushButton" name="pauseButton">
+ <property name="minimumSize">
<size>
- <width>60</width>
+ <width>80</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
+ <property name="text">
+ <string>Pause</string>
+ </property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="gainFreqEdit" >
- <property name="minimumSize" >
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
<size>
- <width>60</width>
- <height>0</height>
+ <width>20</width>
+ <height>60</height>
</size>
</property>
- <property name="maximumSize" >
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="closeButton">
+ <property name="minimumSize">
<size>
<width>80</width>
- <height>16777215</height>
+ <height>0</height>
</size>
</property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="gainPhaseEdit" >
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="gainPhaseLabel_2" >
- <property name="text" >
- <string>Phase Loop Gain</string>
+ <property name="text">
+ <string>Close</string>
</property>
</widget>
</item>
</layout>
- </widget>
- </widget>
+ </item>
+ </layout>
</item>
</layout>
- <zorder>channelModeBox</zorder>
- <zorder></zorder>
- <zorder>rxBox_2</zorder>
- <zorder>horizontalSpacer</zorder>
- <zorder></zorder>
- <zorder>rxBox</zorder>
</widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1019</width>
- <height>24</height>
+ <width>1059</width>
+ <height>23</height>
</rect>
</property>
- <widget class="QMenu" name="menuFile" >
- <property name="title" >
+ <widget class="QMenu" name="menuFile">
+ <property name="title">
<string>&amp;File</string>
</property>
- <addaction name="actionExit" />
+ <addaction name="actionExit"/>
</widget>
- <addaction name="menuFile" />
+ <addaction name="menuFile"/>
</widget>
- <widget class="QStatusBar" name="statusbar" />
- <action name="actionExit" >
- <property name="text" >
+ <widget class="QStatusBar" name="statusbar"/>
+ <action name="actionExit">
+ <property name="text">
<string>E&amp;xit</string>
</property>
</action>
@@ -604,11 +575,11 @@
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>322</x>
<y>623</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>66</x>
<y>561</y>
</hint>
@@ -620,11 +591,11 @@
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>617</x>
<y>327</y>
</hint>
diff --git a/gnuradio-examples/python/digital/qt_rx_window.py b/gnuradio-examples/python/digital/qt_rx_window.py
index 60e1a6e37..e2488eb3d 100644
--- a/gnuradio-examples/python/digital/qt_rx_window.py
+++ b/gnuradio-examples/python/digital/qt_rx_window.py
@@ -2,8 +2,8 @@
# Form implementation generated from reading ui file 'qt_rx_window.ui'
#
-# Created: Fri Jul 3 01:03:19 2009
-# by: PyQt4 UI code generator 4.4.3
+# Created: Tue May 11 21:03:07 2010
+# by: PyQt4 UI code generator 4.6.1
#
# WARNING! All changes made in this file will be lost!
@@ -12,29 +12,14 @@ from PyQt4 import QtCore, QtGui
class Ui_DigitalWindow(object):
def setupUi(self, DigitalWindow):
DigitalWindow.setObjectName("DigitalWindow")
- DigitalWindow.resize(1000, 816)
+ DigitalWindow.resize(999, 519)
self.centralwidget = QtGui.QWidget(DigitalWindow)
self.centralwidget.setObjectName("centralwidget")
- self.gridLayout = QtGui.QGridLayout(self.centralwidget)
- self.gridLayout.setObjectName("gridLayout")
- self.sinkFrame = QtGui.QFrame(self.centralwidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(1)
- sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth())
- self.sinkFrame.setSizePolicy(sizePolicy)
- self.sinkFrame.setMinimumSize(QtCore.QSize(800, 500))
- self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
- self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
- self.sinkFrame.setObjectName("sinkFrame")
- self.horizontalLayout_2 = QtGui.QHBoxLayout(self.sinkFrame)
- self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
+ self.verticalLayout.setObjectName("verticalLayout")
self.sinkLayout = QtGui.QHBoxLayout()
self.sinkLayout.setObjectName("sinkLayout")
- self.horizontalLayout_2.addLayout(self.sinkLayout)
- self.gridLayout.addWidget(self.sinkFrame, 0, 0, 1, 1)
- spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.gridLayout.addItem(spacerItem, 1, 0, 1, 1)
+ self.verticalLayout.addLayout(self.sinkLayout)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.horizontalLayout.setObjectName("horizontalLayout")
@@ -113,15 +98,15 @@ class Ui_DigitalWindow(object):
self.perEdit.setGeometry(QtCore.QRect(120, 90, 113, 23))
self.perEdit.setObjectName("perEdit")
self.verticalLayout_3.addWidget(self.rxPacketBox)
- spacerItem1 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.verticalLayout_3.addItem(spacerItem1)
+ spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ self.verticalLayout_3.addItem(spacerItem)
self.horizontalLayout.addLayout(self.verticalLayout_3)
- spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.horizontalLayout.addItem(spacerItem2)
+ spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.horizontalLayout.addItem(spacerItem1)
self.verticalLayout_5 = QtGui.QVBoxLayout()
self.verticalLayout_5.setObjectName("verticalLayout_5")
- spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.verticalLayout_5.addItem(spacerItem3)
+ spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.verticalLayout_5.addItem(spacerItem2)
self.closeButton = QtGui.QPushButton(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
@@ -133,10 +118,10 @@ class Ui_DigitalWindow(object):
self.closeButton.setObjectName("closeButton")
self.verticalLayout_5.addWidget(self.closeButton)
self.horizontalLayout.addLayout(self.verticalLayout_5)
- self.gridLayout.addLayout(self.horizontalLayout, 2, 0, 1, 1)
+ self.verticalLayout.addLayout(self.horizontalLayout)
DigitalWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(DigitalWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1000, 24))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 999, 23))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
diff --git a/gnuradio-examples/python/digital/qt_rx_window.ui b/gnuradio-examples/python/digital/qt_rx_window.ui
index 4631b7782..f5a074876 100644
--- a/gnuradio-examples/python/digital/qt_rx_window.ui
+++ b/gnuradio-examples/python/digital/qt_rx_window.ui
@@ -1,92 +1,53 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>DigitalWindow</class>
- <widget class="QMainWindow" name="DigitalWindow" >
- <property name="geometry" >
+ <widget class="QMainWindow" name="DigitalWindow">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1000</width>
- <height>816</height>
+ <width>999</width>
+ <height>519</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>MainWindow</string>
</property>
- <widget class="QWidget" name="centralwidget" >
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" >
- <widget class="QFrame" name="sinkFrame" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>1</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>800</width>
- <height>500</height>
- </size>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
- <item>
- <layout class="QHBoxLayout" name="sinkLayout" />
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="0" >
- <spacer name="verticalSpacer" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="sinkLayout"/>
</item>
- <item row="2" column="0" >
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <property name="sizeConstraint" >
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
- <widget class="QGroupBox" name="rxBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QGroupBox" name="rxBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>250</width>
<height>190</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>250</width>
<height>190</height>
</size>
</property>
- <property name="title" >
+ <property name="title">
<string>Receiver Parameters</string>
</property>
- <widget class="QLineEdit" name="gainMuEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="gainMuEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>120</y>
@@ -95,8 +56,8 @@
</rect>
</property>
</widget>
- <widget class="QLabel" name="gainMuLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="gainMuLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>120</y>
@@ -104,12 +65,12 @@
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>mu's gain</string>
</property>
</widget>
- <widget class="QLineEdit" name="alphaEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="alphaEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>150</y>
@@ -118,8 +79,8 @@
</rect>
</property>
</widget>
- <widget class="QLabel" name="alphaLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="alphaLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>150</y>
@@ -127,12 +88,12 @@
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Alpha</string>
</property>
</widget>
- <widget class="QLabel" name="gainLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="gainLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>60</y>
@@ -140,12 +101,12 @@
<height>17</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Gain (dB)</string>
</property>
</widget>
- <widget class="QLineEdit" name="freqEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="freqEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>30</y>
@@ -154,8 +115,8 @@
</rect>
</property>
</widget>
- <widget class="QLabel" name="freqLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="freqLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>30</y>
@@ -163,12 +124,12 @@
<height>17</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Frequency (Hz)</string>
</property>
</widget>
- <widget class="QLineEdit" name="gainEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="gainEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>60</y>
@@ -177,8 +138,8 @@
</rect>
</property>
</widget>
- <widget class="QLabel" name="decimLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="decimLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>90</y>
@@ -186,12 +147,12 @@
<height>17</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Decimation</string>
</property>
</widget>
- <widget class="QLineEdit" name="decimEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="decimEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>90</y>
@@ -203,41 +164,41 @@
</widget>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QGroupBox" name="rxPacketBox" >
- <property name="enabled" >
+ <widget class="QGroupBox" name="rxPacketBox">
+ <property name="enabled">
<bool>true</bool>
</property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>250</width>
<height>130</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>250</width>
<height>130</height>
</size>
</property>
- <property name="font" >
+ <property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
- <property name="title" >
+ <property name="title">
<string>Received Packet Info</string>
</property>
- <widget class="QLineEdit" name="pktsRcvdEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="pktsRcvdEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>30</y>
@@ -246,8 +207,8 @@
</rect>
</property>
</widget>
- <widget class="QLabel" name="pktsRcvdLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="pktsRcvdLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>30</y>
@@ -255,12 +216,12 @@
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Packets Rcvd.</string>
</property>
</widget>
- <widget class="QLineEdit" name="pktsCorrectEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="pktsCorrectEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>60</y>
@@ -269,8 +230,8 @@
</rect>
</property>
</widget>
- <widget class="QLabel" name="pktsCorrectLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="pktsCorrectLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>60</y>
@@ -278,12 +239,12 @@
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Packets Correct</string>
</property>
</widget>
- <widget class="QLabel" name="perLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="perLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>90</y>
@@ -291,12 +252,12 @@
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>PER</string>
</property>
</widget>
- <widget class="QLineEdit" name="perEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="perEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>90</y>
@@ -305,25 +266,17 @@
</rect>
</property>
</widget>
- <zorder>pktsRcvdEdit</zorder>
- <zorder>pktsRcvdLabel</zorder>
- <zorder>pktsCorrectEdit</zorder>
- <zorder>pktsCorrectLabel</zorder>
- <zorder>perLabel</zorder>
- <zorder>perEdit</zorder>
- <zorder>rxBox</zorder>
- <zorder>verticalLayoutWidget</zorder>
</widget>
</item>
<item>
- <spacer name="verticalSpacer_2" >
- <property name="orientation" >
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>60</height>
@@ -334,11 +287,11 @@
</layout>
</item>
<item>
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -347,13 +300,13 @@
</spacer>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_5" >
+ <layout class="QVBoxLayout" name="verticalLayout_5">
<item>
- <spacer name="verticalSpacer_3" >
- <property name="orientation" >
+ <spacer name="verticalSpacer_3">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@@ -362,26 +315,26 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="closeButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QPushButton" name="closeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>80</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>80</width>
<height>30</height>
</size>
</property>
- <property name="text" >
+ <property name="text">
<string>Close</string>
</property>
</widget>
@@ -391,34 +344,27 @@
</layout>
</item>
</layout>
- <zorder>closeButton</zorder>
- <zorder>sinkFrame</zorder>
- <zorder>rxBox</zorder>
- <zorder>rxPacketBox</zorder>
- <zorder>verticalLayoutWidget</zorder>
- <zorder>verticalSpacer</zorder>
- <zorder>horizontalLayoutWidget_2</zorder>
</widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1000</width>
- <height>24</height>
+ <width>999</width>
+ <height>23</height>
</rect>
</property>
- <widget class="QMenu" name="menuFile" >
- <property name="title" >
+ <widget class="QMenu" name="menuFile">
+ <property name="title">
<string>&amp;File</string>
</property>
- <addaction name="actionExit" />
+ <addaction name="actionExit"/>
</widget>
- <addaction name="menuFile" />
+ <addaction name="menuFile"/>
</widget>
- <widget class="QStatusBar" name="statusbar" />
- <action name="actionExit" >
- <property name="text" >
+ <widget class="QStatusBar" name="statusbar"/>
+ <action name="actionExit">
+ <property name="text">
<string>E&amp;xit</string>
</property>
</action>
@@ -431,11 +377,11 @@
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>617</x>
<y>327</y>
</hint>
@@ -447,11 +393,11 @@
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>960</x>
<y>694</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>66</x>
<y>561</y>
</hint>
diff --git a/gnuradio-examples/python/digital/qt_rx_window2.py b/gnuradio-examples/python/digital/qt_rx_window2.py
index 14c961ab2..2fd719ce1 100644
--- a/gnuradio-examples/python/digital/qt_rx_window2.py
+++ b/gnuradio-examples/python/digital/qt_rx_window2.py
@@ -2,8 +2,8 @@
# Form implementation generated from reading ui file 'qt_rx_window2.ui'
#
-# Created: Sat Jan 2 12:54:51 2010
-# by: PyQt4 UI code generator 4.4.3
+# Created: Tue May 11 21:01:39 2010
+# by: PyQt4 UI code generator 4.6.1
#
# WARNING! All changes made in this file will be lost!
@@ -12,11 +12,14 @@ from PyQt4 import QtCore, QtGui
class Ui_DigitalWindow(object):
def setupUi(self, DigitalWindow):
DigitalWindow.setObjectName("DigitalWindow")
- DigitalWindow.resize(1000, 816)
+ DigitalWindow.resize(1000, 523)
self.centralwidget = QtGui.QWidget(DigitalWindow)
self.centralwidget.setObjectName("centralwidget")
- self.gridLayout = QtGui.QGridLayout(self.centralwidget)
- self.gridLayout.setObjectName("gridLayout")
+ self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
+ self.verticalLayout.setObjectName("verticalLayout")
+ self.sinkLayout = QtGui.QHBoxLayout()
+ self.sinkLayout.setObjectName("sinkLayout")
+ self.verticalLayout.addLayout(self.sinkLayout)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.horizontalLayout.setObjectName("horizontalLayout")
@@ -123,26 +126,10 @@ class Ui_DigitalWindow(object):
self.closeButton.setObjectName("closeButton")
self.verticalLayout_5.addWidget(self.closeButton)
self.horizontalLayout.addLayout(self.verticalLayout_5)
- self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
- self.sinkFrame = QtGui.QFrame(self.centralwidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(1)
- sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth())
- self.sinkFrame.setSizePolicy(sizePolicy)
- self.sinkFrame.setMinimumSize(QtCore.QSize(800, 500))
- self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
- self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
- self.sinkFrame.setObjectName("sinkFrame")
- self.horizontalLayout_2 = QtGui.QHBoxLayout(self.sinkFrame)
- self.horizontalLayout_2.setObjectName("horizontalLayout_2")
- self.sinkLayout = QtGui.QHBoxLayout()
- self.sinkLayout.setObjectName("sinkLayout")
- self.horizontalLayout_2.addLayout(self.sinkLayout)
- self.gridLayout.addWidget(self.sinkFrame, 0, 0, 1, 1)
+ self.verticalLayout.addLayout(self.horizontalLayout)
DigitalWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(DigitalWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1000, 24))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1000, 23))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
diff --git a/gnuradio-examples/python/digital/qt_rx_window2.ui b/gnuradio-examples/python/digital/qt_rx_window2.ui
index 5a83471b8..745af8fb8 100644
--- a/gnuradio-examples/python/digital/qt_rx_window2.ui
+++ b/gnuradio-examples/python/digital/qt_rx_window2.ui
@@ -1,104 +1,108 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>DigitalWindow</class>
- <widget class="QMainWindow" name="DigitalWindow" >
- <property name="geometry" >
+ <widget class="QMainWindow" name="DigitalWindow">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1000</width>
- <height>816</height>
+ <height>523</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>MainWindow</string>
</property>
- <widget class="QWidget" name="centralwidget" >
- <layout class="QGridLayout" name="gridLayout" >
- <item row="1" column="0" >
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <property name="sizeConstraint" >
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="sinkLayout"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
- <widget class="QGroupBox" name="rxBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QGroupBox" name="rxBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>250</width>
<height>190</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>250</width>
<height>250</height>
</size>
</property>
- <property name="title" >
+ <property name="title">
<string>Receiver Parameters</string>
</property>
- <layout class="QFormLayout" name="formLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="freqLabel" >
- <property name="text" >
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="freqLabel">
+ <property name="text">
<string>Frequency (Hz)</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="freqEdit" />
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="freqEdit"/>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="gainLabel" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="gainLabel">
+ <property name="text">
<string>Gain (dB)</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="gainEdit" />
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="gainEdit"/>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="decimLabel" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="decimLabel">
+ <property name="text">
<string>Decimation</string>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="decimEdit" />
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="decimEdit"/>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="gainClockLabel" >
- <property name="text" >
+ <item row="3" column="0">
+ <widget class="QLabel" name="gainClockLabel">
+ <property name="text">
<string>Clock Loop Gain</string>
</property>
</widget>
</item>
- <item row="3" column="1" >
- <widget class="QLineEdit" name="gainClockEdit" />
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="gainClockEdit"/>
</item>
- <item row="4" column="0" >
- <widget class="QLabel" name="gainPhaseLabel" >
- <property name="text" >
+ <item row="4" column="0">
+ <widget class="QLabel" name="gainPhaseLabel">
+ <property name="text">
<string>Phase Loop Gain</string>
</property>
</widget>
</item>
- <item row="4" column="1" >
- <widget class="QLineEdit" name="gainPhaseEdit" />
+ <item row="4" column="1">
+ <widget class="QLineEdit" name="gainPhaseEdit"/>
</item>
- <item row="5" column="1" >
- <widget class="QLineEdit" name="gainFreqEdit" />
+ <item row="5" column="1">
+ <widget class="QLineEdit" name="gainFreqEdit"/>
</item>
- <item row="5" column="0" >
- <widget class="QLabel" name="gainFreqLabel" >
- <property name="text" >
+ <item row="5" column="0">
+ <widget class="QLabel" name="gainFreqLabel">
+ <property name="text">
<string>Freq. Loop Gain</string>
</property>
</widget>
@@ -107,41 +111,41 @@
</widget>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QGroupBox" name="rxPacketBox" >
- <property name="enabled" >
+ <widget class="QGroupBox" name="rxPacketBox">
+ <property name="enabled">
<bool>true</bool>
</property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>250</width>
<height>130</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>250</width>
<height>130</height>
</size>
</property>
- <property name="font" >
+ <property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
- <property name="title" >
+ <property name="title">
<string>Received Packet Info</string>
</property>
- <widget class="QLineEdit" name="pktsRcvdEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="pktsRcvdEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>30</y>
@@ -150,8 +154,8 @@
</rect>
</property>
</widget>
- <widget class="QLabel" name="pktsRcvdLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="pktsRcvdLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>30</y>
@@ -159,12 +163,12 @@
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Packets Rcvd.</string>
</property>
</widget>
- <widget class="QLineEdit" name="pktsCorrectEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="pktsCorrectEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>60</y>
@@ -173,8 +177,8 @@
</rect>
</property>
</widget>
- <widget class="QLabel" name="pktsCorrectLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="pktsCorrectLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>60</y>
@@ -182,12 +186,12 @@
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Packets Correct</string>
</property>
</widget>
- <widget class="QLabel" name="perLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="perLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>90</y>
@@ -195,12 +199,12 @@
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>PER</string>
</property>
</widget>
- <widget class="QLineEdit" name="perEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="perEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>90</y>
@@ -212,14 +216,14 @@
</widget>
</item>
<item>
- <spacer name="verticalSpacer_2" >
- <property name="orientation" >
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>60</height>
@@ -230,11 +234,11 @@
</layout>
</item>
<item>
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -243,13 +247,13 @@
</spacer>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_5" >
+ <layout class="QVBoxLayout" name="verticalLayout_5">
<item>
- <spacer name="verticalSpacer_3" >
- <property name="orientation" >
+ <spacer name="verticalSpacer_3">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
@@ -258,26 +262,26 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="closeButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QPushButton" name="closeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>80</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>80</width>
<height>30</height>
</size>
</property>
- <property name="text" >
+ <property name="text">
<string>Close</string>
</property>
</widget>
@@ -286,57 +290,28 @@
</item>
</layout>
</item>
- <item row="0" column="0" >
- <widget class="QFrame" name="sinkFrame" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>1</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>800</width>
- <height>500</height>
- </size>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
- <item>
- <layout class="QHBoxLayout" name="sinkLayout" />
- </item>
- </layout>
- </widget>
- </item>
</layout>
- <zorder>sinkFrame</zorder>
- <zorder>verticalSpacer</zorder>
</widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1000</width>
- <height>24</height>
+ <height>23</height>
</rect>
</property>
- <widget class="QMenu" name="menuFile" >
- <property name="title" >
+ <widget class="QMenu" name="menuFile">
+ <property name="title">
<string>&amp;File</string>
</property>
- <addaction name="actionExit" />
+ <addaction name="actionExit"/>
</widget>
- <addaction name="menuFile" />
+ <addaction name="menuFile"/>
</widget>
- <widget class="QStatusBar" name="statusbar" />
- <action name="actionExit" >
- <property name="text" >
+ <widget class="QStatusBar" name="statusbar"/>
+ <action name="actionExit">
+ <property name="text">
<string>E&amp;xit</string>
</property>
</action>
@@ -349,11 +324,11 @@
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>617</x>
<y>327</y>
</hint>
@@ -365,11 +340,11 @@
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>960</x>
<y>694</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>66</x>
<y>561</y>
</hint>
diff --git a/gnuradio-examples/python/digital/receive_path.py b/gnuradio-examples/python/digital/receive_path.py
index c229aa9e4..0024d6941 100644
--- a/gnuradio-examples/python/digital/receive_path.py
+++ b/gnuradio-examples/python/digital/receive_path.py
@@ -119,7 +119,7 @@ class receive_path(gr.hier_block2):
normal.add_option("-r", "--bitrate", type="eng_float", default=100e3,
help="specify bitrate [default=%default].")
normal.add_option("-v", "--verbose", action="store_true", default=False)
- expert.add_option("-S", "--samples-per-symbol", type="int", default=2,
+ expert.add_option("-S", "--samples-per-symbol", type="float", default=None,
help="set samples/symbol [default=%default]")
expert.add_option("", "--log", action="store_true", default=False,
help="Log all parts of flow graph to files (CAUTION: lots of data)")
@@ -135,4 +135,4 @@ class receive_path(gr.hier_block2):
print "\nReceive Path:"
print "modulation: %s" % (self._demod_class.__name__)
print "bitrate: %sb/s" % (eng_notation.num_to_str(self._bitrate))
- print "samples/symbol: %3d" % (self._samples_per_symbol)
+ print "samples/symbol: %.4f" % (self._samples_per_symbol)
diff --git a/gnuradio-examples/python/digital/transmit_path.py b/gnuradio-examples/python/digital/transmit_path.py
index 9badcdc08..86ebf75c3 100644
--- a/gnuradio-examples/python/digital/transmit_path.py
+++ b/gnuradio-examples/python/digital/transmit_path.py
@@ -99,7 +99,7 @@ class transmit_path(gr.hier_block2):
help="set transmitter digital amplitude: 0 <= AMPL < 1 [default=%default]")
normal.add_option("-v", "--verbose", action="store_true", default=False)
- expert.add_option("-S", "--samples-per-symbol", type="int", default=2,
+ expert.add_option("-S", "--samples-per-symbol", type="float", default=None,
help="set samples/symbol [default=%default]")
expert.add_option("", "--log", action="store_true", default=False,
help="Log all parts of flow graph to file (CAUTION: lots of data)")
@@ -114,5 +114,5 @@ class transmit_path(gr.hier_block2):
print "Tx amplitude %s" % (self._tx_amplitude)
print "modulation: %s" % (self._modulator_class.__name__)
print "bitrate: %sb/s" % (eng_notation.num_to_str(self._bitrate))
- print "samples/symbol: %3d" % (self._samples_per_symbol)
+ print "samples/symbol: %.4f" % (self._samples_per_symbol)
diff --git a/gnuradio-examples/python/digital/usrp_receive_path.py b/gnuradio-examples/python/digital/usrp_receive_path.py
index 517825cc1..a8f16e28a 100644
--- a/gnuradio-examples/python/digital/usrp_receive_path.py
+++ b/gnuradio-examples/python/digital/usrp_receive_path.py
@@ -59,37 +59,35 @@ class usrp_receive_path(gr.hier_block2):
if options.rx_freq is None:
sys.stderr.write("-f FREQ or --freq FREQ or --rx-freq FREQ must be specified\n")
raise SystemExit
- rx_path = receive_path.receive_path(demod_class, rx_callback, options)
- for attr in dir(rx_path): #forward the methods
- if not attr.startswith('_') and not hasattr(self, attr):
- setattr(self, attr, getattr(rx_path, attr))
#setup usrp
self._demod_class = demod_class
self._setup_usrp_source(options)
- # Set up resampler based on rate determined by _setup_usrp_source
- rs_taps = gr.firdes.low_pass_2(32, 32, 0.45, 0.1, 60)
- self.resampler = gr.pfb_arb_resampler_ccf(self.rs_rate, rs_taps)
+ rx_path = receive_path.receive_path(demod_class, rx_callback, options)
+ for attr in dir(rx_path): #forward the methods
+ if not attr.startswith('_') and not hasattr(self, attr):
+ setattr(self, attr, getattr(rx_path, attr))
#connect
- self.connect(self.u, self.resampler, rx_path)
+ self.connect(self.u, rx_path)
def _setup_usrp_source(self, options):
self.u = usrp_options.create_usrp_source(options)
adc_rate = self.u.adc_rate()
self.rs_rate = options.bitrate
- if options.verbose:
- print 'USRP Source:', self.u
+
(self._bitrate, self._samples_per_symbol, self._decim) = \
pick_rx_bitrate(options.bitrate, self._demod_class.bits_per_symbol(), \
- options.samples_per_symbol, options.decim, adc_rate, \
- self.u.get_decim_rates())
+ options.samples_per_symbol, options.decim,
+ adc_rate, self.u.get_decim_rates())
- # Calculate resampler rate based on requested and actual rates
- self.rs_rate = 1.0 /(self._bitrate / self.rs_rate)
-
- print "Resampling by %f to get bitrate of %ssps" % ( self.rs_rate, eng_notation.num_to_str(self._bitrate/self.rs_rate))
+ if options.verbose:
+ print 'USRP Source:', self.u
+ print 'Decimation: ', self._decim
+
+ options.samples_per_symbol = self._samples_per_symbol
+ options.decim = self._decim
self.u.set_decim(self._decim)
diff --git a/gnuradio-examples/python/digital/usrp_receive_path2.py b/gnuradio-examples/python/digital/usrp_receive_path2.py
new file mode 100644
index 000000000..d20017204
--- /dev/null
+++ b/gnuradio-examples/python/digital/usrp_receive_path2.py
@@ -0,0 +1,96 @@
+#
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr
+from gnuradio import usrp_options
+import receive_path
+from pick_bitrate2 import pick_rx_bitrate
+from gnuradio import eng_notation
+
+def add_freq_option(parser):
+ """
+ Hackery that has the -f / --freq option set both tx_freq and rx_freq
+ """
+ def freq_callback(option, opt_str, value, parser):
+ parser.values.rx_freq = value
+ parser.values.tx_freq = value
+
+ if not parser.has_option('--freq'):
+ parser.add_option('-f', '--freq', type="eng_float",
+ action="callback", callback=freq_callback,
+ help="set Tx and/or Rx frequency to FREQ [default=%default]",
+ metavar="FREQ")
+
+def add_options(parser, expert):
+ add_freq_option(parser)
+ usrp_options.add_rx_options(parser)
+ receive_path.receive_path.add_options(parser, expert)
+ expert.add_option("", "--rx-freq", type="eng_float", default=None,
+ help="set Rx frequency to FREQ [default=%default]", metavar="FREQ")
+ parser.add_option("-v", "--verbose", action="store_true", default=False)
+
+class usrp_receive_path(gr.hier_block2):
+
+ def __init__(self, demod_class, rx_callback, options):
+ '''
+ See below for what options should hold
+ '''
+ gr.hier_block2.__init__(self, "usrp_receive_path",
+ gr.io_signature(0, 0, 0), # Input signature
+ gr.io_signature(0, 0, 0)) # Output signature
+ if options.rx_freq is None:
+ sys.stderr.write("-f FREQ or --freq FREQ or --rx-freq FREQ must be specified\n")
+ raise SystemExit
+
+ #setup usrp
+ self._demod_class = demod_class
+ self._setup_usrp_source(options)
+
+ rx_path = receive_path.receive_path(demod_class, rx_callback, options)
+ for attr in dir(rx_path): #forward the methods
+ if not attr.startswith('_') and not hasattr(self, attr):
+ setattr(self, attr, getattr(rx_path, attr))
+
+ #connect
+ self.connect(self.u, rx_path)
+
+ def _setup_usrp_source(self, options):
+ self.u = usrp_options.create_usrp_source(options)
+ adc_rate = self.u.adc_rate()
+ self.rs_rate = options.bitrate
+
+ (self._bitrate, self._samples_per_symbol, self._decim) = \
+ pick_rx_bitrate(options.bitrate, self._demod_class.bits_per_symbol(), \
+ options.samples_per_symbol, options.decim,
+ adc_rate, self.u.get_decim_rates())
+
+ if options.verbose:
+ print 'USRP Source:', self.u
+ print 'Decimation: ', self._decim
+
+ options.samples_per_symbol = self._samples_per_symbol
+ options.decim = self._decim
+
+ self.u.set_decim(self._decim)
+
+ if not self.u.set_center_freq(options.rx_freq):
+ print "Failed to set Rx frequency to %s" % (eng_notation.num_to_str(options.rx_freq))
+ raise ValueError, eng_notation.num_to_str(options.rx_freq)
diff --git a/gnuradio-examples/python/digital/usrp_transmit_path.py b/gnuradio-examples/python/digital/usrp_transmit_path.py
index ee63dcd2b..f0f467599 100644
--- a/gnuradio-examples/python/digital/usrp_transmit_path.py
+++ b/gnuradio-examples/python/digital/usrp_transmit_path.py
@@ -58,21 +58,18 @@ class usrp_transmit_path(gr.hier_block2):
if options.tx_freq is None:
sys.stderr.write("-f FREQ or --freq FREQ or --tx-freq FREQ must be specified\n")
raise SystemExit
- tx_path = transmit_path.transmit_path(modulator_class, options)
- for attr in dir(tx_path): #forward the methods
- if not attr.startswith('_') and not hasattr(self, attr):
- setattr(self, attr, getattr(tx_path, attr))
#setup usrp
self._modulator_class = modulator_class
self._setup_usrp_sink(options)
- # Set up resampler based on rate determined by _setup_usrp_sink
- rs_taps = gr.firdes.low_pass_2(32, 32, 0.45, 0.1, 60)
- self.resampler = gr.pfb_arb_resampler_ccf(self.rs_rate, rs_taps)
+ tx_path = transmit_path.transmit_path(modulator_class, options)
+ for attr in dir(tx_path): #forward the methods
+ if not attr.startswith('_') and not hasattr(self, attr):
+ setattr(self, attr, getattr(tx_path, attr))
#connect
- self.connect(tx_path, self.resampler, self.u)
+ self.connect(tx_path, self.u)
def _setup_usrp_sink(self, options):
"""
@@ -82,17 +79,20 @@ class usrp_transmit_path(gr.hier_block2):
self.u = usrp_options.create_usrp_sink(options)
dac_rate = self.u.dac_rate()
self.rs_rate = options.bitrate # Store requested bit rate
- if options.verbose:
- print 'USRP Sink:', self.u
+
(self._bitrate, self._samples_per_symbol, self._interp) = \
- pick_tx_bitrate(options.bitrate, self._modulator_class.bits_per_symbol(), \
- options.samples_per_symbol, options.interp, dac_rate, \
- self.u.get_interp_rates())
+ pick_tx_bitrate(options.bitrate, self._modulator_class.bits_per_symbol(),
+ options.samples_per_symbol, options.interp,
+ dac_rate, self.u.get_interp_rates())
- # Calculate resampler rate based on requested and actual rates
- self.rs_rate = self._bitrate / self.rs_rate
- print "Resampling by %f to get bitrate of %ssps" % (self.rs_rate, eng_notation.num_to_str(self._bitrate/self.rs_rate))
+ options.interp = self._interp
+ options.samples_per_symbol = self._samples_per_symbol
+ options.bitrate = self._bitrate
+ if options.verbose:
+ print 'USRP Sink:', self.u
+ print "Interpolation Rate: ", self._interp
+
self.u.set_interp(self._interp)
self.u.set_auto_tr(True)
diff --git a/gnuradio-examples/python/digital/usrp_transmit_path2.py b/gnuradio-examples/python/digital/usrp_transmit_path2.py
new file mode 100644
index 000000000..54930e5a0
--- /dev/null
+++ b/gnuradio-examples/python/digital/usrp_transmit_path2.py
@@ -0,0 +1,101 @@
+#
+# Copyright 2010 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr
+from gnuradio import usrp_options
+import transmit_path
+from pick_bitrate2 import pick_tx_bitrate
+from gnuradio import eng_notation
+
+def add_freq_option(parser):
+ """
+ Hackery that has the -f / --freq option set both tx_freq and rx_freq
+ """
+ def freq_callback(option, opt_str, value, parser):
+ parser.values.rx_freq = value
+ parser.values.tx_freq = value
+
+ if not parser.has_option('--freq'):
+ parser.add_option('-f', '--freq', type="eng_float",
+ action="callback", callback=freq_callback,
+ help="set Tx and/or Rx frequency to FREQ [default=%default]",
+ metavar="FREQ")
+
+def add_options(parser, expert):
+ add_freq_option(parser)
+ usrp_options.add_tx_options(parser)
+ transmit_path.transmit_path.add_options(parser, expert)
+ expert.add_option("", "--tx-freq", type="eng_float", default=None,
+ help="set transmit frequency to FREQ [default=%default]", metavar="FREQ")
+ parser.add_option("-v", "--verbose", action="store_true", default=False)
+
+class usrp_transmit_path(gr.hier_block2):
+ def __init__(self, modulator_class, options):
+ '''
+ See below for what options should hold
+ '''
+ gr.hier_block2.__init__(self, "usrp_transmit_path",
+ gr.io_signature(0, 0, 0), # Input signature
+ gr.io_signature(0, 0, 0)) # Output signature
+ if options.tx_freq is None:
+ sys.stderr.write("-f FREQ or --freq FREQ or --tx-freq FREQ must be specified\n")
+ raise SystemExit
+
+ #setup usrp
+ self._modulator_class = modulator_class
+ self._setup_usrp_sink(options)
+
+ tx_path = transmit_path.transmit_path(modulator_class, options)
+ for attr in dir(tx_path): #forward the methods
+ if not attr.startswith('_') and not hasattr(self, attr):
+ setattr(self, attr, getattr(tx_path, attr))
+
+ #connect
+ self.connect(tx_path, self.u)
+
+ def _setup_usrp_sink(self, options):
+ """
+ Creates a USRP sink, determines the settings for best bitrate,
+ and attaches to the transmitter's subdevice.
+ """
+ self.u = usrp_options.create_usrp_sink(options)
+ dac_rate = self.u.dac_rate()
+ self.rs_rate = options.bitrate # Store requested bit rate
+
+ (self._bitrate, self._samples_per_symbol, self._interp) = \
+ pick_tx_bitrate(options.bitrate, self._modulator_class.bits_per_symbol(),
+ options.samples_per_symbol, options.interp,
+ dac_rate, self.u.get_interp_rates())
+
+ options.interp = self._interp
+ options.samples_per_symbol = self._samples_per_symbol
+ options.bitrate = self._bitrate
+
+ if options.verbose:
+ print 'USRP Sink:', self.u
+ print "Interpolation Rate: ", self._interp
+
+ self.u.set_interp(self._interp)
+ self.u.set_auto_tr(True)
+
+ if not self.u.set_center_freq(options.tx_freq):
+ print "Failed to set Rx frequency to %s" % (eng_notation.num_to_str(options.tx_freq))
+ raise ValueError, eng_notation.num_to_str(options.tx_freq)
diff --git a/gnuradio-examples/python/network/audio_sink.py b/gnuradio-examples/python/network/audio_sink.py
index e59d50834..eb18a75aa 100755
--- a/gnuradio-examples/python/network/audio_sink.py
+++ b/gnuradio-examples/python/network/audio_sink.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2006,2007 Free Software Foundation, Inc.
+# Copyright 2006,2007,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -25,30 +25,36 @@ from gnuradio.eng_option import eng_option
from optparse import OptionParser
class audio_sink(gr.top_block):
- def __init__(self, src, port, pkt_size, sample_rate):
+ def __init__(self, host, port, pkt_size, sample_rate, eof, wait):
gr.top_block.__init__(self, "audio_sink")
- src = gr.udp_source(gr.sizeof_float, src, port, pkt_size)
+ src = gr.udp_source(gr.sizeof_float, host, port, pkt_size,
+ eof=eof, wait=wait)
dst = audio.sink(sample_rate)
self.connect(src, dst)
if __name__ == '__main__':
parser = OptionParser(option_class=eng_option)
- parser.add_option("", "--src-name", type="string", default="localhost",
+ parser.add_option("", "--host", type="string", default="0.0.0.0",
help="local host name (domain name or IP address)")
- parser.add_option("", "--src-port", type="int", default=65500,
+ parser.add_option("", "--port", type="int", default=65500,
help="port value to listen to for connection")
parser.add_option("", "--packet-size", type="int", default=1472,
help="packet size.")
parser.add_option("-r", "--sample-rate", type="int", default=32000,
help="audio signal sample rate [default=%default]")
+ parser.add_option("", "--no-eof", action="store_true", default=False,
+ help="don't send EOF on disconnect")
+ parser.add_option("", "--no-wait", action="store_true", default=False,
+ help="don't wait for source")
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
raise SystemExit, 1
# Create an instance of a hierarchical block
- top_block = audio_sink(options.src_name, options.src_port,
- options.packet_size, options.sample_rate)
+ top_block = audio_sink(options.host, options.port,
+ options.packet_size, options.sample_rate,
+ not options.no_eof, not options.no_wait)
try:
# Run forever
diff --git a/gnuradio-examples/python/network/audio_source.py b/gnuradio-examples/python/network/audio_source.py
index d7f4f6d93..5818ccbd8 100755
--- a/gnuradio-examples/python/network/audio_source.py
+++ b/gnuradio-examples/python/network/audio_source.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2006,2007 Free Software Foundation, Inc.
+# Copyright 2006,2007,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -25,32 +25,33 @@ from gnuradio.eng_option import eng_option
from optparse import OptionParser
class audio_source(gr.top_block):
- def __init__(self, src, dst, port, pkt_size, sample_rate):
+ def __init__(self, host, port, pkt_size, sample_rate, eof):
gr.top_block.__init__(self, "audio_source")
self.audio = audio.source(sample_rate)
- self.sink = gr.udp_sink(gr.sizeof_float, src, 0, dst, port, pkt_size)
+ self.sink = gr.udp_sink(gr.sizeof_float, host, port, pkt_size, eof=eof)
self.connect(self.audio, self.sink)
if __name__ == '__main__':
parser = OptionParser(option_class=eng_option)
- parser.add_option("", "--src-name", type="string", default="localhost",
- help="local host name (domain name or IP address)")
- parser.add_option("", "--dst-name", type="string", default="localhost",
+ parser.add_option("", "--host", type="string", default="localhost",
help="Remote host name (domain name or IP address")
- parser.add_option("", "--dst-port", type="int", default=65500,
- help="port value to connect to")
+ parser.add_option("", "--port", type="int", default=65500,
+ help="port number to connect to")
parser.add_option("", "--packet-size", type="int", default=1472,
help="packet size.")
parser.add_option("-r", "--sample-rate", type="int", default=32000 ,
help="audio signal sample rate [default=%default]")
+ parser.add_option("", "--no-eof", action="store_true", default=False,
+ help="don't send EOF on disconnect")
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
raise SystemExit, 1
# Create an instance of a hierarchical block
- top_block = audio_source(options.src_name, options.dst_name, options.dst_port,
- options.packet_size, options.sample_rate)
+ top_block = audio_source(options.host, options.port,
+ options.packet_size, options.sample_rate,
+ not options.no_eof)
try:
# Run forever
diff --git a/gnuradio-examples/python/network/dial_tone_sink.py b/gnuradio-examples/python/network/dial_tone_sink.py
index 47d24b9bc..1b9009552 100755
--- a/gnuradio-examples/python/network/dial_tone_sink.py
+++ b/gnuradio-examples/python/network/dial_tone_sink.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2006,2007 Free Software Foundation, Inc.
+# Copyright 2006,2007,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -25,30 +25,36 @@ from gnuradio.eng_option import eng_option
from optparse import OptionParser
class dial_tone_sink(gr.top_block):
- def __init__(self, src, port, pkt_size, sample_rate):
+ def __init__(self, host, port, pkt_size, sample_rate, eof, wait):
gr.top_block.__init__(self, "dial_tone_sink")
- udp = gr.udp_source(gr.sizeof_float, src, port, pkt_size)
+ udp = gr.udp_source(gr.sizeof_float, host, port, pkt_size,
+ eof=eof, wait=wait)
sink = audio.sink(sample_rate)
self.connect(udp, sink)
if __name__ == '__main__':
parser = OptionParser(option_class=eng_option)
- parser.add_option("", "--src-name", type="string", default="localhost",
+ parser.add_option("", "--host", type="string", default="0.0.0.0",
help="local host name (domain name or IP address)")
- parser.add_option("", "--src-port", type="int", default=65500,
+ parser.add_option("", "--port", type="int", default=65500,
help="port value to listen to for connection")
parser.add_option("", "--packet-size", type="int", default=1472,
help="packet size.")
parser.add_option("-r", "--sample-rate", type="int", default=8000,
help="audio signal sample rate [default=%default]")
+ parser.add_option("", "--no-eof", action="store_true", default=False,
+ help="don't send EOF on disconnect")
+ parser.add_option("", "--no-wait", action="store_true", default=False,
+ help="don't wait for source")
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
raise SystemExit, 1
# Create an instance of a hierarchical block
- top_block = dial_tone_sink(options.src_name, options.src_port,
- options.packet_size, options.sample_rate)
+ top_block = dial_tone_sink(options.host, options.port,
+ options.packet_size, options.sample_rate,
+ not options.no_eof, not options.no_wait)
try:
# Run forever
diff --git a/gnuradio-examples/python/network/dial_tone_source.py b/gnuradio-examples/python/network/dial_tone_source.py
index 835f9aafc..766ecf16d 100755
--- a/gnuradio-examples/python/network/dial_tone_source.py
+++ b/gnuradio-examples/python/network/dial_tone_source.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2006,2007 Free Software Foundation, Inc.
+# Copyright 2006,2007,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -25,7 +25,7 @@ from gnuradio.eng_option import eng_option
from optparse import OptionParser
class dial_tone_source(gr.top_block):
- def __init__(self, src, dst, port, pkt_size, sample_rate):
+ def __init__(self, host, port, pkt_size, sample_rate, eof):
gr.top_block.__init__(self, "dial_tone_source")
amplitude = 0.3
@@ -35,31 +35,32 @@ class dial_tone_source(gr.top_block):
# Throttle needed here to account for the other side's audio card sampling rate
thr = gr.throttle(gr.sizeof_float, sample_rate)
- sink = gr.udp_sink(gr.sizeof_float, src, 0, dst, port, pkt_size)
+ sink = gr.udp_sink(gr.sizeof_float, host, port, pkt_size, eof=eof)
self.connect(src0, (add, 0))
self.connect(src1, (add, 1))
self.connect(add, thr, sink)
if __name__ == '__main__':
parser = OptionParser(option_class=eng_option)
- parser.add_option("", "--src-name", type="string", default="localhost",
- help="local host name (domain name or IP address)")
- parser.add_option("", "--dst-name", type="string", default="localhost",
+ parser.add_option("", "--host", type="string", default="localhost",
help="Remote host name (domain name or IP address")
- parser.add_option("", "--dst-port", type="int", default=65500,
- help="port value to connect to")
+ parser.add_option("", "--port", type="int", default=65500,
+ help="port number to connect to")
parser.add_option("", "--packet-size", type="int", default=1472,
help="packet size.")
parser.add_option("-r", "--sample-rate", type="int", default=8000,
help="audio signal sample rate [default=%default]")
+ parser.add_option("", "--no-eof", action="store_true", default=False,
+ help="don't send EOF on disconnect")
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
raise SystemExit, 1
# Create an instance of a hierarchical block
- top_block = dial_tone_source(options.src_name, options.dst_name, options.dst_port,
- options.packet_size, options.sample_rate)
+ top_block = dial_tone_source(options.host, options.port,
+ options.packet_size, options.sample_rate,
+ not options.no_eof)
try:
# Run forever
@@ -67,4 +68,3 @@ if __name__ == '__main__':
except KeyboardInterrupt:
# Ctrl-C exits
pass
-
diff --git a/gnuradio-examples/python/network/vector_sink.py b/gnuradio-examples/python/network/vector_sink.py
index 981cc598b..5d73858a3 100755
--- a/gnuradio-examples/python/network/vector_sink.py
+++ b/gnuradio-examples/python/network/vector_sink.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2006 Free Software Foundation, Inc.
+# Copyright 2006,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -25,28 +25,35 @@ from gnuradio.eng_option import eng_option
from optparse import OptionParser
class vector_sink(gr.top_block):
- def __init__(self, src, port, pkt_size):
+ def __init__(self, host, port, pkt_size, eof, wait):
gr.top_block.__init__(self, "vector_sink")
- udp = gr.udp_source(gr.sizeof_float, src, port, pkt_size)
+ udp = gr.udp_source(gr.sizeof_float, host, port, pkt_size,
+ eof=eof, wait=wait)
sink = gr.file_sink(gr.sizeof_float, "received.dat")
self.connect(udp, sink)
if __name__ == "__main__":
parser = OptionParser(option_class=eng_option)
- parser.add_option("", "--src-name", type="string", default="localhost",
+ parser.add_option("", "--host", type="string", default="0.0.0.0",
help="local host name (domain name or IP address)")
- parser.add_option("", "--src-port", type="int", default=65500,
+ parser.add_option("", "--port", type="int", default=65500,
help="port value to listen to for connection")
parser.add_option("", "--packet-size", type="int", default=1471,
help="packet size.")
+ parser.add_option("", "--no-eof", action="store_true", default=False,
+ help="don't send EOF on disconnect")
+ parser.add_option("", "--no-wait", action="store_true", default=False,
+ help="don't wait for source")
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
raise SystemExit, 1
# Create an instance of a hierarchical block
- top_block = vector_sink(options.src_name, options.src_port, options.packet_size)
+ top_block = vector_sink(options.host, options.port,
+ options.packet_size,
+ not options.no_eof, not options.no_wait)
try:
# Run forever
diff --git a/gnuradio-examples/python/network/vector_source.py b/gnuradio-examples/python/network/vector_source.py
index e7ec2a461..0e7d67844 100755
--- a/gnuradio-examples/python/network/vector_source.py
+++ b/gnuradio-examples/python/network/vector_source.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2006 Free Software Foundation, Inc.
+# Copyright 2006,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -25,31 +25,31 @@ from gnuradio.eng_option import eng_option
from optparse import OptionParser
class vector_source(gr.top_block):
- def __init__(self, src, dst, port, pkt_size):
+ def __init__(self, host, port, pkt_size, eof):
gr.top_block.__init__(self, "vector_source")
data = [i*0.01 for i in range(1000)]
vec = gr.vector_source_f(data, True)
- udp = gr.udp_sink(gr.sizeof_float, src, 0, dst, port, pkt_size)
+ udp = gr.udp_sink(gr.sizeof_float, host, port, pkt_size, eof=eof)
self.connect(vec, udp)
if __name__ == '__main__':
parser = OptionParser(option_class=eng_option)
- parser.add_option("", "--src-name", type="string", default="localhost",
- help="local host name (domain name or IP address)")
- parser.add_option("", "--dst-name", type="string", default="localhost",
+ parser.add_option("", "--host", type="string", default="localhost",
help="Remote host name (domain name or IP address")
- parser.add_option("", "--dst-port", type="int", default=65500,
- help="port value to connect to")
+ parser.add_option("", "--port", type="int", default=65500,
+ help="port number to connect to")
parser.add_option("", "--packet-size", type="int", default=1471,
help="packet size.")
+ parser.add_option("", "--no-eof", action="store_true", default=False,
+ help="don't send EOF on disconnect")
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
raise SystemExit, 1
# Create an instance of a hierarchical block
- top_block = vector_source(options.src_name, options.dst_name,
- options.dst_port, options.packet_size)
+ top_block = vector_source(options.host, options.port, options.packet_size,
+ not options.no_eof)
try:
# Run forever
diff --git a/gnuradio-examples/python/pfb/channelize.py b/gnuradio-examples/python/pfb/channelize.py
index bc83fae27..27d87e558 100755
--- a/gnuradio-examples/python/pfb/channelize.py
+++ b/gnuradio-examples/python/pfb/channelize.py
@@ -101,7 +101,7 @@ def main():
X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs,
window = lambda d: d*winfunc(fftlen),
scale_by_freq=True)
- X_in = 10.0*scipy.log10(abs(fftpack.fftshift(X)))
+ X_in = 10.0*scipy.log10(abs(X))
f_in = scipy.arange(-fs/2.0, fs/2.0, fs/float(X_in.size))
pin_f = spin_f.plot(f_in, X_in, "b")
spin_f.set_xlim([min(f_in), max(f_in)+1])
@@ -144,7 +144,7 @@ def main():
X,freq = mlab.psd(d, NFFT=fftlen, noverlap=fftlen/4, Fs=fs_o,
window = lambda d: d*winfunc(fftlen),
scale_by_freq=True)
- X_o = 10.0*scipy.log10(abs(fftpack.fftshift(X)))
+ X_o = 10.0*scipy.log10(abs(X))
f_o = scipy.arange(-fs_o/2.0, fs_o/2.0, fs_o/float(X_o.size))
p2_f = sp1_f.plot(f_o, X_o, "b")
sp1_f.set_xlim([min(f_o), max(f_o)+1])