Merge branch 'fll'
authorTom <trondeau@vt.edu>
Tue, 2 Feb 2010 00:21:54 +0000 (19:21 -0500)
committerTom <trondeau@vt.edu>
Tue, 2 Feb 2010 00:21:54 +0000 (19:21 -0500)
39 files changed:
configure.ac
gr-gpio/src/python/gpio_usrp_fft.py
gr-howto-write-a-block/INSTALL
gr-howto-write-a-block/config.guess
gr-howto-write-a-block/config.sub
gr-msdd6000/src/Makefile.am
gr-msdd6000/src/python-examples/new_msdd_fft.py
gr-noaa/apps/Makefile.am
gr-noaa/apps/file_rx_lrit.grc [new file with mode: 0644]
gr-noaa/apps/file_rx_lrit.py [new file with mode: 0755]
gr-noaa/apps/usrp_rx_lrit.grc
gr-noaa/apps/usrp_rx_lrit.py
gr-pager/grc/.gitignore
gr-pager/python/.gitignore
gr-utils/src/python/usrp2_fft.py
gr-utils/src/python/usrp_fft.py
gr-wxgui/src/python/plotter/waterfall_plotter.py
grc/blocks/gr_sample_and_hold_xx.xml
grc/python/Param.py
run_tests.sh.in
usrp/host/include/usrp/db_flexrf.h
usrp/host/lib/db_flexrf.cc
usrp/host/lib/db_wbxng.cc
usrp/host/lib/db_wbxng_adf4350.cc
usrp/host/lib/db_wbxng_adf4350_regs.cc
usrp/host/lib/usrp_standard.cc
usrp2/host/apps/stdin_int32_fft.py
usrp2/host/lib/usrp2_impl.cc
vrt/include/vrt/expanded_header.h
vrt/lib/Makefile.am
vrt/lib/expanded_header.cc
vrt/lib/expanded_header_cw_tables.h [deleted file]
vrt/lib/expanded_header_parse_switch_body.h [new file with mode: 0644]
vrt/lib/expanded_header_switch_body.h [deleted file]
vrt/lib/expanded_header_unparse_switch_body.h [new file with mode: 0644]
vrt/lib/gen_cw_tables.py [deleted file]
vrt/lib/gen_parse_switch_body.py [new file with mode: 0755]
vrt/lib/gen_switch_body.py [deleted file]
vrt/lib/gen_unparse_switch_body.py [new file with mode: 0755]

index fbb8bb52e140bd69861b9c6ac386638686ab4ba4..3ba5bb387d1a86a980f7f8d7f6973153be22b458 100644 (file)
@@ -338,7 +338,7 @@ GRC_USRP2
 GRC_VRT
 GRC_GR_USRP                    dnl this must come after GRC_USRP
 GRC_GR_USRP2
-GRC_GR_VRT
+dnl GRC_GR_VRT
 GRC_GR_GCELL                   dnl this must come after GRC_GCELL and GRC_GNURADIO_CORE
 GRC_GR_MSDD6000        
 GRC_GR_AUDIO_ALSA
index 40b1c54d4a76fbd190ff671dfbf40657ce76bf41..c9ecb032ddeebfd324bbdd4f8fa8ef8e75821802 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005,2007,2008,2009 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007,2008,2009,2010 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -279,7 +279,7 @@ class app_top_block(stdgui2.std_top_block):
                 self.myform['baseband'].set_value(r.baseband_freq)
                 self.myform['ddc'].set_value(r.dxc_freq)
            if not self.options.waterfall and not self.options.oscilloscope:
-               self.scope.win.set_baseband_freq(target_freq)
+               self.scope.set_baseband_freq(target_freq)
            return True
 
         return False
index 8b82ade08e87bbfb02fbf4c3b45b181ab6dda8cb..7d1c323beae76333f523f6df31c47a87f5597edb 100644 (file)
@@ -2,10 +2,12 @@ Installation Instructions
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
-   This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
 
 Basic Installation
 ==================
@@ -13,7 +15,11 @@ Basic Installation
    Briefly, the shell commands `./configure; make; make install' should
 configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
@@ -42,7 +48,7 @@ may remove or edit it.
 you want to change it or regenerate `configure' using a newer version
 of `autoconf'.
 
-The simplest way to compile this package is:
+   The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
      `./configure' to configure the package for your system.
@@ -53,12 +59,22 @@ The simplest way to compile this package is:
   2. Type `make' to compile the package.
 
   3. Optionally, type `make check' to run any self-tests that come with
-     the package.
+     the package, generally using the just-built uninstalled binaries.
 
   4. Type `make install' to install the programs and any data files and
-     documentation.
-
-  5. You can remove the program binaries and object files from the
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
      source code directory by typing `make clean'.  To also remove the
      files that `configure' created (so you can compile the package for
      a different kind of computer), type `make distclean'.  There is
@@ -67,8 +83,15 @@ The simplest way to compile this package is:
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
-  6. Often, you can also type `make uninstall' to remove the installed
-     files again.
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
 
 Compilers and Options
 =====================
@@ -93,7 +116,8 @@ same time, by placing the object files for each architecture in their
 own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
 the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
 
    With a non-GNU `make', it is safer to compile the package for one
 architecture at a time in the source code directory.  After you have
@@ -120,7 +144,8 @@ Installation Names
    By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
@@ -131,15 +156,46 @@ Documentation and other data files still use the regular prefix.
    In addition, if you use an unusual directory layout you can give
 options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
 
    If the package supports it, you can cause programs to be installed
 with an extra prefix or suffix on their names by giving `configure' the
 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
 
-Optional Features
-=================
-
    Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@@ -152,6 +208,13 @@ find the X include and library files automatically, but if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
 Particular systems
 ==================
 
@@ -159,7 +222,7 @@ Particular systems
 CC is not installed, it is recommended to use the following options in
 order to use an ANSI C compiler:
 
-     ./configure CC="cc -Ae"
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
@@ -174,6 +237,16 @@ and if that doesn't work, try
 
      ./configure CC="cc -nodtk"
 
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
 Specifying the System Type
 ==========================
 
@@ -189,7 +262,8 @@ type, such as `sun4', or a canonical name which has the form:
 
 where SYSTEM can have one of these forms:
 
-     OS KERNEL-OS
+     OS
+     KERNEL-OS
 
    See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
@@ -277,7 +351,7 @@ operates.
      `configure' can determine that directory automatically.
 
 `--prefix=DIR'
-     Use DIR as the installation prefix.  *Note Installation Names::
+     Use DIR as the installation prefix.  *note Installation Names::
      for more details, including other options available for fine-tuning
      the installation locations.
 
index f32079abda668e5fc8f8de6f226e7b26384e8a03..dc84c68ef798c6a5000c78c6dd7380d34c9e0218 100755 (executable)
@@ -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
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
 #   Free Software Foundation, Inc.
 
-timestamp='2008-01-23'
+timestamp='2009-11-20'
 
 # 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='2008-01-23'
 # the same distribution terms that you use for the rest of that program.
 
 
-# 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.
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a 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.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# 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
 
 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 __ELF__ >/dev/null
+                       | grep -q __ELF__
                then
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
                    # Return netbsd for either.  FIX?
@@ -324,14 +324,33 @@ 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.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       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/[^.]*//'`
        exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
@@ -640,7 +659,7 @@ EOF
            # => hppa64-hp-hpux11.23
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-               grep __LP64__ >/dev/null
+               grep -q __LP64__
            then
                HP_ARCH="hppa2.0w"
            else
@@ -791,12 +810,12 @@ EOF
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
        exit ;;
-    *:Interix*:[3456]*)
+    *:Interix*:*)
        case ${UNAME_MACHINE} in
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd)
+           authenticamd | genuineintel | EM64T)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
            IA64)
@@ -806,6 +825,9 @@ 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
@@ -835,6 +857,20 @@ 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 \
@@ -857,6 +893,17 @@ 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 ;;
@@ -866,74 +913,33 @@ EOF
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
        exit ;;
-    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:*:*)
+    mips:Linux:*:* | mips64:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
        #undef CPU
-       #undef mips64
-       #undef mips64el
+       #undef ${UNAME_MACHINE}
+       #undef ${UNAME_MACHINE}el
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-       CPU=mips64el
+       CPU=${UNAME_MACHINE}el
        #else
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-       CPU=mips64
+       CPU=${UNAME_MACHINE}
        #else
        CPU=
        #endif
        #endif
 EOF
-       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-           /^CPU/{
-               s: ::g
-               p
-           }'`"
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     or32:Linux:*:*)
        echo or32-unknown-linux-gnu
        exit ;;
-    ppc:Linux:*:*)
-       echo powerpc-unknown-linux-gnu
-       exit ;;
-    ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-gnu
+    padre:Linux:*:*)
+       echo sparc-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}
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
@@ -943,8 +949,11 @@ EOF
          *)    echo hppa-unknown-linux-gnu ;;
        esac
        exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-gnu
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
        echo ${UNAME_MACHINE}-ibm-linux
@@ -967,69 +976,6 @@ 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
@@ -1058,7 +1004,7 @@ EOF
     i*86:syllable:*:*)
        echo ${UNAME_MACHINE}-pc-syllable
        exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     i*86:*DOS:*:*)
@@ -1102,8 +1048,11 @@ 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 i386.
-       echo i386-pc-msdosdjgpp
+        # 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
         exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
@@ -1141,6 +1090,16 @@ 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 ;;
@@ -1153,7 +1112,7 @@ EOF
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
        exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
@@ -1216,6 +1175,9 @@ 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 ;;
@@ -1243,6 +1205,16 @@ 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}
@@ -1324,6 +1296,9 @@ 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
index 6759825a5b7fcf64476b4398dc0e30b3090b925c..2a55a50751c1aaf99de876b404ed613005dfcce1 100755 (executable)
@@ -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
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
 #   Free Software Foundation, Inc.
 
-timestamp='2008-01-16'
+timestamp='2009-11-20'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2008-01-16'
 
 
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU 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.
@@ -122,6 +125,7 @@ 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/'`
@@ -148,10 +152,13 @@ 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)
+       -apple | -axis | -knuth | -cray | -microblaze)
                os=
                basic_machine=$1
                ;;
+        -bluegene*)
+               os=-cnk
+               ;;
        -sim | -cisco | -oki | -wec | -winbond)
                os=
                basic_machine=$1
@@ -249,13 +256,16 @@ 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 \
+       | maxq | mb | microblaze | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
-       | mips64vr | mips64vrel \
+       | mips64octeon | mips64octeonel \
        | mips64orion | mips64orionel \
+       | mips64r5900 | mips64r5900el \
+       | mips64vr | mips64vrel \
        | mips64vr4100 | mips64vr4100el \
        | mips64vr4300 | mips64vr4300el \
        | mips64vr5000 | mips64vr5000el \
@@ -268,6 +278,7 @@ case $basic_machine in
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
+       | moxie \
        | mt \
        | msp430 \
        | nios | nios2 \
@@ -276,20 +287,22 @@ case $basic_machine in
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
+       | rx \
        | score \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | 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)
+       | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12)
+       m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
                os=-none
@@ -329,14 +342,17 @@ 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-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
-       | mips64vr-* | mips64vrel-* \
+       | mips64octeon-* | mips64octeonel-* \
        | mips64orion-* | mips64orionel-* \
+       | mips64r5900-* | mips64r5900el-* \
+       | mips64vr-* | mips64vrel-* \
        | mips64vr4100-* | mips64vr4100el-* \
        | mips64vr4300-* | mips64vr4300el-* \
        | mips64vr5000-* | mips64vr5000el-* \
@@ -357,21 +373,22 @@ case $basic_machine in
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
-       | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+       | romp-* | rs6000-* | rx-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | 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-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
        | tron-* \
+       | ubicom32-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
        | xstormy16-* | xtensa*-* \
        | ymp-* \
-       | z8k-*)
+       | z8k-* | z80-*)
                ;;
        # Recognize the basic CPU types without company name, with glob match.
        xtensa*)
@@ -439,6 +456,10 @@ case $basic_machine in
                basic_machine=m68k-apollo
                os=-bsd
                ;;
+       aros)
+               basic_machine=i386-pc
+               os=-aros
+               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -455,10 +476,18 @@ 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
@@ -526,6 +555,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
        djgpp)
                basic_machine=i586-pc
                os=-msdosdjgpp
@@ -699,6 +732,9 @@ case $basic_machine in
                basic_machine=ns32k-utek
                os=-sysv
                ;;
+        microblaze)
+               basic_machine=microblaze-xilinx
+               ;;
        mingw32)
                basic_machine=i386-pc
                os=-mingw32
@@ -1128,6 +1164,10 @@ 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
@@ -1166,7 +1206,7 @@ case $basic_machine in
        we32k)
                basic_machine=we32k-att
                ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
                basic_machine=sh-unknown
                ;;
        sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1216,6 +1256,9 @@ 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|'`
                ;;
@@ -1236,10 +1279,11 @@ 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* | -sunos | -sunos[34]*\
-             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+             | -sym* | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
+             | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1248,7 +1292,7 @@ case $os in
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1258,7 +1302,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*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1388,6 +1432,9 @@ case $os in
        -zvmoe)
                os=-zvmoe
                ;;
+       -dicos*)
+               os=-dicos
+               ;;
        -none)
                ;;
        *)
@@ -1585,7 +1632,7 @@ case $basic_machine in
                        -sunos*)
                                vendor=sun
                                ;;
-                       -aix*)
+                       -cnk*|-aix*)
                                vendor=ibm
                                ;;
                        -beos*)
index 9ae4efb0a6672bce6589f4f7326e58f77dc68a58..7744395f34cac4dff90bc424bc48907b2a165e36 100644 (file)
@@ -70,7 +70,7 @@ TOP_SWIG_IFILES =                     \
 msdd_pythondir_category =              \
        gnuradio
 
-msdd_rs_pythondir_category =   \ 
+msdd_rs_pythondir_category =   \
        gnuradio
 
 # additional libraries for linking with the SWIG-generated library
index 0b31a00d9faf5aa86bbe7d9cb6686ec6b437099b..782ecb66e2a1156f4c1c6038c2292ab2fe5d6875 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005,2007,2008 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007,2008,2010 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -245,7 +245,7 @@ class app_top_block(stdgui2.std_top_block):
 #                self.myform['baseband'].set_value(r.baseband_freq)
 #                self.myform['ddc'].set_value(r.dxc_freq)
            if not self.options.waterfall and not self.options.oscilloscope:
-               self.scope.win.set_baseband_freq(target_freq)
+               self.scope.set_baseband_freq(target_freq)
            return True
 
         return False
index e246ba76a5c6c326f8a96464d251395b250dd6d4..8fb6fbef8a8afefce18180ba4349c07c61c1ebb0 100644 (file)
@@ -27,6 +27,7 @@ dist_bin_SCRIPTS = \
        hrpt_decode.py \
        hrpt_demod.py \
        file_rx_hrpt.py \
+       file_rx_lrit.py \
        usrp_rx_hrpt.py \
        usrp_rx_hrpt_nogui.py \
        usrp_rx_lrit.py
@@ -35,6 +36,7 @@ EXTRA_DIST = \
        hrpt_decode.grc \
        hrpt_demod.grc \
        file_rx_hrpt.grc \
+       file_rx_lrit.grc \
        usrp_rx_hrpt.grc \
        usrp_rx_hrpt_nogui.grc \
        usrp_rx_lrit.grc
diff --git a/gr-noaa/apps/file_rx_lrit.grc b/gr-noaa/apps/file_rx_lrit.grc
new file mode 100644 (file)
index 0000000..ee6da2a
--- /dev/null
@@ -0,0 +1,1372 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+  <timestamp>Wed Dec 16 09:14:28 2009</timestamp>
+  <block>
+    <key>options</key>
+    <param>
+      <key>id</key>
+      <value>file_rx_lrit</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>LRIT Receiver (from capture file)</value>
+    </param>
+    <param>
+      <key>author</key>
+      <value></value>
+    </param>
+    <param>
+      <key>description</key>
+      <value></value>
+    </param>
+    <param>
+      <key>window_size</key>
+      <value>4095, 4095</value>
+    </param>
+    <param>
+      <key>generate_options</key>
+      <value>wx_gui</value>
+    </param>
+    <param>
+      <key>category</key>
+      <value>Custom</value>
+    </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
+    <param>
+      <key>run</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>realtime_scheduling</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>symbol_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>293e3</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(347, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>sps</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>sample_rate/symbol_rate</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(445, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>config_filename</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>os.environ['HOME']+'/.gnuradio/config.conf'</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(11, 136)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>import</key>
+    <param>
+      <key>id</key>
+      <value>import_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>import</key>
+      <value>import os</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(10, 82)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable</key>
+    <param>
+      <key>id</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>64e6/decim</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(249, 10)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>rx_spectrum</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Baseband Spectrum</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>5</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>50</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>15</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(267, 556)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_file_source</key>
+    <param>
+      <key>id</key>
+      <value>gr_file_source_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>file</key>
+      <value>lrit.dat</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>repeat</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(79, 729)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_throttle</key>
+    <param>
+      <key>id</key>
+      <value>gr_throttle_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>samples_per_second</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>vlen</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(60, 824)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>rx_waveform</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Baseband Waveform</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>v_offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>20.0/sample_rate</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(267, 915)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>gain_mu</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Gain Mu</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>saved_gain_mu</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 1, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(478, 91)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>costas_spectrum</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>PLL Spectrum</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>-15</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>window.hanning</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(916, 535)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_clock_recovery_mm_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_clock_recovery_mm_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>omega</key>
+      <value>sps</value>
+    </param>
+    <param>
+      <key>gain_omega</key>
+      <value>(gain_mu**2)/4.0</value>
+    </param>
+    <param>
+      <key>mu</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>gain_mu</key>
+      <value>gain_mu</value>
+    </param>
+    <param>
+      <key>omega_relative_limit</key>
+      <value>50e-6</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(915, 789)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>costas_spectrum_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Bit Sync Spectrum</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>symbol_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>-15</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>window.hanning</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 3</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1160, 539)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>notebook</key>
+    <param>
+      <key>id</key>
+      <value>displays</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.NB_TOP</value>
+    </param>
+    <param>
+      <key>labels</key>
+      <value>['USRP RX', 'RRC Filter', 'PLL', 'MM']</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 2</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(15, 206)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
+    <param>
+      <key>id</key>
+      <value>costas_alpha</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Costas Alpha</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>saved_costas_alpha</value>
+    </param>
+    <param>
+      <key>min</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>max</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>num_steps</key>
+      <value>100</value>
+    </param>
+    <param>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>float_converter</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(338, 90)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>costas_waveform</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>PLL Waveform</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>v_offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>20.0/sample_rate</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(915, 928)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>mm_waveform</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>Constellation</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>symbol_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>v_offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>20.0/symbol_rate</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 3</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1160, 922)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_config</key>
+    <param>
+      <key>id</key>
+      <value>saved_costas_alpha</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0.2</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+    <param>
+      <key>config_file</key>
+      <value>config_filename</value>
+    </param>
+    <param>
+      <key>section</key>
+      <value>'usrp_rx_lrit'</value>
+    </param>
+    <param>
+      <key>option</key>
+      <value>'costas_alpha'</value>
+    </param>
+    <param>
+      <key>writeback</key>
+      <value>costas_alpha</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(251, 244)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_config</key>
+    <param>
+      <key>id</key>
+      <value>saved_gain_mu</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0.2</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+    <param>
+      <key>config_file</key>
+      <value>config_filename</value>
+    </param>
+    <param>
+      <key>section</key>
+      <value>'usrp_rx_lrit'</value>
+    </param>
+    <param>
+      <key>option</key>
+      <value>'gain_mu'</value>
+    </param>
+    <param>
+      <key>writeback</key>
+      <value>gain_mu</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(411, 242)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>parameter</key>
+    <param>
+      <key>id</key>
+      <value>decim</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Decim</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>160</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>intx</value>
+    </param>
+    <param>
+      <key>short_id</key>
+      <value>d</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(249, 90)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>rrc_spectrum</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>RRC Spectrum</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>-15</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>window.hanning</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(705, 534)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_agc_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_agc_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>rate</key>
+      <value>1e-6</value>
+    </param>
+    <param>
+      <key>reference</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>1.0/32767.0</value>
+    </param>
+    <param>
+      <key>max_gain</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(273, 800)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>rx_waveform_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>RRC Waveform</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>v_scale</key>
+      <value>0.5</value>
+    </param>
+    <param>
+      <key>v_offset</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>t_scale</key>
+      <value>20.0/sample_rate</value>
+    </param>
+    <param>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 1</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(706, 927)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_costas_loop_cc</key>
+    <param>
+      <key>id</key>
+      <value>costas</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>alpha</key>
+      <value>costas_alpha</value>
+    </param>
+    <param>
+      <key>beta</key>
+      <value>(costas_alpha**2)/4.0</value>
+    </param>
+    <param>
+      <key>max_freq</key>
+      <value>50e-6*sps</value>
+    </param>
+    <param>
+      <key>min_freq</key>
+      <value>-50e-6*sps</value>
+    </param>
+    <param>
+      <key>order</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(706, 792)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>root_raised_cosine_filter</key>
+    <param>
+      <key>id</key>
+      <value>rrc</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fir_filter_ccf</value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>interp</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>sym_rate</key>
+      <value>symbol_rate</value>
+    </param>
+    <param>
+      <key>alpha</key>
+      <value>0.25</value>
+    </param>
+    <param>
+      <key>ntaps</key>
+      <value>int(11*sample_rate/symbol_rate)</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(448, 784)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <connection>
+    <source_block_id>rrc</source_block_id>
+    <sink_block_id>rx_waveform_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>rrc</source_block_id>
+    <sink_block_id>rrc_spectrum</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_agc_xx_0</source_block_id>
+    <sink_block_id>rrc</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>rx_waveform</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>rx_spectrum</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>gr_agc_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_file_source_0</source_block_id>
+    <sink_block_id>gr_throttle_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>rrc</source_block_id>
+    <sink_block_id>costas</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>costas</source_block_id>
+    <sink_block_id>costas_spectrum</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>costas</source_block_id>
+    <sink_block_id>costas_waveform</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>costas</source_block_id>
+    <sink_block_id>gr_clock_recovery_mm_xx_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_clock_recovery_mm_xx_0</source_block_id>
+    <sink_block_id>costas_spectrum_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_clock_recovery_mm_xx_0</source_block_id>
+    <sink_block_id>mm_waveform</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+</flow_graph>
diff --git a/gr-noaa/apps/file_rx_lrit.py b/gr-noaa/apps/file_rx_lrit.py
new file mode 100755 (executable)
index 0000000..9a50631
--- /dev/null
@@ -0,0 +1,337 @@
+#!/usr/bin/env python
+##################################################
+# Gnuradio Python Flow Graph
+# Title: LRIT Receiver (from capture file)
+# Generated: Wed Dec 16 09:16:13 2009
+##################################################
+
+from gnuradio import eng_notation
+from gnuradio import gr
+from gnuradio import window
+from gnuradio.eng_option import eng_option
+from gnuradio.gr import firdes
+from gnuradio.wxgui import fftsink2
+from gnuradio.wxgui import forms
+from gnuradio.wxgui import scopesink2
+from grc_gnuradio import wxgui as grc_wxgui
+from optparse import OptionParser
+import ConfigParser
+import os
+import wx
+
+class file_rx_lrit(grc_wxgui.top_block_gui):
+
+       def __init__(self, decim=160):
+               grc_wxgui.top_block_gui.__init__(self, title="LRIT Receiver (from capture file)")
+
+               ##################################################
+               # Parameters
+               ##################################################
+               self.decim = decim
+
+               ##################################################
+               # Variables
+               ##################################################
+               self.config_filename = config_filename = os.environ['HOME']+'/.gnuradio/config.conf'
+               self.symbol_rate = symbol_rate = 293e3
+               self._saved_gain_mu_config = ConfigParser.ConfigParser()
+               self._saved_gain_mu_config.read(config_filename)
+               try: saved_gain_mu = self._saved_gain_mu_config.getfloat('usrp_rx_lrit', 'gain_mu')
+               except: saved_gain_mu = 0.2
+               self.saved_gain_mu = saved_gain_mu
+               self._saved_costas_alpha_config = ConfigParser.ConfigParser()
+               self._saved_costas_alpha_config.read(config_filename)
+               try: saved_costas_alpha = self._saved_costas_alpha_config.getfloat('usrp_rx_lrit', 'costas_alpha')
+               except: saved_costas_alpha = 0.2
+               self.saved_costas_alpha = saved_costas_alpha
+               self.sample_rate = sample_rate = 64e6/decim
+               self.sps = sps = sample_rate/symbol_rate
+               self.gain_mu = gain_mu = saved_gain_mu
+               self.costas_alpha = costas_alpha = saved_costas_alpha
+
+               ##################################################
+               # Notebooks
+               ##################################################
+               self.displays = wx.Notebook(self.GetWin(), style=wx.NB_TOP)
+               self.displays.AddPage(grc_wxgui.Panel(self.displays), "USRP RX")
+               self.displays.AddPage(grc_wxgui.Panel(self.displays), "RRC Filter")
+               self.displays.AddPage(grc_wxgui.Panel(self.displays), "PLL")
+               self.displays.AddPage(grc_wxgui.Panel(self.displays), "MM")
+               self.GridAdd(self.displays, 1, 0, 1, 2)
+
+               ##################################################
+               # Controls
+               ##################################################
+               _gain_mu_sizer = wx.BoxSizer(wx.VERTICAL)
+               self._gain_mu_text_box = forms.text_box(
+                       parent=self.GetWin(),
+                       sizer=_gain_mu_sizer,
+                       value=self.gain_mu,
+                       callback=self.set_gain_mu,
+                       label="Gain Mu",
+                       converter=forms.float_converter(),
+                       proportion=0,
+               )
+               self._gain_mu_slider = forms.slider(
+                       parent=self.GetWin(),
+                       sizer=_gain_mu_sizer,
+                       value=self.gain_mu,
+                       callback=self.set_gain_mu,
+                       minimum=0,
+                       maximum=0.5,
+                       num_steps=100,
+                       style=wx.SL_HORIZONTAL,
+                       cast=float,
+                       proportion=1,
+               )
+               self.GridAdd(_gain_mu_sizer, 0, 1, 1, 1)
+               _costas_alpha_sizer = wx.BoxSizer(wx.VERTICAL)
+               self._costas_alpha_text_box = forms.text_box(
+                       parent=self.GetWin(),
+                       sizer=_costas_alpha_sizer,
+                       value=self.costas_alpha,
+                       callback=self.set_costas_alpha,
+                       label="Costas Alpha",
+                       converter=forms.float_converter(),
+                       proportion=0,
+               )
+               self._costas_alpha_slider = forms.slider(
+                       parent=self.GetWin(),
+                       sizer=_costas_alpha_sizer,
+                       value=self.costas_alpha,
+                       callback=self.set_costas_alpha,
+                       minimum=0,
+                       maximum=0.5,
+                       num_steps=100,
+                       style=wx.SL_HORIZONTAL,
+                       cast=float,
+                       proportion=1,
+               )
+               self.GridAdd(_costas_alpha_sizer, 0, 0, 1, 1)
+
+               ##################################################
+               # Blocks
+               ##################################################
+               self.costas = gr.costas_loop_cc(costas_alpha, (costas_alpha**2)/4.0, 50e-6*sps, -50e-6*sps, 2)
+               self.costas_spectrum = fftsink2.fft_sink_c(
+                       self.displays.GetPage(2).GetWin(),
+                       baseband_freq=0,
+                       y_per_div=10,
+                       y_divs=10,
+                       ref_level=-15,
+                       ref_scale=2.0,
+                       sample_rate=sample_rate,
+                       fft_size=1024,
+                       fft_rate=30,
+                       average=True,
+                       avg_alpha=None,
+                       title="PLL Spectrum",
+                       peak_hold=False,
+                       win=window.hanning,
+               )
+               self.displays.GetPage(2).GridAdd(self.costas_spectrum.win, 0, 0, 1, 1)
+               self.costas_spectrum_0 = fftsink2.fft_sink_c(
+                       self.displays.GetPage(3).GetWin(),
+                       baseband_freq=0,
+                       y_per_div=10,
+                       y_divs=10,
+                       ref_level=-15,
+                       ref_scale=2.0,
+                       sample_rate=symbol_rate,
+                       fft_size=1024,
+                       fft_rate=30,
+                       average=True,
+                       avg_alpha=None,
+                       title="Bit Sync Spectrum",
+                       peak_hold=False,
+                       win=window.hanning,
+               )
+               self.displays.GetPage(3).GridAdd(self.costas_spectrum_0.win, 0, 0, 1, 1)
+               self.costas_waveform = scopesink2.scope_sink_c(
+                       self.displays.GetPage(2).GetWin(),
+                       title="PLL Waveform",
+                       sample_rate=sample_rate,
+                       v_scale=0.5,
+                       v_offset=0,
+                       t_scale=20.0/sample_rate,
+                       ac_couple=False,
+                       xy_mode=False,
+                       num_inputs=1,
+               )
+               self.displays.GetPage(2).GridAdd(self.costas_waveform.win, 1, 0, 1, 1)
+               self.gr_agc_xx_0 = gr.agc_cc(1e-6, 1.0, 1.0/32767.0, 1.0)
+               self.gr_clock_recovery_mm_xx_0 = gr.clock_recovery_mm_cc(sps, (gain_mu**2)/4.0, 0.5, gain_mu, 50e-6)
+               self.gr_file_source_0 = gr.file_source(gr.sizeof_gr_complex*1, "lrit.dat", False)
+               self.gr_throttle_0 = gr.throttle(gr.sizeof_gr_complex*1, sample_rate)
+               self.mm_waveform = scopesink2.scope_sink_c(
+                       self.displays.GetPage(3).GetWin(),
+                       title="Constellation",
+                       sample_rate=symbol_rate,
+                       v_scale=0.5,
+                       v_offset=0,
+                       t_scale=20.0/symbol_rate,
+                       ac_couple=False,
+                       xy_mode=True,
+                       num_inputs=1,
+               )
+               self.displays.GetPage(3).GridAdd(self.mm_waveform.win, 1, 0, 1, 1)
+               self.rrc = gr.fir_filter_ccf(1, firdes.root_raised_cosine(
+                       1, sample_rate, symbol_rate, 0.25, int(11*sample_rate/symbol_rate)))
+               self.rrc_spectrum = fftsink2.fft_sink_c(
+                       self.displays.GetPage(1).GetWin(),
+                       baseband_freq=0,
+                       y_per_div=10,
+                       y_divs=10,
+                       ref_level=-15,
+                       ref_scale=2.0,
+                       sample_rate=sample_rate,
+                       fft_size=1024,
+                       fft_rate=30,
+                       average=True,
+                       avg_alpha=None,
+                       title="RRC Spectrum",
+                       peak_hold=False,
+                       win=window.hanning,
+               )
+               self.displays.GetPage(1).GridAdd(self.rrc_spectrum.win, 0, 0, 1, 1)
+               self.rx_spectrum = fftsink2.fft_sink_c(
+                       self.displays.GetPage(0).GetWin(),
+                       baseband_freq=0,
+                       y_per_div=5,
+                       y_divs=10,
+                       ref_level=50,
+                       ref_scale=2.0,
+                       sample_rate=sample_rate,
+                       fft_size=1024,
+                       fft_rate=15,
+                       average=True,
+                       avg_alpha=None,
+                       title="Baseband Spectrum",
+                       peak_hold=False,
+               )
+               self.displays.GetPage(0).GridAdd(self.rx_spectrum.win, 0, 0, 1, 1)
+               self.rx_waveform = scopesink2.scope_sink_c(
+                       self.displays.GetPage(0).GetWin(),
+                       title="Baseband Waveform",
+                       sample_rate=sample_rate,
+                       v_scale=0,
+                       v_offset=0,
+                       t_scale=20.0/sample_rate,
+                       ac_couple=False,
+                       xy_mode=False,
+                       num_inputs=1,
+               )
+               self.displays.GetPage(0).GridAdd(self.rx_waveform.win, 1, 0, 1, 1)
+               self.rx_waveform_0 = scopesink2.scope_sink_c(
+                       self.displays.GetPage(1).GetWin(),
+                       title="RRC Waveform",
+                       sample_rate=sample_rate,
+                       v_scale=0.5,
+                       v_offset=0,
+                       t_scale=20.0/sample_rate,
+                       ac_couple=False,
+                       xy_mode=False,
+                       num_inputs=1,
+               )
+               self.displays.GetPage(1).GridAdd(self.rx_waveform_0.win, 1, 0, 1, 1)
+
+               ##################################################
+               # Connections
+               ##################################################
+               self.connect((self.rrc, 0), (self.rx_waveform_0, 0))
+               self.connect((self.rrc, 0), (self.rrc_spectrum, 0))
+               self.connect((self.gr_agc_xx_0, 0), (self.rrc, 0))
+               self.connect((self.gr_throttle_0, 0), (self.rx_waveform, 0))
+               self.connect((self.gr_throttle_0, 0), (self.rx_spectrum, 0))
+               self.connect((self.gr_throttle_0, 0), (self.gr_agc_xx_0, 0))
+               self.connect((self.gr_file_source_0, 0), (self.gr_throttle_0, 0))
+               self.connect((self.rrc, 0), (self.costas, 0))
+               self.connect((self.costas, 0), (self.costas_spectrum, 0))
+               self.connect((self.costas, 0), (self.costas_waveform, 0))
+               self.connect((self.costas, 0), (self.gr_clock_recovery_mm_xx_0, 0))
+               self.connect((self.gr_clock_recovery_mm_xx_0, 0), (self.costas_spectrum_0, 0))
+               self.connect((self.gr_clock_recovery_mm_xx_0, 0), (self.mm_waveform, 0))
+
+       def set_decim(self, decim):
+               self.decim = decim
+               self.set_sample_rate(64e6/self.decim)
+
+       def set_config_filename(self, config_filename):
+               self.config_filename = config_filename
+               self._saved_costas_alpha_config = ConfigParser.ConfigParser()
+               self._saved_costas_alpha_config.read(self.config_filename)
+               if not self._saved_costas_alpha_config.has_section('usrp_rx_lrit'):
+                       self._saved_costas_alpha_config.add_section('usrp_rx_lrit')
+               self._saved_costas_alpha_config.set('usrp_rx_lrit', 'costas_alpha', str(self.costas_alpha))
+               self._saved_costas_alpha_config.write(open(self.config_filename, 'w'))
+               self._saved_gain_mu_config = ConfigParser.ConfigParser()
+               self._saved_gain_mu_config.read(self.config_filename)
+               if not self._saved_gain_mu_config.has_section('usrp_rx_lrit'):
+                       self._saved_gain_mu_config.add_section('usrp_rx_lrit')
+               self._saved_gain_mu_config.set('usrp_rx_lrit', 'gain_mu', str(self.gain_mu))
+               self._saved_gain_mu_config.write(open(self.config_filename, 'w'))
+
+       def set_symbol_rate(self, symbol_rate):
+               self.symbol_rate = symbol_rate
+               self.set_sps(self.sample_rate/self.symbol_rate)
+               self.costas_spectrum_0.set_sample_rate(self.symbol_rate)
+               self.mm_waveform.set_sample_rate(self.symbol_rate)
+               self.rrc.set_taps(firdes.root_raised_cosine(1, self.sample_rate, self.symbol_rate, 0.25, int(11*self.sample_rate/self.symbol_rate)))
+
+       def set_saved_gain_mu(self, saved_gain_mu):
+               self.saved_gain_mu = saved_gain_mu
+               self.set_gain_mu(self.saved_gain_mu)
+
+       def set_saved_costas_alpha(self, saved_costas_alpha):
+               self.saved_costas_alpha = saved_costas_alpha
+               self.set_costas_alpha(self.saved_costas_alpha)
+
+       def set_sample_rate(self, sample_rate):
+               self.sample_rate = sample_rate
+               self.set_sps(self.sample_rate/self.symbol_rate)
+               self.rx_spectrum.set_sample_rate(self.sample_rate)
+               self.rx_waveform.set_sample_rate(self.sample_rate)
+               self.costas_spectrum.set_sample_rate(self.sample_rate)
+               self.costas_waveform.set_sample_rate(self.sample_rate)
+               self.rrc_spectrum.set_sample_rate(self.sample_rate)
+               self.rx_waveform_0.set_sample_rate(self.sample_rate)
+               self.rrc.set_taps(firdes.root_raised_cosine(1, self.sample_rate, self.symbol_rate, 0.25, int(11*self.sample_rate/self.symbol_rate)))
+
+       def set_sps(self, sps):
+               self.sps = sps
+               self.gr_clock_recovery_mm_xx_0.set_omega(self.sps)
+
+       def set_gain_mu(self, gain_mu):
+               self.gain_mu = gain_mu
+               self._gain_mu_slider.set_value(self.gain_mu)
+               self._gain_mu_text_box.set_value(self.gain_mu)
+               self.gr_clock_recovery_mm_xx_0.set_gain_omega((self.gain_mu**2)/4.0)
+               self.gr_clock_recovery_mm_xx_0.set_gain_mu(self.gain_mu)
+               self._saved_gain_mu_config = ConfigParser.ConfigParser()
+               self._saved_gain_mu_config.read(self.config_filename)
+               if not self._saved_gain_mu_config.has_section('usrp_rx_lrit'):
+                       self._saved_gain_mu_config.add_section('usrp_rx_lrit')
+               self._saved_gain_mu_config.set('usrp_rx_lrit', 'gain_mu', str(self.gain_mu))
+               self._saved_gain_mu_config.write(open(self.config_filename, 'w'))
+
+       def set_costas_alpha(self, costas_alpha):
+               self.costas_alpha = costas_alpha
+               self._costas_alpha_slider.set_value(self.costas_alpha)
+               self._costas_alpha_text_box.set_value(self.costas_alpha)
+               self._saved_costas_alpha_config = ConfigParser.ConfigParser()
+               self._saved_costas_alpha_config.read(self.config_filename)
+               if not self._saved_costas_alpha_config.has_section('usrp_rx_lrit'):
+                       self._saved_costas_alpha_config.add_section('usrp_rx_lrit')
+               self._saved_costas_alpha_config.set('usrp_rx_lrit', 'costas_alpha', str(self.costas_alpha))
+               self._saved_costas_alpha_config.write(open(self.config_filename, 'w'))
+               self.costas.set_alpha(self.costas_alpha)
+               self.costas.set_beta((self.costas_alpha**2)/4.0)
+
+if __name__ == '__main__':
+       parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
+       parser.add_option("-d", "--decim", dest="decim", type="intx", default=160,
+               help="Set Decim [default=%default]")
+       (options, args) = parser.parse_args()
+       tb = file_rx_lrit(decim=options.decim)
+       tb.Run(True)
+
index 55fe397873ab5f59bf89c9563094016f16f01f45..aca10039a17d9f924d85aea5a2a702fc1825e4dd 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='ASCII'?>
 <flow_graph>
-  <timestamp>Sat Aug 29 11:26:03 2009</timestamp>
+  <timestamp>Wed Dec 16 09:47:16 2009</timestamp>
   <block>
     <key>options</key>
     <param>
       <key>category</key>
       <value>Custom</value>
     </param>
+    <param>
+      <key>run_options</key>
+      <value>prompt</value>
+    </param>
     <param>
       <key>run</key>
       <value>True</value>
@@ -56,7 +60,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>samp_rate</value>
+      <value>sample_rate</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -68,7 +72,7 @@
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(10, 81)</value>
+      <value>(245, 9)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -91,7 +95,7 @@
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(11, 148)</value>
+      <value>(351, 9)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
     <param>
       <key>value</key>
-      <value>samp_rate/symbol_rate</value>
+      <value>sample_rate/symbol_rate</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(12, 214)</value>
+      <value>(456, 9)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>variable_text_box</key>
+    <key>import</key>
     <param>
       <key>id</key>
-      <value>decim</value>
+      <value>import_0</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>label</key>
-      <value>Decim</value>
+      <key>import</key>
+      <value>import os</value>
     </param>
     <param>
-      <key>value</key>
-      <value>saved_decim</value>
+      <key>_coordinate</key>
+      <value>(9, 83)</value>
     </param>
     <param>
-      <key>converver</key>
-      <value>int_converter</value>
+      <key>_rotation</key>
+      <value>0</value>
     </param>
+  </block>
+  <block>
+    <key>variable</key>
     <param>
-      <key>formatter</key>
-      <value>None</value>
+      <key>id</key>
+      <value>config_filename</value>
     </param>
     <param>
-      <key>grid_pos</key>
-      <value>0, 0, 1, 1</value>
+      <key>_enabled</key>
+      <value>True</value>
     </param>
     <param>
-      <key>notebook</key>
-      <value></value>
+      <key>value</key>
+      <value>os.environ['HOME']+'/.gnuradio/config.conf'</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(243, 13)</value>
+      <value>(10, 142)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>wxgui_scopesink2</key>
+    <key>variable_text_box</key>
     <param>
       <key>id</key>
-      <value>wxgui_scopesink2_0</value>
+      <value>freq</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>type</key>
-      <value>complex</value>
-    </param>
-    <param>
-      <key>title</key>
-      <value>Waveform</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
-    </param>
-    <param>
-      <key>v_scale</key>
-      <value>0.5</value>
-    </param>
-    <param>
-      <key>t_scale</key>
-      <value>20.0/samp_rate</value>
+      <key>label</key>
+      <value>Frequency</value>
     </param>
     <param>
-      <key>ac_couple</key>
-      <value>False</value>
+      <key>value</key>
+      <value>saved_freq</value>
     </param>
     <param>
-      <key>xy_mode</key>
-      <value>True</value>
+      <key>converver</key>
+      <value>float_converter</value>
     </param>
     <param>
-      <key>num_inputs</key>
-      <value>1</value>
+      <key>formatter</key>
+      <value>None</value>
     </param>
     <param>
       <key>grid_pos</key>
-      <value>1, 0, 1, 1</value>
+      <value>0, 0, 1, 1</value>
     </param>
     <param>
       <key>notebook</key>
-      <value>displays, 0</value>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(434, 551)</value>
+      <value>(247, 149)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>gr_agc_xx</key>
+    <key>variable_config</key>
     <param>
       <key>id</key>
-      <value>gr_agc_xx_0</value>
+      <value>saved_freq</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
+    <param>
+      <key>value</key>
+      <value>1691e6</value>
+    </param>
     <param>
       <key>type</key>
-      <value>complex</value>
+      <value>real</value>
     </param>
     <param>
-      <key>rate</key>
-      <value>1e-6</value>
+      <key>config_file</key>
+      <value>config_filename</value>
     </param>
     <param>
-      <key>reference</key>
-      <value>1.0</value>
+      <key>section</key>
+      <value>'usrp_rx_lrit'</value>
     </param>
     <param>
-      <key>gain</key>
-      <value>1.0/32767.0</value>
+      <key>option</key>
+      <value>'freq'</value>
     </param>
     <param>
-      <key>max_gain</key>
-      <value>1.0</value>
+      <key>writeback</key>
+      <value>freq</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(261, 493)</value>
+      <value>(246, 299)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>root_raised_cosine_filter</key>
+    <key>variable_config</key>
     <param>
       <key>id</key>
-      <value>root_raised_cosine_filter_0</value>
+      <value>saved_offset</value>
     </param>
     <param>
       <key>_enabled</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>fir_filter_ccf</value>
-    </param>
-    <param>
-      <key>decim</key>
-      <value>1</value>
+      <value>True</value>
     </param>
     <param>
-      <key>interp</key>
-      <value>1</value>
+      <key>value</key>
+      <value>0</value>
     </param>
     <param>
-      <key>gain</key>
-      <value>1</value>
+      <key>type</key>
+      <value>real</value>
     </param>
     <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
+      <key>config_file</key>
+      <value>config_filename</value>
     </param>
     <param>
-      <key>sym_rate</key>
-      <value>symbol_rate</value>
+      <key>section</key>
+      <value>'usrp_rx_lrit'</value>
     </param>
     <param>
-      <key>alpha</key>
-      <value>0.5</value>
+      <key>option</key>
+      <value>'offset'</value>
     </param>
     <param>
-      <key>ntaps</key>
-      <value>50</value>
+      <key>writeback</key>
+      <value>offset</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(618, 373)</value>
+      <value>(406, 300)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>usrp_simple_source_x</key>
+    <key>variable_slider</key>
     <param>
       <key>id</key>
-      <value>usrp_simple_source_x_0</value>
+      <value>offset</value>
     </param>
     <param>
       <key>_enabled</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>complex</value>
+      <value>True</value>
     </param>
     <param>
-      <key>format</key>
-      <value></value>
+      <key>label</key>
+      <value>Offset</value>
     </param>
     <param>
-      <key>which</key>
-      <value>0</value>
+      <key>value</key>
+      <value>saved_offset</value>
     </param>
     <param>
-      <key>decimation</key>
-      <value>decim</value>
+      <key>min</key>
+      <value>-50e3</value>
     </param>
     <param>
-      <key>frequency</key>
-      <value>freq</value>
+      <key>max</key>
+      <value>50e3</value>
     </param>
     <param>
-      <key>lo_offset</key>
-      <value>float('inf')</value>
+      <key>num_steps</key>
+      <value>100</value>
     </param>
     <param>
-      <key>gain</key>
-      <value>gain</value>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
     </param>
     <param>
-      <key>side</key>
-      <value>B</value>
+      <key>converver</key>
+      <value>float_converter</value>
     </param>
     <param>
-      <key>rx_ant</key>
-      <value>RXA</value>
+      <key>grid_pos</key>
+      <value>0, 1, 1, 1</value>
     </param>
     <param>
-      <key>hb_filters</key>
+      <key>notebook</key>
       <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(11, 477)</value>
+      <value>(390, 149)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>wxgui_fftsink2</key>
+    <key>variable_slider</key>
     <param>
       <key>id</key>
-      <value>wxgui_fftsink2_0</value>
+      <value>costas_alpha</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>type</key>
-      <value>complex</value>
+      <key>label</key>
+      <value>Costas Alpha</value>
     </param>
     <param>
-      <key>title</key>
-      <value>Spectrum</value>
+      <key>value</key>
+      <value>saved_costas_alpha</value>
     </param>
     <param>
-      <key>samp_rate</key>
-      <value>samp_rate</value>
+      <key>min</key>
+      <value>0</value>
     </param>
     <param>
-      <key>baseband_freq</key>
-      <value>freq</value>
+      <key>max</key>
+      <value>0.5</value>
     </param>
     <param>
-      <key>y_per_div</key>
-      <value>10</value>
+      <key>num_steps</key>
+      <value>100</value>
     </param>
     <param>
-      <key>y_divs</key>
-      <value>10</value>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
     </param>
     <param>
-      <key>ref_level</key>
-      <value>50</value>
+      <key>converver</key>
+      <value>float_converter</value>
     </param>
     <param>
-      <key>fft_size</key>
-      <value>1024</value>
+      <key>grid_pos</key>
+      <value>1, 1, 1, 1</value>
     </param>
     <param>
-      <key>fft_rate</key>
-      <value>30</value>
+      <key>notebook</key>
+      <value></value>
     </param>
     <param>
-      <key>peak_hold</key>
-      <value>False</value>
+      <key>_coordinate</key>
+      <value>(813, 152)</value>
     </param>
     <param>
-      <key>average</key>
-      <value>False</value>
+      <key>_rotation</key>
+      <value>0</value>
     </param>
+  </block>
+  <block>
+    <key>variable_slider</key>
     <param>
-      <key>avg_alpha</key>
-      <value>0</value>
+      <key>id</key>
+      <value>gain_mu</value>
     </param>
     <param>
-      <key>grid_pos</key>
-      <value>0, 0, 1, 1</value>
+      <key>_enabled</key>
+      <value>True</value>
     </param>
     <param>
-      <key>notebook</key>
-      <value>displays, 0</value>
+      <key>label</key>
+      <value>Gain Mu</value>
     </param>
     <param>
-      <key>_coordinate</key>
-      <value>(434, 337)</value>
+      <key>value</key>
+      <value>saved_gain_mu</value>
     </param>
     <param>
-      <key>_rotation</key>
+      <key>min</key>
       <value>0</value>
     </param>
-  </block>
-  <block>
-    <key>gr_throttle</key>
     <param>
-      <key>id</key>
-      <value>gr_throttle_0</value>
+      <key>max</key>
+      <value>0.5</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>num_steps</key>
+      <value>100</value>
     </param>
     <param>
-      <key>type</key>
-      <value>complex</value>
+      <key>style</key>
+      <value>wx.SL_HORIZONTAL</value>
     </param>
     <param>
-      <key>samples_per_second</key>
-      <value>samp_rate</value>
+      <key>converver</key>
+      <value>float_converter</value>
     </param>
     <param>
-      <key>vlen</key>
-      <value>1</value>
+      <key>grid_pos</key>
+      <value>1, 2, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(181, 663)</value>
+      <value>(957, 151)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>wxgui_scopesink2</key>
+    <key>variable_config</key>
     <param>
       <key>id</key>
-      <value>wxgui_scopesink2_1</value>
+      <value>saved_gain</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>type</key>
-      <value>complex</value>
+      <key>value</key>
+      <value>33</value>
     </param>
     <param>
-      <key>title</key>
-      <value>Scope Plot</value>
+      <key>type</key>
+      <value>real</value>
+    </param>
+    <param>
+      <key>config_file</key>
+      <value>config_filename</value>
+    </param>
+    <param>
+      <key>section</key>
+      <value>'usrp_rx_lrit'</value>
+    </param>
+    <param>
+      <key>option</key>
+      <value>'gain'</value>
+    </param>
+    <param>
+      <key>writeback</key>
+      <value>gain</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(565, 300)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_config</key>
+    <param>
+      <key>id</key>
+      <value>saved_decim</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>160</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>int</value>
+    </param>
+    <param>
+      <key>config_file</key>
+      <value>config_filename</value>
+    </param>
+    <param>
+      <key>section</key>
+      <value>'usrp_rx_lrit'</value>
+    </param>
+    <param>
+      <key>option</key>
+      <value>'decim'</value>
+    </param>
+    <param>
+      <key>writeback</key>
+      <value>decim</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(725, 300)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_text_box</key>
+    <param>
+      <key>id</key>
+      <value>decim</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>label</key>
+      <value>Decim</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>saved_decim</value>
+    </param>
+    <param>
+      <key>converver</key>
+      <value>int_converter</value>
+    </param>
+    <param>
+      <key>formatter</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 2, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value></value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(672, 151)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_config</key>
+    <param>
+      <key>id</key>
+      <value>saved_costas_alpha</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+    <param>
+      <key>config_file</key>
+      <value>config_filename</value>
+    </param>
+    <param>
+      <key>section</key>
+      <value>'usrp_rx_lrit'</value>
+    </param>
+    <param>
+      <key>option</key>
+      <value>'costas_alpha'</value>
+    </param>
+    <param>
+      <key>writeback</key>
+      <value>costas_alpha</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(885, 298)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_config</key>
+    <param>
+      <key>id</key>
+      <value>saved_gain_mu</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>0.005</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>real</value>
+    </param>
+    <param>
+      <key>config_file</key>
+      <value>config_filename</value>
+    </param>
+    <param>
+      <key>section</key>
+      <value>'usrp_rx_lrit'</value>
+    </param>
+    <param>
+      <key>option</key>
+      <value>'gain_mu'</value>
+    </param>
+    <param>
+      <key>writeback</key>
+      <value>gain_mu</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1046, 298)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>variable_config</key>
+    <param>
+      <key>id</key>
+      <value>side</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>value</key>
+      <value>'A'</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>string</value>
+    </param>
+    <param>
+      <key>config_file</key>
+      <value>config_filename</value>
+    </param>
+    <param>
+      <key>section</key>
+      <value>'usrp_rx_lrit'</value>
+    </param>
+    <param>
+      <key>option</key>
+      <value>'side'</value>
+    </param>
+    <param>
+      <key>writeback</key>
+      <value>side</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1102, 152)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>gr_agc_xx</key>
+    <param>
+      <key>id</key>
+      <value>gr_agc_xx_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>rate</key>
+      <value>1e-6</value>
+    </param>
+    <param>
+      <key>reference</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>gain</key>
+      <value>1.0/32767.0</value>
+    </param>
+    <param>
+      <key>max_gain</key>
+      <value>1.0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(286, 729)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_scopesink2</key>
+    <param>
+      <key>id</key>
+      <value>rx_waveform</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>RX Waveform</value>
     </param>
     <param>
       <key>samp_rate</key>
-      <value>samp_rate</value>
+      <value>sample_rate</value>
     </param>
     <param>
       <key>v_scale</key>
-      <value>0.4</value>
+      <value>0</value>
+    </param>
+    <param>
+      <key>v_offset</key>
+      <value>0</value>
     </param>
     <param>
       <key>t_scale</key>
-      <value>20.0/samp_rate</value>
+      <value>20.0/sample_rate</value>
     </param>
     <param>
       <key>ac_couple</key>
     </param>
     <param>
       <key>xy_mode</key>
-      <value>True</value>
+      <value>False</value>
     </param>
     <param>
       <key>num_inputs</key>
       <value>1</value>
     </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>1, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(281, 862)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>wxgui_fftsink2</key>
+    <param>
+      <key>id</key>
+      <value>rx_spectrum</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>RX Spectrum</value>
+    </param>
+    <param>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
+    </param>
+    <param>
+      <key>baseband_freq</key>
+      <value>freq</value>
+    </param>
+    <param>
+      <key>y_per_div</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>y_divs</key>
+      <value>10</value>
+    </param>
+    <param>
+      <key>ref_level</key>
+      <value>50</value>
+    </param>
+    <param>
+      <key>ref_scale</key>
+      <value>2.0</value>
+    </param>
+    <param>
+      <key>fft_size</key>
+      <value>1024</value>
+    </param>
+    <param>
+      <key>fft_rate</key>
+      <value>30</value>
+    </param>
+    <param>
+      <key>peak_hold</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>average</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>avg_alpha</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
     <param>
       <key>grid_pos</key>
       <value>0, 0, 1, 1</value>
     </param>
     <param>
       <key>notebook</key>
-      <value>displays, 1</value>
+      <value>displays, 0</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(1126, 251)</value>
+      <value>(280, 468)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>root_raised_cosine_filter</key>
+    <param>
+      <key>id</key>
+      <value>root_raised_cosine_filter_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>fir_filter_ccf</value>
+    </param>
+    <param>
+      <key>decim</key>
+      <value>1</value>
     </param>
     <param>
-      <key>_rotation</key>
-      <value>0</value>
+      <key>interp</key>
+      <value>1</value>
     </param>
-  </block>
-  <block>
-    <key>gr_probe_mpsk_snr_c</key>
     <param>
-      <key>id</key>
-      <value>gr_probe_mpsk_snr_c_0</value>
+      <key>gain</key>
+      <value>1</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
     </param>
     <param>
-      <key>type</key>
-      <value>snr</value>
+      <key>sym_rate</key>
+      <value>symbol_rate</value>
     </param>
     <param>
       <key>alpha</key>
-      <value>0.0001</value>
+      <value>0.25</value>
     </param>
     <param>
-      <key>probe_rate</key>
-      <value>10</value>
+      <key>ntaps</key>
+      <value>int(11*sample_rate/symbol_rate)</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(1126, 723)</value>
+      <value>(472, 713)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>wxgui_numbersink2</key>
+    <key>wxgui_scopesink2</key>
     <param>
       <key>id</key>
-      <value>wxgui_numbersink2_0</value>
+      <value>rrc_waveform</value>
     </param>
     <param>
       <key>_enabled</key>
     </param>
     <param>
       <key>type</key>
-      <value>float</value>
+      <value>complex</value>
     </param>
     <param>
       <key>title</key>
-      <value>SNR</value>
-    </param>
-    <param>
-      <key>units</key>
-      <value>dB</value>
+      <value>RRC Waveform</value>
     </param>
     <param>
       <key>samp_rate</key>
-      <value>10</value>
-    </param>
-    <param>
-      <key>min_value</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>max_value</key>
-      <value>30</value>
+      <value>sample_rate</value>
     </param>
     <param>
-      <key>factor</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>decimal_places</key>
-      <value>1</value>
+      <key>v_scale</key>
+      <value>0.5</value>
     </param>
     <param>
-      <key>ref_level</key>
+      <key>v_offset</key>
       <value>0</value>
     </param>
     <param>
-      <key>number_rate</key>
-      <value>10</value>
+      <key>t_scale</key>
+      <value>20.0/sample_rate</value>
     </param>
     <param>
-      <key>peak_hold</key>
+      <key>ac_couple</key>
       <value>False</value>
     </param>
     <param>
-      <key>average</key>
+      <key>xy_mode</key>
       <value>False</value>
     </param>
     <param>
-      <key>avg_alpha</key>
-      <value>0</value>
+      <key>num_inputs</key>
+      <value>1</value>
     </param>
     <param>
-      <key>show_gauge</key>
-      <value>True</value>
+      <key>win_size</key>
+      <value></value>
     </param>
     <param>
       <key>grid_pos</key>
-      <value>2, 0, 1, 1</value>
+      <value>1, 0, 1, 1</value>
     </param>
     <param>
       <key>notebook</key>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(1335, 651)</value>
+      <value>(768, 866)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>gr_mpsk_receiver_cc</key>
+    <key>wxgui_fftsink2</key>
     <param>
       <key>id</key>
-      <value>gr_mpsk_receiver_cc_0</value>
+      <value>rrc_spectrum</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>M</key>
-      <value>2</value>
+      <key>type</key>
+      <value>complex</value>
     </param>
     <param>
-      <key>theta</key>
-      <value>0</value>
+      <key>title</key>
+      <value>RRC Spectrum</value>
     </param>
     <param>
-      <key>alpha</key>
-      <value>costas_alpha</value>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
     </param>
     <param>
-      <key>beta</key>
-      <value>costas_alpha*costas_alpha/4.0</value>
+      <key>baseband_freq</key>
+      <value>freq+offset</value>
     </param>
     <param>
-      <key>fmin</key>
-      <value>-0.05</value>
+      <key>y_per_div</key>
+      <value>10</value>
     </param>
     <param>
-      <key>fmax</key>
-      <value>0.05</value>
+      <key>y_divs</key>
+      <value>10</value>
     </param>
     <param>
-      <key>mu</key>
-      <value>0.5</value>
+      <key>ref_level</key>
+      <value>-15</value>
     </param>
     <param>
-      <key>gain_mu</key>
-      <value>gain_mu</value>
+      <key>ref_scale</key>
+      <value>2.0</value>
     </param>
     <param>
-      <key>omega</key>
-      <value>sps</value>
+      <key>fft_size</key>
+      <value>1024</value>
     </param>
     <param>
-      <key>gain_omega</key>
-      <value>gain_mu*gain_mu/4.0</value>
+      <key>fft_rate</key>
+      <value>15</value>
     </param>
     <param>
-      <key>omega_relative_limit</key>
-      <value>0.05</value>
+      <key>peak_hold</key>
+      <value>False</value>
     </param>
     <param>
-      <key>_coordinate</key>
-      <value>(881, 437)</value>
+      <key>average</key>
+      <value>False</value>
     </param>
     <param>
-      <key>_rotation</key>
+      <key>avg_alpha</key>
       <value>0</value>
     </param>
-  </block>
-  <block>
-    <key>gr_complex_to_real</key>
     <param>
-      <key>id</key>
-      <value>gr_complex_to_real_0</value>
+      <key>win</key>
+      <value>None</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>win_size</key>
+      <value></value>
     </param>
     <param>
-      <key>vlen</key>
-      <value>1</value>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 1</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(1133, 521)</value>
+      <value>(767, 499)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>gr_char_to_float</key>
+    <key>gr_costas_loop_cc</key>
     <param>
       <key>id</key>
-      <value>gr_char_to_float_0</value>
+      <value>costas</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>_coordinate</key>
-      <value>(1523, 521)</value>
+      <key>alpha</key>
+      <value>costas_alpha</value>
     </param>
     <param>
-      <key>_rotation</key>
-      <value>0</value>
+      <key>beta</key>
+      <value>(costas_alpha**2.0)/4.0</value>
     </param>
-  </block>
-  <block>
-    <key>gr_binary_slicer_fb</key>
     <param>
-      <key>id</key>
-      <value>gr_binary_slicer_fb_0</value>
+      <key>max_freq</key>
+      <value>50e-6*sps</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>min_freq</key>
+      <value>-50e-6*sps</value>
+    </param>
+    <param>
+      <key>order</key>
+      <value>2</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(1343, 521)</value>
+      <value>(767, 721)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>gr_add_const_vxx</key>
+    <key>wxgui_fftsink2</key>
     <param>
       <key>id</key>
-      <value>gr_add_const_vxx_0</value>
+      <value>costas_spectrum</value>
     </param>
     <param>
       <key>_enabled</key>
     </param>
     <param>
       <key>type</key>
-      <value>float</value>
+      <value>complex</value>
     </param>
     <param>
-      <key>const</key>
-      <value>48.0</value>
+      <key>title</key>
+      <value>PLL Spectrum</value>
     </param>
     <param>
-      <key>vlen</key>
-      <value>1</value>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
     </param>
     <param>
-      <key>_coordinate</key>
-      <value>(1707, 517)</value>
+      <key>baseband_freq</key>
+      <value>freq+offset</value>
     </param>
     <param>
-      <key>_rotation</key>
-      <value>0</value>
+      <key>y_per_div</key>
+      <value>10</value>
     </param>
-  </block>
-  <block>
-    <key>gr_float_to_char</key>
     <param>
-      <key>id</key>
-      <value>gr_float_to_char_0</value>
+      <key>y_divs</key>
+      <value>10</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>ref_level</key>
+      <value>-15</value>
     </param>
     <param>
-      <key>_coordinate</key>
-      <value>(1878, 521)</value>
+      <key>ref_scale</key>
+      <value>2.0</value>
     </param>
     <param>
-      <key>_rotation</key>
-      <value>0</value>
+      <key>fft_size</key>
+      <value>1024</value>
     </param>
-  </block>
-  <block>
-    <key>gr_file_sink</key>
     <param>
-      <key>id</key>
-      <value>gr_file_sink_0</value>
+      <key>fft_rate</key>
+      <value>15</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>peak_hold</key>
+      <value>False</value>
     </param>
     <param>
-      <key>file</key>
-      <value>bits.dat</value>
+      <key>average</key>
+      <value>False</value>
     </param>
     <param>
-      <key>type</key>
-      <value>byte</value>
+      <key>avg_alpha</key>
+      <value>0</value>
     </param>
     <param>
-      <key>vlen</key>
-      <value>1</value>
+      <key>win</key>
+      <value>None</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
+    </param>
+    <param>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
+    </param>
+    <param>
+      <key>notebook</key>
+      <value>displays, 2</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(2059, 517)</value>
+      <value>(969, 502)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>gr_file_source</key>
+    <key>wxgui_fftsink2</key>
     <param>
       <key>id</key>
-      <value>gr_file_source_0</value>
+      <value>mm_spectrum</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
-    <param>
-      <key>file</key>
-      <value>lrit.dat</value>
-    </param>
     <param>
       <key>type</key>
       <value>complex</value>
     </param>
     <param>
-      <key>repeat</key>
-      <value>False</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
+      <key>title</key>
+      <value>Bit Sync Spectrum</value>
     </param>
     <param>
-      <key>_coordinate</key>
-      <value>(11, 655)</value>
+      <key>samp_rate</key>
+      <value>symbol_rate</value>
     </param>
     <param>
-      <key>_rotation</key>
+      <key>baseband_freq</key>
       <value>0</value>
     </param>
-  </block>
-  <block>
-    <key>notebook</key>
-    <param>
-      <key>id</key>
-      <value>displays</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.NB_TOP</value>
-    </param>
     <param>
-      <key>labels</key>
-      <value>['USRP RX', 'Costas Output']</value>
+      <key>y_per_div</key>
+      <value>10</value>
     </param>
     <param>
-      <key>grid_pos</key>
-      <value>2, 0, 1, 3</value>
+      <key>y_divs</key>
+      <value>10</value>
     </param>
     <param>
-      <key>notebook</key>
-      <value></value>
+      <key>ref_level</key>
+      <value>-15</value>
     </param>
     <param>
-      <key>_coordinate</key>
-      <value>(14, 351)</value>
+      <key>ref_scale</key>
+      <value>2.0</value>
     </param>
     <param>
-      <key>_rotation</key>
-      <value>0</value>
+      <key>fft_size</key>
+      <value>1024</value>
     </param>
-  </block>
-  <block>
-    <key>variable_config</key>
     <param>
-      <key>id</key>
-      <value>saved_decim</value>
+      <key>fft_rate</key>
+      <value>15</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>peak_hold</key>
+      <value>False</value>
     </param>
     <param>
-      <key>value</key>
-      <value>160</value>
+      <key>average</key>
+      <value>False</value>
     </param>
     <param>
-      <key>type</key>
-      <value>int</value>
+      <key>avg_alpha</key>
+      <value>0</value>
     </param>
     <param>
-      <key>config_file</key>
-      <value>config_filename</value>
+      <key>win</key>
+      <value>None</value>
     </param>
     <param>
-      <key>section</key>
-      <value>main</value>
+      <key>win_size</key>
+      <value></value>
     </param>
     <param>
-      <key>option</key>
-      <value>decim</value>
+      <key>grid_pos</key>
+      <value>0, 0, 1, 1</value>
     </param>
     <param>
-      <key>writeback</key>
-      <value>decim</value>
+      <key>notebook</key>
+      <value>displays, 3</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(246, 172)</value>
+      <value>(1225, 503)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>variable_slider</key>
+    <key>wxgui_scopesink2</key>
     <param>
       <key>id</key>
-      <value>gain</value>
+      <value>costas_waveform</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>type</key>
+      <value>complex</value>
+    </param>
+    <param>
+      <key>title</key>
+      <value>PLL Waveform</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>samp_rate</key>
+      <value>sample_rate</value>
     </param>
     <param>
-      <key>label</key>
-      <value>Gain</value>
+      <key>v_scale</key>
+      <value>0.5</value>
     </param>
     <param>
-      <key>value</key>
-      <value>saved_gain</value>
+      <key>v_offset</key>
+      <value>0</value>
     </param>
     <param>
-      <key>min</key>
-      <value>0</value>
+      <key>t_scale</key>
+      <value>20.0/sample_rate</value>
     </param>
     <param>
-      <key>max</key>
-      <value>115</value>
+      <key>ac_couple</key>
+      <value>False</value>
     </param>
     <param>
-      <key>num_steps</key>
-      <value>115</value>
+      <key>xy_mode</key>
+      <value>False</value>
     </param>
     <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
+      <key>num_inputs</key>
+      <value>1</value>
     </param>
     <param>
-      <key>converver</key>
-      <value>float_converter</value>
+      <key>win_size</key>
+      <value></value>
     </param>
     <param>
       <key>grid_pos</key>
-      <value>0, 1, 1, 1</value>
+      <value>1, 0, 1, 1</value>
     </param>
     <param>
       <key>notebook</key>
-      <value></value>
+      <value>displays, 2</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(411, 11)</value>
+      <value>(968, 852)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>variable_config</key>
+    <key>gr_clock_recovery_mm_xx</key>
     <param>
       <key>id</key>
-      <value>saved_gain</value>
+      <value>mm_sync</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>value</key>
-      <value>33</value>
+      <key>type</key>
+      <value>complex</value>
     </param>
     <param>
-      <key>type</key>
-      <value>real</value>
+      <key>omega</key>
+      <value>sps</value>
     </param>
     <param>
-      <key>config_file</key>
-      <value>config_filename</value>
+      <key>gain_omega</key>
+      <value>(gain_mu**2)/4.0</value>
     </param>
     <param>
-      <key>section</key>
-      <value>main</value>
+      <key>mu</key>
+      <value>0.5</value>
     </param>
     <param>
-      <key>option</key>
-      <value>gain</value>
+      <key>gain_mu</key>
+      <value>gain_mu</value>
     </param>
     <param>
-      <key>writeback</key>
-      <value>gain</value>
+      <key>omega_relative_limit</key>
+      <value>50e-6*sps</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(412, 172)</value>
+      <value>(969, 722)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>variable_slider</key>
+    <key>wxgui_scopesink2</key>
     <param>
       <key>id</key>
-      <value>freq</value>
+      <value>mm_const</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>label</key>
-      <value>Frequency</value>
+      <key>type</key>
+      <value>complex</value>
     </param>
     <param>
-      <key>value</key>
-      <value>saved_freq</value>
+      <key>title</key>
+      <value>Constellation</value>
     </param>
     <param>
-      <key>min</key>
-      <value>135e6</value>
+      <key>samp_rate</key>
+      <value>symbol_rate</value>
     </param>
     <param>
-      <key>max</key>
-      <value>139e6</value>
+      <key>v_scale</key>
+      <value>0.5</value>
     </param>
     <param>
-      <key>num_steps</key>
-      <value>400</value>
+      <key>v_offset</key>
+      <value>0</value>
     </param>
     <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
+      <key>t_scale</key>
+      <value>20.0/symbol_rate</value>
     </param>
     <param>
-      <key>converver</key>
-      <value>float_converter</value>
+      <key>ac_couple</key>
+      <value>False</value>
+    </param>
+    <param>
+      <key>xy_mode</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>num_inputs</key>
+      <value>1</value>
+    </param>
+    <param>
+      <key>win_size</key>
+      <value></value>
     </param>
     <param>
       <key>grid_pos</key>
-      <value>0, 2, 1, 1</value>
+      <value>1, 0, 1, 1</value>
     </param>
     <param>
       <key>notebook</key>
-      <value></value>
+      <value>displays, 3</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(574, 12)</value>
+      <value>(1225, 859)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>variable_config</key>
+    <key>notebook</key>
     <param>
       <key>id</key>
-      <value>saved_freq</value>
+      <value>displays</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>value</key>
-      <value>137e6</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>real</value>
-    </param>
-    <param>
-      <key>config_file</key>
-      <value>config_filename</value>
+      <key>style</key>
+      <value>wx.NB_TOP</value>
     </param>
     <param>
-      <key>section</key>
-      <value>main</value>
+      <key>labels</key>
+      <value>['USRP RX','RRC','PLL','Const']</value>
     </param>
     <param>
-      <key>option</key>
-      <value>freq</value>
+      <key>grid_pos</key>
+      <value>2, 0, 1, 3</value>
     </param>
     <param>
-      <key>writeback</key>
-      <value>freq</value>
+      <key>notebook</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(576, 170)</value>
+      <value>(10, 228)</value>
     </param>
     <param>
       <key>_rotation</key>
     <key>variable_slider</key>
     <param>
       <key>id</key>
-      <value>costas_alpha</value>
+      <value>gain</value>
     </param>
     <param>
       <key>_enabled</key>
     </param>
     <param>
       <key>label</key>
-      <value>Costas Alpha</value>
+      <value>Gain</value>
     </param>
     <param>
       <key>value</key>
-      <value>saved_costas_alpha</value>
+      <value>saved_gain</value>
     </param>
     <param>
       <key>min</key>
     </param>
     <param>
       <key>max</key>
-      <value>0.5</value>
+      <value>115</value>
     </param>
     <param>
       <key>num_steps</key>
-      <value>100</value>
+      <value>115</value>
     </param>
     <param>
       <key>style</key>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(738, 13)</value>
+      <value>(532, 150)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>variable_config</key>
+    <key>gr_throttle</key>
     <param>
       <key>id</key>
-      <value>saved_costas_alpha</value>
+      <value>gr_throttle_0</value>
     </param>
     <param>
       <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>value</key>
-      <value>0.005</value>
+      <value>False</value>
     </param>
     <param>
       <key>type</key>
-      <value>real</value>
-    </param>
-    <param>
-      <key>config_file</key>
-      <value>config_filename</value>
-    </param>
-    <param>
-      <key>section</key>
-      <value>main</value>
+      <value>complex</value>
     </param>
     <param>
-      <key>option</key>
-      <value>costas_alpha</value>
+      <key>samples_per_second</key>
+      <value>sample_rate</value>
     </param>
     <param>
-      <key>writeback</key>
-      <value>costas_alpha</value>
+      <key>vlen</key>
+      <value>1</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(739, 170)</value>
+      <value>(63, 859)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>variable_config</key>
+    <key>gr_file_source</key>
     <param>
       <key>id</key>
-      <value>saved_gain_mu</value>
+      <value>gr_file_source_0</value>
     </param>
     <param>
       <key>_enabled</key>
-      <value>True</value>
+      <value>False</value>
     </param>
     <param>
-      <key>value</key>
-      <value>0.005</value>
+      <key>file</key>
+      <value>lrit.dat</value>
     </param>
     <param>
       <key>type</key>
-      <value>real</value>
-    </param>
-    <param>
-      <key>config_file</key>
-      <value>config_filename</value>
-    </param>
-    <param>
-      <key>section</key>
-      <value>main</value>
+      <value>complex</value>
     </param>
     <param>
-      <key>option</key>
-      <value>gain_mu</value>
+      <key>repeat</key>
+      <value>False</value>
     </param>
     <param>
-      <key>writeback</key>
-      <value>gain_mu</value>
+      <key>vlen</key>
+      <value>1</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(900, 170)</value>
+      <value>(36, 943)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <block>
-    <key>variable_slider</key>
+    <key>usrp_simple_source_x</key>
     <param>
       <key>id</key>
-      <value>gain_mu</value>
+      <value>usrp_simple_source_x_0</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>label</key>
-      <value>Gain Mu</value>
+      <key>type</key>
+      <value>complex</value>
     </param>
     <param>
-      <key>value</key>
-      <value>saved_gain_mu</value>
+      <key>format</key>
+      <value></value>
     </param>
     <param>
-      <key>min</key>
+      <key>which</key>
       <value>0</value>
     </param>
     <param>
-      <key>max</key>
-      <value>0.5</value>
-    </param>
-    <param>
-      <key>num_steps</key>
-      <value>100</value>
-    </param>
-    <param>
-      <key>style</key>
-      <value>wx.SL_HORIZONTAL</value>
-    </param>
-    <param>
-      <key>converver</key>
-      <value>float_converter</value>
-    </param>
-    <param>
-      <key>grid_pos</key>
-      <value>1, 1, 1, 1</value>
+      <key>decimation</key>
+      <value>decim</value>
     </param>
     <param>
-      <key>notebook</key>
-      <value></value>
+      <key>frequency</key>
+      <value>freq+offset</value>
     </param>
     <param>
-      <key>_coordinate</key>
-      <value>(902, 13)</value>
+      <key>lo_offset</key>
+      <value>float('inf')</value>
     </param>
     <param>
-      <key>_rotation</key>
-      <value>0</value>
+      <key>gain</key>
+      <value>gain</value>
     </param>
-  </block>
-  <block>
-    <key>variable</key>
     <param>
-      <key>id</key>
-      <value>config_filename</value>
+      <key>side</key>
+      <value>side</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>rx_ant</key>
+      <value>RXA</value>
     </param>
     <param>
-      <key>value</key>
-      <value>"usrp_rx_lrit.cfg"</value>
+      <key>hb_filters</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(13, 283)</value>
+      <value>(19, 713)</value>
     </param>
     <param>
       <key>_rotation</key>
     </param>
   </block>
   <connection>
-    <source_block_id>usrp_simple_source_x_0</source_block_id>
-    <sink_block_id>gr_agc_xx_0</sink_block_id>
+    <source_block_id>gr_agc_xx_0</source_block_id>
+    <sink_block_id>root_raised_cosine_filter_0</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_agc_xx_0</source_block_id>
-    <sink_block_id>wxgui_scopesink2_0</sink_block_id>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>gr_agc_xx_0</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_throttle_0</source_block_id>
+    <source_block_id>usrp_simple_source_x_0</source_block_id>
     <sink_block_id>gr_agc_xx_0</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_probe_mpsk_snr_c_0</source_block_id>
-    <sink_block_id>wxgui_numbersink2_0</sink_block_id>
+    <source_block_id>usrp_simple_source_x_0</source_block_id>
+    <sink_block_id>rx_spectrum</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>0</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>rx_spectrum</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_mpsk_receiver_cc_0</source_block_id>
-    <sink_block_id>gr_probe_mpsk_snr_c_0</sink_block_id>
+    <source_block_id>usrp_simple_source_x_0</source_block_id>
+    <sink_block_id>rx_waveform</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_agc_xx_0</source_block_id>
-    <sink_block_id>gr_mpsk_receiver_cc_0</sink_block_id>
+    <source_block_id>gr_throttle_0</source_block_id>
+    <sink_block_id>rx_waveform</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_mpsk_receiver_cc_0</source_block_id>
-    <sink_block_id>wxgui_scopesink2_1</sink_block_id>
+    <source_block_id>root_raised_cosine_filter_0</source_block_id>
+    <sink_block_id>rrc_waveform</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_agc_xx_0</source_block_id>
-    <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+    <source_block_id>root_raised_cosine_filter_0</source_block_id>
+    <sink_block_id>rrc_spectrum</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_mpsk_receiver_cc_0</source_block_id>
-    <sink_block_id>gr_complex_to_real_0</sink_block_id>
+    <source_block_id>root_raised_cosine_filter_0</source_block_id>
+    <sink_block_id>costas</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_complex_to_real_0</source_block_id>
-    <sink_block_id>gr_binary_slicer_fb_0</sink_block_id>
+    <source_block_id>costas</source_block_id>
+    <sink_block_id>costas_spectrum</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_binary_slicer_fb_0</source_block_id>
-    <sink_block_id>gr_char_to_float_0</sink_block_id>
+    <source_block_id>costas</source_block_id>
+    <sink_block_id>costas_waveform</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_char_to_float_0</source_block_id>
-    <sink_block_id>gr_add_const_vxx_0</sink_block_id>
+    <source_block_id>costas</source_block_id>
+    <sink_block_id>mm_sync</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_add_const_vxx_0</source_block_id>
-    <sink_block_id>gr_float_to_char_0</sink_block_id>
+    <source_block_id>mm_sync</source_block_id>
+    <sink_block_id>mm_spectrum</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>gr_float_to_char_0</source_block_id>
-    <sink_block_id>gr_file_sink_0</sink_block_id>
+    <source_block_id>mm_sync</source_block_id>
+    <sink_block_id>mm_const</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
index bc313e3af08552771e6505142b04da8feb147a26..9a3d702008affd1a4dd8317d9df14c6cc137dc4e 100755 (executable)
@@ -2,19 +2,22 @@
 ##################################################
 # Gnuradio Python Flow Graph
 # Title: USRP LRIT Receiver
-# Generated: Sat Aug 29 11:26:03 2009
+# Generated: Wed Dec 16 09:49:15 2009
 ##################################################
 
+from gnuradio import eng_notation
 from gnuradio import gr
+from gnuradio import window
 from gnuradio.eng_option import eng_option
+from gnuradio.gr import firdes
 from gnuradio.wxgui import fftsink2
 from gnuradio.wxgui import forms
-from gnuradio.wxgui import numbersink2
 from gnuradio.wxgui import scopesink2
-from grc_gnuradio import blks2 as grc_blks2
+from grc_gnuradio import usrp as grc_usrp
 from grc_gnuradio import wxgui as grc_wxgui
 from optparse import OptionParser
 import ConfigParser
+import os
 import wx
 
 class usrp_rx_lrit(grc_wxgui.top_block_gui):
@@ -25,36 +28,47 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui):
                ##################################################
                # Variables
                ##################################################
-               self.config_filename = config_filename = "usrp_rx_lrit.cfg"
+               self.config_filename = config_filename = os.environ['HOME']+'/.gnuradio/config.conf'
                self._saved_decim_config = ConfigParser.ConfigParser()
                self._saved_decim_config.read(config_filename)
-               try: saved_decim = self._saved_decim_config.getint("main", "decim")
+               try: saved_decim = self._saved_decim_config.getint('usrp_rx_lrit', 'decim')
                except: saved_decim = 160
                self.saved_decim = saved_decim
                self.decim = decim = saved_decim
                self.symbol_rate = symbol_rate = 293e3
+               self._saved_offset_config = ConfigParser.ConfigParser()
+               self._saved_offset_config.read(config_filename)
+               try: saved_offset = self._saved_offset_config.getfloat('usrp_rx_lrit', 'offset')
+               except: saved_offset = 0
+               self.saved_offset = saved_offset
                self._saved_gain_mu_config = ConfigParser.ConfigParser()
                self._saved_gain_mu_config.read(config_filename)
-               try: saved_gain_mu = self._saved_gain_mu_config.getfloat("main", "gain_mu")
+               try: saved_gain_mu = self._saved_gain_mu_config.getfloat('usrp_rx_lrit', 'gain_mu')
                except: saved_gain_mu = 0.005
                self.saved_gain_mu = saved_gain_mu
                self._saved_gain_config = ConfigParser.ConfigParser()
                self._saved_gain_config.read(config_filename)
-               try: saved_gain = self._saved_gain_config.getfloat("main", "gain")
+               try: saved_gain = self._saved_gain_config.getfloat('usrp_rx_lrit', 'gain')
                except: saved_gain = 33
                self.saved_gain = saved_gain
                self._saved_freq_config = ConfigParser.ConfigParser()
                self._saved_freq_config.read(config_filename)
-               try: saved_freq = self._saved_freq_config.getfloat("main", "freq")
-               except: saved_freq = 137e6
+               try: saved_freq = self._saved_freq_config.getfloat('usrp_rx_lrit', 'freq')
+               except: saved_freq = 1691e6
                self.saved_freq = saved_freq
                self._saved_costas_alpha_config = ConfigParser.ConfigParser()
                self._saved_costas_alpha_config.read(config_filename)
-               try: saved_costas_alpha = self._saved_costas_alpha_config.getfloat("main", "costas_alpha")
+               try: saved_costas_alpha = self._saved_costas_alpha_config.getfloat('usrp_rx_lrit', 'costas_alpha')
                except: saved_costas_alpha = 0.005
                self.saved_costas_alpha = saved_costas_alpha
-               self.samp_rate = samp_rate = 64e6/decim
-               self.sps = sps = samp_rate/symbol_rate
+               self.sample_rate = sample_rate = 64e6/decim
+               self.sps = sps = sample_rate/symbol_rate
+               self._side_config = ConfigParser.ConfigParser()
+               self._side_config.read(config_filename)
+               try: side = self._side_config.get('usrp_rx_lrit', 'side')
+               except: side = 'A'
+               self.side = side
+               self.offset = offset = saved_offset
                self.gain_mu = gain_mu = saved_gain_mu
                self.gain = gain = saved_gain
                self.freq = freq = saved_freq
@@ -65,7 +79,9 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui):
                ##################################################
                self.displays = wx.Notebook(self.GetWin(), style=wx.NB_TOP)
                self.displays.AddPage(grc_wxgui.Panel(self.displays), "USRP RX")
-               self.displays.AddPage(grc_wxgui.Panel(self.displays), "Costas Output")
+               self.displays.AddPage(grc_wxgui.Panel(self.displays), "RRC")
+               self.displays.AddPage(grc_wxgui.Panel(self.displays), "PLL")
+               self.displays.AddPage(grc_wxgui.Panel(self.displays), "Const")
                self.GridAdd(self.displays, 2, 0, 1, 3)
 
                ##################################################
@@ -78,7 +94,30 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui):
                        label="Decim",
                        converter=forms.int_converter(),
                )
-               self.GridAdd(self._decim_text_box, 0, 0, 1, 1)
+               self.GridAdd(self._decim_text_box, 0, 2, 1, 1)
+               _offset_sizer = wx.BoxSizer(wx.VERTICAL)
+               self._offset_text_box = forms.text_box(
+                       parent=self.GetWin(),
+                       sizer=_offset_sizer,
+                       value=self.offset,
+                       callback=self.set_offset,
+                       label="Offset",
+                       converter=forms.float_converter(),
+                       proportion=0,
+               )
+               self._offset_slider = forms.slider(
+                       parent=self.GetWin(),
+                       sizer=_offset_sizer,
+                       value=self.offset,
+                       callback=self.set_offset,
+                       minimum=-50e3,
+                       maximum=50e3,
+                       num_steps=100,
+                       style=wx.SL_HORIZONTAL,
+                       cast=float,
+                       proportion=1,
+               )
+               self.GridAdd(_offset_sizer, 0, 1, 1, 1)
                _gain_mu_sizer = wx.BoxSizer(wx.VERTICAL)
                self._gain_mu_text_box = forms.text_box(
                        parent=self.GetWin(),
@@ -101,7 +140,7 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui):
                        cast=float,
                        proportion=1,
                )
-               self.GridAdd(_gain_mu_sizer, 1, 1, 1, 1)
+               self.GridAdd(_gain_mu_sizer, 1, 2, 1, 1)
                _gain_sizer = wx.BoxSizer(wx.VERTICAL)
                self._gain_text_box = forms.text_box(
                        parent=self.GetWin(),
@@ -124,30 +163,15 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui):
                        cast=float,
                        proportion=1,
                )
-               self.GridAdd(_gain_sizer, 0, 1, 1, 1)
-               _freq_sizer = wx.BoxSizer(wx.VERTICAL)
+               self.GridAdd(_gain_sizer, 1, 0, 1, 1)
                self._freq_text_box = forms.text_box(
                        parent=self.GetWin(),
-                       sizer=_freq_sizer,
                        value=self.freq,
                        callback=self.set_freq,
                        label="Frequency",
                        converter=forms.float_converter(),
-                       proportion=0,
                )
-               self._freq_slider = forms.slider(
-                       parent=self.GetWin(),
-                       sizer=_freq_sizer,
-                       value=self.freq,
-                       callback=self.set_freq,
-                       minimum=135e6,
-                       maximum=139e6,
-                       num_steps=400,
-                       style=wx.SL_HORIZONTAL,
-                       cast=float,
-                       proportion=1,
-               )
-               self.GridAdd(_freq_sizer, 0, 2, 1, 1)
+               self.GridAdd(self._freq_text_box, 0, 0, 1, 1)
                _costas_alpha_sizer = wx.BoxSizer(wx.VERTICAL)
                self._costas_alpha_text_box = forms.text_box(
                        parent=self.GetWin(),
@@ -170,131 +194,193 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui):
                        cast=float,
                        proportion=1,
                )
-               self.GridAdd(_costas_alpha_sizer, 1, 0, 1, 1)
+               self.GridAdd(_costas_alpha_sizer, 1, 1, 1, 1)
 
                ##################################################
                # Blocks
                ##################################################
-               self.gr_add_const_vxx_0 = gr.add_const_vff((48.0, ))
+               self.costas = gr.costas_loop_cc(costas_alpha, (costas_alpha**2.0)/4.0, 50e-6*sps, -50e-6*sps, 2)
+               self.costas_spectrum = fftsink2.fft_sink_c(
+                       self.displays.GetPage(2).GetWin(),
+                       baseband_freq=freq+offset,
+                       y_per_div=10,
+                       y_divs=10,
+                       ref_level=-15,
+                       ref_scale=2.0,
+                       sample_rate=sample_rate,
+                       fft_size=1024,
+                       fft_rate=15,
+                       average=False,
+                       avg_alpha=None,
+                       title="PLL Spectrum",
+                       peak_hold=False,
+               )
+               self.displays.GetPage(2).GridAdd(self.costas_spectrum.win, 0, 0, 1, 1)
+               self.costas_waveform = scopesink2.scope_sink_c(
+                       self.displays.GetPage(2).GetWin(),
+                       title="PLL Waveform",
+                       sample_rate=sample_rate,
+                       v_scale=0.5,
+                       v_offset=0,
+                       t_scale=20.0/sample_rate,
+                       ac_couple=False,
+                       xy_mode=False,
+                       num_inputs=1,
+               )
+               self.displays.GetPage(2).GridAdd(self.costas_waveform.win, 1, 0, 1, 1)
                self.gr_agc_xx_0 = gr.agc_cc(1e-6, 1.0, 1.0/32767.0, 1.0)
-               self.gr_binary_slicer_fb_0 = gr.binary_slicer_fb()
-               self.gr_char_to_float_0 = gr.char_to_float()
-               self.gr_complex_to_real_0 = gr.complex_to_real(1)
-               self.gr_file_sink_0 = gr.file_sink(gr.sizeof_char*1, "bits.dat")
-               self.gr_file_source_0 = gr.file_source(gr.sizeof_gr_complex*1, "lrit.dat", False)
-               self.gr_float_to_char_0 = gr.float_to_char()
-               self.gr_mpsk_receiver_cc_0 = gr.mpsk_receiver_cc(2, 0, costas_alpha, costas_alpha*costas_alpha/4.0, -0.05, 0.05, 0.5, gain_mu, sps, gain_mu*gain_mu/4.0, 0.05)
-               self.gr_probe_mpsk_snr_c_0 = grc_blks2.probe_mpsk_snr_c(
-                       type='snr',
-                       alpha=0.0001,
-                       probe_rate=10,
+               self.mm_const = scopesink2.scope_sink_c(
+                       self.displays.GetPage(3).GetWin(),
+                       title="Constellation",
+                       sample_rate=symbol_rate,
+                       v_scale=0.5,
+                       v_offset=0,
+                       t_scale=20.0/symbol_rate,
+                       ac_couple=False,
+                       xy_mode=True,
+                       num_inputs=1,
                )
-               self.gr_throttle_0 = gr.throttle(gr.sizeof_gr_complex*1, samp_rate)
-               self.wxgui_fftsink2_0 = fftsink2.fft_sink_c(
-                       self.displays.GetPage(0).GetWin(),
-                       baseband_freq=freq,
+               self.displays.GetPage(3).GridAdd(self.mm_const.win, 1, 0, 1, 1)
+               self.mm_spectrum = fftsink2.fft_sink_c(
+                       self.displays.GetPage(3).GetWin(),
+                       baseband_freq=0,
                        y_per_div=10,
                        y_divs=10,
-                       ref_level=50,
-                       sample_rate=samp_rate,
+                       ref_level=-15,
+                       ref_scale=2.0,
+                       sample_rate=symbol_rate,
                        fft_size=1024,
-                       fft_rate=30,
+                       fft_rate=15,
                        average=False,
                        avg_alpha=None,
-                       title="Spectrum",
+                       title="Bit Sync Spectrum",
                        peak_hold=False,
                )
-               self.displays.GetPage(0).GridAdd(self.wxgui_fftsink2_0.win, 0, 0, 1, 1)
-               self.wxgui_numbersink2_0 = numbersink2.number_sink_f(
+               self.displays.GetPage(3).GridAdd(self.mm_spectrum.win, 0, 0, 1, 1)
+               self.mm_sync = gr.clock_recovery_mm_cc(sps, (gain_mu**2)/4.0, 0.5, gain_mu, 50e-6*sps)
+               self.root_raised_cosine_filter_0 = gr.fir_filter_ccf(1, firdes.root_raised_cosine(
+                       1, sample_rate, symbol_rate, 0.25, int(11*sample_rate/symbol_rate)))
+               self.rrc_spectrum = fftsink2.fft_sink_c(
                        self.displays.GetPage(1).GetWin(),
-                       unit="dB",
-                       minval=0,
-                       maxval=30,
-                       factor=1.0,
-                       decimal_places=1,
-                       ref_level=0,
-                       sample_rate=10,
-                       number_rate=10,
+                       baseband_freq=freq+offset,
+                       y_per_div=10,
+                       y_divs=10,
+                       ref_level=-15,
+                       ref_scale=2.0,
+                       sample_rate=sample_rate,
+                       fft_size=1024,
+                       fft_rate=15,
                        average=False,
                        avg_alpha=None,
-                       label="SNR",
+                       title="RRC Spectrum",
                        peak_hold=False,
-                       show_gauge=True,
                )
-               self.displays.GetPage(1).GridAdd(self.wxgui_numbersink2_0.win, 2, 0, 1, 1)
-               self.wxgui_scopesink2_0 = scopesink2.scope_sink_c(
-                       self.displays.GetPage(0).GetWin(),
-                       title="Waveform",
-                       sample_rate=samp_rate,
+               self.displays.GetPage(1).GridAdd(self.rrc_spectrum.win, 0, 0, 1, 1)
+               self.rrc_waveform = scopesink2.scope_sink_c(
+                       self.displays.GetPage(1).GetWin(),
+                       title="RRC Waveform",
+                       sample_rate=sample_rate,
                        v_scale=0.5,
-                       t_scale=20.0/samp_rate,
+                       v_offset=0,
+                       t_scale=20.0/sample_rate,
                        ac_couple=False,
-                       xy_mode=True,
+                       xy_mode=False,
                        num_inputs=1,
                )
-               self.displays.GetPage(0).GridAdd(self.wxgui_scopesink2_0.win, 1, 0, 1, 1)
-               self.wxgui_scopesink2_1 = scopesink2.scope_sink_c(
-                       self.displays.GetPage(1).GetWin(),
-                       title="Scope Plot",
-                       sample_rate=samp_rate,
-                       v_scale=0.4,
-                       t_scale=20.0/samp_rate,
+               self.displays.GetPage(1).GridAdd(self.rrc_waveform.win, 1, 0, 1, 1)
+               self.rx_spectrum = fftsink2.fft_sink_c(
+                       self.displays.GetPage(0).GetWin(),
+                       baseband_freq=freq,
+                       y_per_div=10,
+                       y_divs=10,
+                       ref_level=50,
+                       ref_scale=2.0,
+                       sample_rate=sample_rate,
+                       fft_size=1024,
+                       fft_rate=30,
+                       average=False,
+                       avg_alpha=None,
+                       title="RX Spectrum",
+                       peak_hold=False,
+               )
+               self.displays.GetPage(0).GridAdd(self.rx_spectrum.win, 0, 0, 1, 1)
+               self.rx_waveform = scopesink2.scope_sink_c(
+                       self.displays.GetPage(0).GetWin(),
+                       title="RX Waveform",
+                       sample_rate=sample_rate,
+                       v_scale=0,
+                       v_offset=0,
+                       t_scale=20.0/sample_rate,
                        ac_couple=False,
-                       xy_mode=True,
+                       xy_mode=False,
                        num_inputs=1,
                )
-               self.displays.GetPage(1).GridAdd(self.wxgui_scopesink2_1.win, 0, 0, 1, 1)
+               self.displays.GetPage(0).GridAdd(self.rx_waveform.win, 1, 0, 1, 1)
+               self.usrp_simple_source_x_0 = grc_usrp.simple_source_c(which=0, side=side, rx_ant="RXA")
+               self.usrp_simple_source_x_0.set_decim_rate(decim)
+               self.usrp_simple_source_x_0.set_frequency(freq+offset, verbose=True)
+               self.usrp_simple_source_x_0.set_gain(gain)
 
                ##################################################
                # Connections
                ##################################################
-               self.connect((self.gr_agc_xx_0, 0), (self.wxgui_scopesink2_0, 0))
-               self.connect((self.gr_file_source_0, 0), (self.gr_throttle_0, 0))
-               self.connect((self.gr_throttle_0, 0), (self.gr_agc_xx_0, 0))
-               self.connect((self.gr_probe_mpsk_snr_c_0, 0), (self.wxgui_numbersink2_0, 0))
-               self.connect((self.gr_mpsk_receiver_cc_0, 0), (self.gr_probe_mpsk_snr_c_0, 0))
-               self.connect((self.gr_agc_xx_0, 0), (self.gr_mpsk_receiver_cc_0, 0))
-               self.connect((self.gr_mpsk_receiver_cc_0, 0), (self.wxgui_scopesink2_1, 0))
-               self.connect((self.gr_agc_xx_0, 0), (self.wxgui_fftsink2_0, 0))
-               self.connect((self.gr_mpsk_receiver_cc_0, 0), (self.gr_complex_to_real_0, 0))
-               self.connect((self.gr_complex_to_real_0, 0), (self.gr_binary_slicer_fb_0, 0))
-               self.connect((self.gr_binary_slicer_fb_0, 0), (self.gr_char_to_float_0, 0))
-               self.connect((self.gr_char_to_float_0, 0), (self.gr_add_const_vxx_0, 0))
-               self.connect((self.gr_add_const_vxx_0, 0), (self.gr_float_to_char_0, 0))
-               self.connect((self.gr_float_to_char_0, 0), (self.gr_file_sink_0, 0))
+               self.connect((self.gr_agc_xx_0, 0), (self.root_raised_cosine_filter_0, 0))
+               self.connect((self.usrp_simple_source_x_0, 0), (self.gr_agc_xx_0, 0))
+               self.connect((self.usrp_simple_source_x_0, 0), (self.rx_spectrum, 0))
+               self.connect((self.usrp_simple_source_x_0, 0), (self.rx_waveform, 0))
+               self.connect((self.root_raised_cosine_filter_0, 0), (self.rrc_waveform, 0))
+               self.connect((self.root_raised_cosine_filter_0, 0), (self.rrc_spectrum, 0))
+               self.connect((self.root_raised_cosine_filter_0, 0), (self.costas, 0))
+               self.connect((self.costas, 0), (self.costas_spectrum, 0))
+               self.connect((self.costas, 0), (self.costas_waveform, 0))
+               self.connect((self.costas, 0), (self.mm_sync, 0))
+               self.connect((self.mm_sync, 0), (self.mm_spectrum, 0))
+               self.connect((self.mm_sync, 0), (self.mm_const, 0))
 
        def set_config_filename(self, config_filename):
                self.config_filename = config_filename
-               self._saved_decim_config = ConfigParser.ConfigParser()
-               self._saved_decim_config.read(self.config_filename)
-               if not self._saved_decim_config.has_section("main"):
-                       self._saved_decim_config.add_section("main")
-               self._saved_decim_config.set("main", "decim", str(self.decim))
-               self._saved_decim_config.write(open(self.config_filename, 'w'))
-               self._saved_gain_config = ConfigParser.ConfigParser()
-               self._saved_gain_config.read(self.config_filename)
-               if not self._saved_gain_config.has_section("main"):
-                       self._saved_gain_config.add_section("main")
-               self._saved_gain_config.set("main", "gain", str(self.gain))
-               self._saved_gain_config.write(open(self.config_filename, 'w'))
                self._saved_freq_config = ConfigParser.ConfigParser()
                self._saved_freq_config.read(self.config_filename)
-               if not self._saved_freq_config.has_section("main"):
-                       self._saved_freq_config.add_section("main")
-               self._saved_freq_config.set("main", "freq", str(self.freq))
+               if not self._saved_freq_config.has_section('usrp_rx_lrit'):
+                       self._saved_freq_config.add_section('usrp_rx_lrit')
+               self._saved_freq_config.set('usrp_rx_lrit', 'freq', str(self.freq))
                self._saved_freq_config.write(open(self.config_filename, 'w'))
+               self._saved_offset_config = ConfigParser.ConfigParser()
+               self._saved_offset_config.read(self.config_filename)
+               if not self._saved_offset_config.has_section('usrp_rx_lrit'):
+                       self._saved_offset_config.add_section('usrp_rx_lrit')
+               self._saved_offset_config.set('usrp_rx_lrit', 'offset', str(self.offset))
+               self._saved_offset_config.write(open(self.config_filename, 'w'))
+               self._saved_gain_config = ConfigParser.ConfigParser()
+               self._saved_gain_config.read(self.config_filename)
+               if not self._saved_gain_config.has_section('usrp_rx_lrit'):
+                       self._saved_gain_config.add_section('usrp_rx_lrit')
+               self._saved_gain_config.set('usrp_rx_lrit', 'gain', str(self.gain))
+               self._saved_gain_config.write(open(self.config_filename, 'w'))
+               self._saved_decim_config = ConfigParser.ConfigParser()
+               self._saved_decim_config.read(self.config_filename)
+               if not self._saved_decim_config.has_section('usrp_rx_lrit'):
+                       self._saved_decim_config.add_section('usrp_rx_lrit')
+               self._saved_decim_config.set('usrp_rx_lrit', 'decim', str(self.decim))
+               self._saved_decim_config.write(open(self.config_filename, 'w'))
                self._saved_costas_alpha_config = ConfigParser.ConfigParser()
                self._saved_costas_alpha_config.read(self.config_filename)
-               if not self._saved_costas_alpha_config.has_section("main"):
-                       self._saved_costas_alpha_config.add_section("main")
-               self._saved_costas_alpha_config.set("main", "costas_alpha", str(self.costas_alpha))
+               if not self._saved_costas_alpha_config.has_section('usrp_rx_lrit'):
+                       self._saved_costas_alpha_config.add_section('usrp_rx_lrit')
+               self._saved_costas_alpha_config.set('usrp_rx_lrit', 'costas_alpha', str(self.costas_alpha))
                self._saved_costas_alpha_config.write(open(self.config_filename, 'w'))
                self._saved_gain_mu_config = ConfigParser.ConfigParser()
                self._saved_gain_mu_config.read(self.config_filename)
-               if not self._saved_gain_mu_config.has_section("main"):
-                       self._saved_gain_mu_config.add_section("main")
-               self._saved_gain_mu_config.set("main", "gain_mu", str(self.gain_mu))
+               if not self._saved_gain_mu_config.has_section('usrp_rx_lrit'):
+                       self._saved_gain_mu_config.add_section('usrp_rx_lrit')
+               self._saved_gain_mu_config.set('usrp_rx_lrit', 'gain_mu', str(self.gain_mu))
                self._saved_gain_mu_config.write(open(self.config_filename, 'w'))
+               self._side_config = ConfigParser.ConfigParser()
+               self._side_config.read(self.config_filename)
+               if not self._side_config.has_section('usrp_rx_lrit'):
+                       self._side_config.add_section('usrp_rx_lrit')
+               self._side_config.set('usrp_rx_lrit', 'side', str(self.side))
+               self._side_config.write(open(self.config_filename, 'w'))
 
        def set_saved_decim(self, saved_decim):
                self.saved_decim = saved_decim
@@ -302,18 +388,26 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui):
 
        def set_decim(self, decim):
                self.decim = decim
-               self.set_samp_rate(64e6/self.decim)
-               self._decim_text_box.set_value(self.decim)
+               self.set_sample_rate(64e6/self.decim)
                self._saved_decim_config = ConfigParser.ConfigParser()
                self._saved_decim_config.read(self.config_filename)
-               if not self._saved_decim_config.has_section("main"):
-                       self._saved_decim_config.add_section("main")
-               self._saved_decim_config.set("main", "decim", str(self.decim))
+               if not self._saved_decim_config.has_section('usrp_rx_lrit'):
+                       self._saved_decim_config.add_section('usrp_rx_lrit')
+               self._saved_decim_config.set('usrp_rx_lrit', 'decim', str(self.decim))
                self._saved_decim_config.write(open(self.config_filename, 'w'))
+               self._decim_text_box.set_value(self.decim)
+               self.usrp_simple_source_x_0.set_decim_rate(self.decim)
 
        def set_symbol_rate(self, symbol_rate):
                self.symbol_rate = symbol_rate
-               self.set_sps(self.samp_rate/self.symbol_rate)
+               self.set_sps(self.sample_rate/self.symbol_rate)
+               self.root_raised_cosine_filter_0.set_taps(firdes.root_raised_cosine(1, self.sample_rate, self.symbol_rate, 0.25, int(11*self.sample_rate/self.symbol_rate)))
+               self.mm_spectrum.set_sample_rate(self.symbol_rate)
+               self.mm_const.set_sample_rate(self.symbol_rate)
+
+       def set_saved_offset(self, saved_offset):
+               self.saved_offset = saved_offset
+               self.set_offset(self.saved_offset)
 
        def set_saved_gain_mu(self, saved_gain_mu):
                self.saved_gain_mu = saved_gain_mu
@@ -331,65 +425,95 @@ class usrp_rx_lrit(grc_wxgui.top_block_gui):
                self.saved_costas_alpha = saved_costas_alpha
                self.set_costas_alpha(self.saved_costas_alpha)
 
-       def set_samp_rate(self, samp_rate):
-               self.samp_rate = samp_rate
-               self.set_sps(self.samp_rate/self.symbol_rate)
-               self.wxgui_scopesink2_0.set_sample_rate(self.samp_rate)
-               self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate)
-               self.wxgui_scopesink2_1.set_sample_rate(self.samp_rate)
+       def set_sample_rate(self, sample_rate):
+               self.sample_rate = sample_rate
+               self.set_sps(self.sample_rate/self.symbol_rate)
+               self.rx_waveform.set_sample_rate(self.sample_rate)
+               self.rx_spectrum.set_sample_rate(self.sample_rate)
+               self.root_raised_cosine_filter_0.set_taps(firdes.root_raised_cosine(1, self.sample_rate, self.symbol_rate, 0.25, int(11*self.sample_rate/self.symbol_rate)))
+               self.rrc_waveform.set_sample_rate(self.sample_rate)
+               self.rrc_spectrum.set_sample_rate(self.sample_rate)
+               self.costas_spectrum.set_sample_rate(self.sample_rate)
+               self.costas_waveform.set_sample_rate(self.sample_rate)
 
        def set_sps(self, sps):
                self.sps = sps
-               self.gr_mpsk_receiver_cc_0.set_omega(self.sps)
+               self.mm_sync.set_omega(self.sps)
+
+       def set_side(self, side):
+               self.side = side
+               self._side_config = ConfigParser.ConfigParser()
+               self._side_config.read(self.config_filename)
+               if not self._side_config.has_section('usrp_rx_lrit'):
+                       self._side_config.add_section('usrp_rx_lrit')
+               self._side_config.set('usrp_rx_lrit', 'side', str(self.side))
+               self._side_config.write(open(self.config_filename, 'w'))
+
+       def set_offset(self, offset):
+               self.offset = offset
+               self._saved_offset_config = ConfigParser.ConfigParser()
+               self._saved_offset_config.read(self.config_filename)
+               if not self._saved_offset_config.has_section('usrp_rx_lrit'):
+                       self._saved_offset_config.add_section('usrp_rx_lrit')
+               self._saved_offset_config.set('usrp_rx_lrit', 'offset', str(self.offset))
+               self._saved_offset_config.write(open(self.config_filename, 'w'))
+               self._offset_slider.set_value(self.offset)
+               self._offset_text_box.set_value(self.offset)
+               self.rrc_spectrum.set_baseband_freq(self.freq+self.offset)
+               self.costas_spectrum.set_baseband_freq(self.freq+self.offset)
+               self.usrp_simple_source_x_0.set_frequency(self.freq+self.offset)
 
        def set_gain_mu(self, gain_mu):
                self.gain_mu = gain_mu
-               self.gr_mpsk_receiver_cc_0.set_gain_mu(self.gain_mu)
-               self.gr_mpsk_receiver_cc_0.set_gain_omega(self.gain_mu*self.gain_mu/4.0)
+               self._gain_mu_slider.set_value(self.gain_mu)
+               self._gain_mu_text_box.set_value(self.gain_mu)
                self._saved_gain_mu_config = ConfigParser.ConfigParser()
                self._saved_gain_mu_config.read(self.config_filename)
-               if not self._saved_gain_mu_config.has_section("main"):
-                       self._saved_gain_mu_config.add_section("main")
-               self._saved_gain_mu_config.set("main", "gain_mu", str(self.gain_mu))
+               if not self._saved_gain_mu_config.has_section('usrp_rx_lrit'):
+                       self._saved_gain_mu_config.add_section('usrp_rx_lrit')
+               self._saved_gain_mu_config.set('usrp_rx_lrit', 'gain_mu', str(self.gain_mu))
                self._saved_gain_mu_config.write(open(self.config_filename, 'w'))
-               self._gain_mu_slider.set_value(self.gain_mu)
-               self._gain_mu_text_box.set_value(self.gain_mu)
+               self.mm_sync.set_gain_omega((self.gain_mu**2)/4.0)
+               self.mm_sync.set_gain_mu(self.gain_mu)
 
        def set_gain(self, gain):
                self.gain = gain
-               self._gain_slider.set_value(self.gain)
-               self._gain_text_box.set_value(self.gain)
                self._saved_gain_config = ConfigParser.ConfigParser()
                self._saved_gain_config.read(self.config_filename)
-               if not self._saved_gain_config.has_section("main"):
-                       self._saved_gain_config.add_section("main")
-               self._saved_gain_config.set("main", "gain", str(self.gain))
+               if not self._saved_gain_config.has_section('usrp_rx_lrit'):
+                       self._saved_gain_config.add_section('usrp_rx_lrit')
+               self._saved_gain_config.set('usrp_rx_lrit', 'gain', str(self.gain))
                self._saved_gain_config.write(open(self.config_filename, 'w'))
+               self._gain_slider.set_value(self.gain)
+               self._gain_text_box.set_value(self.gain)
+               self.usrp_simple_source_x_0.set_gain(self.gain)
 
        def set_freq(self, freq):
                self.freq = freq
-               self.wxgui_fftsink2_0.set_baseband_freq(self.freq)
-               self._freq_slider.set_value(self.freq)
                self._freq_text_box.set_value(self.freq)
                self._saved_freq_config = ConfigParser.ConfigParser()
                self._saved_freq_config.read(self.config_filename)
-               if not self._saved_freq_config.has_section("main"):
-                       self._saved_freq_config.add_section("main")
-               self._saved_freq_config.set("main", "freq", str(self.freq))
+               if not self._saved_freq_config.has_section('usrp_rx_lrit'):
+                       self._saved_freq_config.add_section('usrp_rx_lrit')
+               self._saved_freq_config.set('usrp_rx_lrit', 'freq', str(self.freq))
                self._saved_freq_config.write(open(self.config_filename, 'w'))
+               self.rx_spectrum.set_baseband_freq(self.freq)
+               self.rrc_spectrum.set_baseband_freq(self.freq+self.offset)
+               self.costas_spectrum.set_baseband_freq(self.freq+self.offset)
+               self.usrp_simple_source_x_0.set_frequency(self.freq+self.offset)
 
        def set_costas_alpha(self, costas_alpha):
                self.costas_alpha = costas_alpha
-               self.gr_mpsk_receiver_cc_0.set_alpha(self.costas_alpha)
-               self.gr_mpsk_receiver_cc_0.set_beta(self.costas_alpha*self.costas_alpha/4.0)
                self._costas_alpha_slider.set_value(self.costas_alpha)
                self._costas_alpha_text_box.set_value(self.costas_alpha)
                self._saved_costas_alpha_config = ConfigParser.ConfigParser()
                self._saved_costas_alpha_config.read(self.config_filename)
-               if not self._saved_costas_alpha_config.has_section("main"):
-                       self._saved_costas_alpha_config.add_section("main")
-               self._saved_costas_alpha_config.set("main", "costas_alpha", str(self.costas_alpha))
+               if not self._saved_costas_alpha_config.has_section('usrp_rx_lrit'):
+                       self._saved_costas_alpha_config.add_section('usrp_rx_lrit')
+               self._saved_costas_alpha_config.set('usrp_rx_lrit', 'costas_alpha', str(self.costas_alpha))
                self._saved_costas_alpha_config.write(open(self.config_filename, 'w'))
+               self.costas.set_alpha(self.costas_alpha)
+               self.costas.set_beta((self.costas_alpha**2.0)/4.0)
 
 if __name__ == '__main__':
        parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
index 70845e08eb0b807b1022dc47cd27e67f726d4a0f..3dda72986fc5af262451a760393b3a7065938c80 100644 (file)
@@ -1 +1,2 @@
 Makefile.in
+Makefile
index b336cc7cec946a37f6a60672bb4dcaaa02d7ab55..604b402c5627803c8afa248759d7904e9cf013ef 100644 (file)
@@ -1,2 +1,3 @@
 /Makefile
 /Makefile.in
+/run_tests
index 1e8cf89ea9f57c15785e59dcbabc773f5526654a..4276e389ac7a98d27e91f74087b0261b41f078f4 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005,2007,2008 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007,2008,2010 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -218,7 +218,7 @@ class app_top_block(stdgui2.std_top_block):
                 self.myform['baseband'].set_value(r.baseband_freq)
                 self.myform['ddc'].set_value(r.dxc_freq)
            if not self.options.oscilloscope:
-               self.scope.win.set_baseband_freq(target_freq)
+               self.scope.set_baseband_freq(target_freq)
            return True
 
         return False
index 4aa70adab9e3bb9085136ca26a046a9e6edc4e61..ab7fb44622112d65ecdfe246d3efe8fe66e16001 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005,2007,2008 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007,2008,2010 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -255,7 +255,7 @@ class app_top_block(stdgui2.std_top_block):
                 self.myform['baseband'].set_value(r.baseband_freq)
                 self.myform['ddc'].set_value(r.dxc_freq)
            if not self.options.oscilloscope:
-               self.scope.win.set_baseband_freq(target_freq)
+               self.scope.set_baseband_freq(target_freq)
            return True
 
         return False
index d32b0ca0a631f07935c78654d70337bbf4e02328..0af64b826121badeca5745b27aaf7181b7c3d408 100644 (file)
@@ -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
 #
@@ -26,6 +26,7 @@ import common
 import numpy
 import gltext
 import math
+import struct
 
 LEGEND_LEFT_PAD = 7
 LEGEND_NUM_BLOCKS = 256
@@ -37,6 +38,9 @@ MIN_PADDING = 0, 60, 0, 0 #top, right, bottom, left
 
 ceil_log2 = lambda x: 2**int(math.ceil(math.log(x)/math.log(2)))
 
+pack_color   = lambda x: struct.unpack('I', struct.pack('BBBB', *x))[0]
+unpack_color = lambda x: struct.unpack('BBBB', struct.pack('I', int(x)))
+
 def _get_rbga(red_pts, green_pts, blue_pts, alpha_pts=[(0, 0), (1, 0)]):
        """
        Get an array of 256 rgba values where each index maps to a color.
@@ -53,11 +57,10 @@ def _get_rbga(red_pts, green_pts, blue_pts, alpha_pts=[(0, 0), (1, 0)]):
                        #linear interpolation
                        if x <= x2: return float(y1 - y2)/(x1 - x2)*(x - x1) + y1
                raise Exception
-       return [numpy.array(map(
-                       lambda pw: int(255*_fcn(i/255.0, pw)),
-                       (red_pts, green_pts, blue_pts, alpha_pts),
-               ), numpy.uint8).tostring() for i in range(0, 256)
-       ]
+       return numpy.array([pack_color(map(
+               lambda pw: int(255*_fcn(i/255.0, pw)),
+               (red_pts, green_pts, blue_pts, alpha_pts),
+       )) for i in range(0, 256)], numpy.uint32)
 
 COLORS = {
        'rgb1': _get_rbga( #http://www.ks.uiuc.edu/Research/vmd/vmd-1.7.1/ug/img47.gif
@@ -179,8 +182,8 @@ class waterfall_plotter(grid_plotter_base):
                block_height = float(legend_height)/LEGEND_NUM_BLOCKS
                x = self.width - self.padding_right + LEGEND_LEFT_PAD
                for i in range(LEGEND_NUM_BLOCKS):
-                       color = COLORS[self._color_mode][int(255*i/float(LEGEND_NUM_BLOCKS-1))]
-                       GL.glColor4f(*map(lambda c: ord(c)/255.0, color))
+                       color = unpack_color(COLORS[self._color_mode][int(255*i/float(LEGEND_NUM_BLOCKS-1))])
+                       GL.glColor4f(*numpy.array(color)/255.0)
                        y = self.height - (i+1)*block_height - self.padding_bottom
                        self._draw_rect(x, y, LEGEND_WIDTH, block_height)
                #draw rectangle around color scale border
@@ -261,7 +264,7 @@ class waterfall_plotter(grid_plotter_base):
                samples = numpy.clip(samples, 0, 255) #clip
                samples = numpy.array(samples, numpy.uint8)
                #convert the samples to RGBA data
-               data = numpy.choose(samples, COLORS[self._color_mode]).tostring()
+               data = COLORS[self._color_mode][samples].tostring()
                self._buffer.append(data)
                self._waterfall_cache.changed(True)
                self.unlock()
index bfe66bb00bcdf8f4e7a4491f1f4e2875174e3861..2a036c3fdbbe76a0ecde8898956d39b5f6d467a1 100644 (file)
@@ -40,7 +40,7 @@
        </sink>
        <sink>
                <name>ctrl</name>
-               <type>$type</type>
+               <type>byte</type>
        </sink>
        <source>
                <name>out</name>
index febb112ad3a1f4404b71574c1b1e5394e440240f..e04bc8fcb587589effbc2bcfef2fc61085bfba69 100644 (file)
@@ -65,7 +65,7 @@ class FileParam(EntryParam):
                file_dialog.set_local_only(True)
                if gtk.RESPONSE_OK == file_dialog.run(): #run the dialog
                        file_path = file_dialog.get_filename() #get the file path
-                       self.entry.set_text(file_path)
+                       self._input.set_text(file_path)
                        self._handle_changed()
                file_dialog.destroy() #destroy the dialog
 
index 7e1ab93876209ff03640c895d8495f9414f36ff1..ce0d909788184aecb66006be356db3b63a664737 100644 (file)
@@ -13,14 +13,14 @@ abs_top_builddir=@abs_top_builddir@
 # current QA srcdir
 export srcdir=$3
 
-# Where to find my swig generated shared library
-mylibdir=$2/src:$2/src/.libs:$2/src/lib:$2/src/lib/.libs:$2/swig:$2/swig/.libs
+# Where to find my C++ and swig generated shared libraries
+mylibdir=$2/src:$2/src/.libs:$2/src/lib:$2/src/lib/.libs:$2/lib:$2/lib/.libs:$2/swig:$2/swig/.libs
 
 # Where to find my swig generated python module
 mysrcdir=$1/src:$1/src/lib
 
 # Where to find my hand written python modules
-mypydir=$1/src:$1/src/python
+mypydir=$1/src:$1/src/python:$1/python
 
 # Where to find core's swig generated shared libraries,
 # and hand generated swig glue
index 3adad302d2ae40fba8df0dcedf6d57a6cfe9392e..0c834402d0e44f8fa4f70bec409bc85672fef007 100644 (file)
@@ -54,7 +54,6 @@ protected:
                             int &retN, double &retfreq);
   int  _compute_control_reg();
   int _refclk_divisor();
-  double _refclk_freq();
 
   bool _set_pga(float pga_gain);
 
index 85ef79bd38652d8dee07cd76553629cf1b9210e2..07ac2be3bc22e1cafc1479e5dee61e2d31b9c245 100644 (file)
@@ -177,12 +177,6 @@ flexrf_base::_refclk_divisor()
   return d_common->_refclk_divisor();
 }
 
-double
-flexrf_base::_refclk_freq()
-{
-  return 64e6/_refclk_divisor();
-}
-
 struct freq_result_t
 flexrf_base::set_freq(double freq)
 {
index 56a8486ce1aaddf59814d5e9dadcf3aeee5a2655..b35a9cb35d75222df2412dacd04c47c3e9308dd6 100644 (file)
 // Tx and Rx have shared defs, but different i/o regs
 #define ENABLE_5        (1 << 7)         // enables 5.0V power supply
 #define ENABLE_33       (1 << 6)         // enables 3.3V supply
-#define RX_TXN          (1 << 5)         // Tx only: T/R antenna switch for TX/RX port
-#define RX2_RX1N        (1 << 5)         // Rx only: antenna switch between RX2 and TX/RX port
+//#define RX_TXN          (1 << 15)         // Tx only: T/R antenna switch for TX/RX port
+//#define RX2_RX1N        (1 << 15)         // Rx only: antenna switch between RX2 and TX/RX port
+#define RX_TXN          ((1 << 5)|(1 << 15))         // Tx only: T/R antenna switch for TX/RX port
+#define RX2_RX1N        ((1 << 5)|(1 << 15))         // Rx only: antenna switch between RX2 and TX/RX port
 #define RXBB_EN         (1 << 4)
 #define TXMOD_EN        (1 << 4)
 #define PLL_CE          (1 << 3)
@@ -89,8 +91,8 @@ wbxng_base::set_freq(double freq)
   t.tv_nsec = 10000000;
   nanosleep(&t, NULL);
 
-  fprintf(stderr,"Setting WBXNG frequency, requested %d, obtained %f, lock_detect %d\n",
-          int_freq, freq_result, d_common->_get_locked());
+  //fprintf(stderr,"Setting WBXNG frequency, requested %d, obtained %f, lock_detect %d\n",
+  //        int_freq, freq_result, d_common->_get_locked());
 
   // FIXME
   // Offsetting the LO helps get the Tx carrier leakage out of the way.
@@ -159,11 +161,13 @@ wbxng_base_tx::wbxng_base_tx(usrp_basic_sptr _usrp, int which, int _power_on)
 
   d_common = new adf4350(_usrp, d_which, d_spi_enable);
 
-  // FIXME: power up the transmit side, but don't enable the mixer
+  // power up the transmit side, but don't enable the mixer
   usrp()->_write_oe(d_which,(RX_TXN|TXMOD_EN|ENABLE_33|ENABLE_5), (RX_TXN|TXMOD_EN|ENABLE_33|ENABLE_5));
-  usrp()->write_io(d_which, (power_on()|RX_TXN|TXMOD_EN|ENABLE_33|ENABLE_5), (RX_TXN|TXMOD_EN|ENABLE_33|ENABLE_5));
-  fprintf(stderr,"Setting WBXNG TXMOD on");
+  usrp()->write_io(d_which, (power_on()|RX_TXN|ENABLE_33|ENABLE_5), (RX_TXN|ENABLE_33|ENABLE_5));
   //set_lo_offset(4e6);
+  
+  // Disable VCO/PLL
+  d_common->_enable(true);
 
   set_gain((gain_min() + gain_max()) / 2.0);  // initialize gain
 }
@@ -183,11 +187,12 @@ wbxng_base_tx::shutdown()
     d_is_shutdown = true;
     // do whatever there is to do to shutdown
 
+    // Disable VCO/PLL
+    d_common->_enable(false);
+
     // Power down and leave the T/R switch in the R position
     usrp()->write_io(d_which, (power_off()|RX_TXN), (RX_TXN|ENABLE_33|ENABLE_5));
 
-    // Power down VCO/PLL
-    d_common->_enable(false);
 
     /*
     _write_control(_compute_control_reg());
@@ -202,9 +207,9 @@ wbxng_base_tx::set_auto_tr(bool on)
 {
   bool ok = true;
   if(on) {
-    ok &= set_atr_mask (RX_TXN | ENABLE_33 | ENABLE_5);
-    ok &= set_atr_txval(0      | ENABLE_33 | ENABLE_5);
-    ok &= set_atr_rxval(RX_TXN | 0);
+    ok &= set_atr_mask (RX_TXN | TXMOD_EN);
+    ok &= set_atr_txval(0      | TXMOD_EN);
+    ok &= set_atr_rxval(RX_TXN);
   }
   else {
     ok &= set_atr_mask (0);
@@ -222,12 +227,16 @@ wbxng_base_tx::set_enable(bool on)
   */
 
   int v;
-  int mask = RX_TXN | ENABLE_5 | ENABLE_33;
+  int mask = RX_TXN | TXMOD_EN;
   if(on) {
-    v = ENABLE_5 | ENABLE_33;
+    v = TXMOD_EN;
+    // Enable VCO/PLL
+    //d_common->_enable(true);
   }
   else {
     v = RX_TXN;
+    // Disable VCO/PLL
+    //d_common->_enable(false);
   }
   return usrp()->write_io(d_which, v, mask);
 }
@@ -235,19 +244,19 @@ wbxng_base_tx::set_enable(bool on)
 float
 wbxng_base_tx::gain_min()
 {
-  return usrp()->pga_max();
+  return 0.0;
 }
 
 float
 wbxng_base_tx::gain_max()
 {
-  return usrp()->pga_max() + 25.0;
+  return 25.0;
 }
 
 float
 wbxng_base_tx::gain_db_per_step()
 {
-  return 1;
+  return gain_max()/(1+(1.4-0.5)*4096/3.3);
 }
 
 bool
@@ -266,28 +275,22 @@ wbxng_base_tx::set_gain(float gain)
   float pga_gain, agc_gain;
   float V_maxgain, V_mingain, V_fullscale, dac_value;
 
-  float maxgain = gain_max() - usrp()->pga_max();
+  float maxgain = gain_max();
   float mingain = gain_min();
-  if(gain > maxgain) {
-    pga_gain = gain-maxgain;
-    assert(pga_gain <= usrp()->pga_max());
-    agc_gain = maxgain;
-  }
-  else {
-    pga_gain = 0;
-    agc_gain = gain;
-  }
+  pga_gain = 0;
+  agc_gain = gain;
 
-  V_maxgain = 0.7;
+  V_maxgain = 0.5;
   V_mingain = 1.4;
   V_fullscale = 3.3;
   dac_value = (agc_gain*(V_maxgain-V_mingain)/(maxgain-mingain) + V_mingain)*4096/V_fullscale;
 
-  fprintf(stderr, "TXGAIN: %f dB, Dac Code: %d, Voltage: %f\n", gain, int(dac_value), float((dac_value/4096.0)*V_fullscale));
+  //fprintf(stderr, "TXGAIN: %f dB, Dac Code: %d, Voltage: %f\n", gain, int(dac_value), float((dac_value/4096.0)*V_fullscale));
   assert(dac_value>=0 && dac_value<4096);
 
   return (usrp()->write_aux_dac(d_which, 0, int(dac_value))
-         && _set_pga(int(pga_gain)));
+     && _set_pga(usrp()->pga_max()));
+
 }
 
 
@@ -310,10 +313,13 @@ wbxng_base_rx::wbxng_base_rx(usrp_basic_sptr _usrp, int which, int _power_on)
   }
 
   d_common = new adf4350(_usrp, d_which, d_spi_enable);
+  
+  // Disable VCO/PLL
+  d_common->_enable(true);
 
   usrp()->_write_oe(d_which, (RX2_RX1N|RXBB_EN|ATTN_MASK|ENABLE_33|ENABLE_5), (RX2_RX1N|RXBB_EN|ATTN_MASK|ENABLE_33|ENABLE_5));
   usrp()->write_io(d_which,  (power_on()|RX2_RX1N|RXBB_EN|ENABLE_33|ENABLE_5), (RX2_RX1N|RXBB_EN|ATTN_MASK|ENABLE_33|ENABLE_5));
-  fprintf(stderr,"Setting WBXNG RXBB on");
+  //fprintf(stderr,"Setting WBXNG RXBB on");
 
   // set up for RX on TX/RX port
   select_rx_antenna("TX/RX");
@@ -339,9 +345,6 @@ wbxng_base_rx::shutdown()
     d_is_shutdown = true;
     // do whatever there is to do to shutdown
 
-    // Power down
-    usrp()->common_write_io(C_RX, d_which, power_off(), (ENABLE_33|ENABLE_5));
-
     // Power down VCO/PLL
     d_common->_enable(false);
 
@@ -354,6 +357,9 @@ wbxng_base_rx::shutdown()
     // fprintf(stderr, "wbxng_base_rx::shutdown  before set_auto_tr\n");
     set_auto_tr(false);
 
+    // Power down
+    usrp()->write_io(d_which, power_off(), (RX2_RX1N|RXBB_EN|ATTN_MASK|ENABLE_33|ENABLE_5));
+
     // fprintf(stderr, "wbxng_base_rx::shutdown  after set_auto_tr\n");
   }
 }
@@ -363,9 +369,9 @@ wbxng_base_rx::set_auto_tr(bool on)
 {
   bool ok = true;
   if(on) {
-    ok &= set_atr_mask (ENABLE_33|ENABLE_5);
-    ok &= set_atr_txval(     0);
-    ok &= set_atr_rxval(ENABLE_33|ENABLE_5);
+    ok &= set_atr_mask (RXBB_EN|RX2_RX1N);
+    ok &= set_atr_txval(      0|RX2_RX1N);
+    ok &= set_atr_rxval(RXBB_EN|       0);
   }
   else {
     ok &= set_atr_mask (0);
@@ -452,7 +458,7 @@ wbxng_base_rx::_set_attn(float attn)
 {
   int attn_code = int(floor(attn/0.5));
   unsigned int iobits = (~attn_code) << ATTN_SHIFT;
-  fprintf(stderr, "Attenuation: %f dB, Code: %d, IO Bits %x, Mask: %x \n", attn, attn_code, iobits & ATTN_MASK, ATTN_MASK);
+  //fprintf(stderr, "Attenuation: %f dB, Code: %d, IO Bits %x, Mask: %x \n", attn, attn_code, iobits & ATTN_MASK, ATTN_MASK);
   return usrp()->write_io(d_which, iobits, ATTN_MASK);
 }
 
index 2cec972b0fc82a0468e0e56963384853ba573220..c17e8d670faddaa04f89e8a8415c42a75c606dcc 100644 (file)
@@ -26,9 +26,9 @@
 #include <db_base_impl.h>
 #include <stdio.h>
 
+#define FREQ_C(freq) uint64_t(freq)
 #define INPUT_REF_FREQ FREQ_C(64e6)
 #define DIV_ROUND(num, denom) (((num) + ((denom)/2))/(denom))
-#define FREQ_C(freq) uint64_t(freq)
 #define INPUT_REF_FREQ_2X (2*INPUT_REF_FREQ)                            /* input ref freq with doubler turned on */
 #define MIN_INT_DIV uint16_t(23)                                        /* minimum int divider, prescaler 4/5 only */
 #define MAX_RF_DIV uint8_t(16)                                          /* max rf divider, divides rf output */
@@ -55,7 +55,7 @@ adf4350::adf4350(usrp_basic_sptr _usrp, int _which, int _spi_enable)
 
     /* Outputs */
     d_usrp->_write_oe(d_which, (CE_PIN | PDB_RF_PIN), (CE_PIN | PDB_RF_PIN));
-    d_usrp->write_io(d_which, (0), (CE_PIN | PDB_RF_PIN));
+    d_usrp->write_io(d_which, (CE_PIN), (CE_PIN | PDB_RF_PIN));
 
     /* Initialize the pin levels. */
     _enable(true);
@@ -70,6 +70,7 @@ adf4350::adf4350(usrp_basic_sptr _usrp, int _which, int _spi_enable)
 
 adf4350::~adf4350()
 {
+    d_usrp->write_io(d_which, (0), (CE_PIN | PDB_RF_PIN));
     delete d_regs;
 }
 
@@ -95,9 +96,9 @@ void
 adf4350::_enable(bool enable)
 {
     if (enable){ /* chip enable */
-        d_usrp->write_io(d_which, (CE_PIN | PDB_RF_PIN), (CE_PIN | PDB_RF_PIN));
+        d_usrp->write_io(d_which, (PDB_RF_PIN), (PDB_RF_PIN));
     }else{
-        d_usrp->write_io(d_which, 0, (CE_PIN | PDB_RF_PIN));
+        d_usrp->write_io(d_which, 0, (PDB_RF_PIN));
     }
 }
 
index 696b7c1d483a5ce481badbfd8b52eea188d39379..bc859158e71906b262878dd57c67f0114590c2a2 100644 (file)
@@ -11,7 +11,7 @@
 /* reg 1 */
 const uint16_t adf4350_regs::s_phase = 0;
 /* reg 2 */
-const uint8_t adf4350_regs::s_low_noise_and_low_spur_modes = 0;
+const uint8_t adf4350_regs::s_low_noise_and_low_spur_modes = 3;
 const uint8_t adf4350_regs::s_muxout = 6;
 const uint8_t adf4350_regs::s_reference_doubler = 0;
 const uint8_t adf4350_regs::s_rdiv2 = 0;
index 541dd3f570c52ad317a9b03e988b6164d843d1c7..fe5afabdb5357c4ee22ab87fe9f406fe81387b68 100644 (file)
@@ -1025,29 +1025,33 @@ usrp_standard_tx::set_tx_freq (int channel, double freq)
   coarse_mod_t cm;
   double       coarse;
 
-  assert (dac_rate () == 128000000);
+  double coarse_freq_1 = dac_rate () / 8; // First coarse frequency
+  double coarse_freq_2 = dac_rate () / 4; // Second coarse frequency
+  double coarse_limit_1 = coarse_freq_1 / 2; // Midpoint of [0 , freq1] range
+  double coarse_limit_2 = (coarse_freq_1 + coarse_freq_2) / 2; // Midpoint of [freq1 , freq2] range
+  double high_limit = (double)44e6/128e6*dac_rate (); // Highest meaningful frequency
 
-  if (freq < -44e6)            // too low
+  if (freq < -high_limit)              // too low
     return false;
-  else if (freq < -24e6){      // [-44, -24)
+  else if (freq < -coarse_limit_2){    // For 64MHz: [-44, -24)
     cm = CM_NEG_FDAC_OVER_4;
-    coarse = -dac_rate () / 4;
+    coarse = -coarse_freq_2;
   }
-  else if (freq < -8e6){       // [-24, -8)
+  else if (freq < -coarse_limit_1){    // For 64MHz: [-24, -8)
     cm = CM_NEG_FDAC_OVER_8;
-    coarse = -dac_rate () / 8;
+    coarse = -coarse_freq_1;
   }
-  else if (freq < 8e6){                // [-8, 8)
+  else if (freq < coarse_limit_1){             // For 64MHz: [-8, 8)
     cm = CM_OFF;
     coarse = 0;
   }
-  else if (freq < 24e6){       // [8, 24)
+  else if (freq < coarse_limit_2){     // For 64MHz: [8, 24)
     cm = CM_POS_FDAC_OVER_8;
-    coarse = dac_rate () / 8;
+    coarse = coarse_freq_1;
   }
-  else if (freq <= 44e6){      // [24, 44]
+  else if (freq <= high_limit){        // For 64MHz: [24, 44]
     cm = CM_POS_FDAC_OVER_4;
-    coarse = dac_rate () / 4;
+    coarse = coarse_freq_2;
   }
   else                         // too high
     return false;
index 5391863a5515647c3e4cbd758eaadd7af034fad9..1596fa00deab86dbffdcb1c6318a55c1ccc69c7f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2005,2007,2008 Free Software Foundation, Inc.
+# Copyright 2004,2005,2007,2008,2010 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -152,7 +152,7 @@ class app_top_block(stdgui2.std_top_block):
         if True:
             self.myform['freq'].set_value(target_freq)     # update displayed value
            if not self.options.waterfall and not self.options.oscilloscope:
-               self.scope.win.set_baseband_freq(target_freq)
+               self.scope.set_baseband_freq(target_freq)
            return True
 
         return False
index a74707634cd4c7c73ffc0d5320f2afe17a49a796..b19c6ecf196b333d6c078d64660d046713fc6545 100644 (file)
@@ -705,6 +705,7 @@ namespace usrp2 {
       cmd.eop.opcode = OP_EOP;
       cmd.eop.len = sizeof(cmd.eop);
 
+      d_dont_enqueue = false;
       bool success = false;
       pending_reply p(cmd.op.rid, &reply, sizeof(reply));
       success = transmit_cmd_and_wait(&cmd, sizeof(cmd), &p, DEF_CMD_TIMEOUT);
@@ -712,6 +713,8 @@ namespace usrp2 {
 
       if (success)
        d_channel_rings[channel] = ring_sptr(new ring(d_eth_buf->max_frames()));
+      else
+       d_dont_enqueue = true;
 
       return success;
     }
@@ -759,6 +762,7 @@ namespace usrp2 {
       cmd.eop.opcode = OP_EOP;
       cmd.eop.len = sizeof(cmd.eop);
 
+      d_dont_enqueue = false;
       bool success = false;
       pending_reply p(cmd.sync_op.rid, &reply, sizeof(reply));
       success = transmit_cmd_and_wait(&cmd, sizeof(cmd), &p, DEF_CMD_TIMEOUT);
@@ -766,6 +770,8 @@ namespace usrp2 {
 
       if (success)
        d_channel_rings[channel] = ring_sptr(new ring(d_eth_buf->max_frames()));
+      else
+       d_dont_enqueue = true;
 
       return success;
     }
index 0cfca04a1daade0cd432a9e8d4a6386e99bf6f14..b3333a72efea1728f39d45a85f01b629c8a539a7 100644 (file)
@@ -27,6 +27,9 @@
 
 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.
@@ -73,7 +76,17 @@ namespace vrt {
     bool trailer_p() const { return (header & VRTH_HAS_TRAILER) != 0 && data_p(); }
 
 
-    // parser
+    /*!
+     * \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
index 3a758eeac40b407e28412043ca7c02f18e9c5d30..303384c6e57dd452134e7322750c75b7a33ea801 100644 (file)
@@ -41,10 +41,10 @@ libvrt_la_LIBADD =
 # Private headers not needed for above the API development
 noinst_HEADERS = \
        data_handler.h \
-       expanded_header_cw_tables.h \
-       expanded_header_switch_body.h \
+       expanded_header_parse_switch_body.h \
+       expanded_header_unparse_switch_body.h \
        socket_rx_buffer.h
 
 EXTRA_DIST = \
-       gen_cw_tables.py \
-       gen_switch_body.py
+       gen_parse_switch_body.py \
+       gen_unparse_switch_body.py
index bd1d92e530ca2b0eac929cd85e78738ed3210265..8b22fb92549f845ab46d60b9a1cc455492d075ea 100644 (file)
@@ -57,8 +57,6 @@ namespace vrt {
   static const int HAS_FRACTIONAL_SECS = 1 << 3;
   static const int HAS_TRAILER         = 1 << 4;
 
-#include "expanded_header_cw_tables.h"
-
   static int
   compute_codeword(const expanded_header &h)
   {
@@ -71,6 +69,22 @@ namespace vrt {
     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
@@ -78,6 +92,8 @@ namespace vrt {
                        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;
 
@@ -99,18 +115,18 @@ namespace vrt {
     len = h->pkt_size();       // valid length of packet
 
     int cw = compute_codeword(*h);
-    if (cw_header_len(cw) + cw_trailer_len(cw) > len)
-      return false;            // negative payload len
+    switch (cw & 0x1f){
+#include "expanded_header_parse_switch_body.h"
+    }
 
-    *payload = p + cw_header_len(cw);
-    *n32_bit_words_payload = len - (cw_header_len(cw) + cw_trailer_len(cw));
+    if (n32_bit_words_header + n32_bit_words_trailer > len)
+      return false;            // negative payload len
 
-    // printf("parse: hdr = 0x%08x, cw = 0x%02x, cw_header_len(cw) = %d, cw_trailer_len(cw) = %d\n",
-    //   h->header, cw, cw_header_len(cw), cw_trailer_len(cw));
+    *payload = p + n32_bit_words_header;
+    *n32_bit_words_payload = len - (n32_bit_words_header + n32_bit_words_trailer);
 
-    switch (cw & 0x1f){
-#include "expanded_header_switch_body.h"
-    }
+    // 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;
   }
diff --git a/vrt/lib/expanded_header_cw_tables.h b/vrt/lib/expanded_header_cw_tables.h
deleted file mode 100644 (file)
index fbb9c6b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-inline static size_t cw_header_len(int cw){
-  static const size_t s_cw_header_len[32] = {
-    1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 
-  };
-  return s_cw_header_len[cw];
-}
-
-inline static size_t cw_trailer_len(int cw){
-  static const size_t s_cw_trailer_len[32] = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
-  };
-  return s_cw_trailer_len[cw];
-}
-
diff --git a/vrt/lib/expanded_header_parse_switch_body.h b/vrt/lib/expanded_header_parse_switch_body.h
new file mode 100644 (file)
index 0000000..6bfaf37
--- /dev/null
@@ -0,0 +1,320 @@
+  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_switch_body.h b/vrt/lib/expanded_header_switch_body.h
deleted file mode 100644 (file)
index 40e575c..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-  case 0:
-    h->stream_id = 0;
-    h->class_id = 0;
-    h->integer_secs = 0;
-    h->fractional_secs = 0;
-    h->trailer = 0;
-    break;
-
-  case 1:
-    h->stream_id = ntohl(p[1]);
-    h->class_id = 0;
-    h->integer_secs = 0;
-    h->fractional_secs = 0;
-    h->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;
-    h->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;
-    h->trailer = 0;
-    break;
-
-  case 4:
-    h->stream_id = 0;
-    h->class_id = 0;
-    h->integer_secs = ntohl(p[1]);
-    h->fractional_secs = 0;
-    h->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;
-    h->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;
-    h->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;
-    h->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]);
-    h->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]);
-    h->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]);
-    h->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]);
-    h->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]);
-    h->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]);
-    h->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]);
-    h->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]);
-    h->trailer = 0;
-    break;
-
-  case 16:
-    h->stream_id = 0;
-    h->class_id = 0;
-    h->integer_secs = 0;
-    h->fractional_secs = 0;
-    h->trailer = ntohl(p[len-1]);
-    break;
-
-  case 17:
-    h->stream_id = ntohl(p[1]);
-    h->class_id = 0;
-    h->integer_secs = 0;
-    h->fractional_secs = 0;
-    h->trailer = ntohl(p[len-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;
-    h->trailer = ntohl(p[len-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;
-    h->trailer = ntohl(p[len-1]);
-    break;
-
-  case 20:
-    h->stream_id = 0;
-    h->class_id = 0;
-    h->integer_secs = ntohl(p[1]);
-    h->fractional_secs = 0;
-    h->trailer = ntohl(p[len-1]);
-    break;
-
-  case 21:
-    h->stream_id = ntohl(p[1]);
-    h->class_id = 0;
-    h->integer_secs = ntohl(p[2]);
-    h->fractional_secs = 0;
-    h->trailer = ntohl(p[len-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;
-    h->trailer = ntohl(p[len-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;
-    h->trailer = ntohl(p[len-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]);
-    h->trailer = ntohl(p[len-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]);
-    h->trailer = ntohl(p[len-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]);
-    h->trailer = ntohl(p[len-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]);
-    h->trailer = ntohl(p[len-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]);
-    h->trailer = ntohl(p[len-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]);
-    h->trailer = ntohl(p[len-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]);
-    h->trailer = ntohl(p[len-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]);
-    h->trailer = ntohl(p[len-1]);
-    break;
-
diff --git a/vrt/lib/expanded_header_unparse_switch_body.h b/vrt/lib/expanded_header_unparse_switch_body.h
new file mode 100644 (file)
index 0000000..ca6e149
--- /dev/null
@@ -0,0 +1,272 @@
+  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_cw_tables.py b/vrt/lib/gen_cw_tables.py
deleted file mode 100755 (executable)
index 803a392..0000000
+++ /dev/null
@@ -1,69 +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 main():
-    f = sys.stdout
-    header_len  = 32 * [0]
-    trailer_len = 32 * [0]
-
-    for cw in range(32):
-        t = 0
-        if cw & HAS_TRAILER:         t += 1
-        trailer_len[cw] = t
-
-        t = 1
-        if cw & HAS_STREAM_ID:       t += 1
-        if cw & HAS_CLASS_ID:        t += 2
-        if cw & HAS_INTEGER_SECS:    t += 1
-        if cw & HAS_FRACTIONAL_SECS: t += 2
-        header_len[cw] = t
-
-    write_table(f, "cw_header_len", header_len)
-    write_table(f, "cw_trailer_len", trailer_len)
-    
-def write_table(f, name, table):
-    f.write("inline static size_t ")
-    f.write(name)
-    f.write("(int cw){\n")
-
-    f.write("  static const size_t s_")
-    f.write(name)
-    f.write("[32] = {\n    ")
-    for t in table:
-        f.write("%d, " % (t,))
-    f.write("\n  };\n")
-
-    f.write("  return s_")
-    f.write(name)
-    f.write("[cw];\n}\n\n")
-
-
-if __name__ == '__main__':
-    main()
diff --git a/vrt/lib/gen_parse_switch_body.py b/vrt/lib/gen_parse_switch_body.py
new file mode 100755 (executable)
index 0000000..d13e490
--- /dev/null
@@ -0,0 +1,85 @@
+#!/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_switch_body.py b/vrt/lib/gen_switch_body.py
deleted file mode 100755 (executable)
index 105fa76..0000000
+++ /dev/null
@@ -1,80 +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 dotrailer(name, mask):
-        f.write("    ")
-        if cw & mask:
-            f.write("h->%s = ntohl(p[len-1]);\n" % (name,))
-            return 1
-        else:
-            f.write("h->%s = 0;\n" % (name,))
-            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)
-    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
new file mode 100755 (executable)
index 0000000..6c7cd01
--- /dev/null
@@ -0,0 +1,79 @@
+#!/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()