summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--[-rwxr-xr-x]config.guess0
-rw-r--r--[-rwxr-xr-x]config.sub0
-rw-r--r--config/Makefile.am1
-rw-r--r--config/gr_version.m419
-rw-r--r--config/grc_vrt.m464
-rw-r--r--configure.ac3
-rw-r--r--gnuradio-core/src/gen_interpolator_taps/Makefile.am18
-rw-r--r--gnuradio-core/src/lib/general/Makefile.am3
-rw-r--r--gnuradio-core/src/lib/general/general.i2
-rw-r--r--gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.cc196
-rw-r--r--gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.h93
-rw-r--r--gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.i34
-rw-r--r--[-rwxr-xr-x]gnuradio-core/src/lib/io/gr_udp_sink.cc0
-rw-r--r--[-rwxr-xr-x]gnuradio-core/src/lib/io/gr_udp_sink.h0
-rw-r--r--[-rwxr-xr-x]gnuradio-core/src/lib/io/gr_udp_sink.i0
-rw-r--r--[-rwxr-xr-x]gnuradio-core/src/lib/io/gr_udp_source.cc0
-rw-r--r--[-rwxr-xr-x]gnuradio-core/src/lib/io/gr_udp_source.h0
-rw-r--r--[-rwxr-xr-x]gnuradio-core/src/lib/io/gr_udp_source.i0
-rw-r--r--gnuradio-core/src/python/gnuradio/gruimpl/hexint.py12
-rwxr-xr-xgnuradio-examples/python/digital/benchmark_qt_loopback.py31
-rwxr-xr-xgnuradio-examples/python/digital/benchmark_qt_loopback2.py2
-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--[-rwxr-xr-x]gr-howto-write-a-block/config.guess239
-rw-r--r--[-rwxr-xr-x]gr-howto-write-a-block/config.sub91
-rw-r--r--gr-howto-write-a-block/config/gr_version.m419
-rw-r--r--gr-howto-write-a-block/python/run_tests.in24
-rw-r--r--gr-howto-write-a-block/version.sh4
-rw-r--r--gr-qtgui/src/lib/ConstellationDisplayPlot.cc41
-rw-r--r--gr-qtgui/src/lib/ConstellationDisplayPlot.h5
-rw-r--r--gr-qtgui/src/lib/FrequencyDisplayPlot.cc110
-rw-r--r--gr-qtgui/src/lib/FrequencyDisplayPlot.h4
-rw-r--r--gr-qtgui/src/lib/SpectrumGUIClass.cc15
-rw-r--r--gr-qtgui/src/lib/SpectrumGUIClass.h5
-rw-r--r--gr-qtgui/src/lib/TimeDomainDisplayPlot.cc125
-rw-r--r--gr-qtgui/src/lib/TimeDomainDisplayPlot.h9
-rw-r--r--gr-qtgui/src/lib/WaterfallDisplayPlot.cc123
-rw-r--r--gr-qtgui/src/lib/WaterfallDisplayPlot.h4
-rw-r--r--gr-qtgui/src/lib/qtgui_sink_c.cc14
-rw-r--r--gr-qtgui/src/lib/qtgui_sink_c.h4
-rw-r--r--gr-qtgui/src/lib/qtgui_sink_f.cc14
-rw-r--r--gr-qtgui/src/lib/qtgui_sink_f.h4
-rw-r--r--gr-qtgui/src/lib/spectrumUpdateEvents.cc27
-rw-r--r--gr-qtgui/src/lib/spectrumUpdateEvents.h35
-rw-r--r--gr-qtgui/src/lib/spectrumdisplayform.ccbin27362 -> 27467 bytes
-rw-r--r--gr-qtgui/src/lib/spectrumdisplayform.h7
-rw-r--r--gr-qtgui/src/lib/spectrumdisplayform.ui74
-rwxr-xr-xgr-qtgui/src/python/pyqt_example.py4
-rwxr-xr-xgr-qtgui/src/python/pyqt_example_f.py4
-rwxr-xr-xgr-qtgui/src/python/qt_digital.py10
-rw-r--r--gr-qtgui/src/python/qt_digital_window.py164
-rw-r--r--gr-qtgui/src/python/qt_digital_window.ui495
-rwxr-xr-xgr-qtgui/src/python/usrp2_display.py4
-rw-r--r--gr-wxgui/src/python/constants.py4
-rw-r--r--gr-wxgui/src/python/fft_window.py53
-rw-r--r--gr-wxgui/src/python/fftsink_gl.py39
-rw-r--r--gr-wxgui/src/python/fftsink_nongl.py62
-rw-r--r--gr-wxgui/src/python/plot.py100
-rw-r--r--gr-wxgui/src/python/plotter/channel_plotter.py3
-rw-r--r--gr-wxgui/src/python/plotter/plotter_base.py38
-rw-r--r--gr-wxgui/src/python/scope_window.py54
-rw-r--r--gr-wxgui/src/python/scopesink_gl.py34
-rw-r--r--grc/blocks/Makefile.am1
-rw-r--r--grc/blocks/block_tree.xml1
-rw-r--r--grc/blocks/gr_dd_mpsk_sync_cc.xml65
-rw-r--r--grc/freedesktop/Makefile.am2
-rw-r--r--grc/freedesktop/gnuradio-gnuradio-companion.desktop (renamed from grc/freedesktop/gnuradio-grc.desktop)2
-rw-r--r--grc/freedesktop/grc_setup_freedesktop.in2
-rw-r--r--grc/scripts/Makefile.am4
-rwxr-xr-xgrc/scripts/gnuradio-companion (renamed from grc/scripts/grc)0
-rw-r--r--usrp/firmware/include/usrp_ids.h1
-rwxr-xr-xusrp/firmware/src/common/build_eeprom.py4
-rwxr-xr-xusrp/host/apps/burn-db-eeprom1
-rw-r--r--usrp/host/include/usrp/Makefile.am1
-rw-r--r--usrp/host/include/usrp/db_bitshark_rx.h56
-rw-r--r--usrp/host/lib/Makefile.am1
-rw-r--r--usrp/host/lib/db_bitshark_rx.cc417
-rw-r--r--usrp/host/lib/db_boards.cc5
-rw-r--r--usrp/host/lib/usrp_dbid.dat2
-rw-r--r--usrp2/firmware/apps/Makefile.am1
-rw-r--r--usrp2/firmware/include/usrp2_types.h6
-rw-r--r--usrp2/firmware/lib/Makefile.am5
-rw-r--r--usrp2/firmware/lib/db_bitshark_rx.c337
-rw-r--r--usrp2/firmware/lib/db_bitshark_rx.h46
-rw-r--r--usrp2/firmware/lib/db_init.c2
-rw-r--r--version.sh4
-rw-r--r--vrt/.gitignore3
-rw-r--r--vrt/Makefile.am29
-rw-r--r--vrt/apps/.gitignore5
-rw-r--r--vrt/apps/Makefile.am18
-rw-r--r--vrt/include/Makefile.am23
-rw-r--r--vrt/include/vrt/Makefile.am30
-rw-r--r--vrt/include/vrt/bits.h92
-rw-r--r--vrt/include/vrt/copiers.h49
-rw-r--r--vrt/include/vrt/expanded_header.h112
-rw-r--r--vrt/include/vrt/rx.h93
-rw-r--r--vrt/include/vrt/rx_packet_handler.h62
-rw-r--r--vrt/include/vrt/types.h138
-rw-r--r--vrt/lib/.gitignore4
-rw-r--r--vrt/lib/Makefile.am50
-rw-r--r--vrt/lib/copiers.cc71
-rw-r--r--vrt/lib/data_handler.cc32
-rw-r--r--vrt/lib/data_handler.h53
-rw-r--r--vrt/lib/expanded_header.cc135
-rw-r--r--vrt/lib/expanded_header_parse_switch_body.h320
-rw-r--r--vrt/lib/expanded_header_unparse_switch_body.h272
-rwxr-xr-xvrt/lib/gen_parse_switch_body.py85
-rwxr-xr-xvrt/lib/gen_unparse_switch_body.py79
-rw-r--r--vrt/lib/rx.cc124
-rw-r--r--vrt/lib/rx_packet_handler.cc41
-rw-r--r--vrt/lib/socket_rx_buffer.cc278
-rw-r--r--vrt/lib/socket_rx_buffer.h122
-rw-r--r--vrt/vrt.pc.in11
119 files changed, 3369 insertions, 5077 deletions
diff --git a/config.guess b/config.guess
index f32079abda..f32079abda 100755..100644
--- a/config.guess
+++ b/config.guess
diff --git a/config.sub b/config.sub
index 6759825a5b..6759825a5b 100755..100644
--- a/config.sub
+++ b/config.sub
diff --git a/config/Makefile.am b/config/Makefile.am
index 959b8f014b..4dc7216f14 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -70,7 +70,6 @@ m4macros = \
grc_gr_video_sdl.m4 \
grc_gr_wxgui.m4 \
grc_gruel.m4 \
- grc_vrt.m4 \
gr_check_createfilemapping.m4 \
gr_check_mc4020.m4 \
gr_check_shm_open.m4 \
diff --git a/config/gr_version.m4 b/config/gr_version.m4
index 3360b7d54d..489f780345 100644
--- a/config/gr_version.m4
+++ b/config/gr_version.m4
@@ -25,7 +25,7 @@ AC_DEFUN([GR_VERSION],[
dnl
dnl MAJOR_VERSION Major release generation (2.x, 3.x, etc.)
dnl API_COMPAT API compatibility version (3.2.x, 3.3.x, etc.)
- dnl MINOR_VERSION Minor release version
+ dnl MINOR_VERSION Minor release version (3.3.0, 3.3.1, etc.)
dnl MAINT_VERSION Pure bugfix additions to make maintenance release
dnl
dnl The last two fields can have 'git' instead of a number to indicate
@@ -53,18 +53,13 @@ AC_DEFUN([GR_VERSION],[
RELEASE=$RELEASE-$GIT_VERSION
fi
else
- dnl This is a numbered reelase.
- dnl Test if minor version is 0, which we don't encode, unless it is also
- dnl a maintenance release
- if test "$MINOR_VERSION" != "0" -o "$MAINT_VERSION" != "0"; then
- dnl 3.3.1
- RELEASE=$RELEASE.$MINOR_VERSION
- if test "$MAINT_VERSION" != "0"; then
- dnl 3.3.0.1, 3.3.1.1
- RELEASE=$RELEASE.$MAINT_VERSION
- fi
- DOCVER=$RELEASE
+ dnl This is a numbered release.
+ RELEASE=$RELEASE.$MINOR_VERSION
+ if test "$MAINT_VERSION" != "0"; then
+ RELEASE=$RELEASE.$MAINT_VERSION
fi
+
+ DOCVER=$RELEASE
fi
fi
diff --git a/config/grc_vrt.m4 b/config/grc_vrt.m4
deleted file mode 100644
index 982c8863a1..0000000000
--- a/config/grc_vrt.m4
+++ /dev/null
@@ -1,64 +0,0 @@
-dnl Copyright 2008,2009 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-
-AC_DEFUN([GRC_VRT],[
- GRC_ENABLE(vrt)
-
- dnl If execution gets to here, $passed will be:
- dnl with : if the --with code didn't error out
- dnl yes : if the --enable code passed muster and all dependencies are met
- dnl no : otherwise
- if test $passed = yes; then
- dnl Needed for vrt_socket_opener
- AC_CHECK_HEADERS(arpa/inet.h byteswap.h linux/if_packet.h sys/socket.h sys/un.h)
- fi
- if test $passed != with; then
- dnl how and where to find INCLUDES and LA
- VRT_INCLUDES="-I\${abs_top_srcdir}/vrt/include"
- VRT_LA="\${abs_top_builddir}/vrt/lib/libvrt.la"
- fi
-
- # Test host OS compatibility
- AC_MSG_CHECKING([whether host_os is linux*])
- case "$host_os" in
- linux*)
- AC_MSG_RESULT([yes])
- ;;
- *)
- AC_MSG_RESULT([no])
- AC_MSG_NOTICE([libvrt currently requires Linux host OS, not found])
- passed="no"
- ;;
- esac
-
- dnl Include the vrt INCLUDES and LA
- AC_SUBST(VRT_INCLUDES)
- AC_SUBST(VRT_LA)
-
- AC_CONFIG_FILES([
- vrt/Makefile
- vrt/vrt.pc
- vrt/include/Makefile
- vrt/include/vrt/Makefile
- vrt/lib/Makefile
- vrt/apps/Makefile
- ])
-
- GRC_BUILD_CONDITIONAL(vrt)
-])
diff --git a/configure.ac b/configure.ac
index 5200059e4e..29a84cb621 100644
--- a/configure.ac
+++ b/configure.ac
@@ -124,7 +124,7 @@ dnl AC_DISABLE_SHARED dnl don't build shared libraries
AC_ENABLE_SHARED dnl do build shared libraries
AC_DISABLE_STATIC dnl don't build static libraries
m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL])
-GR_FORTRAN
+dnl GR_FORTRAN
GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag
GR_SCRIPTING
@@ -340,7 +340,6 @@ GRC_GCELL
GRC_GNURADIO_CORE
GRC_USRP
GRC_USRP2
-GRC_VRT
GRC_GR_USRP dnl this must come after GRC_USRP
GRC_GR_USRP2
GRC_GR_GCELL dnl this must come after GRC_GCELL and GRC_GNURADIO_CORE
diff --git a/gnuradio-core/src/gen_interpolator_taps/Makefile.am b/gnuradio-core/src/gen_interpolator_taps/Makefile.am
index 5f3a6cb254..d244e7f546 100644
--- a/gnuradio-core/src/gen_interpolator_taps/Makefile.am
+++ b/gnuradio-core/src/gen_interpolator_taps/Makefile.am
@@ -21,13 +21,13 @@
include $(top_srcdir)/Makefile.common
-EXTRA_DIST = praxis.txt simpson.h
+EXTRA_DIST = praxis.txt simpson.h objective_fct.c gen_interpolator_taps.c simpson.c praxis.f
-if ENABLE_FORTRAN
-noinst_PROGRAMS = gen_interpolator_taps
-noinst_HEADERS = simpson.h
-
-gen_interpolator_taps_SOURCES = gen_interpolator_taps.c objective_fct.c simpson.c praxis.f
-gen_interpolator_taps_LDADD = $(FLIBS) -lm
-
-endif
+# if ENABLE_FORTRAN
+# noinst_PROGRAMS = gen_interpolator_taps
+# noinst_HEADERS = simpson.h
+#
+# gen_interpolator_taps_SOURCES = gen_interpolator_taps.c objective_fct.c simpson.c praxis.f
+# gen_interpolator_taps_LDADD = $(FLIBS) -lm
+#
+# endif
diff --git a/gnuradio-core/src/lib/general/Makefile.am b/gnuradio-core/src/lib/general/Makefile.am
index b5f5c346be..3d8a42805c 100644
--- a/gnuradio-core/src/lib/general/Makefile.am
+++ b/gnuradio-core/src/lib/general/Makefile.am
@@ -60,7 +60,6 @@ libgeneral_la_SOURCES = \
gr_cpfsk_bc.cc \
gr_crc32.cc \
gr_ctcss_squelch_ff.cc \
- gr_dd_mpsk_sync_cc.cc \
gr_decode_ccsds_27_fb.cc \
gr_deinterleave.cc \
gr_delay.cc \
@@ -215,7 +214,6 @@ grinclude_HEADERS = \
gr_cpfsk_bc.h \
gr_crc32.h \
gr_ctcss_squelch_ff.h \
- gr_dd_mpsk_sync_cc.h \
gr_decode_ccsds_27_fb.h \
gr_diff_decoder_bb.h \
gr_diff_encoder_bb.h \
@@ -386,7 +384,6 @@ swiginclude_HEADERS = \
gr_cpfsk_bc.i \
gr_crc32.i \
gr_ctcss_squelch_ff.i \
- gr_dd_mpsk_sync_cc.i \
gr_decode_ccsds_27_fb.i \
gr_diff_decoder_bb.i \
gr_diff_encoder_bb.i \
diff --git a/gnuradio-core/src/lib/general/general.i b/gnuradio-core/src/lib/general/general.i
index 6929f1e6e8..68cafce2e6 100644
--- a/gnuradio-core/src/lib/general/general.i
+++ b/gnuradio-core/src/lib/general/general.i
@@ -80,7 +80,6 @@
#include <gr_threshold_ff.h>
#include <gr_clock_recovery_mm_ff.h>
#include <gr_clock_recovery_mm_cc.h>
-#include <gr_dd_mpsk_sync_cc.h>
#include <gr_packet_sink.h>
#include <gr_lms_dfe_cc.h>
#include <gr_lms_dfe_ff.h>
@@ -202,7 +201,6 @@
%include "gr_threshold_ff.i"
%include "gr_clock_recovery_mm_ff.i"
%include "gr_clock_recovery_mm_cc.i"
-%include "gr_dd_mpsk_sync_cc.i"
%include "gr_packet_sink.i"
%include "gr_lms_dfe_cc.i"
%include "gr_lms_dfe_ff.i"
diff --git a/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.cc b/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.cc
deleted file mode 100644
index d4141efc7d..0000000000
--- a/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.cc
+++ /dev/null
@@ -1,196 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004 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.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gr_dd_mpsk_sync_cc.h>
-#include <gr_io_signature.h>
-#include <gr_sincos.h>
-#include <gri_mmse_fir_interpolator_cc.h>
-#include <math.h>
-#include <stdexcept>
-#include <cstdio>
-
-#include <gr_complex.h>
-
-#define M_TWOPI (2*M_PI)
-
-gr_dd_mpsk_sync_cc_sptr
-gr_make_dd_mpsk_sync_cc (float alpha, float beta, float max_freq, float min_freq, float ref_phase,
- float omega, float gain_omega, float mu, float gain_mu)
-{
- return gr_dd_mpsk_sync_cc_sptr (new gr_dd_mpsk_sync_cc (alpha, beta, max_freq, min_freq,ref_phase,
- omega,gain_omega,mu,gain_mu));
-}
-
-gr_dd_mpsk_sync_cc::gr_dd_mpsk_sync_cc (float alpha, float beta, float max_freq, float min_freq,
- float ref_phase,
- float omega, float gain_omega, float mu, float gain_mu)
- : gr_block ("dd_mpsk_sync_cc",
- gr_make_io_signature (1, 1, sizeof (gr_complex)),
- gr_make_io_signature (1, 1, sizeof (gr_complex))),
- d_alpha(alpha), d_beta(beta),
- d_max_freq(max_freq), d_min_freq(min_freq),
- d_ref_phase(ref_phase),d_omega(omega), d_gain_omega(gain_omega),
- d_mu(mu), d_gain_mu(gain_mu),
- d_phase(0), d_freq((max_freq+min_freq)/2), d_last_sample(0),
- d_interp(new gri_mmse_fir_interpolator_cc()),
- d_dl_idx(0)
-{
- if (omega <= 0.0)
- throw std::out_of_range ("clock rate must be > 0");
- if (gain_mu < 0 || gain_omega < 0)
- throw std::out_of_range ("Gains must be non-negative");
-
- assert(d_interp->ntaps() <= DLLEN);
-
- // zero double length delay line.
- for (unsigned int i = 0; i < 2 * DLLEN; i++)
- d_dl[i] = gr_complex(0.0,0.0);
-}
-
-gr_dd_mpsk_sync_cc::~gr_dd_mpsk_sync_cc()
-{
- delete d_interp;
-}
-
-float
-gr_dd_mpsk_sync_cc::phase_detector(gr_complex sample,float ref_phase)
-{
- return ((sample.real()>0 ? 1.0 : -1.0) * sample.imag() -
- (sample.imag()>0 ? 1.0 : -1.0) * sample.real());
-}
-
-void
-gr_dd_mpsk_sync_cc::forecast(int noutput_items, gr_vector_int &ninput_items_required)
-{
- unsigned ninputs = ninput_items_required.size();
- for (unsigned i=0; i < ninputs; i++)
- ninput_items_required[i] =
- (int) ceil((noutput_items * d_omega) + d_interp->ntaps());
-}
-gr_complex
-gr_dd_mpsk_sync_cc::slicer_45deg (gr_complex sample)
-{
- float real,imag;
- if(sample.real() > 0)
- real=1;
- else
- real=-1;
- if(sample.imag() > 0)
- imag = 1;
- else
- imag = -1;
- return gr_complex(real,imag);
-}
-
-gr_complex
-gr_dd_mpsk_sync_cc::slicer_0deg (gr_complex sample)
-{
- gr_complex out;
- if( fabs(sample.real()) > fabs(sample.imag()) ) {
- if(sample.real() > 0)
- return gr_complex(1.0,0.0);
- else
- return gr_complex(-1.0,0.0);
- }
- else {
- if(sample.imag() > 0)
- return gr_complex(0.0, 1.0);
- else
- return gr_complex(0.0, -1.0);
- }
-}
-
-int
-gr_dd_mpsk_sync_cc::general_work (int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
-{
- const gr_complex *in = (gr_complex *) input_items[0];
- gr_complex *out = (gr_complex *) output_items[0];
-
- int ii, oo;
- ii = 0; oo = 0;
-
- float error;
- float t_imag, t_real;
- gr_complex nco_out;
- float mm_val;
-
- while (oo < noutput_items) {
- //
- // generate an output sample by interpolating between the carrier
- // tracked samples in the delay line. d_mu, the fractional
- // interpolation amount (in [0.0, 1.0]) is controlled by the
- // symbol timing loop below.
- //
- out[oo] = d_interp->interpolate (&d_dl[d_dl_idx], d_mu);
-
- error = phase_detector(out[oo], d_ref_phase);
-
- d_freq = d_freq + d_beta * error;
- d_phase = d_phase + d_alpha * error;
- while(d_phase>M_TWOPI)
- d_phase -= M_TWOPI;
- while(d_phase<-M_TWOPI)
- d_phase += M_TWOPI;
-
- if (d_freq > d_max_freq)
- d_freq = d_max_freq;
- else if (d_freq < d_min_freq)
- d_freq = d_min_freq;
-
- mm_val = real(d_last_sample * slicer_0deg(out[oo]) - out[oo] * slicer_0deg(d_last_sample));
- d_last_sample = out[oo];
-
- d_omega = d_omega + d_gain_omega * mm_val;
- d_mu = d_mu + d_omega + d_gain_mu * mm_val;
-
- while(d_mu >= 1.0) {
- //
- // Generate more carrier tracked samples for the delay line
- //
- d_mu -= 1.0;
- gr_sincosf(d_phase, &t_imag, &t_real);
- nco_out = gr_complex(t_real, -t_imag);
- gr_complex new_sample = in[ii] * nco_out;
-
- d_dl[d_dl_idx] = new_sample; // overwrite oldest sample
- d_dl[(d_dl_idx + DLLEN)] = new_sample; // and second copy
- d_dl_idx = (d_dl_idx+1) % DLLEN; // point to the new oldest sample
- d_phase = d_phase + d_freq;
- ii++;
- }
- oo++;
- printf("%f\t%f\t%f\t%f\t%f\n",d_mu,d_omega,mm_val,d_freq,d_phase);
- //printf("%f\t%f\t%f\t%f\t%f\t%f\t%f\n",mple).real(),slicer_0deg(d_last_sample).imag(),mm_val,d_omega,d_mu);
- }
-
- assert(ii <= ninput_items[0]);
-
- consume_each (ii);
- return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.h b/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.h
deleted file mode 100644
index 4ffcd3771b..0000000000
--- a/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2006 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.
- */
-
-#ifndef INCLUDED_GR_DD_MPSK_SYNC_CC_H
-#define INCLUDED_GR_DD_MPSK_SYNC_CC_H
-
-#include <gr_sync_block.h>
-
-class gri_mmse_fir_interpolator_cc;
-
-class gr_dd_mpsk_sync_cc;
-typedef boost::shared_ptr<gr_dd_mpsk_sync_cc> gr_dd_mpsk_sync_cc_sptr;
-
-gr_dd_mpsk_sync_cc_sptr
-gr_make_dd_mpsk_sync_cc (float alpha, float beta,
- float max_freq, float min_freq, float ref_phase,
- float omega, float gain_omega, float mu, float gain_mu);
-
-/*!
- * \brief Decision directed M-PSK synchronous demod
- * \ingroup sync_blk
- * This block performs joint carrier tracking and symbol timing recovery.
- *
- * input: complex baseband; output: properly timed complex samples ready for slicing.
- *
- * N.B, at this point, it handles only QPSK.
- */
-
-class gr_dd_mpsk_sync_cc : public gr_block
-{
- friend gr_dd_mpsk_sync_cc_sptr gr_make_dd_mpsk_sync_cc (float alpha, float beta,
- float max_freq, float min_freq, float ref_phase,
- float omega, float gain_omega, float mu, float gain_mu);
-public:
- ~gr_dd_mpsk_sync_cc ();
- void forecast(int noutput_items, gr_vector_int &ninput_items_required);
- float mu() const { return d_mu;}
- float omega() const { return d_omega;}
- float gain_mu() const { return d_gain_mu;}
- float gain_omega() const { return d_gain_omega;}
-
- void set_gain_mu (float gain_mu) { d_gain_mu = gain_mu; }
- void set_gain_omega (float gain_omega) { d_gain_omega = gain_omega; }
- void set_mu (float mu) { d_mu = mu; }
- void set_omega (float omega) { d_omega = omega; }
-
-protected:
- gr_dd_mpsk_sync_cc (float alpha, float beta, float max_freq, float min_freq, float ref_phase,
- float omega, float gain_omega, float mu, float gain_mu);
-
- int general_work (int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-
-private:
- static const unsigned int DLLEN = 8; // delay line length.
-
- float d_alpha,d_beta,d_max_freq,d_min_freq,d_ref_phase;
- float d_omega, d_gain_omega, d_mu, d_gain_mu;
- float d_phase, d_freq;
- gr_complex slicer_45deg (gr_complex sample);
- gr_complex slicer_0deg (gr_complex sample);
- gr_complex d_last_sample;
- gri_mmse_fir_interpolator_cc *d_interp;
-
- gr_complex d_dl[2 * DLLEN]; // Holds post carrier tracking samples.
- // double length delay line to avoid wraps.
- unsigned int d_dl_idx; // indexes oldest sample in delay line.
-
- float phase_detector(gr_complex sample,float ref_phase);
-};
-
-#endif
diff --git a/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.i b/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.i
deleted file mode 100644
index 17739248e7..0000000000
--- a/gnuradio-core/src/lib/general/gr_dd_mpsk_sync_cc.i
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 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.
- */
-
-GR_SWIG_BLOCK_MAGIC(gr,dd_mpsk_sync_cc)
-
- gr_dd_mpsk_sync_cc_sptr gr_make_dd_mpsk_sync_cc (float alpha, float beta,
- float max_freq, float min_freq, float ref_phase,
- float omega, float gain_omega, float mu, float gain_mu);
-
-class gr_dd_mpsk_sync_cc : public gr_block
-{
- private:
- gr_dd_mpsk_sync_cc (float alpha, float beta, float max_freq, float min_freq, float ref_phase,
- float omega, float gain_omega, float mu, float gain_mu);
-};
diff --git a/gnuradio-core/src/lib/io/gr_udp_sink.cc b/gnuradio-core/src/lib/io/gr_udp_sink.cc
index 3084a848be..3084a848be 100755..100644
--- a/gnuradio-core/src/lib/io/gr_udp_sink.cc
+++ b/gnuradio-core/src/lib/io/gr_udp_sink.cc
diff --git a/gnuradio-core/src/lib/io/gr_udp_sink.h b/gnuradio-core/src/lib/io/gr_udp_sink.h
index 421d514a4d..421d514a4d 100755..100644
--- a/gnuradio-core/src/lib/io/gr_udp_sink.h
+++ b/gnuradio-core/src/lib/io/gr_udp_sink.h
diff --git a/gnuradio-core/src/lib/io/gr_udp_sink.i b/gnuradio-core/src/lib/io/gr_udp_sink.i
index a71006ae03..a71006ae03 100755..100644
--- a/gnuradio-core/src/lib/io/gr_udp_sink.i
+++ b/gnuradio-core/src/lib/io/gr_udp_sink.i
diff --git a/gnuradio-core/src/lib/io/gr_udp_source.cc b/gnuradio-core/src/lib/io/gr_udp_source.cc
index fea9a26ba4..fea9a26ba4 100755..100644
--- a/gnuradio-core/src/lib/io/gr_udp_source.cc
+++ b/gnuradio-core/src/lib/io/gr_udp_source.cc
diff --git a/gnuradio-core/src/lib/io/gr_udp_source.h b/gnuradio-core/src/lib/io/gr_udp_source.h
index e23231aa77..e23231aa77 100755..100644
--- a/gnuradio-core/src/lib/io/gr_udp_source.h
+++ b/gnuradio-core/src/lib/io/gr_udp_source.h
diff --git a/gnuradio-core/src/lib/io/gr_udp_source.i b/gnuradio-core/src/lib/io/gr_udp_source.i
index 2001f33e9c..2001f33e9c 100755..100644
--- a/gnuradio-core/src/lib/io/gr_udp_source.i
+++ b/gnuradio-core/src/lib/io/gr_udp_source.i
diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/hexint.py b/gnuradio-core/src/python/gnuradio/gruimpl/hexint.py
index 8d46e8192f..f2808c4489 100644
--- a/gnuradio-core/src/python/gnuradio/gruimpl/hexint.py
+++ b/gnuradio-core/src/python/gnuradio/gruimpl/hexint.py
@@ -30,3 +30,15 @@ def hexint(mask):
if mask >= 2**31:
return int(mask-2**32)
return mask
+
+def hexshort(mask):
+ """
+ Convert unsigned masks into signed shorts.
+
+ This allows us to use hex constants like 0x8000 when talking to
+ our hardware and not get screwed by them getting treated as python
+ longs.
+ """
+ if mask >= 2**15:
+ return int(mask-2**16)
+ return mask
diff --git a/gnuradio-examples/python/digital/benchmark_qt_loopback.py b/gnuradio-examples/python/digital/benchmark_qt_loopback.py
index 35cc2e376d..0ae0e4e51a 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 56c6c7f52e..02ae4b25ff 100755
--- a/gnuradio-examples/python/digital/benchmark_qt_loopback2.py
+++ b/gnuradio-examples/python/digital/benchmark_qt_loopback2.py
@@ -254,7 +254,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
if channelon:
diff --git a/gnuradio-examples/python/digital/qt_digital_window.py b/gnuradio-examples/python/digital/qt_digital_window.py
index 6e0f25212e..b47ed0c2b5 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 a0af196edc..4b3857d87e 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 98745dfe8d..2d10e3a7f0 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 4e87ff0583..5447046684 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 60e1a6e379..e2488eb3d3 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 4631b77827..f5a074876d 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 14c961ab2b..2fd719ce1b 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 5a83471b8b..745af8fb81 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/gr-howto-write-a-block/config.guess b/gr-howto-write-a-block/config.guess
index dc84c68ef7..f32079abda 100755..100644
--- a/gr-howto-write-a-block/config.guess
+++ b/gr-howto-write-a-block/config.guess
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
-timestamp='2009-11-20'
+timestamp='2008-01-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2009-11-20'
# the same distribution terms that you use for the rest of that program.
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ELF__
+ | grep __ELF__ >/dev/null
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -324,33 +324,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
- exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -659,7 +640,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep -q __LP64__
+ grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
@@ -810,12 +791,12 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- *:Interix*:*)
+ *:Interix*:[3456]*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- authenticamd | genuineintel | EM64T)
+ EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
@@ -825,9 +806,6 @@ EOF
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -857,20 +835,6 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -893,17 +857,6 @@ EOF
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
- i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
@@ -913,33 +866,74 @@ EOF
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- mips:Linux:*:* | mips64:Linux:*:*)
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
- #undef ${UNAME_MACHINE}
- #undef ${UNAME_MACHINE}el
+ #undef mips64
+ #undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=${UNAME_MACHINE}el
+ CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=${UNAME_MACHINE}
+ CPU=mips64
#else
CPU=
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
@@ -949,11 +943,8 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
@@ -976,6 +967,69 @@ EOF
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@@ -1004,7 +1058,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@@ -1048,11 +1102,8 @@ EOF
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
@@ -1090,16 +1141,6 @@ EOF
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@@ -1112,7 +1153,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1175,9 +1216,6 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1205,16 +1243,6 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1296,9 +1324,6 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/gr-howto-write-a-block/config.sub b/gr-howto-write-a-block/config.sub
index 2a55a50751..6759825a5b 100755..100644
--- a/gr-howto-write-a-block/config.sub
+++ b/gr-howto-write-a-block/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
-timestamp='2009-11-20'
+timestamp='2008-01-16'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -32,16 +32,13 @@ timestamp='2009-11-20'
# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
-# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@@ -125,7 +122,6 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -152,13 +148,10 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
- -bluegene*)
- os=-cnk
- ;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@@ -256,16 +249,13 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
@@ -278,7 +268,6 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
- | moxie \
| mt \
| msp430 \
| nios | nios2 \
@@ -287,22 +276,20 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
- | ubicom32 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k | z80)
+ | z8k)
basic_machine=$basic_machine-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
+ m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
@@ -342,17 +329,14 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
@@ -373,22 +357,21 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
- | romp-* | rs6000-* | rx-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
- | ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
- | z8k-* | z80-*)
+ | z8k-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
@@ -456,10 +439,6 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -476,18 +455,10 @@ case $basic_machine in
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
- bluegene*)
- basic_machine=powerpc-ibm
- os=-cnk
- ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -555,10 +526,6 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
@@ -732,9 +699,6 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
- basic_machine=microblaze-xilinx
- ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -1164,10 +1128,6 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
- ;;
none)
basic_machine=none-none
os=-none
@@ -1206,7 +1166,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1256,9 +1216,6 @@ case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
- ;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@@ -1279,11 +1236,10 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1292,7 +1248,7 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
+ | -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1302,7 +1258,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1432,9 +1388,6 @@ case $os in
-zvmoe)
os=-zvmoe
;;
- -dicos*)
- os=-dicos
- ;;
-none)
;;
*)
@@ -1632,7 +1585,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
- -cnk*|-aix*)
+ -aix*)
vendor=ibm
;;
-beos*)
diff --git a/gr-howto-write-a-block/config/gr_version.m4 b/gr-howto-write-a-block/config/gr_version.m4
index 3360b7d54d..489f780345 100644
--- a/gr-howto-write-a-block/config/gr_version.m4
+++ b/gr-howto-write-a-block/config/gr_version.m4
@@ -25,7 +25,7 @@ AC_DEFUN([GR_VERSION],[
dnl
dnl MAJOR_VERSION Major release generation (2.x, 3.x, etc.)
dnl API_COMPAT API compatibility version (3.2.x, 3.3.x, etc.)
- dnl MINOR_VERSION Minor release version
+ dnl MINOR_VERSION Minor release version (3.3.0, 3.3.1, etc.)
dnl MAINT_VERSION Pure bugfix additions to make maintenance release
dnl
dnl The last two fields can have 'git' instead of a number to indicate
@@ -53,18 +53,13 @@ AC_DEFUN([GR_VERSION],[
RELEASE=$RELEASE-$GIT_VERSION
fi
else
- dnl This is a numbered reelase.
- dnl Test if minor version is 0, which we don't encode, unless it is also
- dnl a maintenance release
- if test "$MINOR_VERSION" != "0" -o "$MAINT_VERSION" != "0"; then
- dnl 3.3.1
- RELEASE=$RELEASE.$MINOR_VERSION
- if test "$MAINT_VERSION" != "0"; then
- dnl 3.3.0.1, 3.3.1.1
- RELEASE=$RELEASE.$MAINT_VERSION
- fi
- DOCVER=$RELEASE
+ dnl This is a numbered release.
+ RELEASE=$RELEASE.$MINOR_VERSION
+ if test "$MAINT_VERSION" != "0"; then
+ RELEASE=$RELEASE.$MAINT_VERSION
fi
+
+ DOCVER=$RELEASE
fi
fi
diff --git a/gr-howto-write-a-block/python/run_tests.in b/gr-howto-write-a-block/python/run_tests.in
index 5b50509e17..2c32539c71 100644
--- a/gr-howto-write-a-block/python/run_tests.in
+++ b/gr-howto-write-a-block/python/run_tests.in
@@ -28,6 +28,30 @@ echo $PYTHONPATH
export PYTHONPATH
+case "@host_os@" in
+ darwin*)
+ # FIXME: Code for Darwin guessed but not tested
+ # Special Code for executing on Darwin / Mac OS X only
+ if [ "$DYLD_LIBRARY_PATH" = "" ]
+ then
+ DYLD_LIBRARY_PATH=$libbld/.libs
+ else
+ DYLD_LIBRARY_PATH=$libbld/.libs:$DYLD_LIBRARY_PATH
+ fi
+ export DYLD_LIBRARY_PATH
+ ;;
+ cygwin*|win*|mingw*)
+ # Special Code for executing on Win32 variants only
+ if [ "$PATH" = "" ]
+ then
+ PATH=$libbld/.libs
+ else
+ PATH=$libbld/.libs:$PATH
+ fi
+ export PATH
+ ;;
+esac
+
#
# This is the simple part...
# Run everything that matches qa_*.py and return the final result.
diff --git a/gr-howto-write-a-block/version.sh b/gr-howto-write-a-block/version.sh
index b2cad877dd..fa37f42981 100644
--- a/gr-howto-write-a-block/version.sh
+++ b/gr-howto-write-a-block/version.sh
@@ -1,4 +1,4 @@
MAJOR_VERSION=3
API_COMPAT=3
-MINOR_VERSION=git
-MAINT_VERSION=
+MINOR_VERSION=0-rc1
+MAINT_VERSION=0
diff --git a/gr-qtgui/src/lib/ConstellationDisplayPlot.cc b/gr-qtgui/src/lib/ConstellationDisplayPlot.cc
index 80bf4503f5..e8e6288f5b 100644
--- a/gr-qtgui/src/lib/ConstellationDisplayPlot.cc
+++ b/gr-qtgui/src/lib/ConstellationDisplayPlot.cc
@@ -26,8 +26,8 @@ public:
protected:
virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
- QwtText t(QString("Sample %1, %2 V").arg(p.x(), 0, 'f', 0).arg(p.y(), 0, 'f', 4));
-
+ QwtText t(QString("(%1, %2)").arg(p.x(), 0, 'f', 4).
+ arg(p.y(), 0, 'f', 4));
return t;
}
};
@@ -39,8 +39,6 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent)
resize(parent->width(), parent->height());
- _displayIntervalTime = (1.0/10.0); // 1/10 of a second between updates
-
_numPoints = 1024;
_penSize = 5;
_realDataPoints = new double[_numPoints];
@@ -58,12 +56,10 @@ ConstellationDisplayPlot::ConstellationDisplayPlot(QWidget* parent)
canvas()->setPalette(palette);
setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine);
- //setAxisScale(QwtPlot::xBottom, -1.0, 1.0);
set_xaxis(-2.0, 2.0);
setAxisTitle(QwtPlot::xBottom, "In-phase");
setAxisScaleEngine(QwtPlot::yLeft, new QwtLinearScaleEngine);
- //setAxisScale(QwtPlot::yLeft, -1.0, 1.0);
set_yaxis(-2.0, 2.0);
setAxisTitle(QwtPlot::yLeft, "Quadrature");
@@ -148,19 +144,9 @@ ConstellationDisplayPlot::set_axis(double xmin, double xmax,
set_yaxis(ymin, ymax);
}
-void ConstellationDisplayPlot::replot(){
-
- const timespec startTime = get_highres_clock();
-
+void ConstellationDisplayPlot::replot()
+{
QwtPlot::replot();
-
- double differenceTime = (diff_timespec(get_highres_clock(), startTime));
-
- differenceTime *= 99.0;
- // Require at least a 10% duty cycle
- if(differenceTime > (1.0/10.0)){
- _displayIntervalTime = differenceTime;
- }
}
void
@@ -171,10 +157,12 @@ ConstellationDisplayPlot::resizeSlot( QSize *s )
void ConstellationDisplayPlot::PlotNewData(const double* realDataPoints,
const double* imagDataPoints,
- const int64_t numDataPoints)
+ const int64_t numDataPoints,
+ const double timeInterval)
{
- if(numDataPoints > 0){
-
+ if((numDataPoints > 0) &&
+ (diff_timespec(get_highres_clock(), _lastReplot) > timeInterval)) {
+
if(numDataPoints != _numPoints){
_numPoints = numDataPoints;
@@ -185,17 +173,12 @@ void ConstellationDisplayPlot::PlotNewData(const double* realDataPoints,
_plot_curve->setRawData(_realDataPoints, _imagDataPoints, _numPoints);
}
+
memcpy(_realDataPoints, realDataPoints, numDataPoints*sizeof(double));
memcpy(_imagDataPoints, imagDataPoints, numDataPoints*sizeof(double));
- }
-
- // Allow at least a 50% duty cycle
- if(diff_timespec(get_highres_clock(), _lastReplot) > _displayIntervalTime){
- // Only replot the screen if it is visible
- if(isVisible()){
- replot();
- }
+ replot();
+
_lastReplot = get_highres_clock();
}
}
diff --git a/gr-qtgui/src/lib/ConstellationDisplayPlot.h b/gr-qtgui/src/lib/ConstellationDisplayPlot.h
index 99ae566e0a..a441a8bfe8 100644
--- a/gr-qtgui/src/lib/ConstellationDisplayPlot.h
+++ b/gr-qtgui/src/lib/ConstellationDisplayPlot.h
@@ -24,7 +24,8 @@ public:
void PlotNewData(const double* realDataPoints,
const double* imagDataPoints,
- const int64_t numDataPoints);
+ const int64_t numDataPoints,
+ const double timeInterval);
virtual void replot();
@@ -55,8 +56,6 @@ private:
int64_t _numPoints;
int64_t _penSize;
-
- double _displayIntervalTime;
};
#endif /* CONSTELLATION_DISPLAY_PLOT_HPP */
diff --git a/gr-qtgui/src/lib/FrequencyDisplayPlot.cc b/gr-qtgui/src/lib/FrequencyDisplayPlot.cc
index 7deff85436..f2cde322ef 100644
--- a/gr-qtgui/src/lib/FrequencyDisplayPlot.cc
+++ b/gr-qtgui/src/lib/FrequencyDisplayPlot.cc
@@ -73,15 +73,22 @@ public:
updateDisplay();
}
+ void SetUnitType(const std::string &type)
+ {
+ _unitType = type;
+ }
+
protected:
virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
- QString strunits = (GetFrequencyPrecision() == 0) ? "Hz" : "kHz";
- QwtText t(QString("%1 %2, %3 dB").arg(p.x(), 0, 'f',
- GetFrequencyPrecision()).arg(strunits).arg(p.y(), 0, 'f', 2));
-
+ QwtText t(QString("%1 %2, %3 dB").
+ arg(p.x(), 0, 'f', GetFrequencyPrecision()).
+ arg(_unitType.c_str()).arg(p.y(), 0, 'f', 2));
return t;
}
+
+private:
+ std::string _unitType;
};
FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent)
@@ -94,8 +101,6 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent)
resize(parent->width(), parent->height());
- _displayIntervalTime = (1.0/10.0); // 1/10 of a second between updates
-
_useCenterFrequencyFlag = false;
_numPoints = 1024;
@@ -115,9 +120,8 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent)
palette.setColor(canvas()->backgroundRole(), QColor("white"));
canvas()->setPalette(palette);
- setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(0));
- setAxisScale(QwtPlot::xBottom, _startFrequency, _stopFrequency);
setAxisTitle(QwtPlot::xBottom, "Frequency (Hz)");
+ setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(0));
_minYAxis = -120;
_maxYAxis = 10;
@@ -150,7 +154,7 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent)
_upper_intensity_marker = new QwtPlotMarker();
_upper_intensity_marker->setLineStyle(QwtPlotMarker::HLine);
- _upper_intensity_marker->setLinePen(QPen(Qt::green));
+ _upper_intensity_marker->setLinePen(QPen(Qt::green, 0, Qt::DotLine));
_upper_intensity_marker->attach(this);
memset(_dataPoints, 0x0, _numPoints*sizeof(double));
@@ -161,9 +165,6 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent)
_maxFFTPoints[number] = -280.0;
}
- _resetXAxisPoints();
-
-
// set up peak marker
QwtSymbol symbol;
@@ -213,6 +214,9 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent)
const QColor c(Qt::darkRed);
_zoomer->setRubberBandPen(c);
_zoomer->setTrackerPen(c);
+
+ // Do this after the zoomer has been built
+ _resetXAxisPoints();
}
FrequencyDisplayPlot::~FrequencyDisplayPlot()
@@ -258,21 +262,26 @@ FrequencyDisplayPlot::SetFrequencyRange(const double constStartFreq,
stopFreq = (stopFreq + centerFreq);
}
- _startFrequency = startFreq;
- _stopFrequency = stopFreq;
- _resetXAxisPoints();
-
- double display_units = ceil(log10(units)/2.0);
- setAxisScale(QwtPlot::xBottom, _startFrequency, _stopFrequency);
- setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(display_units));
- setAxisTitle(QwtPlot::xBottom, QString("Frequency (%1)").arg(strunits.c_str()));
- ((FreqDisplayZoomer*)_zoomer)->SetFrequencyPrecision(display_units);
-
- // Load up the new base zoom settings
- _zoomer->setZoomBase();
-
- // Zooms back to the base and clears any other zoom levels
- _zoomer->zoom(0);
+ bool reset = false;
+ if((startFreq != _startFrequency) || (stopFreq != _stopFrequency))
+ reset = true;
+
+ if(stopFreq > startFreq) {
+ _startFrequency = startFreq;
+ _stopFrequency = stopFreq;
+
+ if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (_zoomer != NULL)){
+ double display_units = ceil(log10(units)/2.0);
+ setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(display_units));
+ setAxisTitle(QwtPlot::xBottom, QString("Frequency (%1)").arg(strunits.c_str()));
+
+ if(reset)
+ _resetXAxisPoints();
+
+ ((FreqDisplayZoomer*)_zoomer)->SetFrequencyPrecision(display_units);
+ ((FreqDisplayZoomer*)_zoomer)->SetUnitType(strunits);
+ }
+ }
}
@@ -291,8 +300,6 @@ FrequencyDisplayPlot::GetStopFrequency() const
void
FrequencyDisplayPlot::replot()
{
- const timespec startTime = get_highres_clock();
-
_markerNoiseFloorAmplitude->setYValue(_noiseFloorAmplitude);
// Make sure to take into account the start frequency
@@ -305,14 +312,6 @@ FrequencyDisplayPlot::replot()
_markerPeakAmplitude->setYValue(_peakAmplitude);
QwtPlot::replot();
-
- double differenceTime = (diff_timespec(get_highres_clock(), startTime));
-
- differenceTime *= 99.0;
- // Require at least a 10% duty cycle
- if(differenceTime > (1.0/10.0)){
- _displayIntervalTime = differenceTime;
- }
}
void
@@ -324,13 +323,15 @@ FrequencyDisplayPlot::resizeSlot( QSize *s )
void
FrequencyDisplayPlot::PlotNewData(const double* dataPoints, const int64_t numDataPoints,
const double noiseFloorAmplitude, const double peakFrequency,
- const double peakAmplitude)
+ const double peakAmplitude, const double timeInterval)
{
- if(numDataPoints > 0){
-
- if(numDataPoints != _numPoints){
+ // Only update plot if there is data and if the time interval has elapsed
+ if((numDataPoints > 0) &&
+ (diff_timespec(get_highres_clock(), _lastReplot) > timeInterval)) {
+
+ if(numDataPoints != _numPoints) {
_numPoints = numDataPoints;
-
+
delete[] _dataPoints;
delete[] _minFFTPoints;
delete[] _maxFFTPoints;
@@ -343,12 +344,12 @@ FrequencyDisplayPlot::PlotNewData(const double* dataPoints, const int64_t numDat
_fft_plot_curve->setRawData(_xAxisPoints, _dataPoints, _numPoints);
_min_fft_plot_curve->setRawData(_xAxisPoints, _minFFTPoints, _numPoints);
_max_fft_plot_curve->setRawData(_xAxisPoints, _maxFFTPoints, _numPoints);
-
+
_resetXAxisPoints();
ClearMaxData();
ClearMinData();
}
-
+
memcpy(_dataPoints, dataPoints, numDataPoints*sizeof(double));
for(int64_t point = 0; point < numDataPoints; point++){
if(dataPoints[point] < _minFFTPoints[point]){
@@ -363,14 +364,10 @@ FrequencyDisplayPlot::PlotNewData(const double* dataPoints, const int64_t numDat
_peakFrequency = peakFrequency;
_peakAmplitude = peakAmplitude;
- }
+ SetUpperIntensityLevel(_peakAmplitude);
- // Allow at least a 50% duty cycle
- if(diff_timespec(get_highres_clock(), _lastReplot) > _displayIntervalTime){
- // Only replot the screen if it is visible
- if(isVisible()){
- replot();
- }
+ replot();
+
_lastReplot = get_highres_clock();
}
}
@@ -412,6 +409,17 @@ FrequencyDisplayPlot::_resetXAxisPoints()
_xAxisPoints[loc] = freqValue;
freqValue += fft_bin_size;
}
+
+ setAxisScale(QwtPlot::xBottom, _startFrequency, _stopFrequency);
+
+ // Set up zoomer base for maximum unzoom x-axis
+ // and reset to maximum unzoom level
+ QwtDoubleRect zbase = _zoomer->zoomBase();
+ zbase.setLeft(_startFrequency);
+ zbase.setRight(_stopFrequency);
+ _zoomer->zoom(zbase);
+ _zoomer->setZoomBase(zbase);
+ _zoomer->zoom(0);
}
void
diff --git a/gr-qtgui/src/lib/FrequencyDisplayPlot.h b/gr-qtgui/src/lib/FrequencyDisplayPlot.h
index 785efe694b..c78e1667ea 100644
--- a/gr-qtgui/src/lib/FrequencyDisplayPlot.h
+++ b/gr-qtgui/src/lib/FrequencyDisplayPlot.h
@@ -30,7 +30,7 @@ public:
void PlotNewData(const double* dataPoints, const int64_t numDataPoints,
const double noiseFloorAmplitude, const double peakFrequency,
- const double peakAmplitude);
+ const double peakAmplitude, const double timeInterval);
void ClearMaxData();
void ClearMinData();
@@ -86,8 +86,6 @@ private:
timespec _lastReplot;
bool _useCenterFrequencyFlag;
-
- double _displayIntervalTime;
};
#endif /* FREQUENCY_DISPLAY_PLOT_HPP */
diff --git a/gr-qtgui/src/lib/SpectrumGUIClass.cc b/gr-qtgui/src/lib/SpectrumGUIClass.cc
index 4cb71a31a0..8c1b367030 100644
--- a/gr-qtgui/src/lib/SpectrumGUIClass.cc
+++ b/gr-qtgui/src/lib/SpectrumGUIClass.cc
@@ -111,7 +111,7 @@ SpectrumGUIClass::OpenSpectrumWindow(QWidget* parent,
timespec_reset(&_lastGUIUpdateTime);
// Draw Blank Display
- UpdateWindow(false, NULL, 0, NULL, 0, NULL, 0, 1.0, get_highres_clock(), true);
+ UpdateWindow(false, NULL, 0, NULL, 0, NULL, 0, get_highres_clock(), true);
// Set up the initial frequency axis settings
SetFrequencyRange(_centerFrequency, _startFrequency, _stopFrequency);
@@ -220,7 +220,6 @@ SpectrumGUIClass::UpdateWindow(const bool updateDisplayFlag,
const uint64_t realTimeDomainDataSize,
const float* complexTimeDomainData,
const uint64_t complexTimeDomainDataSize,
- const double timePerFFT,
const timespec timestamp,
const bool lastOfMultipleFFTUpdateFlag)
{
@@ -277,7 +276,7 @@ SpectrumGUIClass::UpdateWindow(const bool updateDisplayFlag,
const timespec currentTime = get_highres_clock();
const timespec lastUpdateGUITime = GetLastGUIUpdateTime();
- if((diff_timespec(currentTime, lastUpdateGUITime) > (4*timePerFFT)) &&
+ if((diff_timespec(currentTime, lastUpdateGUITime) > (4*_updateTime)) &&
(GetPendingGUIUpdateEvents() > 0) && !timespec_empty(&lastUpdateGUITime)) {
// Do not update the display if too much data is pending to be displayed
_droppedEntriesCount++;
@@ -290,7 +289,7 @@ SpectrumGUIClass::UpdateWindow(const bool updateDisplayFlag,
_realTimeDomainPoints,
_imagTimeDomainPoints,
timeDomainBufferSize,
- timePerFFT, timestamp,
+ timestamp,
repeatDataFlag,
lastOfMultipleFFTUpdateFlag,
currentTime,
@@ -460,4 +459,12 @@ SpectrumGUIClass::SetFrequencyAxis(double min, double max)
_spectrumDisplayForm->SetFrequencyAxis(min, max);
}
+void
+SpectrumGUIClass::SetUpdateTime(double t)
+{
+ _updateTime = t;
+ _spectrumDisplayForm->SetUpdateTime(_updateTime);
+}
+
+
#endif /* SPECTRUM_GUI_CLASS_CPP */
diff --git a/gr-qtgui/src/lib/SpectrumGUIClass.h b/gr-qtgui/src/lib/SpectrumGUIClass.h
index d8dcb27691..17d3a54c1a 100644
--- a/gr-qtgui/src/lib/SpectrumGUIClass.h
+++ b/gr-qtgui/src/lib/SpectrumGUIClass.h
@@ -47,7 +47,7 @@ public:
void UpdateWindow(const bool, const std::complex<float>*,
const uint64_t, const float*,
const uint64_t, const float*,
- const uint64_t, const double,
+ const uint64_t,
const timespec, const bool);
float GetPowerValue()const;
@@ -79,6 +79,8 @@ public:
void SetConstellationPenSize(int size);
void SetFrequencyAxis(double min, double max);
+ void SetUpdateTime(double t);
+
protected:
private:
@@ -98,6 +100,7 @@ private:
unsigned int _pendingGUIUpdateEventsCount;
int _droppedEntriesCount;
bool _fftBuffersCreatedFlag;
+ double _updateTime;
SpectrumDisplayForm* _spectrumDisplayForm;
diff --git a/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc b/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc
index cb18b44184..c299f83a4a 100644
--- a/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc
+++ b/gr-qtgui/src/lib/TimeDomainDisplayPlot.cc
@@ -7,10 +7,37 @@
#include <qwt_legend.h>
-class TimeDomainDisplayZoomer: public QwtPlotZoomer
+class TimePrecisionClass
{
public:
- TimeDomainDisplayZoomer(QwtPlotCanvas* canvas):QwtPlotZoomer(canvas)
+ TimePrecisionClass(const int timePrecision)
+ {
+ _timePrecision = timePrecision;
+ }
+
+ virtual ~TimePrecisionClass()
+ {
+ }
+
+ virtual unsigned int GetTimePrecision() const
+ {
+ return _timePrecision;
+ }
+
+ virtual void SetTimePrecision(const unsigned int newPrecision)
+ {
+ _timePrecision = newPrecision;
+ }
+protected:
+ unsigned int _timePrecision;
+};
+
+
+class TimeDomainDisplayZoomer: public QwtPlotZoomer, public TimePrecisionClass
+{
+public:
+ TimeDomainDisplayZoomer(QwtPlotCanvas* canvas, const unsigned int timePrecision)
+ : QwtPlotZoomer(canvas),TimePrecisionClass(timePrecision)
{
setTrackerMode(QwtPicker::AlwaysOn);
}
@@ -23,28 +50,37 @@ public:
updateDisplay();
}
+ void SetUnitType(const std::string &type)
+ {
+ _unitType = type;
+ }
+
protected:
virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
- QwtText t(QString("Sample %1, %2 V").arg(p.x(), 0, 'f', 0).arg(p.y(), 0, 'f', 4));
+ QwtText t(QString("%1 %2, %3 V").arg(p.x(), 0, 'f', GetTimePrecision()).
+ arg(_unitType.c_str()).
+ arg(p.y(), 0, 'f', 4));
return t;
}
+
+private:
+ std::string _unitType;
};
-TimeDomainDisplayPlot::TimeDomainDisplayPlot(QWidget* parent):QwtPlot(parent){
+TimeDomainDisplayPlot::TimeDomainDisplayPlot(QWidget* parent):QwtPlot(parent)
+{
timespec_reset(&_lastReplot);
resize(parent->width(), parent->height());
- _displayIntervalTime = (1.0/10.0); // 1/10 of a second between updates
-
_numPoints = 1024;
_realDataPoints = new double[_numPoints];
_imagDataPoints = new double[_numPoints];
_xAxisPoints = new double[_numPoints];
- _zoomer = new TimeDomainDisplayZoomer(canvas());
+ _zoomer = new TimeDomainDisplayZoomer(canvas(), 0);
// Disable polygon clipping
QwtPainter::setDeviceClipping(false);
@@ -59,7 +95,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(QWidget* parent):QwtPlot(parent){
setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine);
set_xaxis(0, _numPoints);
- setAxisTitle(QwtPlot::xBottom, "Sample Number");
+ setAxisTitle(QwtPlot::xBottom, "Time (sec)");
setAxisScaleEngine(QwtPlot::yLeft, new QwtLinearScaleEngine);
set_yaxis(-2.0, 2.0);
@@ -81,6 +117,7 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(QWidget* parent):QwtPlot(parent){
memset(_imagDataPoints, 0x0, _numPoints*sizeof(double));
memset(_xAxisPoints, 0x0, _numPoints*sizeof(double));
+ _sampleRate = 1;
_resetXAxisPoints();
replot();
@@ -114,7 +151,8 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(QWidget* parent):QwtPlot(parent){
legendDisplay->setItemMode(QwtLegend::CheckableItem);
insertLegend(legendDisplay);
- connect(this, SIGNAL( legendChecked(QwtPlotItem *, bool ) ), this, SLOT( LegendEntryChecked(QwtPlotItem *, bool ) ));
+ connect(this, SIGNAL( legendChecked(QwtPlotItem *, bool ) ),
+ this, SLOT( LegendEntryChecked(QwtPlotItem *, bool ) ));
}
TimeDomainDisplayPlot::~TimeDomainDisplayPlot(){
@@ -143,17 +181,7 @@ TimeDomainDisplayPlot::set_xaxis(double min, double max)
void TimeDomainDisplayPlot::replot()
{
- const timespec startTime = get_highres_clock();
-
QwtPlot::replot();
-
- double differenceTime = (diff_timespec(get_highres_clock(), startTime));
-
- differenceTime *= 99.0;
- // Require at least a 10% duty cycle
- if(differenceTime > (1.0/10.0)){
- _displayIntervalTime = differenceTime;
- }
}
void
@@ -164,10 +192,12 @@ TimeDomainDisplayPlot::resizeSlot( QSize *s )
void TimeDomainDisplayPlot::PlotNewData(const double* realDataPoints,
const double* imagDataPoints,
- const int64_t numDataPoints)
+ const int64_t numDataPoints,
+ const double timeInterval)
{
- if(numDataPoints > 0){
-
+ if((numDataPoints > 0) &&
+ (diff_timespec(get_highres_clock(), _lastReplot) > timeInterval)) {
+
if(numDataPoints != _numPoints){
_numPoints = numDataPoints;
@@ -185,34 +215,61 @@ void TimeDomainDisplayPlot::PlotNewData(const double* realDataPoints,
_resetXAxisPoints();
}
+
memcpy(_realDataPoints, realDataPoints, numDataPoints*sizeof(double));
memcpy(_imagDataPoints, imagDataPoints, numDataPoints*sizeof(double));
- }
+ replot();
- // Allow at least a 50% duty cycle
- if(diff_timespec(get_highres_clock(), _lastReplot) > _displayIntervalTime){
- // Only replot the screen if it is visible
- if(isVisible()){
- replot();
- }
_lastReplot = get_highres_clock();
}
}
-void TimeDomainDisplayPlot::SetImaginaryDataVisible(const bool visibleFlag){
+void TimeDomainDisplayPlot::SetImaginaryDataVisible(const bool visibleFlag)
+{
_imag_plot_curve->setVisible(visibleFlag);
}
-void TimeDomainDisplayPlot::_resetXAxisPoints(){
+void TimeDomainDisplayPlot::_resetXAxisPoints()
+{
+ double delt = 1.0/_sampleRate;
for(long loc = 0; loc < _numPoints; loc++){
- _xAxisPoints[loc] = loc;
+ _xAxisPoints[loc] = loc*delt;
}
- setAxisScale(QwtPlot::xBottom, 0, _numPoints);
+ setAxisScale(QwtPlot::xBottom, 0, _numPoints*delt);
+
+ // Set up zoomer base for maximum unzoom x-axis
+ // and reset to maximum unzoom level
+ QwtDoubleRect zbase = _zoomer->zoomBase();
+ zbase.setLeft(0);
+ zbase.setRight(_numPoints*delt);
+ _zoomer->zoom(zbase);
+ _zoomer->setZoomBase(zbase);
+ _zoomer->zoom(0);
}
-void TimeDomainDisplayPlot::LegendEntryChecked(QwtPlotItem* plotItem, bool on){
+void TimeDomainDisplayPlot::LegendEntryChecked(QwtPlotItem* plotItem, bool on)
+{
plotItem->setVisible(!on);
}
+void
+TimeDomainDisplayPlot::SetSampleRate(double sr, double units,
+ const std::string &strunits)
+{
+ double newsr = sr/units;
+ if(newsr != _sampleRate) {
+ _sampleRate = sr/units;
+ _resetXAxisPoints();
+
+ // While we could change the displayed sigfigs based on the unit being
+ // displayed, I think it looks better by just setting it to 4 regardless.
+ //double display_units = ceil(log10(units)/2.0);
+ double display_units = 4;
+ setAxisTitle(QwtPlot::xBottom, QString("Time (%1)").arg(strunits.c_str()));
+ ((TimeDomainDisplayZoomer*)_zoomer)->SetTimePrecision(display_units);
+ ((TimeDomainDisplayZoomer*)_zoomer)->SetUnitType(strunits);
+ }
+}
+
#endif /* TIME_DOMAIN_DISPLAY_PLOT_C */
diff --git a/gr-qtgui/src/lib/TimeDomainDisplayPlot.h b/gr-qtgui/src/lib/TimeDomainDisplayPlot.h
index 8d98abac6d..5525bbabe9 100644
--- a/gr-qtgui/src/lib/TimeDomainDisplayPlot.h
+++ b/gr-qtgui/src/lib/TimeDomainDisplayPlot.h
@@ -21,7 +21,8 @@ public:
TimeDomainDisplayPlot(QWidget*);
virtual ~TimeDomainDisplayPlot();
- void PlotNewData(const double* realDataPoints, const double* imagDataPoints, const int64_t numDataPoints);
+ void PlotNewData(const double* realDataPoints, const double* imagDataPoints,
+ const int64_t numDataPoints, const double timeInterval);
void SetImaginaryDataVisible(const bool);
@@ -32,6 +33,8 @@ public:
public slots:
void resizeSlot( QSize *s );
+ void SetSampleRate(double sr, double units,
+ const std::string &strunits);
protected slots:
void LegendEntryChecked(QwtPlotItem *plotItem, bool on);
@@ -51,11 +54,11 @@ private:
double* _imagDataPoints;
double* _xAxisPoints;
+ double _sampleRate;
+
timespec _lastReplot;
int64_t _numPoints;
-
- double _displayIntervalTime;
};
#endif /* TIME_DOMAIN_DISPLAY_PLOT_HPP */
diff --git a/gr-qtgui/src/lib/WaterfallDisplayPlot.cc b/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
index f6d0cc0ba7..e0804fa640 100644
--- a/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
+++ b/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
@@ -66,8 +66,7 @@ public:
QwtText label(double value) const
{
- return QString("%1").arg((value + GetCenterFrequency()) / ((GetFrequencyPrecision() == 0) ? 1.0 : 1000.0),
- 0, 'f', GetFrequencyPrecision());
+ return QString("%1").arg(value, 0, 'f', GetFrequencyPrecision());
}
virtual void initiateUpdate()
@@ -161,7 +160,8 @@ private:
};
-class WaterfallZoomer: public QwtPlotZoomer, public TimeScaleData, public FreqOffsetAndPrecisionClass
+class WaterfallZoomer: public QwtPlotZoomer, public TimeScaleData,
+ public FreqOffsetAndPrecisionClass
{
public:
WaterfallZoomer(QwtPlotCanvas* canvas, const unsigned int freqPrecision)
@@ -180,6 +180,11 @@ public:
updateDisplay();
}
+ void SetUnitType(const std::string &type)
+ {
+ _unitType = type;
+ }
+
protected:
virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
@@ -193,10 +198,14 @@ protected:
timeTm.tm_mday, timeTm.tm_hour, timeTm.tm_min,
timeTm.tm_sec, lineTime.tv_nsec/1000000));
- QwtText t(QString("%1 %2, %3").arg((p.x() + GetCenterFrequency()) / ((GetFrequencyPrecision() == 0) ? 1.0 : 1000.0), 0, 'f', GetFrequencyPrecision()).arg( (GetFrequencyPrecision() == 0) ? "Hz" : "kHz").arg(yLabel));
-
+ QwtText t(QString("%1 %2, %3").
+ arg(p.x(), 0, 'f', GetFrequencyPrecision()).
+ arg(_unitType.c_str()).arg(yLabel));
return t;
}
+
+private:
+ std::string _unitType;
};
@@ -216,8 +225,6 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent)
resize(parent->width(), parent->height());
_numPoints = 1024;
- _displayIntervalTime = (1.0/5.0); // 1/5 of a second between updates
-
_waterfallData = new WaterfallData(_startFrequency, _stopFrequency, _numPoints, 200);
QPalette palette;
@@ -282,6 +289,7 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(QWidget* parent)
WaterfallDisplayPlot::~WaterfallDisplayPlot()
{
delete _waterfallData;
+ delete d_spectrogram;
}
void
@@ -290,6 +298,8 @@ WaterfallDisplayPlot::Reset()
_waterfallData->ResizeData(_startFrequency, _stopFrequency, _numPoints);
_waterfallData->Reset();
+ setAxisScale(QwtPlot::xBottom, _startFrequency, _stopFrequency);
+
// Load up the new base zoom settings
QwtDoubleRect newSize = _zoomer->zoomBase();
newSize.setLeft(_startFrequency);
@@ -310,27 +320,32 @@ WaterfallDisplayPlot::SetFrequencyRange(const double constStartFreq,
double stopFreq = constStopFreq / units;
double centerFreq = constCenterFreq / units;
- if(stopFreq > startFreq) {
- _startFrequency = 1000*startFreq;
- _stopFrequency = 1000*stopFreq;
+ _useCenterFrequencyFlag = useCenterFrequencyFlag;
- setAxisScale(QwtPlot::xBottom, _startFrequency, _stopFrequency);
+ if(_useCenterFrequencyFlag){
+ startFreq = (startFreq + centerFreq);
+ stopFreq = (stopFreq + centerFreq);
+ }
- if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (_zoomer != NULL)){
- WaterfallFreqDisplayScaleDraw* freqScale = ((WaterfallFreqDisplayScaleDraw*)axisScaleDraw(QwtPlot::xBottom));
- freqScale->SetCenterFrequency(centerFreq);
- ((WaterfallZoomer*)_zoomer)->SetCenterFrequency(centerFreq);
+ bool reset = false;
+ if((startFreq != _startFrequency) || (stopFreq != _stopFrequency))
+ reset = true;
- freqScale->SetFrequencyPrecision( 2 );
- ((WaterfallZoomer*)_zoomer)->SetFrequencyPrecision( 2 );
+ if(stopFreq > startFreq) {
+ _startFrequency = startFreq;
+ _stopFrequency = stopFreq;
+
+ if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (_zoomer != NULL)){
+ double display_units = ceil(log10(units)/2.0);
+ setAxisScaleDraw(QwtPlot::xBottom, new WaterfallFreqDisplayScaleDraw(display_units));
setAxisTitle(QwtPlot::xBottom, QString("Frequency (%1)").arg(strunits.c_str()));
- }
- Reset();
+ if(reset) {
+ Reset();
+ }
- // Only replot if screen is visible
- if(isVisible()){
- replot();
+ ((WaterfallZoomer*)_zoomer)->SetFrequencyPrecision(display_units);
+ ((WaterfallZoomer*)_zoomer)->SetUnitType(strunits);
}
}
}
@@ -350,50 +365,46 @@ WaterfallDisplayPlot::GetStopFrequency() const
void
WaterfallDisplayPlot::PlotNewData(const double* dataPoints,
- const int64_t numDataPoints,
- const double timePerFFT,
- const timespec timestamp,
- const int droppedFrames)
+ const int64_t numDataPoints,
+ const double timePerFFT,
+ const timespec timestamp,
+ const int droppedFrames)
{
if(numDataPoints > 0){
if(numDataPoints != _numPoints){
_numPoints = numDataPoints;
-
+
Reset();
-
+
d_spectrogram->invalidateCache();
d_spectrogram->itemChanged();
-
+
if(isVisible()){
replot();
}
-
+
_lastReplot = get_highres_clock();
}
- _waterfallData->addFFTData(dataPoints, numDataPoints, droppedFrames);
- _waterfallData->IncrementNumLinesToUpdate();
-
- QwtTimeScaleDraw* timeScale = (QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
- timeScale->SetSecondsPerLine(timePerFFT);
- timeScale->SetZeroTime(timestamp);
-
- ((WaterfallZoomer*)_zoomer)->SetSecondsPerLine(timePerFFT);
- ((WaterfallZoomer*)_zoomer)->SetZeroTime(timestamp);
- }
-
- // Allow at least a 50% duty cycle
- if(diff_timespec(get_highres_clock(), _lastReplot) > _displayIntervalTime){
-
- d_spectrogram->invalidateCache();
- d_spectrogram->itemChanged();
-
- // Only update when window is visible
- if(isVisible()){
+ if(diff_timespec(get_highres_clock(), _lastReplot) > timePerFFT) {
+ //FIXME: We may want to average the data between these updates to smooth display
+ _waterfallData->addFFTData(dataPoints, numDataPoints, droppedFrames);
+ _waterfallData->IncrementNumLinesToUpdate();
+
+ QwtTimeScaleDraw* timeScale = (QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
+ timeScale->SetSecondsPerLine(timePerFFT);
+ timeScale->SetZeroTime(timestamp);
+
+ ((WaterfallZoomer*)_zoomer)->SetSecondsPerLine(timePerFFT);
+ ((WaterfallZoomer*)_zoomer)->SetZeroTime(timestamp);
+
+ d_spectrogram->invalidateCache();
+ d_spectrogram->itemChanged();
+
replot();
- }
- _lastReplot = get_highres_clock();
+ _lastReplot = get_highres_clock();
+ }
}
}
@@ -412,8 +423,6 @@ WaterfallDisplayPlot::SetIntensityRange(const double minIntensity,
void
WaterfallDisplayPlot::replot()
{
- const timespec startTime = get_highres_clock();
-
QwtTimeScaleDraw* timeScale = (QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
timeScale->initiateUpdate();
@@ -435,14 +444,6 @@ WaterfallDisplayPlot::replot()
}
QwtPlot::replot();
-
- double differenceTime = (diff_timespec(get_highres_clock(), startTime));
-
- // Require at least a 5% duty cycle
- differenceTime *= 19.0;
- if(differenceTime > (1.0/5.0)){
- _displayIntervalTime = differenceTime;
- }
}
void
diff --git a/gr-qtgui/src/lib/WaterfallDisplayPlot.h b/gr-qtgui/src/lib/WaterfallDisplayPlot.h
index bb87fb09f4..a5ccaec401 100644
--- a/gr-qtgui/src/lib/WaterfallDisplayPlot.h
+++ b/gr-qtgui/src/lib/WaterfallDisplayPlot.h
@@ -69,9 +69,9 @@ private:
timespec _lastReplot;
- int64_t _numPoints;
+ bool _useCenterFrequencyFlag;
- double _displayIntervalTime;
+ int64_t _numPoints;
int _intensityColorMapType;
QColor _userDefinedLowIntensityColor;
diff --git a/gr-qtgui/src/lib/qtgui_sink_c.cc b/gr-qtgui/src/lib/qtgui_sink_c.cc
index 7340141a69..a148cf5011 100644
--- a/gr-qtgui/src/lib/qtgui_sink_c.cc
+++ b/gr-qtgui/src/lib/qtgui_sink_c.cc
@@ -88,7 +88,7 @@ qtgui_sink_c::qtgui_sink_c (int fftsize, int wintype,
qtgui_sink_c::~qtgui_sink_c()
{
- delete d_object;
+ delete d_main_gui;
delete [] d_residbuf;
delete d_fft;
}
@@ -145,6 +145,9 @@ qtgui_sink_c::initialize(const bool opengl)
d_plotconst,
opengl);
+ // initialize update time to 10 times a second
+ set_update_time(0.1);
+
d_object = new qtgui_obj(d_qApplication);
qApp->postEvent(d_object, new qtgui_event(&d_pmutex));
}
@@ -208,6 +211,13 @@ qtgui_sink_c::set_frequency_axis(double min, double max)
}
void
+qtgui_sink_c::set_update_time(double t)
+{
+ d_update_time = t;
+ d_main_gui->SetUpdateTime(d_update_time);
+}
+
+void
qtgui_sink_c::fft(const gr_complex *data_in, int size)
{
if (d_window.size()) {
@@ -300,7 +310,7 @@ qtgui_sink_c::general_work (int noutput_items,
d_main_gui->UpdateWindow(true, d_fft->get_outbuf(), d_fftsize,
NULL, 0, (float*)d_residbuf, d_fftsize,
- 1.0/4.0, currentTime, true);
+ currentTime, true);
}
// Otherwise, copy what we received into the residbuf for next time
else {
diff --git a/gr-qtgui/src/lib/qtgui_sink_c.h b/gr-qtgui/src/lib/qtgui_sink_c.h
index 91c6b03e61..1f6c284738 100644
--- a/gr-qtgui/src/lib/qtgui_sink_c.h
+++ b/gr-qtgui/src/lib/qtgui_sink_c.h
@@ -86,6 +86,8 @@ private:
bool d_plotfreq, d_plotwaterfall, d_plotwaterfall3d, d_plottime, d_plotconst;
+ double d_update_time;
+
QWidget *d_parent;
SpectrumGUIClass *d_main_gui;
@@ -111,6 +113,8 @@ public:
void set_constellation_pen_size(int size);
void set_frequency_axis(double min, double max);
+ void set_update_time(double t);
+
QApplication *d_qApplication;
qtgui_obj *d_object;
diff --git a/gr-qtgui/src/lib/qtgui_sink_f.cc b/gr-qtgui/src/lib/qtgui_sink_f.cc
index 6fbb2f381c..8eb0a0347f 100644
--- a/gr-qtgui/src/lib/qtgui_sink_f.cc
+++ b/gr-qtgui/src/lib/qtgui_sink_f.cc
@@ -88,7 +88,7 @@ qtgui_sink_f::qtgui_sink_f (int fftsize, int wintype,
qtgui_sink_f::~qtgui_sink_f()
{
- delete d_object;
+ delete d_main_gui;
delete [] d_residbuf;
delete d_fft;
}
@@ -140,6 +140,9 @@ qtgui_sink_f::initialize(const bool opengl)
d_plotconst,
opengl);
+ // initialize update time to 10 times a second
+ set_update_time(0.1);
+
d_object = new qtgui_obj(d_qApplication);
qApp->postEvent(d_object, new qtgui_event(&d_pmutex));
}
@@ -202,6 +205,13 @@ qtgui_sink_f::set_frequency_axis(double min, double max)
}
void
+qtgui_sink_f::set_update_time(double t)
+{
+ d_update_time = t;
+ d_main_gui->SetUpdateTime(d_update_time);
+}
+
+void
qtgui_sink_f::fft(const float *data_in, int size)
{
if (d_window.size()) {
@@ -295,7 +305,7 @@ qtgui_sink_f::general_work (int noutput_items,
d_main_gui->UpdateWindow(true, d_fft->get_outbuf(), d_fftsize,
(float*)d_residbuf, d_fftsize, NULL, 0,
- 1.0/4.0, currentTime, true);
+ currentTime, true);
}
// Otherwise, copy what we received into the residbuf for next time
else {
diff --git a/gr-qtgui/src/lib/qtgui_sink_f.h b/gr-qtgui/src/lib/qtgui_sink_f.h
index 47c928d17c..f603da7b6a 100644
--- a/gr-qtgui/src/lib/qtgui_sink_f.h
+++ b/gr-qtgui/src/lib/qtgui_sink_f.h
@@ -84,6 +84,8 @@ private:
bool d_plotfreq, d_plotwaterfall, d_plotwaterfall3d, d_plottime, d_plotconst;
+ double d_update_time;
+
QWidget *d_parent;
SpectrumGUIClass *d_main_gui;
@@ -109,6 +111,8 @@ public:
void set_constellation_pen_size(int size);
void set_frequency_axis(double min, double max);
+ void set_update_time(double t);
+
QApplication *d_qApplication;
qtgui_obj *d_object;
diff --git a/gr-qtgui/src/lib/spectrumUpdateEvents.cc b/gr-qtgui/src/lib/spectrumUpdateEvents.cc
index 2da37d350e..53a205fb78 100644
--- a/gr-qtgui/src/lib/spectrumUpdateEvents.cc
+++ b/gr-qtgui/src/lib/spectrumUpdateEvents.cc
@@ -8,7 +8,6 @@ SpectrumUpdateEvent::SpectrumUpdateEvent(const std::complex<float>* fftPoints,
const double* realTimeDomainPoints,
const double* imagTimeDomainPoints,
const uint64_t numTimeDomainDataPoints,
- const double timePerFFT,
const timespec dataTimestamp,
const bool repeatDataFlag,
const bool lastOfMultipleUpdateFlag,
@@ -16,15 +15,19 @@ SpectrumUpdateEvent::SpectrumUpdateEvent(const std::complex<float>* fftPoints,
const int droppedFFTFrames)
: QEvent(QEvent::Type(10005))
{
- _numFFTDataPoints = numFFTDataPoints;
- if(_numFFTDataPoints < 1){
+ if(numFFTDataPoints < 1) {
_numFFTDataPoints = 1;
}
+ else {
+ _numFFTDataPoints = numFFTDataPoints;
+ }
- _numTimeDomainDataPoints = numTimeDomainDataPoints;
- if(_numTimeDomainDataPoints < 1){
+ if(numTimeDomainDataPoints < 1) {
_numTimeDomainDataPoints = 1;
}
+ else {
+ _numTimeDomainDataPoints = numTimeDomainDataPoints;
+ }
_fftPoints = new std::complex<float>[_numFFTDataPoints];
_fftPoints[0] = std::complex<float>(0,0);
@@ -32,26 +35,26 @@ SpectrumUpdateEvent::SpectrumUpdateEvent(const std::complex<float>* fftPoints,
_realDataTimeDomainPoints = new double[_numTimeDomainDataPoints];
memset(_realDataTimeDomainPoints, 0x0, _numTimeDomainDataPoints*sizeof(double));
- if(numTimeDomainDataPoints > 0){
+ if(numTimeDomainDataPoints > 0) {
memcpy(_realDataTimeDomainPoints, realTimeDomainPoints,
numTimeDomainDataPoints*sizeof(double));
}
_imagDataTimeDomainPoints = new double[_numTimeDomainDataPoints];
memset(_imagDataTimeDomainPoints, 0x0, _numTimeDomainDataPoints*sizeof(double));
- if(numTimeDomainDataPoints > 0){
+ if(numTimeDomainDataPoints > 0) {
memcpy(_imagDataTimeDomainPoints, imagTimeDomainPoints,
numTimeDomainDataPoints*sizeof(double));
}
_dataTimestamp = dataTimestamp;
- _timePerFFT = timePerFFT;
_repeatDataFlag = repeatDataFlag;
_lastOfMultipleUpdateFlag = lastOfMultipleUpdateFlag;
_eventGeneratedTimestamp = generatedTimestamp;
_droppedFFTFrames = droppedFFTFrames;
}
-SpectrumUpdateEvent::~SpectrumUpdateEvent(){
+SpectrumUpdateEvent::~SpectrumUpdateEvent()
+{
delete[] _fftPoints;
delete[] _realDataTimeDomainPoints;
delete[] _imagDataTimeDomainPoints;
@@ -87,12 +90,6 @@ SpectrumUpdateEvent::getNumTimeDomainDataPoints() const
return _numTimeDomainDataPoints;
}
-double
-SpectrumUpdateEvent::getTimePerFFT() const
-{
- return _timePerFFT;
-}
-
timespec
SpectrumUpdateEvent::getDataTimestamp() const
{
diff --git a/gr-qtgui/src/lib/spectrumUpdateEvents.h b/gr-qtgui/src/lib/spectrumUpdateEvents.h
index 75fa273243..ccc072c3e3 100644
--- a/gr-qtgui/src/lib/spectrumUpdateEvents.h
+++ b/gr-qtgui/src/lib/spectrumUpdateEvents.h
@@ -10,19 +10,29 @@
class SpectrumUpdateEvent:public QEvent{
public:
- SpectrumUpdateEvent(const std::complex<float>* fftPoints, const uint64_t numFFTDataPoints, const double* realTimeDomainPoints, const double* imagTimeDomainPoints, const uint64_t numTimeDomainDataPoints, const double timePerFFT, const timespec dataTimestamp, const bool repeatDataFlag, const bool lastOfMultipleUpdateFlag, const timespec generatedTimestamp, const int droppedFFTFrames);
+ SpectrumUpdateEvent(const std::complex<float>* fftPoints,
+ const uint64_t numFFTDataPoints,
+ const double* realTimeDomainPoints,
+ const double* imagTimeDomainPoints,
+ const uint64_t numTimeDomainDataPoints,
+ const timespec dataTimestamp,
+ const bool repeatDataFlag,
+ const bool lastOfMultipleUpdateFlag,
+ const timespec generatedTimestamp,
+ const int droppedFFTFrames);
+
~SpectrumUpdateEvent();
- const std::complex<float>* getFFTPoints()const;
- const double* getRealTimeDomainPoints()const;
- const double* getImagTimeDomainPoints()const;
- uint64_t getNumFFTDataPoints()const;
- uint64_t getNumTimeDomainDataPoints()const;
- double getTimePerFFT()const;
- timespec getDataTimestamp()const;
- bool getRepeatDataFlag()const;
- bool getLastOfMultipleUpdateFlag()const;
- timespec getEventGeneratedTimestamp()const;
- int getDroppedFFTFrames()const;
+
+ const std::complex<float>* getFFTPoints() const;
+ const double* getRealTimeDomainPoints() const;
+ const double* getImagTimeDomainPoints() const;
+ uint64_t getNumFFTDataPoints() const;
+ uint64_t getNumTimeDomainDataPoints() const;
+ timespec getDataTimestamp() const;
+ bool getRepeatDataFlag() const;
+ bool getLastOfMultipleUpdateFlag() const;
+ timespec getEventGeneratedTimestamp() const;
+ int getDroppedFFTFrames() const;
protected:
@@ -32,7 +42,6 @@ private:
double* _imagDataTimeDomainPoints;
uint64_t _numFFTDataPoints;
uint64_t _numTimeDomainDataPoints;
- double _timePerFFT;
timespec _dataTimestamp;
bool _repeatDataFlag;
bool _lastOfMultipleUpdateFlag;
diff --git a/gr-qtgui/src/lib/spectrumdisplayform.cc b/gr-qtgui/src/lib/spectrumdisplayform.cc
index b272921938..f52a63d1f0 100644
--- a/gr-qtgui/src/lib/spectrumdisplayform.cc
+++ b/gr-qtgui/src/lib/spectrumdisplayform.cc
Binary files differ
diff --git a/gr-qtgui/src/lib/spectrumdisplayform.h b/gr-qtgui/src/lib/spectrumdisplayform.h
index d89141f1ed..bf2af70335 100644
--- a/gr-qtgui/src/lib/spectrumdisplayform.h
+++ b/gr-qtgui/src/lib/spectrumdisplayform.h
@@ -13,6 +13,7 @@ class SpectrumGUIClass;
#include <TimeDomainDisplayPlot.h>
#include <ConstellationDisplayPlot.h>
#include <QValidator>
+#include <QTimer>
#include <vector>
class SpectrumDisplayForm : public QWidget, public Ui::SpectrumDisplayForm
@@ -43,7 +44,6 @@ public slots:
void MaxHoldResetBtn_clicked();
void TabChanged(int index);
- void PowerLineEdit_textChanged( const QString& valueString );
void SetFrequencyRange( const double newCenterFrequency,
const double newStartFrequency,
const double newStopFrequency );
@@ -71,9 +71,11 @@ public slots:
double ymin, double ymax);
void SetConstellationPenSize(int size);
void SetFrequencyAxis(double min, double max);
+ void SetUpdateTime(double t);
private slots:
void newFrequencyData( const SpectrumUpdateEvent* );
+ void UpdateGuiTimer();
protected:
@@ -111,6 +113,9 @@ private:
int d_plot_waterfall3d;
int d_plot_time;
int d_plot_constellation;
+
+ QTimer *displayTimer;
+ double d_update_time;
};
#endif /* SPECTRUM_DISPLAY_FORM_H */
diff --git a/gr-qtgui/src/lib/spectrumdisplayform.ui b/gr-qtgui/src/lib/spectrumdisplayform.ui
index cb7b4f9967..0e652d8337 100644
--- a/gr-qtgui/src/lib/spectrumdisplayform.ui
+++ b/gr-qtgui/src/lib/spectrumdisplayform.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>657</width>
+ <width>712</width>
<height>543</height>
</rect>
</property>
@@ -183,7 +183,7 @@
<property name="minimumSize">
<size>
<width>400</width>
- <height>332</height>
+ <height>350</height>
</size>
</property>
<property name="sizeIncrement">
@@ -222,31 +222,6 @@
</property>
</widget>
</item>
- <item row="1" column="3">
- <widget class="QLabel" name="PowerLabel">
- <property name="minimumSize">
- <size>
- <width>50</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Power</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
<item row="1" column="1">
<widget class="QPushButton" name="MaxHoldResetBtn">
<property name="sizePolicy">
@@ -266,7 +241,7 @@
</property>
</widget>
</item>
- <item row="1" column="4">
+ <item row="1" column="3">
<widget class="QLabel" name="AvgLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@@ -298,33 +273,8 @@
</property>
</widget>
</item>
- <item row="2" column="4">
- <widget class="QSpinBox" name="AvgLineEdit"/>
- </item>
<item row="2" column="3">
- <widget class="QLineEdit" name="PowerLineEdit">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>50</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>1</string>
- </property>
- </widget>
+ <widget class="QSpinBox" name="AvgLineEdit"/>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_2">
@@ -844,22 +794,6 @@
</hints>
</connection>
<connection>
- <sender>PowerLineEdit</sender>
- <signal>textChanged(QString)</signal>
- <receiver>SpectrumDisplayForm</receiver>
- <slot>PowerLineEdit_textChanged(QString)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>482</x>
- <y>344</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
- <connection>
<sender>WindowComboBox</sender>
<signal>activated(int)</signal>
<receiver>SpectrumDisplayForm</receiver>
diff --git a/gr-qtgui/src/python/pyqt_example.py b/gr-qtgui/src/python/pyqt_example.py
index 4fa8cdd925..7c0cfc6983 100755
--- a/gr-qtgui/src/python/pyqt_example.py
+++ b/gr-qtgui/src/python/pyqt_example.py
@@ -131,9 +131,9 @@ class my_top_block(gr.top_block):
# Wrap the pointer as a PyQt SIP object
# This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
- self.main_box = dialog_box(pyWin, self.ctrl_win)
+ self.main_box = dialog_box(self.pyWin, self.ctrl_win)
self.main_box.show()
diff --git a/gr-qtgui/src/python/pyqt_example_f.py b/gr-qtgui/src/python/pyqt_example_f.py
index 46fe07e0d8..4e36ccca5f 100755
--- a/gr-qtgui/src/python/pyqt_example_f.py
+++ b/gr-qtgui/src/python/pyqt_example_f.py
@@ -130,9 +130,9 @@ class my_top_block(gr.top_block):
# Wrap the pointer as a PyQt SIP object
# This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
- self.main_box = dialog_box(pyWin, self.ctrl_win)
+ self.main_box = dialog_box(self.pyWin, self.ctrl_win)
self.main_box.show()
diff --git a/gr-qtgui/src/python/qt_digital.py b/gr-qtgui/src/python/qt_digital.py
index ceb492c8d0..679f144eff 100755
--- a/gr-qtgui/src/python/qt_digital.py
+++ b/gr-qtgui/src/python/qt_digital.py
@@ -139,7 +139,7 @@ class my_top_block(gr.top_block):
self.qapp = QtGui.QApplication(sys.argv)
- self._sample_rate = 200e3
+ self._sample_rate = 2000e3
self.sps = 2
self.excess_bw = 0.35
@@ -182,11 +182,13 @@ class my_top_block(gr.top_block):
self.to = 1.0
self.channel = gr.channel_model(noise, self.fo, self.to)
- self.thr = gr.throttle(gr.sizeof_char, 10*fftsize)
- self.snk_tx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, 0, 1,
+ self.thr = gr.throttle(gr.sizeof_char, self._sample_rate)
+ self.snk_tx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
+ 0, self._sample_rate*self.sps,
"Tx", True, True, False, True, True)
- self.snk_rx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, 0, 1,
+ self.snk_rx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
+ 0, self._sample_rate,
"Rx", True, True, False, True, True)
self.connect(self.src, self.thr, self.mod, self.channel, self.snk_tx)
diff --git a/gr-qtgui/src/python/qt_digital_window.py b/gr-qtgui/src/python/qt_digital_window.py
index 9e4c57a892..50dd53a923 100644
--- a/gr-qtgui/src/python/qt_digital_window.py
+++ b/gr-qtgui/src/python/qt_digital_window.py
@@ -2,8 +2,8 @@
# Form implementation generated from reading ui file 'qt_digital_window.ui'
#
-# Created: Thu Jun 18 07:57:58 2009
-# by: PyQt4 UI code generator 4.4.3
+# Created: Sat May 1 20:14:02 2010
+# by: PyQt4 UI code generator 4.6.1
#
# WARNING! All changes made in this file will be lost!
@@ -12,73 +12,118 @@ from PyQt4 import QtCore, QtGui
class Ui_DigitalWindow(object):
def setupUi(self, DigitalWindow):
DigitalWindow.setObjectName("DigitalWindow")
- DigitalWindow.resize(1236, 739)
+ DigitalWindow.resize(1236, 741)
self.centralwidget = QtGui.QWidget(DigitalWindow)
self.centralwidget.setObjectName("centralwidget")
- self.closeButton = QtGui.QPushButton(self.centralwidget)
- self.closeButton.setGeometry(QtCore.QRect(1120, 650, 101, 31))
- self.closeButton.setObjectName("closeButton")
+ self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
+ self.verticalLayout.setObjectName("verticalLayout")
self.sinkFrame = QtGui.QFrame(self.centralwidget)
- self.sinkFrame.setGeometry(QtCore.QRect(10, 10, 1221, 501))
+ self.sinkFrame.setMinimumSize(QtCore.QSize(0, 550))
self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
self.sinkFrame.setObjectName("sinkFrame")
- self.horizontalLayoutWidget = QtGui.QWidget(self.sinkFrame)
- self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 1201, 481))
- self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
- self.sinkLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
+ self.horizontalLayout_2 = QtGui.QHBoxLayout(self.sinkFrame)
+ self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ self.sinkLayout = QtGui.QHBoxLayout()
self.sinkLayout.setObjectName("sinkLayout")
- self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
- self.channelModeBox.setGeometry(QtCore.QRect(290, 520, 291, 161))
- self.channelModeBox.setObjectName("channelModeBox")
- self.timeLabel = QtGui.QLabel(self.channelModeBox)
- self.timeLabel.setGeometry(QtCore.QRect(10, 90, 101, 17))
- self.timeLabel.setObjectName("timeLabel")
- self.timeEdit = QtGui.QLineEdit(self.channelModeBox)
- self.timeEdit.setGeometry(QtCore.QRect(160, 90, 113, 23))
- self.timeEdit.setObjectName("timeEdit")
- self.snrEdit = QtGui.QLineEdit(self.channelModeBox)
- self.snrEdit.setGeometry(QtCore.QRect(160, 30, 113, 23))
- self.snrEdit.setObjectName("snrEdit")
- self.snrLabel = QtGui.QLabel(self.channelModeBox)
- self.snrLabel.setGeometry(QtCore.QRect(10, 30, 111, 20))
- self.snrLabel.setObjectName("snrLabel")
- self.freqEdit = QtGui.QLineEdit(self.channelModeBox)
- self.freqEdit.setGeometry(QtCore.QRect(160, 60, 113, 23))
- self.freqEdit.setObjectName("freqEdit")
- self.freqLabel = QtGui.QLabel(self.channelModeBox)
- self.freqLabel.setGeometry(QtCore.QRect(10, 60, 141, 17))
- self.freqLabel.setObjectName("freqLabel")
- self.rxBox = QtGui.QGroupBox(self.centralwidget)
- self.rxBox.setGeometry(QtCore.QRect(590, 520, 251, 161))
- self.rxBox.setObjectName("rxBox")
- self.gainMuEdit = QtGui.QLineEdit(self.rxBox)
- self.gainMuEdit.setGeometry(QtCore.QRect(120, 30, 113, 23))
- self.gainMuEdit.setObjectName("gainMuEdit")
- self.gainMuLabel = QtGui.QLabel(self.rxBox)
- self.gainMuLabel.setGeometry(QtCore.QRect(10, 30, 111, 20))
- self.gainMuLabel.setObjectName("gainMuLabel")
- self.alphaEdit = QtGui.QLineEdit(self.rxBox)
- self.alphaEdit.setGeometry(QtCore.QRect(120, 60, 113, 23))
- self.alphaEdit.setObjectName("alphaEdit")
- self.alphaLabel = QtGui.QLabel(self.rxBox)
- self.alphaLabel.setGeometry(QtCore.QRect(10, 60, 111, 20))
- self.alphaLabel.setObjectName("alphaLabel")
+ self.horizontalLayout_2.addLayout(self.sinkLayout)
+ self.verticalLayout.addWidget(self.sinkFrame)
+ self.horizontalLayout = QtGui.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
self.sysBox = QtGui.QGroupBox(self.centralwidget)
- self.sysBox.setGeometry(QtCore.QRect(20, 520, 261, 161))
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth())
+ self.sysBox.setSizePolicy(sizePolicy)
+ self.sysBox.setMinimumSize(QtCore.QSize(0, 0))
+ self.sysBox.setMaximumSize(QtCore.QSize(16777215, 120))
+ self.sysBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.sysBox.setObjectName("sysBox")
+ self.gridLayout_2 = QtGui.QGridLayout(self.sysBox)
+ self.gridLayout_2.setObjectName("gridLayout_2")
self.sampleRateEdit = QtGui.QLineEdit(self.sysBox)
- self.sampleRateEdit.setGeometry(QtCore.QRect(140, 30, 113, 23))
+ self.sampleRateEdit.setMaximumSize(QtCore.QSize(100, 16777215))
self.sampleRateEdit.setObjectName("sampleRateEdit")
+ self.gridLayout_2.addWidget(self.sampleRateEdit, 0, 3, 1, 1)
self.sampleRateLabel = QtGui.QLabel(self.sysBox)
- self.sampleRateLabel.setGeometry(QtCore.QRect(10, 30, 121, 20))
self.sampleRateLabel.setObjectName("sampleRateLabel")
+ self.gridLayout_2.addWidget(self.sampleRateLabel, 0, 2, 1, 1)
+ self.horizontalLayout.addWidget(self.sysBox)
+ self.rxBox = QtGui.QGroupBox(self.centralwidget)
+ self.rxBox.setMaximumSize(QtCore.QSize(16777215, 120))
+ self.rxBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.rxBox.setObjectName("rxBox")
+ self.gridLayout_3 = QtGui.QGridLayout(self.rxBox)
+ self.gridLayout_3.setObjectName("gridLayout_3")
+ self.alphaLabel = QtGui.QLabel(self.rxBox)
+ self.alphaLabel.setObjectName("alphaLabel")
+ self.gridLayout_3.addWidget(self.alphaLabel, 1, 0, 1, 1)
+ self.alphaEdit = QtGui.QLineEdit(self.rxBox)
+ self.alphaEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+ self.alphaEdit.setObjectName("alphaEdit")
+ self.gridLayout_3.addWidget(self.alphaEdit, 1, 1, 1, 1)
+ self.gainMuLabel = QtGui.QLabel(self.rxBox)
+ self.gainMuLabel.setObjectName("gainMuLabel")
+ self.gridLayout_3.addWidget(self.gainMuLabel, 0, 0, 1, 1)
+ self.gainMuEdit = QtGui.QLineEdit(self.rxBox)
+ self.gainMuEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+ self.gainMuEdit.setObjectName("gainMuEdit")
+ self.gridLayout_3.addWidget(self.gainMuEdit, 0, 1, 1, 1)
+ self.horizontalLayout.addWidget(self.rxBox)
+ self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
+ self.channelModeBox.setMaximumSize(QtCore.QSize(16777215, 120))
+ self.channelModeBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.channelModeBox.setObjectName("channelModeBox")
+ self.gridLayout = QtGui.QGridLayout(self.channelModeBox)
+ self.gridLayout.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
+ self.gridLayout.setObjectName("gridLayout")
+ self.snrLabel = QtGui.QLabel(self.channelModeBox)
+ self.snrLabel.setObjectName("snrLabel")
+ self.gridLayout.addWidget(self.snrLabel, 0, 1, 1, 1)
+ self.snrEdit = QtGui.QLineEdit(self.channelModeBox)
+ self.snrEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+ self.snrEdit.setObjectName("snrEdit")
+ self.gridLayout.addWidget(self.snrEdit, 0, 2, 1, 1)
+ self.freqLabel = QtGui.QLabel(self.channelModeBox)
+ self.freqLabel.setObjectName("freqLabel")
+ self.gridLayout.addWidget(self.freqLabel, 1, 1, 1, 1)
+ self.freqEdit = QtGui.QLineEdit(self.channelModeBox)
+ self.freqEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+ self.freqEdit.setObjectName("freqEdit")
+ self.gridLayout.addWidget(self.freqEdit, 1, 2, 1, 1)
+ self.timeLabel = QtGui.QLabel(self.channelModeBox)
+ self.timeLabel.setObjectName("timeLabel")
+ self.gridLayout.addWidget(self.timeLabel, 2, 1, 1, 1)
+ self.timeEdit = QtGui.QLineEdit(self.channelModeBox)
+ self.timeEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+ self.timeEdit.setObjectName("timeEdit")
+ self.gridLayout.addWidget(self.timeEdit, 2, 2, 1, 1)
+ self.horizontalLayout.addWidget(self.channelModeBox)
+ spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.horizontalLayout.addItem(spacerItem)
+ self.verticalLayout_2 = QtGui.QVBoxLayout()
+ self.verticalLayout_2.setObjectName("verticalLayout_2")
+ spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.verticalLayout_2.addItem(spacerItem1)
self.pauseButton = QtGui.QPushButton(self.centralwidget)
- self.pauseButton.setGeometry(QtCore.QRect(1120, 520, 101, 31))
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.pauseButton.sizePolicy().hasHeightForWidth())
+ self.pauseButton.setSizePolicy(sizePolicy)
+ self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215))
self.pauseButton.setObjectName("pauseButton")
+ self.verticalLayout_2.addWidget(self.pauseButton)
+ self.closeButton = QtGui.QPushButton(self.centralwidget)
+ self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.closeButton.setObjectName("closeButton")
+ self.verticalLayout_2.addWidget(self.closeButton)
+ self.horizontalLayout.addLayout(self.verticalLayout_2)
+ self.verticalLayout.addLayout(self.horizontalLayout)
DigitalWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(DigitalWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1236, 25))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1236, 23))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
@@ -95,23 +140,22 @@ class Ui_DigitalWindow(object):
QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), DigitalWindow.close)
QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL("triggered()"), DigitalWindow.close)
QtCore.QMetaObject.connectSlotsByName(DigitalWindow)
- DigitalWindow.setTabOrder(self.closeButton, self.snrEdit)
DigitalWindow.setTabOrder(self.snrEdit, self.freqEdit)
DigitalWindow.setTabOrder(self.freqEdit, self.timeEdit)
def retranslateUi(self, DigitalWindow):
DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", 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.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
+ self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", None, QtGui.QApplication.UnicodeUTF8))
+ self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8))
self.channelModeBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtGui.QApplication.UnicodeUTF8))
- self.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", 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.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.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.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.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/gr-qtgui/src/python/qt_digital_window.ui b/gr-qtgui/src/python/qt_digital_window.ui
index 79ba012865..9672521815 100644
--- a/gr-qtgui/src/python/qt_digital_window.ui
+++ b/gr-qtgui/src/python/qt_digital_window.ui
@@ -7,243 +7,273 @@
<x>0</x>
<y>0</y>
<width>1236</width>
- <height>739</height>
+ <height>741</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
- <widget class="QPushButton" name="closeButton">
- <property name="geometry">
- <rect>
- <x>1120</x>
- <y>650</y>
- <width>101</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>Close</string>
- </property>
- </widget>
- <widget class="QFrame" name="sinkFrame">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>1221</width>
- <height>501</height>
- </rect>
- </property>
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <widget class="QWidget" name="horizontalLayoutWidget">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>1201</width>
- <height>481</height>
- </rect>
- </property>
- <layout class="QHBoxLayout" name="sinkLayout"/>
- </widget>
- </widget>
- <widget class="QGroupBox" name="channelModeBox">
- <property name="geometry">
- <rect>
- <x>290</x>
- <y>520</y>
- <width>291</width>
- <height>161</height>
- </rect>
- </property>
- <property name="title">
- <string>Channel Model Parameters</string>
- </property>
- <widget class="QLabel" name="timeLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>90</y>
- <width>101</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>Timing Offset</string>
- </property>
- </widget>
- <widget class="QLineEdit" name="timeEdit">
- <property name="geometry">
- <rect>
- <x>160</x>
- <y>90</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLineEdit" name="snrEdit">
- <property name="geometry">
- <rect>
- <x>160</x>
- <y>30</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="snrLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>30</y>
- <width>111</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string>SNR (dB)</string>
- </property>
- </widget>
- <widget class="QLineEdit" name="freqEdit">
- <property name="geometry">
- <rect>
- <x>160</x>
- <y>60</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="freqLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>60</y>
- <width>141</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>Frequency Offset (Hz)</string>
- </property>
- </widget>
- </widget>
- <widget class="QGroupBox" name="rxBox">
- <property name="geometry">
- <rect>
- <x>590</x>
- <y>520</y>
- <width>251</width>
- <height>161</height>
- </rect>
- </property>
- <property name="title">
- <string>Receiver Parameters</string>
- </property>
- <widget class="QLineEdit" name="gainMuEdit">
- <property name="geometry">
- <rect>
- <x>120</x>
- <y>30</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="gainMuLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>30</y>
- <width>111</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string>Gain mu</string>
- </property>
- </widget>
- <widget class="QLineEdit" name="alphaEdit">
- <property name="geometry">
- <rect>
- <x>120</x>
- <y>60</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="alphaLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>60</y>
- <width>111</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string>Alpha</string>
- </property>
- </widget>
- </widget>
- <widget class="QGroupBox" name="sysBox">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>520</y>
- <width>261</width>
- <height>161</height>
- </rect>
- </property>
- <property name="title">
- <string>System Parameters</string>
- </property>
- <widget class="QLineEdit" name="sampleRateEdit">
- <property name="geometry">
- <rect>
- <x>140</x>
- <y>30</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="sampleRateLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>30</y>
- <width>121</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string>Sample Rate (sps)</string>
- </property>
- </widget>
- </widget>
- <widget class="QPushButton" name="pauseButton">
- <property name="geometry">
- <rect>
- <x>1120</x>
- <y>520</y>
- <width>101</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>Pause</string>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QFrame" name="sinkFrame">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>550</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>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QGroupBox" name="sysBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>System Parameters</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="3">
+ <widget class="QLineEdit" name="sampleRateEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="sampleRateLabel">
+ <property name="text">
+ <string>Sample Rate (sps)</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="rxBox">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Receiver Parameters</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="1" column="0">
+ <widget class="QLabel" name="alphaLabel">
+ <property name="text">
+ <string>Alpha</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="alphaEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="gainMuLabel">
+ <property name="text">
+ <string>Gain mu</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="gainMuEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="channelModeBox">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Channel Model Parameters</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinimumSize</enum>
+ </property>
+ <item row="0" column="1">
+ <widget class="QLabel" name="snrLabel">
+ <property name="text">
+ <string>SNR (dB)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLineEdit" name="snrEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="freqLabel">
+ <property name="text">
+ <string>Frequency Offset (Hz)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLineEdit" name="freqEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLabel" name="timeLabel">
+ <property name="text">
+ <string>Timing Offset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QLineEdit" name="timeEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pauseButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Pause</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="closeButton">
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
@@ -251,7 +281,7 @@
<x>0</x>
<y>0</y>
<width>1236</width>
- <height>25</height>
+ <height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@@ -270,7 +300,6 @@
</action>
</widget>
<tabstops>
- <tabstop>closeButton</tabstop>
<tabstop>snrEdit</tabstop>
<tabstop>freqEdit</tabstop>
<tabstop>timeEdit</tabstop>
diff --git a/gr-qtgui/src/python/usrp2_display.py b/gr-qtgui/src/python/usrp2_display.py
index 46ebfe94ab..75d374c2bd 100755
--- a/gr-qtgui/src/python/usrp2_display.py
+++ b/gr-qtgui/src/python/usrp2_display.py
@@ -171,9 +171,9 @@ class my_top_block(gr.top_block):
help="select Ethernet interface, default is eth0")
parser.add_option("-m", "--mac-addr", type="string", default="",
help="select USRP by MAC address, default is auto-select")
- parser.add_option("-W", "--bw", type="float", default=1e6,
+ parser.add_option("-W", "--bw", type="eng_float", default=1e6,
help="set bandwidth of receiver [default=%default]")
- parser.add_option("-f", "--freq", type="eng_float", default=None,
+ parser.add_option("-f", "--freq", type="eng_float", default=2412e6,
help="set frequency to FREQ", metavar="FREQ")
parser.add_option("-g", "--gain", type="eng_float", default=None,
help="set gain in dB (default is midpoint)")
diff --git a/gr-wxgui/src/python/constants.py b/gr-wxgui/src/python/constants.py
index 825f71c322..9612f36dde 100644
--- a/gr-wxgui/src/python/constants.py
+++ b/gr-wxgui/src/python/constants.py
@@ -1,5 +1,5 @@
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -27,6 +27,8 @@ ALPHA_KEY = 'alpha'
AUTORANGE_KEY = 'autorange'
AVERAGE_KEY = 'average'
AVG_ALPHA_KEY = 'avg_alpha'
+USE_PERSISTENCE_KEY = 'use_persistence'
+PERSIST_ALPHA_KEY = 'persist_alpha'
BASEBAND_FREQ_KEY = 'baseband_freq'
BETA_KEY = 'beta'
COLOR_MODE_KEY = 'color_mode'
diff --git a/gr-wxgui/src/python/fft_window.py b/gr-wxgui/src/python/fft_window.py
index 4ee5520f76..f4f485f4b0 100644
--- a/gr-wxgui/src/python/fft_window.py
+++ b/gr-wxgui/src/python/fft_window.py
@@ -1,5 +1,5 @@
#
-# Copyright 2008, 2009 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -37,6 +37,7 @@ import forms
##################################################
SLIDER_STEPS = 100
AVG_ALPHA_MIN_EXP, AVG_ALPHA_MAX_EXP = -3, 0
+PERSIST_ALPHA_MIN_EXP, PERSIST_ALPHA_MAX_EXP = -2, 0
DEFAULT_WIN_SIZE = (600, 300)
DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'fft_rate', 30)
DB_DIV_MIN, DB_DIV_MAX = 1, 20
@@ -97,7 +98,38 @@ class control_panel(wx.Panel):
for widget in (avg_alpha_text, avg_alpha_slider):
parent.subscribe(AVERAGE_KEY, widget.Enable)
widget.Enable(parent[AVERAGE_KEY])
+ parent.subscribe(AVERAGE_KEY, widget.ShowItems)
+ #allways show initially, so room is reserved for them
+ widget.ShowItems(True) # (parent[AVERAGE_KEY])
+
+ parent.subscribe(AVERAGE_KEY, self._update_layout)
+
+ forms.check_box(
+ sizer=options_box, parent=self, label='Persistence',
+ ps=parent, key=USE_PERSISTENCE_KEY,
+ )
+ #static text and slider for persist alpha
+ persist_alpha_text = forms.static_text(
+ sizer=options_box, parent=self, label='Persist Alpha',
+ converter=forms.float_converter(lambda x: '%.4f'%x),
+ ps=parent, key=PERSIST_ALPHA_KEY, width=50,
+ )
+ persist_alpha_slider = forms.log_slider(
+ sizer=options_box, parent=self,
+ min_exp=PERSIST_ALPHA_MIN_EXP,
+ max_exp=PERSIST_ALPHA_MAX_EXP,
+ num_steps=SLIDER_STEPS,
+ ps=parent, key=PERSIST_ALPHA_KEY,
+ )
+ for widget in (persist_alpha_text, persist_alpha_slider):
+ parent.subscribe(USE_PERSISTENCE_KEY, widget.Enable)
+ widget.Enable(parent[USE_PERSISTENCE_KEY])
+ parent.subscribe(USE_PERSISTENCE_KEY, widget.ShowItems)
+ #allways show initially, so room is reserved for them
+ widget.ShowItems(True) # (parent[USE_PERSISTENCE_KEY])
+ parent.subscribe(USE_PERSISTENCE_KEY, self._update_layout)
+
#trace menu
for trace in TRACES:
trace_box = wx.BoxSizer(wx.HORIZONTAL)
@@ -144,6 +176,7 @@ class control_panel(wx.Panel):
)
#set sizer
self.SetSizerAndFit(control_box)
+
#mouse wheel event
def on_mouse_wheel(event):
if event.GetWheelRotation() < 0: self._on_incr_ref_level(event)
@@ -161,6 +194,14 @@ class control_panel(wx.Panel):
self.parent[Y_PER_DIV_KEY] = min(DB_DIV_MAX, common.get_clean_incr(self.parent[Y_PER_DIV_KEY]))
def _on_decr_db_div(self, event):
self.parent[Y_PER_DIV_KEY] = max(DB_DIV_MIN, common.get_clean_decr(self.parent[Y_PER_DIV_KEY]))
+ ##################################################
+ # subscriber handlers
+ ##################################################
+ def _update_layout(self,key):
+ # Just ignore the key value we get
+ # we only need to now that the visability or size of something has changed
+ self.parent.Layout()
+ #self.parent.Fit()
##################################################
# FFT window with plotter and control panel
@@ -183,7 +224,10 @@ class fft_window(wx.Panel, pubsub.pubsub):
avg_alpha_key,
peak_hold,
msg_key,
+ use_persistence,
+ persist_alpha,
):
+
pubsub.pubsub.__init__(self)
#setup
self.samples = EMPTY_TRACE
@@ -204,6 +248,8 @@ class fft_window(wx.Panel, pubsub.pubsub):
self[REF_LEVEL_KEY] = ref_level
self[BASEBAND_FREQ_KEY] = baseband_freq
self[RUNNING_KEY] = True
+ self[USE_PERSISTENCE_KEY] = use_persistence
+ self[PERSIST_ALPHA_KEY] = persist_alpha
for trace in TRACES:
#a function that returns a function
#so the function wont use local trace
@@ -232,6 +278,8 @@ class fft_window(wx.Panel, pubsub.pubsub):
self.plotter.enable_legend(True)
self.plotter.enable_point_label(True)
self.plotter.enable_grid_lines(True)
+ self.plotter.set_use_persistence(use_persistence)
+ self.plotter.set_persist_alpha(persist_alpha)
#setup the box with plot and controls
self.control_panel = control_panel(self)
main_box = wx.BoxSizer(wx.HORIZONTAL)
@@ -247,9 +295,12 @@ class fft_window(wx.Panel, pubsub.pubsub):
Y_PER_DIV_KEY, X_DIVS_KEY,
Y_DIVS_KEY, REF_LEVEL_KEY,
): self.subscribe(key, self.update_grid)
+ self.subscribe(USE_PERSISTENCE_KEY, self.plotter.set_use_persistence)
+ self.subscribe(PERSIST_ALPHA_KEY, self.plotter.set_persist_alpha)
#initial update
self.update_grid()
+
def autoscale(self, *args):
"""
Autoscale the fft plot to the last frame.
diff --git a/gr-wxgui/src/python/fftsink_gl.py b/gr-wxgui/src/python/fftsink_gl.py
index 8ddea9a8e3..e0306d9193 100644
--- a/gr-wxgui/src/python/fftsink_gl.py
+++ b/gr-wxgui/src/python/fftsink_gl.py
@@ -1,5 +1,5 @@
#
-# Copyright 2008,2009 Free Software Foundation, Inc.
+# Copyright 2008,2009,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -27,6 +27,7 @@ import common
from gnuradio import gr, blks2
from pubsub import pubsub
from constants import *
+import math
##################################################
# FFT sink block (wrapper for old wxgui)
@@ -53,10 +54,21 @@ class _fft_sink_base(gr.hier_block2, common.wxgui_hb):
size=fft_window.DEFAULT_WIN_SIZE,
peak_hold=False,
win=None,
+ use_persistence=False,
+ persist_alpha=None,
**kwargs #do not end with a comma
):
#ensure avg alpha
if avg_alpha is None: avg_alpha = 2.0/fft_rate
+ #ensure analog alpha
+ if persist_alpha is None:
+ actual_fft_rate=float(sample_rate/fft_size)/float(max(1,int(float((sample_rate/fft_size)/fft_rate))))
+ #print "requested_fft_rate ",fft_rate
+ #print "actual_fft_rate ",actual_fft_rate
+ analog_cutoff_freq=0.5 # Hertz
+ #calculate alpha from wanted cutoff freq
+ persist_alpha = 1.0 - math.exp(-2.0*math.pi*analog_cutoff_freq/actual_fft_rate)
+
#init
gr.hier_block2.__init__(
self,
@@ -76,6 +88,8 @@ class _fft_sink_base(gr.hier_block2, common.wxgui_hb):
)
msgq = gr.msg_queue(2)
sink = gr.message_sink(gr.sizeof_float*fft_size, msgq, True)
+
+
#controller
self.controller = pubsub()
self.controller.subscribe(AVERAGE_KEY, fft.set_average)
@@ -103,6 +117,8 @@ class _fft_sink_base(gr.hier_block2, common.wxgui_hb):
avg_alpha_key=AVG_ALPHA_KEY,
peak_hold=peak_hold,
msg_key=MSG_KEY,
+ use_persistence=use_persistence,
+ persist_alpha=persist_alpha,
)
common.register_access_methods(self, self.win)
setattr(self.win, 'set_baseband_freq', getattr(self, 'set_baseband_freq')) #BACKWARDS
@@ -134,11 +150,14 @@ class test_app_block (stdgui2.std_top_block):
fft_size = 256
# build our flow graph
- input_rate = 20.48e3
+ input_rate = 2048.0e3
+
+ #Generate some noise
+ noise =gr.noise_source_c(gr.GR_UNIFORM, 1.0/10)
# Generate a complex sinusoid
#src1 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 2e3, 1)
- src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 5.75e3, 1)
+ src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 57.50e3, 1)
# We add these throttle blocks so that this demo doesn't
# suck down all the CPU available. Normally you wouldn't use these.
@@ -149,17 +168,25 @@ class test_app_block (stdgui2.std_top_block):
ref_level=0, y_per_div=20, y_divs=10)
vbox.Add (sink1.win, 1, wx.EXPAND)
- self.connect(src1, thr1, sink1)
+ combine1=gr.add_cc()
+ self.connect(src1, (combine1,0))
+ self.connect(noise,(combine1,1))
+ self.connect(combine1,thr1, sink1)
#src2 = gr.sig_source_f (input_rate, gr.GR_SIN_WAVE, 2e3, 1)
- src2 = gr.sig_source_f (input_rate, gr.GR_CONST_WAVE, 5.75e3, 1)
+ src2 = gr.sig_source_f (input_rate, gr.GR_CONST_WAVE, 57.50e3, 1)
thr2 = gr.throttle(gr.sizeof_float, input_rate)
sink2 = fft_sink_f (panel, title="Real Data", fft_size=fft_size*2,
sample_rate=input_rate, baseband_freq=100e3,
ref_level=0, y_per_div=20, y_divs=10)
vbox.Add (sink2.win, 1, wx.EXPAND)
- self.connect(src2, thr2, sink2)
+ combine2=gr.add_ff()
+ c2f2=gr.complex_to_float()
+
+ self.connect(src2, (combine2,0))
+ self.connect(noise,c2f2,(combine2,1))
+ self.connect(combine2, thr2,sink2)
def main ():
app = stdgui2.stdapp (test_app_block, "FFT Sink Test App")
diff --git a/gr-wxgui/src/python/fftsink_nongl.py b/gr-wxgui/src/python/fftsink_nongl.py
index 937eb27cce..508b4e772f 100644
--- a/gr-wxgui/src/python/fftsink_nongl.py
+++ b/gr-wxgui/src/python/fftsink_nongl.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2003,2004,2005,2006,2007,2009 Free Software Foundation, Inc.
+# Copyright 2003,2004,2005,2006,2007,2009,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -37,7 +37,7 @@ class fft_sink_base(object):
y_divs=8, ref_level=50,
sample_rate=1, fft_size=512,
fft_rate=default_fft_rate,
- average=False, avg_alpha=None, title='', peak_hold=False):
+ average=False, avg_alpha=None, title='', peak_hold=False,use_persistence=False,persist_alpha=0.2):
# initialize common attributes
self.baseband_freq = baseband_freq
@@ -52,6 +52,9 @@ class fft_sink_base(object):
self.avg_alpha = 2.0 / fft_rate
else:
self.avg_alpha = avg_alpha
+ self.use_persistence = use_persistence
+ self.persist_alpha = persist_alpha
+
self.title = title
self.peak_hold = peak_hold
self.input_is_real = input_is_real
@@ -75,6 +78,14 @@ class fft_sink_base(object):
self.peak_hold = enable
self.win.set_peak_hold(enable)
+ def set_use_persistence(self, enable):
+ self.use_persistence = enable
+ self.win.set_use_persistence(enable)
+
+ def set_persist_alpha(self, persist_alpha):
+ self.persist_alpha = persist_alpha
+ self.win.set_persist_alpha(persist_alpha)
+
def set_avg_alpha(self, avg_alpha):
self.avg_alpha = avg_alpha
@@ -93,7 +104,7 @@ class fft_sink_f(gr.hier_block2, fft_sink_base):
def __init__(self, parent, baseband_freq=0, ref_scale=2.0,
y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512,
fft_rate=default_fft_rate, average=False, avg_alpha=None,
- title='', size=default_fftsink_size, peak_hold=False, **kwargs):
+ title='', size=default_fftsink_size, peak_hold=False, use_persistence=False,persist_alpha=0.2, **kwargs):
gr.hier_block2.__init__(self, "fft_sink_f",
gr.io_signature(1, 1, gr.sizeof_float),
@@ -104,7 +115,7 @@ class fft_sink_f(gr.hier_block2, fft_sink_base):
sample_rate=sample_rate, fft_size=fft_size,
fft_rate=fft_rate,
average=average, avg_alpha=avg_alpha, title=title,
- peak_hold=peak_hold)
+ peak_hold=peak_hold,use_persistence=use_persistence,persist_alpha=persist_alpha)
self.s2p = gr.stream_to_vector(gr.sizeof_float, self.fft_size)
self.one_in_n = gr.keep_one_in_n(gr.sizeof_float * self.fft_size,
@@ -131,12 +142,14 @@ class fft_sink_f(gr.hier_block2, fft_sink_base):
self.win = fft_window(self, parent, size=size)
self.set_average(self.average)
self.set_peak_hold(self.peak_hold)
+ self.set_use_persistence(self.use_persistence)
+ self.set_persist_alpha(self.persist_alpha)
class fft_sink_c(gr.hier_block2, fft_sink_base):
def __init__(self, parent, baseband_freq=0, ref_scale=2.0,
y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512,
fft_rate=default_fft_rate, average=False, avg_alpha=None,
- title='', size=default_fftsink_size, peak_hold=False, **kwargs):
+ title='', size=default_fftsink_size, peak_hold=False, use_persistence=False,persist_alpha=0.2, **kwargs):
gr.hier_block2.__init__(self, "fft_sink_c",
gr.io_signature(1, 1, gr.sizeof_gr_complex),
@@ -147,7 +160,7 @@ class fft_sink_c(gr.hier_block2, fft_sink_base):
sample_rate=sample_rate, fft_size=fft_size,
fft_rate=fft_rate,
average=average, avg_alpha=avg_alpha, title=title,
- peak_hold=peak_hold)
+ peak_hold=peak_hold, use_persistence=use_persistence,persist_alpha=persist_alpha)
self.s2p = gr.stream_to_vector(gr.sizeof_gr_complex, self.fft_size)
self.one_in_n = gr.keep_one_in_n(gr.sizeof_gr_complex * self.fft_size,
@@ -173,6 +186,8 @@ class fft_sink_c(gr.hier_block2, fft_sink_base):
self.win = fft_window(self, parent, size=size)
self.set_average(self.average)
+ self.set_use_persistence(self.use_persistence)
+ self.set_persist_alpha(self.persist_alpha)
self.set_peak_hold(self.peak_hold)
@@ -236,6 +251,9 @@ class control_panel(wx.Panel):
self.average_check_box = wx.CheckBox(parent=self, style=wx.CHK_2STATE, label="Average")
self.average_check_box.Bind(wx.EVT_CHECKBOX, parent.on_average)
control_box.Add(self.average_check_box, 0, wx.EXPAND)
+ self.use_persistence_check_box = wx.CheckBox(parent=self, style=wx.CHK_2STATE, label="Persistence")
+ self.use_persistence_check_box.Bind(wx.EVT_CHECKBOX, parent.on_use_persistence)
+ control_box.Add(self.use_persistence_check_box, 0, wx.EXPAND)
self.peak_hold_check_box = wx.CheckBox(parent=self, style=wx.CHK_2STATE, label="Peak Hold")
self.peak_hold_check_box.Bind(wx.EVT_CHECKBOX, parent.on_peak_hold)
control_box.Add(self.peak_hold_check_box, 0, wx.EXPAND)
@@ -276,6 +294,7 @@ class control_panel(wx.Panel):
"""
#update checkboxes
self.average_check_box.SetValue(self.parent.fftsink.average)
+ self.use_persistence_check_box.SetValue(self.parent.fftsink.use_persistence)
self.peak_hold_check_box.SetValue(self.parent.fftsink.peak_hold)
#update radio buttons
try:
@@ -306,6 +325,10 @@ class fft_window (wx.Panel):
self.peak_hold = False
self.peak_vals = None
+
+ self.use_persistence=False
+ self.persist_alpha=0.2
+
self.plot.SetEnableGrid (True)
# self.SetEnableZoom (True)
@@ -394,6 +417,14 @@ class fft_window (wx.Panel):
y_range = ymin, ymax
self.plot.Draw (graphics, xAxis=x_range, yAxis=y_range, step=self.fftsink.y_per_div)
+ def set_use_persistence(self, enable):
+ self.use_persistence = enable
+ self.plot.set_use_persistence( enable)
+
+ def set_persist_alpha(self, persist_alpha):
+ self.persist_alpha = persist_alpha
+ self.plot.set_persist_alpha(persist_alpha)
+
def set_peak_hold(self, enable):
self.peak_hold = enable
self.peak_vals = None
@@ -403,6 +434,11 @@ class fft_window (wx.Panel):
self.fftsink.set_average(evt.IsChecked())
self.control_panel.update()
+ def on_use_persistence(self, evt):
+ # print "on_analog"
+ self.fftsink.set_use_persistence(evt.IsChecked())
+ self.control_panel.update()
+
def on_peak_hold(self, evt):
# print "on_peak_hold"
self.fftsink.set_peak_hold(evt.IsChecked())
@@ -486,9 +522,11 @@ class fft_window (wx.Panel):
self.id_y_per_div_10 = wx.NewId()
self.id_y_per_div_20 = wx.NewId()
self.id_average = wx.NewId()
+ self.id_use_persistence = wx.NewId()
self.id_peak_hold = wx.NewId()
self.plot.Bind(wx.EVT_MENU, self.on_average, id=self.id_average)
+ self.plot.Bind(wx.EVT_MENU, self.on_use_persistence, id=self.id_use_persistence)
self.plot.Bind(wx.EVT_MENU, self.on_peak_hold, id=self.id_peak_hold)
self.plot.Bind(wx.EVT_MENU, self.on_incr_ref_level, id=self.id_incr_ref_level)
self.plot.Bind(wx.EVT_MENU, self.on_decr_ref_level, id=self.id_decr_ref_level)
@@ -504,6 +542,7 @@ class fft_window (wx.Panel):
menu = wx.Menu()
self.popup_menu = menu
menu.AppendCheckItem(self.id_average, "Average")
+ menu.AppendCheckItem(self.id_use_persistence, "Persistence")
menu.AppendCheckItem(self.id_peak_hold, "Peak Hold")
menu.Append(self.id_incr_ref_level, "Incr Ref Level")
menu.Append(self.id_decr_ref_level, "Decr Ref Level")
@@ -519,6 +558,7 @@ class fft_window (wx.Panel):
self.checkmarks = {
self.id_average : lambda : self.fftsink.average,
+ self.id_use_persistence : lambda : self.fftsink.use_persistence,
self.id_peak_hold : lambda : self.fftsink.peak_hold,
self.id_y_per_div_1 : lambda : self.fftsink.y_per_div == 1,
self.id_y_per_div_2 : lambda : self.fftsink.y_per_div == 2,
@@ -561,11 +601,11 @@ class test_app_block (stdgui2.std_top_block):
fft_size = 256
# build our flow graph
- input_rate = 20.48e3
+ input_rate = 100*20.48e3
# Generate a complex sinusoid
- #src1 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 2e3, 1)
- src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 5.75e3, 1)
+ #src1 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 100*2e3, 1)
+ src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 100*5.75e3, 1)
# We add these throttle blocks so that this demo doesn't
# suck down all the CPU available. Normally you wouldn't use these.
@@ -578,8 +618,8 @@ class test_app_block (stdgui2.std_top_block):
self.connect(src1, thr1, sink1)
- #src2 = gr.sig_source_f (input_rate, gr.GR_SIN_WAVE, 2e3, 1)
- src2 = gr.sig_source_f (input_rate, gr.GR_CONST_WAVE, 5.75e3, 1)
+ #src2 = gr.sig_source_f (input_rate, gr.GR_SIN_WAVE, 100*2e3, 1)
+ src2 = gr.sig_source_f (input_rate, gr.GR_CONST_WAVE, 100*5.75e3, 1)
thr2 = gr.throttle(gr.sizeof_float, input_rate)
sink2 = fft_sink_f (panel, title="Real Data", fft_size=fft_size*2,
sample_rate=input_rate, baseband_freq=100e3,
diff --git a/gr-wxgui/src/python/plot.py b/gr-wxgui/src/python/plot.py
index c104b0ea51..e0bc4ca608 100644
--- a/gr-wxgui/src/python/plot.py
+++ b/gr-wxgui/src/python/plot.py
@@ -6,7 +6,7 @@
#
# Created: 2003/11/03
# RCS-ID: $Id$
-# Copyright: (c) 2002,2007
+# Copyright: (c) 2002,2007,2010
# Licence: Use as you wish.
#-----------------------------------------------------------------------------
# 12/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
@@ -36,6 +36,9 @@
#
# May 27, 2007 Johnathan Corgan (jcorgan@corganenterprises.com)
# - Converted from numarray to numpy
+#
+# Apr 23, 2010 Martin Dudok van Heel (http://www.olifantasia.com/gnuradio/contact_olifantasia.gif)
+# - Added Persistence option (emulate after glow of an analog CRT display using IIR)
"""
This is a simple light weight plotting module that can be used with
@@ -422,6 +425,11 @@ class PlotCanvas(wx.Window):
def __init__(self, parent, id = -1, pos=wx.DefaultPosition,
size=wx.DefaultSize, style= wx.DEFAULT_FRAME_STYLE, name= ""):
+
+ self.use_persistence=False
+ self.alpha=0.3
+ self.decimation=10
+ self.decim_counter=0
"""Constucts a window, which can be a child of a frame, dialog or
any other non-control window"""
@@ -488,6 +496,14 @@ class PlotCanvas(wx.Window):
# platforms at initialization, but little harm done.
self.OnSize(None) # sets the initial size based on client size
# UNCONDITIONAL, needed to create self._Buffer
+
+
+ def set_use_persistence(self, enable):
+ self.use_persistence = enable
+
+ def set_persist_alpha(self, persist_alpha):
+ self.alpha = persist_alpha
+
# SaveFile
def SaveFile(self, fileName= ''):
@@ -791,12 +807,19 @@ class PlotCanvas(wx.Window):
if dc == None:
# sets new dc and clears it
- dc = wx.BufferedDC(wx.ClientDC(self), self._Buffer)
- dc.Clear()
-
+ if self.use_persistence:
+ dc = wx.MemoryDC()
+ dc.SelectObject(self._Buffer)
+ dc.Clear()
+ else:
+ dc = wx.BufferedDC(wx.ClientDC(self), self._Buffer)
+ dc.Clear()
+
dc.BeginDrawing()
# dc.Clear()
-
+
+
+
# set font size for every thing but title and legend
dc.SetFont(self._getFont(self._fontSizeAxis))
@@ -818,6 +841,15 @@ class PlotCanvas(wx.Window):
self.last_draw = (graphics, xAxis, yAxis) # saves most recient values
+ if False:
+ ptx,pty,rectWidth,rectHeight= self._point2ClientCoord(p1, p2)
+ #dc.SetPen(wx.Pen(wx.BLACK))
+ dc.SetBrush(wx.Brush( wx.BLACK, wx.SOLID ) ) #wx.SOLID wx.TRANSPARENT ) )
+ #dc.SetLogicalFunction(wx.INVERT) #wx.XOR wx.INVERT
+ dc.DrawRectangle( ptx,pty, rectWidth,rectHeight)
+ #dc.SetBrush(wx.Brush( wx.WHITE, wx.SOLID ) )
+ #dc.SetLogicalFunction(wx.COPY)
+
# Get ticks and textExtents for axis if required
if self._xSpec is not 'none':
if self._xUseScopeTicks:
@@ -874,8 +906,11 @@ class PlotCanvas(wx.Window):
scale = (self.plotbox_size-textSize_scale) / (p2-p1)* _numpy.array((1,-1))
shift = -p1*scale + self.plotbox_origin + textSize_shift * _numpy.array((1,-1))
self._pointScale= scale # make available for mouse events
- self._pointShift= shift
+ self._pointShift= shift
+
+ #dc.SetLogicalFunction(wx.INVERT) #wx.XOR wx.INVERT
self._drawAxes(dc, p1, p2, scale, shift, xticks, yticks)
+ #dc.SetLogicalFunction(wx.COPY)
graphics.scaleAndShift(scale, shift)
graphics.setPrinterScale(self.printerScale) # thicken up lines and markers if printing
@@ -885,11 +920,44 @@ class PlotCanvas(wx.Window):
dc.SetClippingRegion(ptx,pty,rectWidth,rectHeight)
# Draw the lines and markers
#start = _time.clock()
+
graphics.draw(dc)
# print "entire graphics drawing took: %f second"%(_time.clock() - start)
# remove the clipping region
dc.DestroyClippingRegion()
dc.EndDrawing()
+
+
+ if self.use_persistence:
+ dc=None
+ self._Buffer.CopyToBuffer(self._Bufferarray) #, format=wx.BitmapBufferFormat_RGB, stride=-1)
+ ## do the IIR filter
+ alpha_int=int(float(self.alpha*256))
+ if True:
+ _numpy.add(self._Bufferarray,0,self._Buffer3array)
+ _numpy.multiply(self._Buffer3array,alpha_int,self._Buffer3array)
+ _numpy.multiply(self._Buffer2array,(256-alpha_int),self._Buffer2array)
+ _numpy.add(self._Buffer3array,self._Buffer2array,self._Buffer2array)
+ _numpy.right_shift(self._Buffer2array,8,self._Buffer2array)
+ elif False:
+ self._Buffer2array=(self._Bufferarray.astype(_numpy.uint32) *alpha_int + self._Buffer2array*(256-alpha_int)).__rshift__(8)
+ elif False:
+ self._Buffer2array *=(256-alpha_int)
+ self._Buffer2array +=self._Bufferarray.astype(_numpy.uint32)*alpha_int
+ self._Buffer2array /=256
+
+ ##copy back to image buffer
+ self._Buffer2.CopyFromBuffer(self._Buffer2array.astype(_numpy.uint8)) #, format=wx.BitmapBufferFormat_RGB, stride=-1)
+
+ #draw to the screen
+ #self.decim_counter=self.decim_counter+1
+ if True: #self.decim_counter>self.decimation:
+ #self.decim_counter=0
+ dc2 = wx.ClientDC( self )
+ dc2.BeginDrawing()
+ dc2.DrawBitmap(self._Buffer2, 0, 0, False)
+ #dc2.DrawBitmap(self._Buffer, 0, 0, False)
+ dc2.EndDrawing()
def Redraw(self, dc= None):
"""Redraw the existing plot."""
@@ -1031,6 +1099,8 @@ class PlotCanvas(wx.Window):
if self.last_PointLabel != None:
self._drawPointLabel(self.last_PointLabel) #erase old
self.last_PointLabel = None
+
+ #paint current buffer to screen
dc = wx.BufferedPaintDC(self, self._Buffer)
def OnSize(self,event):
@@ -1041,7 +1111,23 @@ class PlotCanvas(wx.Window):
# Make new offscreen bitmap: this bitmap will always have the
# current drawing in it, so it can be used to save the image to
# a file, or whatever.
- self._Buffer = wx.EmptyBitmap(Size[0],Size[1])
+ self._Buffer = wx.EmptyBitmap(Size[0],Size[1],24)
+
+
+ if True: #self.use_persistence:
+ #self._Bufferarray = _numpy.zeros((Size[0], Size[1],3), dtype=_numpy.uint8)
+ self._Bufferarray = _numpy.zeros((Size[0]* Size[1]*3), dtype=_numpy.uint8)
+
+ # Make new second offscreen bitmap: this bitmap will always have the
+ # last drawing in it, so it can be used to do display time dependent processing
+ # like averaging (IIR) or show differences between updates
+ self._Buffer2 = wx.EmptyBitmap(Size[0],Size[1],24)
+ # now the extra buffers for the IIR processing
+ # note the different datatype uint32
+ self._Buffer2array = _numpy.zeros((Size[0]* Size[1]*3), dtype=_numpy.uint32) #dtype=_numpy.float
+ self._Buffer3array = _numpy.zeros((Size[0]* Size[1]*3), dtype=_numpy.uint32) #dtype=_numpy.float
+ # optional you can set the ufunct buffer size to improve speed
+ #_numpy.setbufsize(16*((Size[0]* Size[1]*3)/16 +1))
self._setSize()
self.last_PointLabel = None #reset pointLabel
diff --git a/gr-wxgui/src/python/plotter/channel_plotter.py b/gr-wxgui/src/python/plotter/channel_plotter.py
index ff0a3a160d..a3a2b64519 100644
--- a/gr-wxgui/src/python/plotter/channel_plotter.py
+++ b/gr-wxgui/src/python/plotter/channel_plotter.py
@@ -1,5 +1,5 @@
#
-# Copyright 2008, 2009 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -47,6 +47,7 @@ class channel_plotter(grid_plotter_base):
"""
#init
grid_plotter_base.__init__(self, parent, MIN_PADDING)
+ self.set_use_persistence(False)
#setup legend cache
self._legend_cache = self.new_gl_cache(self._draw_legend, 50)
self.enable_legend(False)
diff --git a/gr-wxgui/src/python/plotter/plotter_base.py b/gr-wxgui/src/python/plotter/plotter_base.py
index dede5a0ad5..b856215e9b 100644
--- a/gr-wxgui/src/python/plotter/plotter_base.py
+++ b/gr-wxgui/src/python/plotter/plotter_base.py
@@ -1,5 +1,5 @@
#
-# Copyright 2008, 2009 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -87,7 +87,10 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex):
@param parent the parent widgit
"""
attribList = (wx.glcanvas.WX_GL_DOUBLEBUFFER, wx.glcanvas.WX_GL_RGBA)
- wx.glcanvas.GLCanvas.__init__(self, parent, attribList=attribList)
+ wx.glcanvas.GLCanvas.__init__(self, parent, attribList=attribList);
+ self.use_persistence=False
+ self.persist_alpha=2.0/15
+ self.clear_accum=True
self._gl_init_flag = False
self._resized_flag = True
self._init_fcns = list()
@@ -97,6 +100,13 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex):
self.Bind(wx.EVT_SIZE, self._on_size)
self.Bind(wx.EVT_ERASE_BACKGROUND, lambda e: None)
+ def set_use_persistence(self,enable):
+ self.use_persistence=enable
+ self.clear_accum=True
+
+ def set_persist_alpha(self,analog_alpha):
+ self.persist_alpha=analog_alpha
+
def new_gl_cache(self, draw_fcn, draw_pri=50):
"""
Create a new gl cache.
@@ -131,6 +141,7 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex):
"""
self.lock()
self._resized_flag = True
+ self.clear_accum=True
self.unlock()
def _on_paint(self, event):
@@ -160,7 +171,30 @@ class plotter_base(wx.glcanvas.GLCanvas, common.mutex):
self._resized_flag = False
#clear, draw functions, swap
GL.glClear(GL.GL_COLOR_BUFFER_BIT)
+
+ if False:
+ GL.glEnable (GL.GL_LINE_SMOOTH)
+ GL.glEnable (GL.GL_POLYGON_SMOOTH)
+ GL.glEnable (GL.GL_BLEND)
+ GL.glBlendFunc (GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA)
+ GL.glHint (GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST) #GL.GL_DONT_CARE)
+ GL.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST)
+ #GL.glLineWidth (1.5)
+
+ GL.glEnable(GL.GL_MULTISAMPLE) #Enable Multisampling anti-aliasing
+
+
for fcn in self._draw_fcns: fcn[1]()
+
+ if self.use_persistence:
+ if self.clear_accum:
+ #GL.glClear(GL.GL_ACCUM_BUFFER_BIT)
+ GL.glAccum(GL.GL_LOAD, 1.0)
+ self.clear_accum=False
+
+ GL.glAccum(GL.GL_MULT, 1.0-self.persist_alpha)
+ GL.glAccum(GL.GL_ACCUM, self.persist_alpha)
+ GL.glAccum(GL.GL_RETURN, 1.0)
self.SwapBuffers()
self.unlock()
diff --git a/gr-wxgui/src/python/scope_window.py b/gr-wxgui/src/python/scope_window.py
index f7c0ffa82e..c03b71f1e0 100644
--- a/gr-wxgui/src/python/scope_window.py
+++ b/gr-wxgui/src/python/scope_window.py
@@ -1,5 +1,5 @@
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -36,6 +36,8 @@ import forms
# Constants
##################################################
DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'scope_rate', 30)
+PERSIST_ALPHA_MIN_EXP, PERSIST_ALPHA_MAX_EXP = -2, 0
+SLIDER_STEPS = 100
DEFAULT_WIN_SIZE = (600, 300)
COUPLING_MODES = (
('DC', False),
@@ -88,6 +90,37 @@ class control_panel(wx.Panel):
parent[SHOW_CONTROL_PANEL_KEY] = True
parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
control_box = wx.BoxSizer(wx.VERTICAL)
+
+ ##################################################
+ # Persistence
+ ##################################################
+
+ forms.check_box(
+ sizer=control_box, parent=self, label='Persistence',
+ ps=parent, key=USE_PERSISTENCE_KEY,
+ )
+ #static text and slider for analog alpha
+ persist_alpha_text = forms.static_text(
+ sizer=control_box, parent=self, label='Analog Alpha',
+ converter=forms.float_converter(lambda x: '%.4f'%x),
+ ps=parent, key=PERSIST_ALPHA_KEY, width=50,
+ )
+ persist_alpha_slider = forms.log_slider(
+ sizer=control_box, parent=self,
+ min_exp=PERSIST_ALPHA_MIN_EXP,
+ max_exp=PERSIST_ALPHA_MAX_EXP,
+ num_steps=SLIDER_STEPS,
+ ps=parent, key=PERSIST_ALPHA_KEY,
+ )
+ for widget in (persist_alpha_text, persist_alpha_slider):
+ parent.subscribe(USE_PERSISTENCE_KEY, widget.Enable)
+ widget.Enable(parent[USE_PERSISTENCE_KEY])
+ parent.subscribe(USE_PERSISTENCE_KEY, widget.ShowItems)
+ #allways show initially, so room is reserved for them
+ widget.ShowItems(True) # (parent[USE_PERSISTENCE_KEY])
+
+ parent.subscribe(USE_PERSISTENCE_KEY, self._update_layout)
+
##################################################
# Axes Options
##################################################
@@ -364,6 +397,15 @@ class control_panel(wx.Panel):
def _on_decr_y_off(self, event):
self.parent[Y_OFF_KEY] = self.parent[Y_OFF_KEY] - self.parent[Y_PER_DIV_KEY]
+ ##################################################
+ # subscriber handlers
+ ##################################################
+ def _update_layout(self,key):
+ # Just ignore the key value we get
+ # we only need to now that the visability or size of something has changed
+ self.parent.Layout()
+ #self.parent.Fit()
+
##################################################
# Scope window with plotter and control panel
##################################################
@@ -388,6 +430,8 @@ class scope_window(wx.Panel, pubsub.pubsub):
trigger_channel_key,
decimation_key,
msg_key,
+ use_persistence,
+ persist_alpha,
):
pubsub.pubsub.__init__(self)
#check num inputs
@@ -430,6 +474,8 @@ class scope_window(wx.Panel, pubsub.pubsub):
self[TRIGGER_MODE_KEY] = gr.gr_TRIG_MODE_AUTO
self[TRIGGER_SLOPE_KEY] = gr.gr_TRIG_SLOPE_POS
self[T_FRAC_OFF_KEY] = 0.5
+ self[USE_PERSISTENCE_KEY] = use_persistence
+ self[PERSIST_ALPHA_KEY] = persist_alpha
for i in range(num_inputs):
self.proxy(common.index_key(AC_COUPLE_KEY, i), controller, common.index_key(ac_couple_key, i))
#init panel and plot
@@ -440,6 +486,8 @@ class scope_window(wx.Panel, pubsub.pubsub):
self.plotter.enable_legend(True)
self.plotter.enable_point_label(True)
self.plotter.enable_grid_lines(True)
+ self.plotter.set_use_persistence(use_persistence)
+ self.plotter.set_persist_alpha(persist_alpha)
#setup the box with plot and controls
self.control_panel = control_panel(self)
main_box = wx.BoxSizer(wx.HORIZONTAL)
@@ -457,6 +505,9 @@ class scope_window(wx.Panel, pubsub.pubsub):
XY_MODE_KEY, AUTORANGE_KEY, T_FRAC_OFF_KEY,
TRIGGER_SHOW_KEY, XY_MARKER_KEY, X_CHANNEL_KEY, Y_CHANNEL_KEY,
]: self.subscribe(key, self.update_grid)
+ #register events for plotter settings
+ self.subscribe(USE_PERSISTENCE_KEY, self.plotter.set_use_persistence)
+ self.subscribe(PERSIST_ALPHA_KEY, self.plotter.set_persist_alpha)
#initial update
self.update_grid()
@@ -621,3 +672,4 @@ class scope_window(wx.Panel, pubsub.pubsub):
self.plotter.set_y_grid(self.get_y_min(), self.get_y_max(), self[Y_PER_DIV_KEY])
#redraw current sample
self.handle_samples()
+
diff --git a/gr-wxgui/src/python/scopesink_gl.py b/gr-wxgui/src/python/scopesink_gl.py
index 358361de62..ebf9b29398 100644
--- a/gr-wxgui/src/python/scopesink_gl.py
+++ b/gr-wxgui/src/python/scopesink_gl.py
@@ -1,5 +1,5 @@
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -27,6 +27,7 @@ import common
from gnuradio import gr
from pubsub import pubsub
from constants import *
+import math
class ac_couple_block(gr.hier_block2):
"""
@@ -76,8 +77,17 @@ class _scope_sink_base(gr.hier_block2, common.wxgui_hb):
ac_couple=False,
num_inputs=1,
frame_rate=scope_window.DEFAULT_FRAME_RATE,
+ use_persistence=False,
+ persist_alpha=None,
**kwargs #do not end with a comma
):
+ #ensure analog alpha
+ if persist_alpha is None:
+ actual_frame_rate=float(frame_rate)
+ analog_cutoff_freq=0.5 # Hertz
+ #calculate alpha from wanted cutoff freq
+ persist_alpha = 1.0 - math.exp(-2.0*math.pi*analog_cutoff_freq/actual_frame_rate)
+
if not t_scale: t_scale = 10.0/sample_rate
#init
gr.hier_block2.__init__(
@@ -129,6 +139,8 @@ class _scope_sink_base(gr.hier_block2, common.wxgui_hb):
trigger_channel_key=TRIGGER_CHANNEL_KEY,
decimation_key=DECIMATION_KEY,
msg_key=MSG_KEY,
+ use_persistence=use_persistence,
+ persist_alpha=persist_alpha,
)
common.register_access_methods(self, self.win)
#connect
@@ -169,10 +181,11 @@ class test_top_block (stdgui2.std_top_block):
def __init__(self, frame, panel, vbox, argv):
stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv)
+ default_input_rate = 1e6
if len(argv) > 1:
- frame_decim = int(argv[1])
+ input_rate = int(argv[1])
else:
- frame_decim = 1
+ input_rate = default_input_rate
if len(argv) > 2:
v_scale = float(argv[2]) # start up at this v_scale value
@@ -182,14 +195,17 @@ class test_top_block (stdgui2.std_top_block):
if len(argv) > 3:
t_scale = float(argv[3]) # start up at this t_scale value
else:
- t_scale = .00003 # old behavior
+ t_scale = .00003*default_input_rate/input_rate # old behavior
- print "frame decim %s v_scale %s t_scale %s" % (frame_decim,v_scale,t_scale)
+ print "input rate %s v_scale %s t_scale %s" % (input_rate,v_scale,t_scale)
- input_rate = 1e6
# Generate a complex sinusoid
- self.src0 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 25.1e3, 1e3)
+ ampl=1.0e3
+ self.src0 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 25.1e3*input_rate/default_input_rate, ampl)
+ self.noise =gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 11.1*25.1e3*input_rate/default_input_rate, ampl/10)
+ #self.noise =gr.noise_source_c(gr.GR_GAUSSIAN, ampl/10)
+ self.combine=gr.add_cc()
# We add this throttle block so that this demo doesn't suck down
# all the CPU available. You normally wouldn't use it...
@@ -201,7 +217,9 @@ class test_top_block (stdgui2.std_top_block):
# Ultimately this will be
# self.connect("src0 throttle scope")
- self.connect(self.src0, self.thr, scope)
+ self.connect(self.src0,(self.combine,0))
+ self.connect(self.noise,(self.combine,1))
+ self.connect(self.combine, self.thr, scope)
def main ():
app = stdgui2.stdapp (test_top_block, "O'Scope Test App")
diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am
index 4e3839d27a..2596eae456 100644
--- a/grc/blocks/Makefile.am
+++ b/grc/blocks/Makefile.am
@@ -91,7 +91,6 @@ dist_ourdata_DATA = \
gr_correlate_access_code_bb.xml \
gr_costas_loop_cc.xml \
gr_cpfsk_bc.xml \
- gr_dd_mpsk_sync_cc.xml \
gr_decode_ccsds_27_fb.xml \
gr_deinterleave.xml \
gr_delay.xml \
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 04568e19a8..8d91258e51 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -130,7 +130,6 @@
<block>gr_pfb_clock_sync_xxx</block>
<block>gr_costas_loop_cc</block>
- <block>gr_dd_mpsk_sync_cc</block>
<block>gr_mpsk_sync_cc</block>
<block>gr_mpsk_receiver_cc</block>
diff --git a/grc/blocks/gr_dd_mpsk_sync_cc.xml b/grc/blocks/gr_dd_mpsk_sync_cc.xml
deleted file mode 100644
index aed0e8d310..0000000000
--- a/grc/blocks/gr_dd_mpsk_sync_cc.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##DD MPSK Sync
-###################################################
- -->
-<block>
- <name>DD MPSK Sync</name>
- <key>gr_dd_mpsk_sync_cc</key>
- <import>from gnuradio import gr</import>
- <make>gr.dd_mpsk_sync_cc($alpha, $beta, $max_freq, $min_freq, $ref_phase, $omega, $gain_omega, $mu, $gain_mu)</make>
- <param>
- <name>Alpha</name>
- <key>alpha</key>
- <type>real</type>
- </param>
- <param>
- <name>Beta</name>
- <key>beta</key>
- <type>real</type>
- </param>
- <param>
- <name>Max Freq</name>
- <key>max_freq</key>
- <type>real</type>
- </param>
- <param>
- <name>Min Freq</name>
- <key>min_freq</key>
- <type>real</type>
- </param>
- <param>
- <name>Reference Phase</name>
- <key>ref_phase</key>
- <type>real</type>
- </param>
- <param>
- <name>Omega</name>
- <key>omega</key>
- <type>real</type>
- </param>
- <param>
- <name>Gain Omega</name>
- <key>gain_omega</key>
- <type>real</type>
- </param>
- <param>
- <name>Mu</name>
- <key>mu</key>
- <type>real</type>
- </param>
- <param>
- <name>Gain Mu</name>
- <key>gain_mu</key>
- <type>real</type>
- </param>
- <sink>
- <name>in</name>
- <type>complex</type>
- </sink>
- <source>
- <name>out</name>
- <type>complex</type>
- </source>
-</block>
diff --git a/grc/freedesktop/Makefile.am b/grc/freedesktop/Makefile.am
index bfbdee9404..23bb70bf54 100644
--- a/grc/freedesktop/Makefile.am
+++ b/grc/freedesktop/Makefile.am
@@ -30,7 +30,7 @@ dist_ourdata_DATA = \
grc-icon-48.png \
grc-icon-32.png \
gnuradio-grc.xml \
- gnuradio-grc.desktop \
+ gnuradio-gnuradio-companion.desktop \
gnuradio-usrp2_probe.desktop \
gnuradio-usrp_probe.desktop
diff --git a/grc/freedesktop/gnuradio-grc.desktop b/grc/freedesktop/gnuradio-gnuradio-companion.desktop
index d9c70ca928..5fd0497808 100644
--- a/grc/freedesktop/gnuradio-grc.desktop
+++ b/grc/freedesktop/gnuradio-gnuradio-companion.desktop
@@ -2,7 +2,7 @@
Version=1.0
Type=Application
Name=GRC
-Exec=grc %F
+Exec=gnuradio-companion %F
Categories=Development;
MimeType=application/gnuradio-grc;
Icon=gnuradio-grc
diff --git a/grc/freedesktop/grc_setup_freedesktop.in b/grc/freedesktop/grc_setup_freedesktop.in
index db65064524..a0c5ac193b 100644
--- a/grc/freedesktop/grc_setup_freedesktop.in
+++ b/grc/freedesktop/grc_setup_freedesktop.in
@@ -8,7 +8,7 @@
##################################################
ICON_SIZES="32 48 64 128 256"
-MENU_ITEMS="grc usrp2_probe usrp_probe"
+MENU_ITEMS="gnuradio-companion usrp2_probe usrp_probe"
if [ -n "$2" ]; then
SRCDIR="$2"
else
diff --git a/grc/scripts/Makefile.am b/grc/scripts/Makefile.am
index e24f88800f..9019ec5cc9 100644
--- a/grc/scripts/Makefile.am
+++ b/grc/scripts/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2008, 2009 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,4 +21,4 @@
include $(top_srcdir)/Makefile.common
-dist_bin_SCRIPTS = grc usrp2_probe usrp_probe
+dist_bin_SCRIPTS = gnuradio-companion usrp2_probe usrp_probe
diff --git a/grc/scripts/grc b/grc/scripts/gnuradio-companion
index a4115c39f3..a4115c39f3 100755
--- a/grc/scripts/grc
+++ b/grc/scripts/gnuradio-companion
diff --git a/usrp/firmware/include/usrp_ids.h b/usrp/firmware/include/usrp_ids.h
index 4152600bd2..46a0694349 100644
--- a/usrp/firmware/include/usrp_ids.h
+++ b/usrp/firmware/include/usrp_ids.h
@@ -56,6 +56,7 @@
#define USB_PID_FSF_BDALE_9 0x0013 // Bdale Garbee <bdale@gag.com>
#define USB_PID_FSF_HPSDR_HERMES 0x0014 // HPSDR Hermes
#define USB_PID_FSF_THINKRF 0x0015 // Catalin Patulea <catalin.patulea@thinkrf.com>
+#define USB_PID_FSF_MSA 0x0016 // Hans de Bok <hdbok@dionaea.demon.nl> Scotty's Modular Spectrum Analyzer
#define USB_PID_FSF_LBNL_UXO 0x0018 // http://recycle.lbl.gov/~ldoolitt/uxo/
diff --git a/usrp/firmware/src/common/build_eeprom.py b/usrp/firmware/src/common/build_eeprom.py
index d73cbbc4f7..00c2e34141 100755
--- a/usrp/firmware/src/common/build_eeprom.py
+++ b/usrp/firmware/src/common/build_eeprom.py
@@ -182,10 +182,6 @@ if __name__ == '__main__':
sys.stderr.write (
"You must specify the install prefix with -p PREFIX\n")
sys.exit (1)
- if not os.path.isdir(options.prefix):
- sys.stderr.write (
- "PREFIX dir (" + options.prefix + "), does not exist\n")
- sys.exit (1)
ihx_filename = args[0]
diff --git a/usrp/host/apps/burn-db-eeprom b/usrp/host/apps/burn-db-eeprom
index 7ff1e97369..8fb9143eb7 100755
--- a/usrp/host/apps/burn-db-eeprom
+++ b/usrp/host/apps/burn-db-eeprom
@@ -71,6 +71,7 @@ daughterboards = {
'wbx_lo' : ((WBX_LO_TX, 0x0000), (WBX_LO_RX, 0x0000)),
'wbx_ng' : ((WBX_NG_TX, 0x0000), (WBX_NG_RX, 0x0000)),
'xcvr2450' : ((XCVR2450_TX, 0x0000), (XCVR2450_RX, 0x0000)),
+ 'bitshark_rx' : (None, (BITSHARK_RX, 0x0000)),
'experimental_tx' : ((EXPERIMENTAL_TX, 0x0000), None),
'experimental_rx' : (None, (EXPERIMENTAL_RX, 0x0000)),
}
diff --git a/usrp/host/include/usrp/Makefile.am b/usrp/host/include/usrp/Makefile.am
index cfce514438..2aaf66a536 100644
--- a/usrp/host/include/usrp/Makefile.am
+++ b/usrp/host/include/usrp/Makefile.am
@@ -26,6 +26,7 @@ usrpincludedir = $(includedir)/usrp
usrpinclude_HEADERS = \
db_base.h \
db_basic.h \
+ db_bitshark_rx.h \
db_dbs_rx.h \
db_dtt754.h \
db_dtt768.h \
diff --git a/usrp/host/include/usrp/db_bitshark_rx.h b/usrp/host/include/usrp/db_bitshark_rx.h
new file mode 100644
index 0000000000..f81877d28f
--- /dev/null
+++ b/usrp/host/include/usrp/db_bitshark_rx.h
@@ -0,0 +1,56 @@
+/* -*- c++ -*- */
+//
+// 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 asversion 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.
+
+#ifndef DB_BITSHARK_RX_H
+#define DB_BITSHARK_RX_H
+
+#include <usrp/db_base.h>
+#include <vector>
+#include <stdint.h>
+
+class db_bitshark_rx : public db_base
+{
+private:
+ int d_i2c_addr;
+ // Internal function for interfacing to the card
+ void _set_pga(int pga_gain);
+
+protected:
+ void shutdown();
+
+public:
+ db_bitshark_rx(usrp_basic_sptr usrp, int which);
+ ~db_bitshark_rx();
+
+ float gain_min();
+ float gain_max();
+ float gain_db_per_step();
+ double freq_min();
+ double freq_max();
+ struct freq_result_t set_freq(double freq);
+ bool set_gain(float gain);
+ bool set_bw(float bw);
+ bool set_clock_scheme(uint8_t clock_scheme, uint32_t ref_clock_freq);
+ bool is_quadrature();
+ bool i_and_q_swapped();
+};
+
+#endif
diff --git a/usrp/host/lib/Makefile.am b/usrp/host/lib/Makefile.am
index 5848412c93..f01ff8a0ad 100644
--- a/usrp/host/lib/Makefile.am
+++ b/usrp/host/lib/Makefile.am
@@ -120,6 +120,7 @@ libusrp_la_common_SOURCES = \
db_boards.cc \
db_base.cc \
db_basic.cc \
+ db_bitshark_rx.cc \
db_tv_rx.cc \
db_tv_rx_mimo.cc \
db_flexrf.cc \
diff --git a/usrp/host/lib/db_bitshark_rx.cc b/usrp/host/lib/db_bitshark_rx.cc
new file mode 100644
index 0000000000..5368866d88
--- /dev/null
+++ b/usrp/host/lib/db_bitshark_rx.cc
@@ -0,0 +1,417 @@
+//
+// 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 asversion 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.
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrp/db_bitshark_rx.h>
+#include <db_base_impl.h>
+#include <cmath>
+#include <cstdio>
+#include <string.h>
+#include <stdint.h>
+
+/* Note: Thie general structure of this file is based on the db_dbsrx.cc
+ codebase for the dbsrx daughterboard. */
+
+/* The following defines specify the address map provided by the
+ Bitshark card. These registers are all accessed over I2C. */
+#define RF_CENTER_FREQ_REG 0x00
+#define RF_CHAN_FILTER_BW_REG 0x01
+#define RF_GAIN_REG 0x02
+#define BB_GAIN_REG 0x03
+#define ADF4350_REG 0x10
+#define SKY73202_REG 0x11
+#define CLOCK_SCHEME_REG 0x20
+
+/* The following table lists the registers provided by the BURX board that
+ are accessible over I2C:
+ --------------------------------------------------------
+ |RegAddr: 0x00-RF Center Freq register |
+ |4-bytes 0x00|
+ |4-byte unsigned RF center freq (in KHz)|
+ |RegAddr: 0x01-RF channel filter bandwidth register |
+ |4-bytes 0x00|
+ |4-byte unsigned RF channel filter bw (in KHz)|
+ |RegAddr: 0x02-RF gain register |
+ |7-bytes 0x00|
+ |1-byte signed RF gain (in dB)|
+ |RegAddr: 0x03-Baseband gain register |
+ |4-bytes 0x00|
+ |4-byte signed baseband filter gain (in dB)|
+ |RegAddr: 0x10-ADF4350 register |
+ |4-bytes 0x00|
+ |4-byte ADF4350 register value (actual ADF4350 reg addr embedded
+ within 4-byte value)|
+ |RegAddr: 0x11-SKY73202 register |
+ |5-bytes 0x00|
+ |1-byte reg 0 of SKY73202 |
+ |1-byte reg 1 of SKY73202 |
+ |1-byte reg 2 of SKY73202 |
+ |RegAddr: 0x20-Clock Scheme |
+ |3-bytes 0x00|
+ |1-byte indicating clocking scheme:
+ -0x00 -> BURX local TCXO off, BURX accepts ref clock from
+ USRP (freq of USRP's ref clock specified in bytes 2-5)
+ -0x01 -> BURX local TCXO on, BURX uses its local TCXO as its ref
+ clock, TCXO signal output for use by USRP |
+ |4-byte USRP ref clock freq in hz (only needed if byte 1 set to 0x00) |
+
+ ---------------------------------------------------------------------------
+
+ As an example, lets say the client wants to set an RF center freq of
+ 1000 MHz. In KHz, this translates to 1000000 (resolution is only down to
+ steps of 1 KHz), which is 0x000F4240 in hex. So the complete 9-byte I2C
+ sequence that the client should send is as follows:
+ byte 0: 0x00-register 0x00 is the target of the write operation
+ bytes 1-4: 0x00 (padding)
+ byte 5: 0x40 (LSB of the 1000000 KHz value, in hex)
+ byte 6: 0x42
+ byte 7: 0x0F
+ byte 8: 0x00 (MSB of the 1000000 KHz value, in hex)
+
+ If using the usrper cmd-line application on a PC, this sequence would
+ be sent as follows (assuming that the BURX is in slot A):
+
+ # usrper i2c_write 0x47 000000000040420F00
+
+ How about another example...lets say the client wants to setup the clock
+ scheme to use scheme #1 where the 26 MHz TCXO on the BURX board is enabled,
+ and is provided to the USRP. 26 MHz (i.e. 26 million), in hex, is 0x18CBA80.
+ So the complete 9-byte I2C sequence that the client should send is as follows:
+ byte 0: 0x20-register 0x20 is the target of the write operation
+ bytes 1-3: 0x00 (padding)
+ byte 4: 0x01 (indicating that clock scheme #1 is wanted)
+ byte 5: 0x80 (LSB of the BURX ref clk freq)
+ byte 6: 0xBA
+ byte 7: 0x8C
+ byte 8: 0x01 (MSB of the BURX ref clk freq)
+
+ To enable the BURX local ref clk, which will also make it available on the
+ on-board U.FL connector as a source for the USRP, a user can also use
+ the usrper cmd-line application on a PC. The following sequence would
+ be sent (assuming that the BURX is in slot A):
+
+ # usrper i2c_write 0x47 200000000180BA8C01
+
+*/
+
+#define NUM_BYTES_IN_I2C_CMD 9
+
+/*****************************************************************************/
+
+db_bitshark_rx::db_bitshark_rx(usrp_basic_sptr _usrp, int which)
+ : db_base(_usrp, which)
+{
+ // Control Bitshark receiver USRP daughterboard.
+ //
+ // @param usrp: instance of usrp.source_c
+ // @param which: which side: 0, 1 corresponding to RX_A or RX_B respectively
+
+ // turn off all outputs
+ usrp()->_write_oe(d_which, 0, 0xffff);
+
+ if (which == 0)
+ {
+ d_i2c_addr = 0x47;
+ }
+ else
+ {
+ d_i2c_addr = 0x45;
+ }
+
+ // initialize gain
+ set_gain((gain_min() + gain_max()) / 2.0);
+
+ // by default, assume we're using the USRPs clock as the ref clk,
+ // so setup the clock scheme and frequency. If the user wants
+ // to use the Bitshark's TCXO, the clock scheme should be set
+ // to 1, the freq should be set to 26000000, and a top-level
+ // 'make' and 'make install' needs to be executed. In addition,
+ // a U.FL to SMA cable needs to connect J6 on the Bitshark to
+ // the external clk input on the USRP
+ set_clock_scheme(0,64000000);
+
+ set_bw(8e6); // Default IF bandwidth to match USRP1 max host bandwidth
+
+ bypass_adc_buffers(true);
+}
+
+db_bitshark_rx::~db_bitshark_rx()
+{
+ shutdown();
+}
+
+/************ Private Functions **********************/
+
+void
+db_bitshark_rx::_set_pga(int pga_gain)
+{
+ assert(pga_gain>=0 && pga_gain<=20);
+ if(d_which == 0)
+ {
+ usrp()->set_pga (0, pga_gain);
+ usrp()->set_pga (1, pga_gain);
+ }
+ else
+ {
+ usrp()->set_pga (2, pga_gain);
+ usrp()->set_pga (3, pga_gain);
+ }
+}
+
+/************ Public Functions **********************/
+void
+db_bitshark_rx::shutdown()
+{
+ if (!d_is_shutdown)
+ {
+ d_is_shutdown = true;
+ }
+}
+
+bool
+db_bitshark_rx::set_bw (float bw)
+{
+ std::vector<int> args(NUM_BYTES_IN_I2C_CMD,0);
+ uint16_t rf_bw_in_khz = (uint16_t)(bw/1000.0);
+ char val[4];
+ bool result = false;
+ uint8_t try_count = 0;
+
+ memset(val,0x00,4);
+ if (rf_bw_in_khz < 660 || rf_bw_in_khz > 56000)
+ {
+ fprintf(stderr, "db_bitshark_rx::set_bw: bw (=%d) must be between 660 KHz and 56 MHz inclusive\n", rf_bw_in_khz);
+ return false;
+ }
+ //fprintf(stdout,"Setting bw: requested bw in khz is %d\r\n",rf_bw_in_khz);
+ memcpy(val,&rf_bw_in_khz,4);
+ args[0] = RF_CHAN_FILTER_BW_REG;
+ args[5] = val[0];
+ args[6] = val[1];
+ args[7] = val[2];
+ args[8] = val[3];
+ while ((result != true) && (try_count < 3))
+ {
+ result=usrp()->write_i2c (d_i2c_addr, int_seq_to_str (args));
+ try_count++;
+ }
+
+ if (result == false)
+ {
+ fprintf(stderr, "db_bitshark_rx:set_bw: giving up after 3 tries without success\n");
+ }
+
+ return result;
+}
+
+/* The gain referenced below is RF gain only. There are two independent
+ gain settings at RF: a digital step attenuator (providing 0, -6, -12, and
+ -18 dB of attenuation), and a second LNA (LNA2) that provides ~25 dB of
+ gain (roughly...it actually depends on the RF freq). So combining these
+ two stages can provide an overall gain range from 0 (which is mapped
+ to -18 dB on the step attenuator + LNA2 turned off) to 42 (which is
+ mapped to 0 dB on the step attenuator + LNA2 turned on).
+
+ There could be better ways to map these, but this is sufficient for
+ now. */
+float
+db_bitshark_rx::gain_min()
+{
+ return 0;
+}
+
+float
+db_bitshark_rx::gain_max()
+{
+ return 42;
+}
+
+float
+db_bitshark_rx::gain_db_per_step()
+{
+ return 6;
+}
+
+bool
+db_bitshark_rx::set_gain(float gain)
+{
+ // Set the gain.
+ //
+ // @param gain: RF gain in decibels, range of 0-42
+ // @returns True/False
+
+ std::vector<int> args(NUM_BYTES_IN_I2C_CMD,0);
+ bool result = false;
+ uint8_t try_count = 0;
+
+ if (gain < gain_min() || gain > gain_max())
+ {
+ fprintf(stderr,"db_bitshark_rx::set_gain: gain (=%f) must be between %f and %f inclusive\n", gain,gain_min(),gain_max());
+ return false;
+ }
+ //fprintf(stdout,"db_bitshark_rx::set_gain: requested gain of %f\r\n",gain);
+ args[0] = RF_GAIN_REG;
+ args[5] = (int)gain;
+
+ while ((result != true) && (try_count < 3))
+ {
+ result=usrp()->write_i2c (d_i2c_addr, int_seq_to_str (args));
+ try_count++;
+ }
+
+ if (result == false)
+ {
+ fprintf(stderr, "db_bitshark_rx:set_gain: giving up after 3 tries without success\n");
+ }
+
+ return result;
+}
+
+
+bool
+db_bitshark_rx::set_clock_scheme(uint8_t clock_scheme, uint32_t ref_clk_freq)
+{
+ // Set the clock scheme for determining how the BURX
+ // dboard receives its clock. Note: Ideally, the constructor for the
+ // BURX board could simply call this method to set how it wants the
+ // clock scheme configured. However, depending on the application
+ // using the daughterboard, the constructor may run _after_ some
+ // other portion of the application needs the FPGA. And if the
+ // the clock source for the FPGA was the BURX's 26 MHz TCXO, we're in
+ // a chicken-before-the-egg dilemna. So the solution is to leave
+ // this function here for reference in case an app wants to use it,
+ // and also give the user the ability to set the clock scheme through
+ // the usrper cmd-line application (see example at the top of this
+ // file).
+ //
+ // @param clock_scheme
+ // @param ref_clk_freq in Hz
+ // @returns True/False
+
+ std::vector<int> args(NUM_BYTES_IN_I2C_CMD,0);
+ bool result = false;
+ uint8_t try_count = 0;
+ char val[4];
+
+ if (clock_scheme > 1)
+ {
+ fprintf(stderr,"db_bitshark_rx::set_clock_scheme: invalid scheme %d\n",clock_scheme);
+ return false;
+ }
+ //fprintf(stdout,"db_bitshark_rx::set_clock_scheme: requested clock schem of %d with freq %d Hz \n",clock_scheme,ref_clk_freq);
+ memcpy(val,&ref_clk_freq,4);
+ args[0] = CLOCK_SCHEME_REG;
+ args[4] = (int)clock_scheme;
+ args[5] = val[0];
+ args[6] = val[1];
+ args[7] = val[2];
+ args[8] = val[3];
+
+ while ((result != true) && (try_count < 3))
+ {
+ result=usrp()->write_i2c (d_i2c_addr, int_seq_to_str (args));
+ try_count++;
+ }
+
+ if (result == false)
+ {
+ fprintf(stderr, "db_bitshark_rx:set_clock_scheme: giving up after 3 tries without success\n");
+ }
+ return result;
+}
+
+double
+db_bitshark_rx::freq_min()
+{
+ return 300e6;
+}
+
+double
+db_bitshark_rx::freq_max()
+{
+ return 4e9;
+}
+
+struct freq_result_t
+db_bitshark_rx::set_freq(double freq)
+{
+ // Set the frequency.
+ //
+ // @param freq: target RF frequency in Hz
+ // @type freq: double
+ //
+ // @returns (ok, actual_baseband_freq) where:
+ // ok is True or False and indicates success or failure,
+ // actual_baseband_freq is RF frequency that corresponds to DC in the IF.
+
+ std::vector<int> args(NUM_BYTES_IN_I2C_CMD,0);
+ std::vector<int> bytes(2);
+ char val[4];
+ freq_result_t act_freq = {false, 0};
+ uint32_t freq_in_khz = (uint32_t)(freq/1000.0);
+ bool result = false;
+ uint8_t try_count = 0;
+
+ memset(val,0x00,4);
+ if(!(freq>=freq_min() && freq<=freq_max()))
+ {
+ return act_freq;
+ }
+
+ //fprintf(stdout,"db_bitshark_rx::set_freq: requested freq is %d KHz\n",freq_in_khz);
+ memcpy(val,&freq_in_khz,4);
+ args[0] = RF_CENTER_FREQ_REG;
+ args[5] = val[0];
+ args[6] = val[1];
+ args[7] = val[2];
+ args[8] = val[3];
+
+ while ((result != true) && (try_count < 3))
+ {
+ result=usrp()->write_i2c (d_i2c_addr, int_seq_to_str (args));
+ try_count++;
+ }
+
+ if (result == false)
+ {
+ fprintf(stderr, "db_bitshark_rx:set_freq: giving up after 3 tries without success\n");
+ }
+
+ act_freq.ok = result;
+ act_freq.baseband_freq = (double)freq;
+ return act_freq;
+}
+
+bool
+db_bitshark_rx::is_quadrature()
+{
+ // Return True if this board requires both I & Q analog channels.
+ return true;
+}
+
+bool
+db_bitshark_rx::i_and_q_swapped()
+{
+ // Returns True since our I and Q channels are swapped
+ return true;
+}
diff --git a/usrp/host/lib/db_boards.cc b/usrp/host/lib/db_boards.cc
index 590d8132d1..9324d58ee2 100644
--- a/usrp/host/lib/db_boards.cc
+++ b/usrp/host/lib/db_boards.cc
@@ -36,6 +36,7 @@
#include <usrp/db_xcvr2450.h>
#include <usrp/db_dtt754.h>
#include <usrp/db_dtt768.h>
+#include <usrp/db_bitshark_rx.h>
#include <cstdio>
std::vector<db_base_sptr>
@@ -209,6 +210,10 @@ instantiate_dbs(int dbid, usrp_basic_sptr usrp, int which_side)
db.push_back(db_base_sptr(new db_dtt768(usrp, which_side)));
break;
+ case(USRP_DBID_BITSHARK_RX):
+ db.push_back(db_base_sptr(new db_bitshark_rx(usrp, which_side)));
+ break;
+
case(-1):
if (boost::dynamic_pointer_cast<usrp_basic_tx>(usrp)){
db.push_back(db_base_sptr(new db_basic_tx(usrp, which_side)));
diff --git a/usrp/host/lib/usrp_dbid.dat b/usrp/host/lib/usrp_dbid.dat
index 7d1e187140..5193a5fa0e 100644
--- a/usrp/host/lib/usrp_dbid.dat
+++ b/usrp/host/lib/usrp_dbid.dat
@@ -84,5 +84,7 @@
"XCVR2450 Tx" 0x0060
"XCVR2450 Rx" 0x0061
+"Bitshark Rx" 0x0070
+
"Experimental Tx" 0xfffe
"Experimental Rx" 0xffff
diff --git a/usrp2/firmware/apps/Makefile.am b/usrp2/firmware/apps/Makefile.am
index 00f682fc7e..1dc8b0a737 100644
--- a/usrp2/firmware/apps/Makefile.am
+++ b/usrp2/firmware/apps/Makefile.am
@@ -75,6 +75,7 @@ txrx_wbx_LDADD = ../lib/libu2fw_wbx.a
txrx_xcvr_LDADD = ../lib/libu2fw_xcvr.a
+
noinst_HEADERS = \
app_common_v2.h \
app_passthru_v2.h \
diff --git a/usrp2/firmware/include/usrp2_types.h b/usrp2/firmware/include/usrp2_types.h
index dd2bcf1edd..32cb25c419 100644
--- a/usrp2/firmware/include/usrp2_types.h
+++ b/usrp2/firmware/include/usrp2_types.h
@@ -50,6 +50,12 @@ u2_fxpt_freq_round_to_int(u2_fxpt_freq_t fx)
return (int)((fx+(1<<(U2_FPF_RP-1)))>>U2_FPF_RP);
}
+static inline unsigned int
+u2_fxpt_freq_round_to_uint(u2_fxpt_freq_t fx)
+{
+ return (unsigned int)((fx+(1<<(U2_FPF_RP-1)))>>U2_FPF_RP);
+}
+
static inline double
u2_fxpt_freq_to_double(u2_fxpt_freq_t fx)
{
diff --git a/usrp2/firmware/lib/Makefile.am b/usrp2/firmware/lib/Makefile.am
index 0a7d5c39b6..84e0c9440d 100644
--- a/usrp2/firmware/lib/Makefile.am
+++ b/usrp2/firmware/lib/Makefile.am
@@ -26,13 +26,12 @@ noinst_LIBRARIES = \
libu2fw_a_SOURCES = \
abort.c \
ad9510.c \
- adf4350.c \
- adf4350_regs.c \
ad9777.c \
bsm12.c \
buffer_pool.c \
clocks.c \
db_basic.c \
+ db_bitshark_rx.c \
db_dbsrx.c \
db_rfx.c \
db_tvrx.c \
@@ -99,6 +98,7 @@ libu2fw_wbx_a_SOURCES = \
spi.c \
u2_init.c
+
libu2fw_xcvr_a_SOURCES = \
abort.c \
ad9510.c \
@@ -149,6 +149,7 @@ noinst_HEADERS = \
db.h \
db_base.h \
db_wbxng.h \
+ db_bitshark_rx.h
dbsm.h \
eth_mac.h \
eth_mac_regs.h \
diff --git a/usrp2/firmware/lib/db_bitshark_rx.c b/usrp2/firmware/lib/db_bitshark_rx.c
new file mode 100644
index 0000000000..4c126de9ba
--- /dev/null
+++ b/usrp2/firmware/lib/db_bitshark_rx.c
@@ -0,0 +1,337 @@
+/*
+ * Copyright 2010 Free Software Foundation, Inc.
+ *
+ * This program 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 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "db_bitshark_rx.h"
+#include <memory_map.h>
+#include <db_base.h>
+#include <hal_io.h>
+#include <mdelay.h>
+#include <lsdac.h>
+#include <clocks.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <i2c.h>
+
+/* Note: Thie general structure of this file is based on the db_wbxng.c
+ codebase for the wbx daughterboard. */
+
+/* The following defines specify the address map provided by the
+ Bitshark USRP Rx (BURX) board. These registers are all accessed over I2C. */
+#define RF_CENTER_FREQ_REG 0x00
+#define RF_CHAN_FILTER_BW_REG 0x01
+#define RF_GAIN_REG 0x02
+#define BB_GAIN_REG 0x03
+#define ADF4350_REG 0x10
+#define SKY73202_REG 0x11
+#define CLOCK_SCHEME_REG 0x20
+
+/* The following table lists the registers provided by the Bitshark board
+ that are accessible over I2C:
+ --------------------------------------------------------
+ |RegAddr: 0x00-RF Center Freq register |
+ |4-bytes 0x00|
+ |4-byte unsigned RF center freq (in KHz)|
+ |RegAddr: 0x01-RF channel filter bandwidth register |
+ |4-bytes 0x00|
+ |4-byte unsigned RF channel filter bw (in KHz)|
+ |RegAddr: 0x02-RF gain register |
+ |7-bytes 0x00|
+ |1-byte signed RF gain (in dB)|
+ |RegAddr: 0x03-Baseband gain register |
+ |4-bytes 0x00|
+ |4-byte signed baseband filter gain (in dB)|
+ |RegAddr: 0x10-ADF4350 register |
+ |4-bytes 0x00|
+ |4-byte ADF4350 register value (actual ADF4350 reg addr embedded
+ within 4-byte value)|
+ |RegAddr: 0x11-SKY73202 register |
+ |5-bytes 0x00|
+ |1-byte reg 0 of SKY73202 |
+ |1-byte reg 1 of SKY73202 |
+ |1-byte reg 2 of SKY73202 |
+ |RegAddr: 0x20-Clock Scheme |
+ |3-bytes 0x00|
+ |1-byte indicating clocking scheme:
+ -0x00 -> BURX local TCXO off, BURX accepts ref clock from
+ USRP2 (freq of USRP2's ref clock specified in bytes 2-5)
+ -0x01 -> BURX local TCXO on, BURX uses its local TCXO as its ref
+ clock, TCXO signal output for use as phase lock for USRP2 |
+ |4-byte USRP2 ref clock freq in hz (only needed if byte 1 set to 0x00) |
+
+ ---------------------------------------------------------------------------
+
+ As an example, lets say the client wants to set an RF center freq of
+ 1000 MHz. In KHz, this translates to 1000000 (resolution is only down to
+ steps of 1 KHz), which is 0x000F4240 in hex. So the complete 9-byte I2C
+ sequence that the client should send is as follows:
+ byte 0: 0x00-register 0x00 is the target of the write operation
+ bytes 1-4: 0x00 (padding)
+ byte 5: 0x00 (MSB of the 1000000 KHz value, in hex)
+ byte 6: 0x0F
+ byte 7: 0x42
+ byte 8: 0x40 (LSB of the 1000000 KHz value, in hex)
+
+ How about another example...lets say the client wants to setup the clock
+ scheme to use scheme #1 where the 26 MHz TCXO on the BURX board is enabled,
+ and is provided to the USRP2 for it to phase lock to it as an external ref.
+ 26 MHz (i.e. 26 million), in hex, is 0x18CBA80.
+ So the complete 9-byte I2C sequence that the client should send is as follows:
+ byte 0: 0x20-register 0x20 is the target of the write operation
+ bytes 1-3: 0x00 (padding)
+ byte 4: 0x01 (indicating that clock scheme #1 is wanted)
+ byte 5: 0x01 (MSB of the BURX ref clk freq)
+ byte 6: 0x8C
+ byte 7: 0xBA
+ byte 8: 0x80 (LSB of the BURX ref clk freq)
+
+ Note: The endian-ness of 4-byte values used in I2C cmds is different on
+ USRP2 compared to USRP1.
+
+*/
+
+#define NUM_BYTES_IN_I2C_CMD 9
+#define I2C_ADDR 0x47
+
+bool bitshark_rx_init(struct db_base *dbb);
+bool bitshark_rx_set_freq(struct db_base *dbb, u2_fxpt_freq_t freq, u2_fxpt_freq_t *dc);
+bool bitshark_rx_set_gain(struct db_base *dbb, u2_fxpt_gain_t gain);
+bool bitshark_rx_set_bw(struct db_base *dbb, uint16_t bw);
+
+static bool set_clock_scheme(uint8_t clock_scheme, uint32_t ref_clk_freq);
+
+/*
+ * The class instances
+ */
+struct db_bitshark_rx db_bitshark_rx = {
+ .base.dbid = 0x0070,
+ .base.is_tx = false,
+ .base.output_enables = 0x0000,
+ .base.used_pins = 0x0000,
+ .base.freq_min = U2_DOUBLE_TO_FXPT_FREQ(300e6),
+ .base.freq_max = U2_DOUBLE_TO_FXPT_FREQ(4000e6),
+ .base.gain_min = U2_DOUBLE_TO_FXPT_GAIN(0),
+ .base.gain_max = U2_DOUBLE_TO_FXPT_GAIN(42),
+ .base.gain_step_size = U2_DOUBLE_TO_FXPT_GAIN(6),
+ .base.is_quadrature = true,
+ .base.i_and_q_swapped = true,
+ .base.spectrum_inverted = false,
+ .base.default_lo_offset = U2_DOUBLE_TO_FXPT_FREQ(0),
+ .base.init = bitshark_rx_init,
+ .base.set_freq = bitshark_rx_set_freq,
+ .base.set_gain = bitshark_rx_set_gain,
+ .base.set_tx_enable = 0,
+ .base.atr_mask = 0x0000,
+ .base.atr_txval = 0,
+ .base.atr_rxval = 0,
+ .base.set_antenna = 0,
+ .extra.bw_min = 660, /* in KHz, so 660 KHz */
+ .extra.bw_max = 56000, /* in KHz, so 56 MHz */
+ .extra.set_bw = bitshark_rx_set_bw
+};
+
+bool
+bitshark_rx_init(struct db_base *dbb)
+{
+ struct db_bitshark_rx_dummy *db = (struct db_bitshark_rx_dummy *) dbb;
+
+ clocks_enable_rx_dboard(true, 0);
+ /* hal_gpio_write( GPIO_RX_BANK, ENABLE_5|ENABLE_33, ENABLE_5|ENABLE_33 ); */
+ /* above isn't needed, since we don't have any GPIO from the FPGA */
+
+ /* setup the clock scheme to accept the USRP2's 100 MHz ref clk */
+ set_clock_scheme(0,100000000);
+
+ /* initial setting of gain */
+ dbb->set_gain(dbb,U2_DOUBLE_TO_FXPT_GAIN(20.0));
+
+ /* Set the freq now to get the one time 10ms delay out of the way. */
+ u2_fxpt_freq_t dc;
+ dbb->set_freq(dbb, dbb->freq_min, &dc);
+
+ /* set up the RF bandwidth of the signal of interest...Note: there
+ doesn't appear to be a standard way of setting this bandwidth
+ in USRP2-land (compared to USRP1-land, where we have the
+ straight-forward set_bw() method). Not sure why this is, but
+ for now, simply set the bandwidth once for the intended
+ application. */
+ db->extra.set_bw(dbb, 25000); /* 25 MHz channel bw */
+
+ return true;
+}
+
+bool
+bitshark_rx_set_freq(struct db_base *dbb, u2_fxpt_freq_t freq, u2_fxpt_freq_t *dc)
+{
+ struct db_bitshark_rx_dummy *db = (struct db_bitshark_rx_dummy *) dbb;
+ unsigned char args[NUM_BYTES_IN_I2C_CMD];
+ unsigned char val[4];
+ uint32_t freq_in_khz = (uint32_t)(u2_fxpt_freq_round_to_uint(freq)/1000);
+
+ if(!(freq>=db->base.freq_min && freq<=db->base.freq_max))
+ {
+ return false;
+ }
+
+ memset(args,0x00,NUM_BYTES_IN_I2C_CMD);
+ memcpy(val,&freq_in_khz,4);
+ args[0] = RF_CENTER_FREQ_REG;
+ args[5] = val[3];
+ args[6] = val[2];
+ args[7] = val[1];
+ args[8] = val[0];
+
+ i2c_write(I2C_ADDR, args, NUM_BYTES_IN_I2C_CMD);
+ /* Add a brief delay after each command. This only seems to be
+ necessary when sending a sequence of commands one after the other.
+ This issue appears to be specific to the USRP2, since it isn't
+ necessary on the USRP1. The 5 mS delay is a bit of
+ an emperical compromise: too short (say, 1 mS), and every once
+ in a great while a command will still be magically dropped on its
+ way out...too long (say, 500 mS) and higher-level apps such as
+ usrp2_fft.py seem to choke because the init sequence is taking
+ too long. So 5 mS was tested repeatedly without error, and deemed
+ reasonable. Not sure if this is an issue with the I2C master
+ code in the microblaze or some place else, and I hate magic
+ delays too, but this seems to be stable. */
+ mdelay(5);
+
+ *dc = freq;
+ return true;
+}
+
+bool
+bitshark_rx_set_gain(struct db_base *dbb, u2_fxpt_gain_t gain)
+{
+ struct db_bitshark_rx_dummy *db = (struct db_bitshark_rx_dummy *) dbb;
+
+ unsigned char args[NUM_BYTES_IN_I2C_CMD];
+ uint8_t final_gain = (uint8_t)(u2_fxpt_gain_round_to_int(gain));
+
+ if(!(gain >= db->base.gain_min && gain <= db->base.gain_max))
+ {
+ return false;
+ }
+
+ memset(args,0x00,NUM_BYTES_IN_I2C_CMD);
+ args[0] = RF_GAIN_REG;
+ args[5] = final_gain;
+
+ i2c_write(I2C_ADDR, args, NUM_BYTES_IN_I2C_CMD);
+ /* Add a brief delay after each command. This only seems to be
+ necessary when sending a sequence of commands one after the other.
+ This issue appears to be specific to the USRP2, since it isn't
+ necessary on the USRP1. The 5 mS delay is a bit of
+ an emperical compromise: too short (say, 1 mS), and every once
+ in a great while a command will still be magically dropped on its
+ way out...too long (say, 500 mS) and higher-level apps such as
+ usrp2_fft.py seem to choke because the init sequence is taking
+ too long. So 5 mS was tested repeatedly without error, and deemed
+ reasonable. Not sure if this is an issue with the I2C master
+ code in the microblaze or some place else, and I hate magic
+ delays too, but this seems to be stable. */
+ mdelay(5);
+
+ return true;
+}
+
+bool
+bitshark_rx_set_bw(struct db_base *dbb, uint16_t bw_in_khz)
+{
+ struct db_bitshark_rx_dummy *db = (struct db_bitshark_rx_dummy *) dbb;
+ unsigned char val[2];
+ unsigned char args[NUM_BYTES_IN_I2C_CMD];
+
+ if(!(bw_in_khz >= db->extra.bw_min && bw_in_khz <= db->extra.bw_max))
+ {
+ return false;
+ }
+
+ memset(args,0x00,NUM_BYTES_IN_I2C_CMD);
+ memcpy(val,&bw_in_khz,2);
+ args[0] = RF_CHAN_FILTER_BW_REG;
+ args[5] = val[1];
+ args[6] = val[0];
+
+ i2c_write(I2C_ADDR, args, NUM_BYTES_IN_I2C_CMD);
+ /* Add a brief delay after each command. This only seems to be
+ necessary when sending a sequence of commands one after the other.
+ This issue appears to be specific to the USRP2, since it isn't
+ necessary on the USRP1. The 5 mS delay is a bit of
+ an emperical compromise: too short (say, 1 mS), and every once
+ in a great while a command will still be magically dropped on its
+ way out...too long (say, 500 mS) and higher-level apps such as
+ usrp2_fft.py seem to choke because the init sequence is taking
+ too long. So 5 mS was tested repeatedly without error, and deemed
+ reasonable. Not sure if this is an issue with the I2C master
+ code in the microblaze or some place else, and I hate magic
+ delays too, but this seems to be stable. */
+ mdelay(5);
+
+ return true;
+}
+
+static bool
+set_clock_scheme(uint8_t clock_scheme, uint32_t ref_clk_freq)
+{
+ /* Set the clock scheme for determining how the BURX
+ dboard receives its clock. For the USRP2, there is really only
+ one way of doing this, which is to use the 100 MHz ref clk
+ on the USRP2 as its reference. However, it is possible to
+ use the BURX's 26 MHz TCXO as the external reference input to
+ the USRP, which would provide phase lock between our oscillator
+ and the USRP's 100 MHz oscillator. And since the BURX board
+ provides the ability to warp the oscillator, this may be
+ useful to some folks. Otherwise, the BURX board will always
+ just take the 100 MHz reference from the USRP2 as its reference.
+ */
+
+ unsigned char args[NUM_BYTES_IN_I2C_CMD];
+ char val[4];
+
+ if (clock_scheme > 1)
+ {
+ return false;
+ }
+
+ memcpy(val,&ref_clk_freq,4);
+ args[0] = CLOCK_SCHEME_REG;
+ args[4] = clock_scheme;
+ args[5] = val[3];
+ args[6] = val[2];
+ args[7] = val[1];
+ args[8] = val[0];
+
+ i2c_write(I2C_ADDR, args, NUM_BYTES_IN_I2C_CMD);
+ /* Add a brief delay after each command. This only seems to be
+ necessary when sending a sequence of commands one after the other.
+ This issue appears to be specific to the USRP2, since it isn't
+ necessary on the USRP1. The 5 mS delay is a bit of
+ an emperical compromise: too short (say, 1 mS), and every once
+ in a great while a command will still be magically dropped on its
+ way out...too long (say, 500 mS) and higher-level apps such as
+ usrp2_fft.py seem to choke because the init sequence is taking
+ too long. So 5 mS was tested repeatedly without error, and deemed
+ reasonable. Not sure if this is an issue with the I2C master
+ code in the microblaze or some place else, and I hate magic
+ delays too, but this seems to be stable. */
+ mdelay(5);
+
+ return true;
+}
+
diff --git a/usrp2/firmware/lib/db_bitshark_rx.h b/usrp2/firmware/lib/db_bitshark_rx.h
new file mode 100644
index 0000000000..3651f27b89
--- /dev/null
+++ b/usrp2/firmware/lib/db_bitshark_rx.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2010 Free Software Foundation, Inc.
+ *
+ * This program 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 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DB_BITSHARK_RX_H
+#define DB_BITSHARK_RX_H
+
+#include <db_base.h>
+
+struct db_bitshark_rx_extra
+{
+ uint16_t bw_min;
+ uint16_t bw_max;
+ bool (*set_bw)(struct db_base *, uint16_t bw);
+
+};
+
+struct db_bitshark_rx_dummy
+{
+ struct db_base base;
+ struct db_bitshark_rx_extra extra;
+};
+
+
+struct db_bitshark_rx
+{
+ struct db_base base;
+ struct db_bitshark_rx_extra extra;
+};
+
+
+#endif /* DB_BITSHARK_RX_H */
diff --git a/usrp2/firmware/lib/db_init.c b/usrp2/firmware/lib/db_init.c
index bc82946fc7..d58badc9e5 100644
--- a/usrp2/firmware/lib/db_init.c
+++ b/usrp2/firmware/lib/db_init.c
@@ -51,6 +51,7 @@ extern struct db_base db_tvrx1;
extern struct db_base db_tvrx2;
extern struct db_base db_tvrx3;
extern struct db_base db_dbsrx;
+extern struct db_base db_bitshark_rx;
struct db_base *all_dboards[] = {
&db_basic_tx,
@@ -73,6 +74,7 @@ struct db_base *all_dboards[] = {
#endif
&db_tvrx3,
&db_dbsrx,
+ &db_bitshark_rx,
0
};
diff --git a/version.sh b/version.sh
index b2cad877dd..fa37f42981 100644
--- a/version.sh
+++ b/version.sh
@@ -1,4 +1,4 @@
MAJOR_VERSION=3
API_COMPAT=3
-MINOR_VERSION=git
-MAINT_VERSION=
+MINOR_VERSION=0-rc1
+MAINT_VERSION=0
diff --git a/vrt/.gitignore b/vrt/.gitignore
deleted file mode 100644
index 8d802d8ff4..0000000000
--- a/vrt/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-vrt.pc
diff --git a/vrt/Makefile.am b/vrt/Makefile.am
deleted file mode 100644
index 791b8d65c5..0000000000
--- a/vrt/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Copyright 2008,2009 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 this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-include $(top_srcdir)/Makefile.common
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = vrt.pc
-
-EXTRA_DIST = \
- vrt.pc.in
-
-SUBDIRS = include lib apps
diff --git a/vrt/apps/.gitignore b/vrt/apps/.gitignore
deleted file mode 100644
index dab7a7fd6f..0000000000
--- a/vrt/apps/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-
diff --git a/vrt/apps/Makefile.am b/vrt/apps/Makefile.am
deleted file mode 100644
index 45772055b1..0000000000
--- a/vrt/apps/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright 2009 Free Software Foundation, Inc.
-#
-# This program 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 of the License, or
-# (at your option) any later version.
-#
-# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-include $(top_srcdir)/Makefile.common
diff --git a/vrt/include/Makefile.am b/vrt/include/Makefile.am
deleted file mode 100644
index 3ce6a8f32b..0000000000
--- a/vrt/include/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-include $(top_srcdir)/Makefile.common
-
-SUBDIRS = vrt
diff --git a/vrt/include/vrt/Makefile.am b/vrt/include/vrt/Makefile.am
deleted file mode 100644
index 183eaf9cec..0000000000
--- a/vrt/include/vrt/Makefile.am
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright 2008,2009 Free Software Foundation, Inc.
-#
-# This program 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 of the License, or
-# (at your option) any later version.
-#
-# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-include $(top_srcdir)/Makefile.common
-
-INCLUDES =
-
-vrtincludedir = $(includedir)/vrt
-
-vrtinclude_HEADERS = \
- bits.h \
- copiers.h \
- expanded_header.h \
- rx.h \
- rx_packet_handler.h \
- types.h
diff --git a/vrt/include/vrt/bits.h b/vrt/include/vrt/bits.h
deleted file mode 100644
index 54eeec7b4a..0000000000
--- a/vrt/include/vrt/bits.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This program 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 of the License, or
- * (at your option) any later version.
- *
- * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef INCLUDED_VRT_BITS_H
-#define INCLUDED_VRT_BITS_H
-
-#include <stdint.h>
-
-
-/* VRT Header bits */
-
-#define VRTH_PT_MASK (0xf << 28)
-#define VRTH_PT_IF_DATA_NO_SID (0x0 << 28) // IF-Data, no stream id
-#define VRTH_PT_IF_DATA_WITH_SID (0x1 << 28) // IF-Data, w/ stream id
-#define VRTH_PT_EXT_DATA_NO_SID (0x2 << 28)
-#define VRTH_PT_EXT_DATA_WITH_SID (0x3 << 28)
-#define VRTH_PT_IF_CONTEXT (0x4 << 28)
-#define VRTH_PT_EXT_CONTEXT (0x5 << 28)
-
-#define VRTH_HAS_CLASSID (1 << 27)
-#define VRTH_HAS_TRAILER (1 << 26) // Data pkts only
-#define VRTH_START_OF_BURST (1 << 25) // Data (Tx) pkts only
-#define VRTH_END_OF_BURST (1 << 24) // Data (Tx) pkts only
-#define VRTH_TSM (1 << 24) // Context pkts only
-
-#define VRTH_TSI_MASK (0x3 << 22)
-#define VRTH_TSI_NONE (0x0 << 22)
-#define VRTH_TSI_UTC (0x1 << 22)
-#define VRTH_TSI_GPS (0x2 << 22)
-#define VRTH_TSI_OTHER (0x3 << 22)
-
-#define VRTH_TSF_MASK (0x3 << 20)
-#define VRTH_TSF_NONE (0x0 << 20)
-#define VRTH_TSF_SAMPLE_CNT (0x1 << 20)
-#define VRTH_TSF_REAL_TIME_PS (0x2 << 20)
-#define VRTH_TSF_FREE_RUNNING (0x3 << 20)
-
-#define VRTH_PKT_CNT_SHIFT 16
-#define VRTH_PKT_CNT_MASK (0xf << 16)
-
-#define VRTH_PKT_SIZE_MASK 0xffff
-
-
-static inline int
-vrth_pkt_cnt(uint32_t h)
-{
- return (h & VRTH_PKT_CNT_MASK) >> 16;
-}
-
-static inline int
-vrth_pkt_size(uint32_t h)
-{
- return h & VRTH_PKT_SIZE_MASK;
-}
-
-/*
- * Trailer bits
- */
-#define TR_E (1 << 8)
-
-#define TR_ENABLE(x) ((x) << 20)
-#define TR_STATE(x) ((x) << 8)
-
-// Use these with TR_ENABLE and TR_STATE
-#define TR_CAL_TIME (1 << 11)
-#define TR_VALID_DATA (1 << 10)
-#define TR_REF_LOCK (1 << 9)
-#define TR_AGC (1 << 8)
-#define TR_DETECTED_SIG (1 << 7)
-#define TR_SPECTRAL_INVERSION (1 << 6)
-#define TR_OVER_RANGE (1 << 5)
-#define TR_SAMPLE_LOSS (1 << 4)
-#define TR_USER_3 (1 << 3)
-#define TR_USER_2 (1 << 2)
-#define TR_USER_1 (1 << 1)
-#define TR_USER_0 (1 << 0)
-
-#endif /* INCLUDED_VRT_BITS_H */
diff --git a/vrt/include/vrt/copiers.h b/vrt/include/vrt/copiers.h
deleted file mode 100644
index 990538c425..0000000000
--- a/vrt/include/vrt/copiers.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef INCLUDED_VRT_COPIERS_H
-#define INCLUDED_VRT_COPIERS_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <complex>
-
-namespace vrt {
-
- /*!
- * \brief Copy and convert from net format to host format
- */
- void
- copy_net_16sc_to_host_16sc(size_t nitems,
- const uint32_t *items,
- std::complex<int16_t> *host_items);
-
-
- /*!
- * \brief Copy and convert from net format to host format mapping [-32768, 32767] -> [1.0, +1.0)
- */
- void
- copy_net_16sc_to_host_32fc(size_t nitems,
- const uint32_t *items,
- std::complex<float> *host_items);
-};
-
-#endif /* INCLUDED_VRT_COPIERS_H */
diff --git a/vrt/include/vrt/expanded_header.h b/vrt/include/vrt/expanded_header.h
deleted file mode 100644
index b3333a72ef..0000000000
--- a/vrt/include/vrt/expanded_header.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_VRT_EXPANDED_HEADER_H
-#define INCLUDED_VRT_EXPANDED_HEADER_H
-
-#include <stdint.h>
-#include <stddef.h>
-#include <vrt/bits.h>
-
-namespace vrt {
-
- static const size_t HEADER_MAX_N32_BIT_WORDS = 7;
- static const size_t TRAILER_MAX_N32_BIT_WORDS = 1;
-
- /*!
- * \brief All headers and trailer for VRT IF-Data, Extension-Data,
- * IF-Context and Extension-Context packets.
- *
- * There are fields allocated for each possible header. Their content may
- * or may not be valid. Check the header field to confirm their validity.
- * All values are in host-endian format.
- */
- struct expanded_header {
- uint32_t header; // first word of all packets
- uint32_t stream_id; // optional stream identifier
- uint64_t class_id; // optional class identifier
- uint32_t integer_secs; // optional integer seconds timestamp
- uint64_t fractional_secs; // optional fractional seconds timestamp
- uint32_t trailer; // optional trailer (only possible in data pkts)
-
- expanded_header()
- : header(0) /*, stream_id(0), class_id(0),
- integer_secs(0), fractional_secs(0), trailer(0)*/ {}
-
-
- int pkt_type() const {
- return (header & VRTH_PT_MASK) >> 28;
- }
-
- int pkt_cnt() const { return vrth_pkt_cnt(header); }
- size_t pkt_size() const { return vrth_pkt_size(header); }
-
-
- // packet type predicates
- bool if_data_p() const { return s_if_data[pkt_type()]; }
- bool ext_data_p() const { return s_ext_data[pkt_type()]; }
- bool if_context_p() const { return (header & VRTH_PT_MASK) == VRTH_PT_IF_CONTEXT; }
- bool ext_context_p() const { return (header & VRTH_PT_MASK) == VRTH_PT_EXT_CONTEXT; }
-
- bool data_p() const { return s_data[pkt_type()]; } // if_data_p() || ext_data_p()
- bool context_p() const { return s_context[pkt_type()]; } // if_context_p() || ext_context_p()
-
- // optional info predicates
- bool stream_id_p() const { return s_stream_id[pkt_type()]; }
- bool class_id_p() const { return (header & VRTH_HAS_CLASSID) != 0; }
- bool integer_secs_p() const { return (header & VRTH_TSI_MASK) != 0; }
- bool fractional_secs_p() const { return (header & VRTH_TSF_MASK) != 0; }
- bool trailer_p() const { return (header & VRTH_HAS_TRAILER) != 0 && data_p(); }
-
-
- /*!
- * \brief unparse expanded header, fill-in the words of a vrt packet header and trailer
- * This method is only intended to fill the buffers with header and trailer information.
- * The actual handling of the separate header, payload, trailer buffers is up to the caller.
- */
- static void unparse(const expanded_header *hdr, // in
- size_t n32_bit_words_payload, // in
- uint32_t *header, // out
- size_t *n32_bit_words_header, // out
- uint32_t *trailer, // out
- size_t *n32_bit_words_trailer);// out
-
- /*!
- * \brief parse packet, fill-in expanded header, start of payload and len of payload
- */
- static bool parse(const uint32_t *packet, // in
- size_t n32_bit_words_packet, // in
- expanded_header *hdr, // out
- const uint32_t **payload, // out
- size_t *n32_bit_words_payload); // out
-
- private:
- static unsigned char s_if_data[16];
- static unsigned char s_ext_data[16];
- static unsigned char s_data[16];
- static unsigned char s_context[16];
- static unsigned char s_stream_id[16];
-
- };
-
-}; // vrt
-
-
-#endif /* INCLUDED_VRT_EXPANDED_HEADER_H */
diff --git a/vrt/include/vrt/rx.h b/vrt/include/vrt/rx.h
deleted file mode 100644
index ff3ce85fbb..0000000000
--- a/vrt/include/vrt/rx.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_VRT_RX_H
-#define INCLUDED_VRT_RX_H
-
-#include <boost/shared_ptr.hpp>
-#include <boost/utility.hpp>
-#include <vrt/rx_packet_handler.h>
-
-namespace vrt {
-
- class socket_rx_buffer;
-
- /*!
- * Relatively low-level interface to receive VRT packets over a datagram socket.
- *
- * (We'll refactor this if/when we use a non-UDP transport.)
- * No VRT control issues are addressed here.
- */
- class rx : boost::noncopyable
- {
- int d_socket_fd;
- socket_rx_buffer *d_srb;
-
- public:
- /*!
- * Shared pointer to this class
- */
- typedef boost::shared_ptr<rx> sptr;
-
- /*!
- * \brief Static function to return an instance of rx as a shared pointer.
- *
- * \param socket_fd file descriptor that data grams will be received from.
- * It is assumed that some higher-level control software
- * opened the appropriate UDP socket for us. This object
- * assumes management of the socket's lifetime. The
- * socket will be closed when our destructor fires.
- *
- * \param rx_bufsize is a hint as to the number of bytes of memory
- * to allocate for received ethernet frames (0 -> reasonable default)
- */
- static sptr make(int socket_fd, size_t rx_bufsize = 0);
-
- /*!
- * \param socket_fd file descriptor that data grams will be received from.
- * It is assumed that some higher-level control software
- * opened the appropriate UDP socket for us. This object
- * assumes management of the socket's lifetime. The
- * socket will be closed when our destructor fires.
- *
- * \param rx_bufsize is a hint as to the number of bytes of memory
- * to allocate for received ethernet frames (0 -> reasonable default)
- */
- rx(int socket_fd, size_t rx_bufsize = 0);
- ~rx();
-
- /*!
- * \brief Receive packets from the given socket file descriptor.
- *
- * \p handler will be invoked for all available packets.
- * Unless \p dont_wait is true, this function blocks until at
- * least one packet has been processed.
- */
- bool rx_packets(rx_packet_handler *handler, bool dont_wait = false);
-
- /*
- * \returns the socket_fd. Useful for select or poll.
- */
- int socket_fd() const { return d_socket_fd; }
- };
-
-}
-
-#endif /* INCLUDED_VRT_RX_H */
diff --git a/vrt/include/vrt/rx_packet_handler.h b/vrt/include/vrt/rx_packet_handler.h
deleted file mode 100644
index ad34078134..0000000000
--- a/vrt/include/vrt/rx_packet_handler.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_VRT_RX_PACKET_HANDLER_H
-#define INCLUDED_VRT_RX_PACKET_HANDLER_H
-
-#include <vrt/expanded_header.h>
-#include <stddef.h>
-
-namespace vrt {
-
- /*!
- * \brief Abstract function object called to handle received VRT packets.
- *
- * An object derived from this class is passed to vrt_rx_udp::rx_packets
- * to process the received packets.
- */
- class rx_packet_handler {
- public:
- virtual ~rx_packet_handler();
-
- /*!
- * \param payload points to the first 32-bit word of the payload field.
- * \param n32_bit_words is the number of 32-bit words in the payload field.
- * \param hdr is the expanded version of the mandatory and optional header fields (& trailer).
- *
- * \p payload points to the raw payload section of the packet received off
- * the wire. The data is network-endian (aka big-endian) 32-bit integers.
- *
- * This is the general purpose, low level interface and relies on other
- * functions to handle all required endian-swapping and format conversion
- * of the payload. \sa FIXME.
- *
- * \returns true if the object wants to be called again with new data;
- * false if no additional data is wanted.
- */
- virtual bool operator()(const uint32_t *payload,
- size_t n32_bit_words,
- const expanded_header *hdr);
- };
-
-}; // vrt
-
-
-#endif /* INCLUDED_VRT_RX_PACKET_HANDLER_H */
diff --git a/vrt/include/vrt/types.h b/vrt/include/vrt/types.h
deleted file mode 100644
index edfa4ec37b..0000000000
--- a/vrt/include/vrt/types.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 Free Software Foundation, Inc.
- *
- * This program 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 of the License, or
- * (at your option) any later version.
- *
- * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef INCLUDED_VRT_TYPES_H
-#define INCLUDED_VRT_TYPES_H
-
-#include <stdint.h>
-
-/* macros for dealing with fixed point numbers */
-#define _FXPT_C(_type, _x, _rp) ((_type)((_x)*(1ll << _rp)))
-#define _FXPT_TO_INT(_x, _one) (((_x) + ((_one)/2))/(_one))
-#define _FXPT_TO_DOUBLE(_x, _one) ((double)(_x) * (1.0/(_one)))
-
-/***********************************************************************
- * The VRT Altitude Type (meters)
- **********************************************************************/
-typedef int32_t vrt_altitude_t;
-#define VRT_ALTITUDE_RP 5
-#define VRT_ALTITUDE_C(_x) _FXPT_C(vrt_altitude_t, _x, VRT_ALTITUDE_RP)
-
-static inline vrt_altitude_t
-double_to_vrt_altitude(double num){
- return VRT_ALTITUDE_C(num);
-}
-
-static inline int32_t
-vrt_altitude_round_to_int(vrt_altitude_t fx){
- return _FXPT_TO_INT(fx, VRT_ALTITUDE_C(1));
-}
-
-static inline double
-vrt_altitude_to_double(vrt_altitude_t fx){
- return _FXPT_TO_DOUBLE(fx, VRT_ALTITUDE_C(1));
-}
-
-/***********************************************************************
- * The VRT Geolocation Angle Type (degrees)
- **********************************************************************/
-typedef int32_t vrt_geo_angle_t;
-#define VRT_GEO_ANGLE_RP 22
-#define VRT_GEO_ANGLE_C(_x) _FXPT_C(vrt_geo_angle_t, _x, VRT_GEO_ANGLE_RP)
-
-static inline vrt_geo_angle_t
-double_to_vrt_geo_angle(double num){
- return VRT_GEO_ANGLE_C(num);
-}
-
-static inline int16_t
-vrt_geo_angle_round_to_int(vrt_geo_angle_t fx){
- return _FXPT_TO_INT(fx, VRT_GEO_ANGLE_C(1));
-}
-
-static inline double
-vrt_geo_angle_to_double(vrt_geo_angle_t fx){
- return _FXPT_TO_DOUBLE(fx, VRT_GEO_ANGLE_C(1));
-}
-
-/***********************************************************************
- * The VRT Frequency Type (Hz)
- **********************************************************************/
-typedef int64_t vrt_freq_t;
-#define VRT_FREQ_RP 20
-#define VRT_FREQ_C(_x) _FXPT_C(vrt_freq_t, _x, VRT_FREQ_RP)
-
-static inline vrt_freq_t
-double_to_vrt_freq(double num){
- return VRT_FREQ_C(num);
-}
-
-static inline int64_t
-vrt_freq_round_to_int(vrt_freq_t fx){
- return _FXPT_TO_INT(fx, VRT_FREQ_C(1));
-}
-
-static inline double
-vrt_freq_to_double(vrt_freq_t fx){
- return _FXPT_TO_DOUBLE(fx, VRT_FREQ_C(1));
-}
-
-/***********************************************************************
- * The VRT Gain Type (dB)
- **********************************************************************/
-typedef int16_t vrt_gain_t;
-#define VRT_GAIN_RP 7
-#define VRT_GAIN_C(_x) _FXPT_C(vrt_gain_t, _x, VRT_GAIN_RP)
-
-static inline vrt_gain_t
-double_to_vrt_gain(double num){
- return VRT_GAIN_C(num);
-}
-
-static inline int16_t
-vrt_gain_round_to_int(vrt_gain_t fx){
- return _FXPT_TO_INT(fx, VRT_GAIN_C(1));
-}
-
-static inline double
-vrt_gain_to_double(vrt_gain_t fx){
- return _FXPT_TO_DOUBLE(fx, VRT_GAIN_C(1));
-}
-
-/***********************************************************************
- * The VRT Temperature Type (Celcius)
- **********************************************************************/
-typedef int16_t vrt_temp_t;
-#define VRT_TEMP_RP 6
-#define VRT_TEMP_C(_x) _FXPT_C(vrt_temp_t, _x, VRT_TEMP_RP)
-
-static inline vrt_temp_t
-double_to_vrt_temp(double num){
- return VRT_TEMP_C(num);
-}
-
-static inline int16_t
-vrt_temp_round_to_int(vrt_temp_t fx){
- return _FXPT_TO_INT(fx, VRT_TEMP_C(1));
-}
-
-static inline double
-vrt_temp_to_double(vrt_temp_t fx){
- return _FXPT_TO_DOUBLE(fx, VRT_TEMP_C(1));
-}
-
-#endif /* INCLUDED_VRT_TYPES_H */
diff --git a/vrt/lib/.gitignore b/vrt/lib/.gitignore
deleted file mode 100644
index 02b0523973..0000000000
--- a/vrt/lib/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
diff --git a/vrt/lib/Makefile.am b/vrt/lib/Makefile.am
deleted file mode 100644
index 303384c6e5..0000000000
--- a/vrt/lib/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright 2007,2008,2009 Free Software Foundation, Inc.
-#
-# This program 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 of the License, or
-# (at your option) any later version.
-#
-# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-include $(top_srcdir)/Makefile.common
-
-AM_CPPFLAGS = \
- $(VRT_INCLUDES) \
- $(BOOST_CPPFLAGS) \
- $(CPPUNIT_INCLUDES) \
- $(GRUEL_INCLUDES)
-
-bin_PROGRAMS =
-
-lib_LTLIBRARIES = \
- libvrt.la
-
-libvrt_la_SOURCES = \
- copiers.cc \
- data_handler.cc \
- expanded_header.cc \
- rx.cc \
- rx_packet_handler.cc \
- socket_rx_buffer.cc
-
-libvrt_la_LIBADD =
-
-# Private headers not needed for above the API development
-noinst_HEADERS = \
- data_handler.h \
- expanded_header_parse_switch_body.h \
- expanded_header_unparse_switch_body.h \
- socket_rx_buffer.h
-
-EXTRA_DIST = \
- gen_parse_switch_body.py \
- gen_unparse_switch_body.py
diff --git a/vrt/lib/copiers.cc b/vrt/lib/copiers.cc
deleted file mode 100644
index ddf82abcfc..0000000000
--- a/vrt/lib/copiers.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <vrt/copiers.h>
-#include <arpa/inet.h>
-#include <assert.h>
-#include <string.h>
-
-namespace vrt {
-
- void
- copy_net_16sc_to_host_16sc(size_t nitems,
- const uint32_t *items,
- std::complex<int16_t> *host_items)
- {
-#ifdef WORDS_BIGENDIAN
-
- assert(sizeof(items[0]) == sizeof(host_items[0]));
- memcpy(host_items, items, nitems * sizeof(items[0]));
-
-#else
-
- // FIXME SIMD welcome here
-
- for (size_t i = 0; i < nitems; i++){
- uint32_t t = ntohl(items[i]);
- //printf("%9d\n", items[i]);
- host_items[i] = std::complex<int16_t>((t >> 16), t & 0xffff);
- }
-
-#endif
- }
-
- void
- copy_net_16sc_to_host_32fc(size_t nitems,
- const uint32_t *items,
- std::complex<float> *host_items)
- {
- // FIXME SIMD welcome here
-
- for (size_t i = 0; i < nitems; i++){
- uint32_t t = ntohl(items[i]);
- int16_t re = (t >> 16) & 0xffff;
- int16_t im = (t & 0xffff);
- host_items[i] = std::complex<float>(re * 1.0/32768, im * 1.0/32768);
- }
- }
-
-};
-
diff --git a/vrt/lib/data_handler.cc b/vrt/lib/data_handler.cc
deleted file mode 100644
index 7d1f73a9ac..0000000000
--- a/vrt/lib/data_handler.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include "data_handler.h"
-
-namespace vrt {
-
- data_handler::~data_handler()
- {
- // default nop destructor
- }
-
-}
-
diff --git a/vrt/lib/data_handler.h b/vrt/lib/data_handler.h
deleted file mode 100644
index c041e48be7..0000000000
--- a/vrt/lib/data_handler.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_VRT_DATA_HANDLER_H
-#define INCLUDED_VRT_DATA_HANDLER_H
-
-#include <stdint.h>
-#include <stddef.h>
-
-namespace vrt {
-
- /*!
- * \brief Abstract function object called to handle received data blocks.
- */
- class data_handler
- {
- public:
-
- enum result_bits {
- DONE = 0x0002, //< do not call this object again
- };
-
- typedef int result; //< bitmask of result_bits
-
- /*!
- * \param base points to the beginning of the data
- * \param len is the length in bytes of the data
- * \returns bitmask composed of DONE
- */
- virtual result operator()(const void *base, size_t len) = 0;
- virtual ~data_handler();
- };
-
-} // namespace vrt
-
-#endif /* INCLUDED_VRT_DATA_HANDLER_H */
diff --git a/vrt/lib/expanded_header.cc b/vrt/lib/expanded_header.cc
deleted file mode 100644
index 8b22fb9254..0000000000
--- a/vrt/lib/expanded_header.cc
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <vrt/expanded_header.h>
-#include <gruel/inet.h>
-//#include <stdio.h>
-
-namespace vrt {
-
- // lookup tables indexed by packet type
- unsigned char expanded_header::s_if_data[16] = {
- 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
-
- unsigned char expanded_header::s_ext_data[16] = {
- 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
-
- unsigned char expanded_header::s_data[16] = {
- 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
-
- unsigned char expanded_header::s_context[16] = {
- 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
-
- unsigned char expanded_header::s_stream_id[16] = {
- 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- };
-
-
- // dispatch codeword bits
- static const int HAS_STREAM_ID = 1 << 0;
- static const int HAS_CLASS_ID = 1 << 1;
- static const int HAS_INTEGER_SECS = 1 << 2;
- static const int HAS_FRACTIONAL_SECS = 1 << 3;
- static const int HAS_TRAILER = 1 << 4;
-
- static int
- compute_codeword(const expanded_header &h)
- {
- int cw = 0;
- if (h.stream_id_p()) cw |= HAS_STREAM_ID;
- if (h.class_id_p()) cw |= HAS_CLASS_ID;
- if (h.integer_secs_p()) cw |= HAS_INTEGER_SECS;
- if (h.fractional_secs_p()) cw |= HAS_FRACTIONAL_SECS;
- if (h.trailer_p()) cw |= HAS_TRAILER;
- return cw;
- }
-
- void expanded_header::unparse(const expanded_header *h, // in
- size_t n32_bit_words_payload, // in
- uint32_t *header, // out
- size_t *n32_bit_words_header, // out
- uint32_t *trailer, // out
- size_t *n32_bit_words_trailer){// out
- int cw = compute_codeword(*h);
- //fills in the header (except word0), header length, trailer, trailer length
- switch (cw & 0x1f){
-#include "expanded_header_unparse_switch_body.h"
- }
- //fill in the header word 0 with the calculated length
- size_t n32_bit_words_packet = *n32_bit_words_header + n32_bit_words_payload + *n32_bit_words_trailer;
- header[0] = htonl((h->header & ~VRTH_PKT_SIZE_MASK) | (n32_bit_words_packet & VRTH_PKT_SIZE_MASK));
- }
-
- bool
- expanded_header::parse(const uint32_t *packet, // in
- size_t n32_bit_words_packet, // in
- expanded_header *h, // out
- const uint32_t **payload, // out
- size_t *n32_bit_words_payload) // out
- {
- size_t n32_bit_words_header = 0;
- size_t n32_bit_words_trailer = 0;
- size_t len = n32_bit_words_packet;
- const uint32_t *p = packet;
-
- *payload = 0;
- *n32_bit_words_payload = 0;
-
- // printf("parse: n32_bit_words_packet = %zd\n", n32_bit_words_packet);
-
- if (len < 1){ // must have at least the header word
- h->header = 0;
- return false;
- }
-
- h->header = ntohl(p[0]);
-
- if (h->pkt_size() > len)
- return false; // VRT header says packet is bigger than what we've got
-
- len = h->pkt_size(); // valid length of packet
-
- int cw = compute_codeword(*h);
- switch (cw & 0x1f){
-#include "expanded_header_parse_switch_body.h"
- }
-
- if (n32_bit_words_header + n32_bit_words_trailer > len)
- return false; // negative payload len
-
- *payload = p + n32_bit_words_header;
- *n32_bit_words_payload = len - (n32_bit_words_header + n32_bit_words_trailer);
-
- // printf("parse: hdr = 0x%08x, cw = 0x%02x, n32_bit_words_header = %d, n32_bit_words_trailer = %d\n",
- // h->header, cw, n32_bit_words_header, n32_bit_words_trailer);
-
- return true;
- }
-
-
-}; // vrt
diff --git a/vrt/lib/expanded_header_parse_switch_body.h b/vrt/lib/expanded_header_parse_switch_body.h
deleted file mode 100644
index 6bfaf37997..0000000000
--- a/vrt/lib/expanded_header_parse_switch_body.h
+++ /dev/null
@@ -1,320 +0,0 @@
- case 0:
- h->stream_id = 0;
- h->class_id = 0;
- h->integer_secs = 0;
- h->fractional_secs = 0;
- n32_bit_words_header = 1;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 1:
- h->stream_id = ntohl(p[1]);
- h->class_id = 0;
- h->integer_secs = 0;
- h->fractional_secs = 0;
- n32_bit_words_header = 2;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 2:
- h->stream_id = 0;
- h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
- h->integer_secs = 0;
- h->fractional_secs = 0;
- n32_bit_words_header = 3;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 3:
- h->stream_id = ntohl(p[1]);
- h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- h->integer_secs = 0;
- h->fractional_secs = 0;
- n32_bit_words_header = 4;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 4:
- h->stream_id = 0;
- h->class_id = 0;
- h->integer_secs = ntohl(p[1]);
- h->fractional_secs = 0;
- n32_bit_words_header = 2;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 5:
- h->stream_id = ntohl(p[1]);
- h->class_id = 0;
- h->integer_secs = ntohl(p[2]);
- h->fractional_secs = 0;
- n32_bit_words_header = 3;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 6:
- h->stream_id = 0;
- h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
- h->integer_secs = ntohl(p[3]);
- h->fractional_secs = 0;
- n32_bit_words_header = 4;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 7:
- h->stream_id = ntohl(p[1]);
- h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- h->integer_secs = ntohl(p[4]);
- h->fractional_secs = 0;
- n32_bit_words_header = 5;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 8:
- h->stream_id = 0;
- h->class_id = 0;
- h->integer_secs = 0;
- h->fractional_secs = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
- n32_bit_words_header = 3;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 9:
- h->stream_id = ntohl(p[1]);
- h->class_id = 0;
- h->integer_secs = 0;
- h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- n32_bit_words_header = 4;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 10:
- h->stream_id = 0;
- h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
- h->integer_secs = 0;
- h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]);
- n32_bit_words_header = 5;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 11:
- h->stream_id = ntohl(p[1]);
- h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- h->integer_secs = 0;
- h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]);
- n32_bit_words_header = 6;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 12:
- h->stream_id = 0;
- h->class_id = 0;
- h->integer_secs = ntohl(p[1]);
- h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- n32_bit_words_header = 4;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 13:
- h->stream_id = ntohl(p[1]);
- h->class_id = 0;
- h->integer_secs = ntohl(p[2]);
- h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]);
- n32_bit_words_header = 5;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 14:
- h->stream_id = 0;
- h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
- h->integer_secs = ntohl(p[3]);
- h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]);
- n32_bit_words_header = 6;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 15:
- h->stream_id = ntohl(p[1]);
- h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- h->integer_secs = ntohl(p[4]);
- h->fractional_secs = ((uint64_t)(ntohl(p[5])) << 32) | ntohl(p[6]);
- n32_bit_words_header = 7;
- h->trailer = 0;
- n32_bit_words_trailer = 0;
- break;
-
- case 16:
- h->stream_id = 0;
- h->class_id = 0;
- h->integer_secs = 0;
- h->fractional_secs = 0;
- n32_bit_words_header = 1;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 17:
- h->stream_id = ntohl(p[1]);
- h->class_id = 0;
- h->integer_secs = 0;
- h->fractional_secs = 0;
- n32_bit_words_header = 2;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 18:
- h->stream_id = 0;
- h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
- h->integer_secs = 0;
- h->fractional_secs = 0;
- n32_bit_words_header = 3;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 19:
- h->stream_id = ntohl(p[1]);
- h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- h->integer_secs = 0;
- h->fractional_secs = 0;
- n32_bit_words_header = 4;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 20:
- h->stream_id = 0;
- h->class_id = 0;
- h->integer_secs = ntohl(p[1]);
- h->fractional_secs = 0;
- n32_bit_words_header = 2;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 21:
- h->stream_id = ntohl(p[1]);
- h->class_id = 0;
- h->integer_secs = ntohl(p[2]);
- h->fractional_secs = 0;
- n32_bit_words_header = 3;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 22:
- h->stream_id = 0;
- h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
- h->integer_secs = ntohl(p[3]);
- h->fractional_secs = 0;
- n32_bit_words_header = 4;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 23:
- h->stream_id = ntohl(p[1]);
- h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- h->integer_secs = ntohl(p[4]);
- h->fractional_secs = 0;
- n32_bit_words_header = 5;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 24:
- h->stream_id = 0;
- h->class_id = 0;
- h->integer_secs = 0;
- h->fractional_secs = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
- n32_bit_words_header = 3;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 25:
- h->stream_id = ntohl(p[1]);
- h->class_id = 0;
- h->integer_secs = 0;
- h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- n32_bit_words_header = 4;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 26:
- h->stream_id = 0;
- h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
- h->integer_secs = 0;
- h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]);
- n32_bit_words_header = 5;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 27:
- h->stream_id = ntohl(p[1]);
- h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- h->integer_secs = 0;
- h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]);
- n32_bit_words_header = 6;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 28:
- h->stream_id = 0;
- h->class_id = 0;
- h->integer_secs = ntohl(p[1]);
- h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- n32_bit_words_header = 4;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 29:
- h->stream_id = ntohl(p[1]);
- h->class_id = 0;
- h->integer_secs = ntohl(p[2]);
- h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]);
- n32_bit_words_header = 5;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 30:
- h->stream_id = 0;
- h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]);
- h->integer_secs = ntohl(p[3]);
- h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]);
- n32_bit_words_header = 6;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
- case 31:
- h->stream_id = ntohl(p[1]);
- h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]);
- h->integer_secs = ntohl(p[4]);
- h->fractional_secs = ((uint64_t)(ntohl(p[5])) << 32) | ntohl(p[6]);
- n32_bit_words_header = 7;
- h->trailer = ntohl(p[len-1]);
- n32_bit_words_trailer = 1;
- break;
-
diff --git a/vrt/lib/expanded_header_unparse_switch_body.h b/vrt/lib/expanded_header_unparse_switch_body.h
deleted file mode 100644
index ca6e14989a..0000000000
--- a/vrt/lib/expanded_header_unparse_switch_body.h
+++ /dev/null
@@ -1,272 +0,0 @@
- case 0:
- *n32_bit_words_header = 1;
- *n32_bit_words_trailer = 0;
- break;
-
- case 1:
- header[1] = htonl(h->stream_id);
- *n32_bit_words_header = 2;
- *n32_bit_words_trailer = 0;
- break;
-
- case 2:
- header[1] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[2] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- *n32_bit_words_header = 3;
- *n32_bit_words_trailer = 0;
- break;
-
- case 3:
- header[1] = htonl(h->stream_id);
- header[2] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- *n32_bit_words_header = 4;
- *n32_bit_words_trailer = 0;
- break;
-
- case 4:
- header[1] = htonl(h->integer_secs);
- *n32_bit_words_header = 2;
- *n32_bit_words_trailer = 0;
- break;
-
- case 5:
- header[1] = htonl(h->stream_id);
- header[2] = htonl(h->integer_secs);
- *n32_bit_words_header = 3;
- *n32_bit_words_trailer = 0;
- break;
-
- case 6:
- header[1] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[2] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[3] = htonl(h->integer_secs);
- *n32_bit_words_header = 4;
- *n32_bit_words_trailer = 0;
- break;
-
- case 7:
- header[1] = htonl(h->stream_id);
- header[2] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[4] = htonl(h->integer_secs);
- *n32_bit_words_header = 5;
- *n32_bit_words_trailer = 0;
- break;
-
- case 8:
- header[1] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[2] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 3;
- *n32_bit_words_trailer = 0;
- break;
-
- case 9:
- header[1] = htonl(h->stream_id);
- header[2] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 4;
- *n32_bit_words_trailer = 0;
- break;
-
- case 10:
- header[1] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[2] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[4] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 5;
- *n32_bit_words_trailer = 0;
- break;
-
- case 11:
- header[1] = htonl(h->stream_id);
- header[2] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[4] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[5] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 6;
- *n32_bit_words_trailer = 0;
- break;
-
- case 12:
- header[1] = htonl(h->integer_secs);
- header[2] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 4;
- *n32_bit_words_trailer = 0;
- break;
-
- case 13:
- header[1] = htonl(h->stream_id);
- header[2] = htonl(h->integer_secs);
- header[3] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[4] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 5;
- *n32_bit_words_trailer = 0;
- break;
-
- case 14:
- header[1] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[2] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[3] = htonl(h->integer_secs);
- header[4] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[5] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 6;
- *n32_bit_words_trailer = 0;
- break;
-
- case 15:
- header[1] = htonl(h->stream_id);
- header[2] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[4] = htonl(h->integer_secs);
- header[5] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[6] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 7;
- *n32_bit_words_trailer = 0;
- break;
-
- case 16:
- *n32_bit_words_header = 1;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 17:
- header[1] = htonl(h->stream_id);
- *n32_bit_words_header = 2;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 18:
- header[1] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[2] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- *n32_bit_words_header = 3;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 19:
- header[1] = htonl(h->stream_id);
- header[2] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- *n32_bit_words_header = 4;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 20:
- header[1] = htonl(h->integer_secs);
- *n32_bit_words_header = 2;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 21:
- header[1] = htonl(h->stream_id);
- header[2] = htonl(h->integer_secs);
- *n32_bit_words_header = 3;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 22:
- header[1] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[2] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[3] = htonl(h->integer_secs);
- *n32_bit_words_header = 4;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 23:
- header[1] = htonl(h->stream_id);
- header[2] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[4] = htonl(h->integer_secs);
- *n32_bit_words_header = 5;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 24:
- header[1] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[2] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 3;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 25:
- header[1] = htonl(h->stream_id);
- header[2] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 4;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 26:
- header[1] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[2] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[4] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 5;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 27:
- header[1] = htonl(h->stream_id);
- header[2] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[4] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[5] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 6;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 28:
- header[1] = htonl(h->integer_secs);
- header[2] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 4;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 29:
- header[1] = htonl(h->stream_id);
- header[2] = htonl(h->integer_secs);
- header[3] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[4] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 5;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 30:
- header[1] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[2] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[3] = htonl(h->integer_secs);
- header[4] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[5] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 6;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
- case 31:
- header[1] = htonl(h->stream_id);
- header[2] = htonl((uint32_t)((h->class_id >> 32) & 0xffffffff));
- header[3] = htonl((uint32_t)((h->class_id >> 0) & 0xffffffff));
- header[4] = htonl(h->integer_secs);
- header[5] = htonl((uint32_t)((h->fractional_secs >> 32) & 0xffffffff));
- header[6] = htonl((uint32_t)((h->fractional_secs >> 0) & 0xffffffff));
- *n32_bit_words_header = 7;
- trailer[0] = htonl(h->trailer);
- *n32_bit_words_trailer = 1;
- break;
-
diff --git a/vrt/lib/gen_parse_switch_body.py b/vrt/lib/gen_parse_switch_body.py
deleted file mode 100755
index d13e490b75..0000000000
--- a/vrt/lib/gen_parse_switch_body.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-import sys
-
-# dispatch codeword bits
-HAS_STREAM_ID = 1 << 0;
-HAS_CLASS_ID = 1 << 1;
-HAS_INTEGER_SECS = 1 << 2;
-HAS_FRACTIONAL_SECS = 1 << 3;
-HAS_TRAILER = 1 << 4;
-
-def do_case(f, cw):
-
- def do32(name, mask, index):
- f.write(" ")
- if cw & mask:
- f.write("h->%s = ntohl(p[%d]);\n" % (name, index))
- return 1
- else:
- f.write("h->%s = 0;\n" % (name,))
- return 0
-
- def do64(name, mask, index):
- f.write(" ")
- if cw & mask:
- f.write("h->%s = ((uint64_t)(ntohl(p[%d])) << 32) | ntohl(p[%d]);\n" % (name, index, index+1))
- return 2
- else:
- f.write("h->%s = 0;\n" % (name,))
- return 0
-
- def dolength(index):
- f.write(" n32_bit_words_header = %d;\n"%index)
-
- def dotrailer(name, mask):
- if cw & mask:
- f.write(" h->%s = ntohl(p[len-1]);\n" % (name,))
- f.write(" n32_bit_words_trailer = 1;\n")
- return 1
- else:
- f.write(" h->%s = 0;\n" % (name,))
- f.write(" n32_bit_words_trailer = 0;\n")
- return 0
-
- f.write(" case %d:\n" % (cw,))
-
- index = 1
- index += do32("stream_id", HAS_STREAM_ID, index)
- index += do64("class_id", HAS_CLASS_ID, index)
- index += do32("integer_secs", HAS_INTEGER_SECS, index)
- index += do64("fractional_secs", HAS_FRACTIONAL_SECS, index)
- dolength(index)
- dotrailer("trailer", HAS_TRAILER)
-
- f.write(" break;\n\n")
-
-
-def main():
- f = sys.stdout
-
- for cw in range(32):
- do_case(f, cw)
-
-
-if __name__ == '__main__':
- main()
diff --git a/vrt/lib/gen_unparse_switch_body.py b/vrt/lib/gen_unparse_switch_body.py
deleted file mode 100755
index 6c7cd01b3a..0000000000
--- a/vrt/lib/gen_unparse_switch_body.py
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-import sys
-
-# dispatch codeword bits
-HAS_STREAM_ID = 1 << 0;
-HAS_CLASS_ID = 1 << 1;
-HAS_INTEGER_SECS = 1 << 2;
-HAS_FRACTIONAL_SECS = 1 << 3;
-HAS_TRAILER = 1 << 4;
-
-def do_case(f, cw):
-
- def do32(name, mask, index):
- if cw & mask:
- f.write(" header[%d] = htonl(h->%s);\n" % (index, name))
- return 1
- return 0
-
- def do64(name, mask, index):
- if cw & mask:
- f.write(" header[%d] = htonl((uint32_t)((h->%s >> 32) & 0xffffffff));\n" % (index, name))
- f.write(" header[%d] = htonl((uint32_t)((h->%s >> 0) & 0xffffffff));\n" % (index+1, name))
- return 2
- return 0
-
- def dolength(index):
- f.write(" *n32_bit_words_header = %d;\n"%index)
-
- def dotrailer(name, mask):
- if cw & mask:
- f.write(" trailer[%d] = htonl(h->%s);\n" % (0, name))
- f.write(" *n32_bit_words_trailer = 1;\n")
- return 1
- else:
- f.write(" *n32_bit_words_trailer = 0;\n")
- return 0
-
- f.write(" case %d:\n" % (cw,))
-
- index = 1
- index += do32("stream_id", HAS_STREAM_ID, index)
- index += do64("class_id", HAS_CLASS_ID, index)
- index += do32("integer_secs", HAS_INTEGER_SECS, index)
- index += do64("fractional_secs", HAS_FRACTIONAL_SECS, index)
- dolength(index)
- dotrailer("trailer", HAS_TRAILER)
-
- f.write(" break;\n\n")
-
-
-def main():
- f = sys.stdout
-
- for cw in range(32):
- do_case(f, cw)
-
-
-if __name__ == '__main__':
- main()
diff --git a/vrt/lib/rx.cc b/vrt/lib/rx.cc
deleted file mode 100644
index 2d741e908f..0000000000
--- a/vrt/lib/rx.cc
+++ /dev/null
@@ -1,124 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <vrt/rx.h>
-#include <vrt/expanded_header.h>
-#include "socket_rx_buffer.h"
-#include "data_handler.h"
-#include <unistd.h>
-#include <stdio.h>
-#include <stdexcept>
-
-static void
-print_words(FILE *fp, size_t offset, const uint32_t *buf, size_t n)
-{
- size_t i;
- for (i = 0; i < n; i++){
- if (i % 4 == 0){
- fprintf(fp, "%04zx:", i);
- }
-
- putc(' ', fp);
- fprintf(fp, "%08x", buf[i]);
- if (i % 4 == 3)
- putc('\n', fp);
- }
-
- putc('\n', fp);
-}
-
-
-
-namespace vrt {
-
- rx::sptr
- rx::make(int socket_fd, size_t rx_bufsize)
- {
- return sptr(new rx(socket_fd, rx_bufsize));
- }
-
- rx::rx(int socket_fd, size_t rx_bufsize)
- : d_socket_fd(socket_fd),
- d_srb(new socket_rx_buffer(socket_fd, rx_bufsize))
- {
- }
-
- rx::~rx()
- {
- delete d_srb;
- ::close(d_socket_fd);
- }
-
-
- class vrt_data_handler : public data_handler
- {
- rx_packet_handler *d_handler;
-
- public:
- vrt_data_handler(rx_packet_handler *handler)
- : d_handler(handler){}
-
- ~vrt_data_handler();
-
- result operator()(const void *base, size_t len);
- };
-
- vrt_data_handler::~vrt_data_handler(){}
-
- // N.B., There may be more than 1 VRT packet in a frame (usually IF-Context packets)
- data_handler::result
- vrt_data_handler::operator()(const void *base, size_t len)
- {
- const uint32_t *word_base = (const uint32_t *) base;
- size_t word_len = len/(sizeof(uint32_t));
-
- bool want_more = true;
- while (word_len > 0 && want_more){
- const uint32_t *payload;
- size_t n32_bit_words;
- expanded_header hdr;
- if (!expanded_header::parse(word_base, word_len,
- &hdr, &payload, &n32_bit_words)){
- if (1){
- fprintf(stderr, "vrt_data_handler: malformed VRT packet!\n");
- print_words(stderr, 0, word_base, word_len);
- }
- return 0;
- }
- want_more = (*d_handler)(payload, n32_bit_words, &hdr);
- word_base += hdr.pkt_size();
- word_len -= hdr.pkt_size();
- }
- return !want_more ? data_handler::DONE : 0;
- }
-
-
- bool
- rx::rx_packets(rx_packet_handler *handler, bool dont_wait)
- {
- vrt_data_handler h(handler);
- socket_rx_buffer::result r = d_srb->rx_frames(&h, dont_wait ? 0 : -1);
- return r == socket_rx_buffer::EB_OK || r == socket_rx_buffer::EB_WOULD_BLOCK;
- }
-
-}; // vrt
diff --git a/vrt/lib/rx_packet_handler.cc b/vrt/lib/rx_packet_handler.cc
deleted file mode 100644
index 11f90278df..0000000000
--- a/vrt/lib/rx_packet_handler.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <vrt/rx_packet_handler.h>
-
-namespace vrt {
-
- rx_packet_handler::~rx_packet_handler(){}
-
- // default operator is a NOP
- bool
- rx_packet_handler::operator()(const uint32_t *payload,
- size_t n32_bit_words,
- const expanded_header *hdr)
- {
- return true;
- }
-
-
-}; // vrt
diff --git a/vrt/lib/socket_rx_buffer.cc b/vrt/lib/socket_rx_buffer.cc
deleted file mode 100644
index 6ed211b9ae..0000000000
--- a/vrt/lib/socket_rx_buffer.cc
+++ /dev/null
@@ -1,278 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "socket_rx_buffer.h"
-#include "data_handler.h"
-#include <linux/if_packet.h>
-#include <sys/socket.h>
-#include <sys/mman.h>
-#include <sys/poll.h>
-#include <iostream>
-#include <cmath>
-#include <errno.h>
-#include <stdexcept>
-#include <string.h>
-#include <fcntl.h>
-#include <cstdio>
-
-
-#define SOCKET_RX_BUFFER_DEBUG 1 // define to 0 or 1
-#if SOCKET_RX_BUFFER_DEBUG
-#define DEBUG_LOG(x) ::write(2, (x), 1)
-#else
-#define DEBUG_LOG(X)
-#endif
-
-#define DEFAULT_MEM_SIZE 62.5e6 // ~0.5s @ 125 MB/s
-#define MAX_MEM_SIZE 1000e6 // ~10.00s @ 100 MB/s.
-#define MAX_SLAB_SIZE 131072 // 128 KB (FIXME fish out of /proc/slabinfo)
-
-
-namespace vrt {
-
- const unsigned int socket_rx_buffer::MAX_PKTLEN = 8192;
- const unsigned int socket_rx_buffer::MIN_PKTLEN = 64;
-
- socket_rx_buffer::socket_rx_buffer(int socket_fd, size_t rx_bufsize)
- : d_fd(socket_fd), d_using_tpring(false), d_buflen(0), d_buf(0), d_frame_nr(0),
- d_frame_size(0), d_head(0), d_ring(0)
- {
- if (rx_bufsize == 0)
- d_buflen = (size_t)DEFAULT_MEM_SIZE;
- else
- d_buflen = std::min((size_t)MAX_MEM_SIZE, rx_bufsize);
-
- if (!open()){
- throw std::runtime_error("socket_rx_buffer::open failed");
- }
- }
-
- socket_rx_buffer::~socket_rx_buffer()
- {
- close();
- }
-
- bool
- socket_rx_buffer::open()
- {
- if (try_packet_ring()){
- d_using_tpring = true;
- // fprintf(stderr, "socket_rx_buffer: using memory mapped interface\n");
- }
- else {
- d_using_tpring = false;
- // fprintf(stderr, "socket_rx_buffer: NOT using memory mapped interface\n");
-
- // Increase socket buffer if possible
-
- int rcvbuf_size = d_buflen;
-#if defined(SO_RCVBUFFORCE)
- if (setsockopt(d_fd, SOL_SOCKET, SO_RCVBUFFORCE, &rcvbuf_size, sizeof(rcvbuf_size)) != 0){
- perror("setsockopt(SO_RCVBUFFORCE)");
- fprintf(stderr, "Are you running as root? If not, please do.\n");
- }
- else {
- fprintf(stderr, "SO_RCVBUFFORCE = %zd\n", d_buflen);
- }
-#endif
- }
-
- return true;
- }
-
- bool
- socket_rx_buffer::try_packet_ring()
- {
- struct tpacket_req req;
- size_t page_size = getpagesize();
-
- // Calculate minimum power-of-two aligned size for frames
- req.tp_frame_size =
- (unsigned int)rint(pow(2, ceil(log2(TPACKET_ALIGN(TPACKET_HDRLEN)+TPACKET_ALIGN(MAX_PKTLEN)))));
- d_frame_size = req.tp_frame_size;
-
- // Calculate minimum contiguous pages needed to enclose a frame
- int npages = (page_size > req.tp_frame_size) ? 1 : ((req.tp_frame_size+page_size-1)/page_size);
- req.tp_block_size = page_size << (int)ceil(log2(npages));
-
- // Calculate number of blocks
- req.tp_block_nr = (int)(d_buflen/req.tp_block_size);
-
-
- // Recalculate buffer length
- d_buflen = req.tp_block_nr*req.tp_block_size;
-
- // Finally, calculate total number of frames. Since frames, blocks,
- // and pages are all power-of-two aligned, frames are contiguous
- req.tp_frame_nr = d_buflen/req.tp_frame_size;
- d_frame_nr = req.tp_frame_nr;
-
-#if 0
- if (SOCKET_RX_BUFFER_DEBUG)
- std::cerr << "socket_rx_buffer:"
- << " frame_size=" << req.tp_frame_size
- << " block_size=" << req.tp_block_size
- << " block_nr=" << req.tp_block_nr
- << " frame_nr=" << req.tp_frame_nr
- << " buflen=" << d_buflen
- << std::endl;
-#endif
-
- // Try to get kernel shared memory buffer
- if (setsockopt(d_fd, SOL_PACKET, PACKET_RX_RING, (void *)&req, sizeof(req)) != 0){
- // perror("socket_rx_buffer: setsockopt");
- return false;
- }
-
- void *p = mmap(0, d_buflen, PROT_READ|PROT_WRITE, MAP_SHARED, d_fd, 0);
- if (p == MAP_FAILED){
- perror("socket_rx_buffer: mmap");
- return false;
- }
- d_buf = (uint8_t *) p;
-
- // Initialize our pointers into the packet ring
- d_ring.resize(req.tp_frame_nr);
- for (unsigned int i=0; i < req.tp_frame_nr; i++)
- d_ring[i] = (uint8_t *)(d_buf+i*req.tp_frame_size);
-
- return true;
- }
-
- bool
- socket_rx_buffer::close()
- {
- return true;
- }
-
- inline bool
- socket_rx_buffer::frame_available()
- {
- return (((tpacket_hdr *)d_ring[d_head])->tp_status != TP_STATUS_KERNEL);
- }
-
- socket_rx_buffer::result
- socket_rx_buffer::rx_frames(data_handler *f, int timeout_in_ms)
- {
- if (!d_using_tpring){
-
- // ----------------------------------------------------------------
- // Use recv instead of kernel Rx packet ring
- // ----------------------------------------------------------------
-
- unsigned char buf[MAX_PKTLEN];
- bool dont_wait = timeout_in_ms == 0; // FIXME treating timeout as 0 or inf
- int flags = dont_wait ? MSG_DONTWAIT : 0;
-
- ssize_t rr = recv(d_fd, buf, sizeof(buf), flags);
- if (rr == -1){ // error?
- if (errno == EAGAIN){ // non-blocking, nothing there
- return EB_WOULD_BLOCK;
- }
- perror("rx_frames: recv");
- return EB_ERROR;
- }
-
- // Got first packet. Call handler
-
- data_handler::result r = (*f)(buf, rr);
- if (r & data_handler::DONE)
- return EB_OK;
-
- // Now do as many as we can without blocking
-
- while (1){
- rr = recv(d_fd, buf, sizeof(buf), MSG_DONTWAIT);
- if (rr == -1){ // error?
- if (errno == EAGAIN) // non-blocking, nothing there
- return EB_OK; // return OK; we've processed >= 1 packets
- perror("rx_frames: recv");
- return EB_ERROR;
- }
-
- r = (*f)(buf, rr);
- if (r & data_handler::DONE)
- break;
- }
- return EB_OK;
- }
-
- // ----------------------------------------------------------------
- // Use kernel Rx packet ring
- // ----------------------------------------------------------------
-
- DEBUG_LOG("\n");
-
- while (!frame_available()) {
- if (timeout_in_ms == 0) {
- DEBUG_LOG("w");
- return EB_WOULD_BLOCK;
- }
-
- struct pollfd pfd;
- pfd.fd = d_fd;
- pfd.revents = 0;
- pfd.events = POLLIN;
-
- // DEBUG_LOG("P");
-
- int pres = poll(&pfd, 1, timeout_in_ms);
- if (pres == -1) {
- perror("poll");
- return EB_ERROR;
- }
-
- if (pres == 0) {
- DEBUG_LOG("t");
- return EB_TIMED_OUT;
- }
- }
-
- // Iterate through available packets
- while (frame_available()) {
- // Get start of ethernet frame and length
- tpacket_hdr *hdr = (tpacket_hdr *)d_ring[d_head];
- void *base = (uint8_t *)hdr+hdr->tp_mac;
- size_t len = hdr->tp_len;
-
- if (1)
- fprintf(stderr, "socket_rx_buffer: base = %p tp_mac = %3d tp_net = %3d\n",
- base, hdr->tp_mac, hdr->tp_net);
-
- // Invoke data handler
- data_handler::result r = (*f)(base, len);
- hdr->tp_status = TP_STATUS_KERNEL; // mark it free
-
- inc_head();
-
- if (r & data_handler::DONE)
- break;
- }
-
- DEBUG_LOG("|");
- return EB_OK;
- }
-
-} // namespace vrt
diff --git a/vrt/lib/socket_rx_buffer.h b/vrt/lib/socket_rx_buffer.h
deleted file mode 100644
index 053c30c127..0000000000
--- a/vrt/lib/socket_rx_buffer.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2009 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 this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#ifndef INCLUDED_VRT_SOCKET_RX_BUFFER_H
-#define INCLUDED_VRT_SOCKET_RX_BUFFER_H
-
-#include <boost/utility.hpp>
-#include <vector>
-#include <memory>
-#include <stdint.h>
-
-namespace vrt {
-
- class data_handler;
-
- /*!
- * \brief high-performance interface to receive datagrams
- *
- * On many systems it should be possible to implement this on top of libpcap
- *
- * \internal
- */
- class socket_rx_buffer : boost::noncopyable
- {
-
- int d_fd; // socket file descriptor
- bool d_using_tpring; // using kernel mapped packet ring
- size_t d_buflen; // length of our buffer
- uint8_t *d_buf; // packet ring
- unsigned int d_frame_nr; // max frames on ring
- size_t d_frame_size; // frame storage size
- unsigned int d_head; // pointer to next frame
-
- std::vector<uint8_t *> d_ring; // pointers into buffer
-
- bool frame_available();
-
- void inc_head()
- {
- if (d_head + 1 >= d_frame_nr)
- d_head = 0;
- else
- d_head = d_head + 1;
- }
-
- bool open();
- bool close();
- bool try_packet_ring();
-
- public:
-
- enum result {
- EB_OK, //< everything's fine
- EB_ERROR, //< A non-recoverable error occurred
- EB_WOULD_BLOCK, //< A timeout of 0 was specified and nothing was ready
- EB_TIMED_OUT, //< The timeout expired before anything was ready
- };
-
- static const unsigned int MAX_PKTLEN;
- static const unsigned int MIN_PKTLEN;
-
- /*!
- * \param socket_fd file descriptor that corresponds to a socket
- * \param rx_bufsize is a hint as to the number of bytes of memory
- * to allocate for received ethernet frames (0 -> reasonable default)
- */
- socket_rx_buffer(int socket_fd, size_t rx_bufsize = 0);
- ~socket_rx_buffer();
-
- /*!
- * \brief Call \p f for each frame in the receive buffer.
- * \param f is the frame data handler
- * \param timeout (in ms) controls behavior when there are no frames to read
- *
- * If \p timeout is 0, rx_frames will not wait for frames if none are
- * available, and f will not be invoked. If \p timeout is -1 (the
- * default), rx_frames will block indefinitely until frames are
- * available. If \p timeout is positive, it indicates the number of
- * milliseconds to wait for a frame to become available. Once the
- * timeout has expired, rx_frames will return, f never having been
- * invoked.
- *
- * \p f will be called on each frame that is available.
- * \p f returns a bit mask with one of the following set or cleared:
- *
- * data_handler::DONE - return from rx_frames now even though more frames
- * might be available; otherwise continue if more
- * frames are ready.
- *
- * \returns EB_OK if at least one frame was received
- * \returns EB_WOULD_BLOCK if \p timeout is 0 and the call would have blocked
- * \returns EB_TIMED_OUT if timeout occurred
- * \returns EB_ERROR if there was an unrecoverable error.
- */
- result rx_frames(data_handler *f, int timeout=-1);
-
- /*
- * \brief Returns maximum possible number of frames in buffer
- */
- unsigned int max_frames() const { return d_using_tpring ? d_frame_nr : 0; }
- };
-
-}; // namespace vrt
-
-#endif /* INCLUDED_VRT_SOCKET_RX_BUFFER_H */
diff --git a/vrt/vrt.pc.in b/vrt/vrt.pc.in
deleted file mode 100644
index 0f8cb938bb..0000000000
--- a/vrt/vrt.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: vrt
-Description: Host implementation of Virtual Radio Transport (VITA-49)
-Requires:
-Version: @VERSION@
-Libs: -L${libdir} -lvrt
-Cflags: -I${includedir}