commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r7621 - in gnuradio/branches/developers/jcorgan/usrpdb


From: jcorgan
Subject: [Commit-gnuradio] r7621 - in gnuradio/branches/developers/jcorgan/usrpdb: . config gr-usrp/src usrp/host/apps usrp/host/apps-inband usrp/host/lib/inband usrp/host/lib/legacy usrpdb usrpdb/src
Date: Fri, 8 Feb 2008 18:02:42 -0700 (MST)

Author: jcorgan
Date: 2008-02-08 18:02:41 -0700 (Fri, 08 Feb 2008)
New Revision: 7621

Added:
   gnuradio/branches/developers/jcorgan/usrpdb/config/grc_usrpdb.m4
   
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_hwa_rx.cc
   
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_hwa_rx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/Makefile.am
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/Makefile.am
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_rx.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_tx.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_dbsrx.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lfrx.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lftx.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_usrpdb.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/run_tests.in
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/usrpdb.pc.in
Removed:
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/Makefile.am
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/Makefile.am
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_rx.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_tx.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_dbsrx.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lfrx.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lftx.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_usrpdb.py
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/run_tests.in
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.h
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.i
   gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/usrpdb.pc.in
Modified:
   gnuradio/branches/developers/jcorgan/usrpdb/Makefile.common
   gnuradio/branches/developers/jcorgan/usrpdb/config/Makefile.am
   gnuradio/branches/developers/jcorgan/usrpdb/configure.ac
   gnuradio/branches/developers/jcorgan/usrpdb/gr-usrp/src/Makefile.am
   gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/apps-inband/Makefile.am
   gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/apps/Makefile.am
   gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/inband/Makefile.am
   gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/Makefile.am
   
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_basic.cc
   gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_basic.h
Log:
Merged r7120:7608 from jcorgan/t127 into jcorgan/usrpdb, fixing merge conflicts 
and manual updates for new build structure.  This rolls forward development but 
based on new trunk.

Modified: gnuradio/branches/developers/jcorgan/usrpdb/Makefile.common
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/Makefile.common 2008-02-09 
00:10:03 UTC (rev 7620)
+++ gnuradio/branches/developers/jcorgan/usrpdb/Makefile.common 2008-02-09 
01:02:41 UTC (rev 7621)
@@ -64,6 +64,10 @@
 # This is a dependency for many swig operations
 GNURADIO_I = @gnuradio_core_I@
 
+# How to link in the USPRDB library from inside the tree
+USRPDB_INCLUDES = -I$(top_srcdir)/usrpdb/src
+USRPDB_LA = $(top_builddir)/usrpdb/src/libusrpdb.la
+
 # How to link in the USRP library from inside the tree
 USRP_INCLUDES = @usrp_INCLUDES@
 USRP_LA = @usrp_LA@

Modified: gnuradio/branches/developers/jcorgan/usrpdb/config/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/config/Makefile.am      
2008-02-09 00:10:03 UTC (rev 7620)
+++ gnuradio/branches/developers/jcorgan/usrpdb/config/Makefile.am      
2008-02-09 01:02:41 UTC (rev 7621)
@@ -57,6 +57,7 @@
        gr_check_usrp.m4 \
        grc_pmt.m4 \
        grc_usrp.m4 \
+       grc_usrpdb.m4 \
        gr_doxygen.m4 \
        gr_fortran.m4 \
        gr_gprof.m4 \

Copied: gnuradio/branches/developers/jcorgan/usrpdb/config/grc_usrpdb.m4 (from 
rev 7620, gnuradio/branches/developers/jcorgan/t127/config/grc_usrpdb.m4)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/config/grc_usrpdb.m4            
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/config/grc_usrpdb.m4    
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,35 @@
+dnl Copyright 2001,2002,2003,2004,2005,2006,2007 Free Software Foundation, Inc.
+dnl 
+dnl This file is part of GNU Radio
+dnl 
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl 
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl GNU General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING.  If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
+
+AC_DEFUN([GRC_USRPDB],[
+    GRC_ENABLE([usrpdb])
+
+    AC_CONFIG_FILES([ \
+       usrpdb/Makefile \
+       usrpdb/usrpdb.pc \
+        usrpdb/src/Makefile \
+       usrpdb/src/run_tests \
+    ])
+
+    passed=yes
+    GRC_BUILD_CONDITIONAL([usrpdb],[
+       dnl run_tests is created from run_tests.in.  Make it executable.
+        AC_CONFIG_COMMANDS([run_tests_usrpdb], [chmod +x usrpdb/src/run_tests])
+       ])
+])

Modified: gnuradio/branches/developers/jcorgan/usrpdb/configure.ac
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/configure.ac    2008-02-09 
00:10:03 UTC (rev 7620)
+++ gnuradio/branches/developers/jcorgan/usrpdb/configure.ac    2008-02-09 
01:02:41 UTC (rev 7621)
@@ -224,7 +224,8 @@
 GRC_GNURADIO_CORE
 GRC_PMT
 GRC_MBLOCK                     dnl this must come after GRC_PMT
-GRC_USRP
+GRC_USRPDB
+GRC_USRP                       dnl this must come after USRPDB
 GRC_GR_USRP                    dnl this must come after GRC_USRP
 GRC_GR_AUDIO_ALSA
 GRC_GR_AUDIO_JACK

Modified: gnuradio/branches/developers/jcorgan/usrpdb/gr-usrp/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/gr-usrp/src/Makefile.am 
2008-02-09 00:10:03 UTC (rev 7620)
+++ gnuradio/branches/developers/jcorgan/usrpdb/gr-usrp/src/Makefile.am 
2008-02-09 01:02:41 UTC (rev 7621)
@@ -63,6 +63,7 @@
 
 INCLUDES = $(STD_DEFINES_AND_INCLUDES)  \
           $(PYTHON_CPPFLAGS)           \
+          $(USRPDB_INCLUDES)           \
           $(USRP_INCLUDES)             \
           $(WITH_INCLUDES)
 

Modified: gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/apps/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/apps/Makefile.am      
2008-02-09 00:10:03 UTC (rev 7620)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/apps/Makefile.am      
2008-02-09 01:02:41 UTC (rev 7621)
@@ -22,7 +22,7 @@
 include $(top_srcdir)/Makefile.common
 
 INCLUDES = $(USRP_INCLUDES) $(BOOST_CFLAGS) $(CPPUNIT_INCLUDES) \
-          $(WITH_INCLUDES)
+          $(USRPDB_INCLUDES) $(WITH_INCLUDES)
 
 bin_PROGRAMS =                         \
        usrper                          \

Modified: 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/apps-inband/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/apps-inband/Makefile.am   
    2008-02-09 00:10:03 UTC (rev 7620)
+++ 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/apps-inband/Makefile.am   
    2008-02-09 01:02:41 UTC (rev 7621)
@@ -23,7 +23,7 @@
 
 INCLUDES =     \
        $(DEFINES) $(OMNITHREAD_INCLUDES) $(PMT_INCLUDES) $(MBLOCK_INCLUDES) \
-       $(USRP_INCLUDES) $(USRP_INBAND_INCLUDES) $(BOOST_CFLAGS) \
+       $(USRPDB_INCLUDES) $(USRP_INCLUDES) $(USRP_INBAND_INCLUDES) 
$(BOOST_CFLAGS) \
        $(CPPUNIT_INCLUDES) $(WITH_INCLUDES)
 
 

Modified: 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/inband/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/inband/Makefile.am    
    2008-02-09 00:10:03 UTC (rev 7620)
+++ 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/inband/Makefile.am    
    2008-02-09 01:02:41 UTC (rev 7621)
@@ -22,7 +22,7 @@
 
 INCLUDES =     \
        $(DEFINES) $(OMNITHREAD_INCLUDES) $(PMT_INCLUDES) $(MBLOCK_INCLUDES) \
-       $(USRP_INCLUDES) $(BOOST_CFLAGS) $(CPPUNIT_INCLUDES) \
+       $(USRPDB_INCLUDES) $(USRP_INCLUDES) $(BOOST_CFLAGS) $(CPPUNIT_INCLUDES) 
\
        -I$(srcdir)/../../apps-inband $(WITH_INCLUDES)
 
 TESTS = test_inband

Modified: 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/Makefile.am    
    2008-02-09 00:10:03 UTC (rev 7620)
+++ 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/Makefile.am    
    2008-02-09 01:02:41 UTC (rev 7621)
@@ -20,7 +20,7 @@
 
 include $(top_srcdir)/Makefile.common
 
-common_INCLUDES = $(USRP_INCLUDES)
+common_INCLUDES = $(USRPDB_INCLUDES) $(USRP_INCLUDES)
 
 lib_LTLIBRARIES = libusrp.la
 
@@ -28,6 +28,7 @@
 
 libusrp_la_common_LIBADD =             \
        $(USB_LIBS)                     \
+       $(USRPDB_LA)                    \
        ../../misc/libmisc.la
 
 # darwin fusb requires omnithreads
@@ -102,7 +103,8 @@
        usrp_dbid.cc                    \
        usrp_local_sighandler.cc        \
        usrp_prims.cc                   \
-       usrp_standard.cc
+       usrp_standard.cc                \
+       usrp_hwa_rx.cc
 
 
 if FUSB_TECH_generic
@@ -132,7 +134,8 @@
        usrp_dbid.h                     \
        usrp_prims.h                    \
        usrp_slots.h                    \
-       usrp_standard.h                 
+       usrp_standard.h                 \
+       usrp_hwa_rx.h
 
 noinst_HEADERS =                       \
        ad9862.h                        \

Modified: 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_basic.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_basic.cc  
    2008-02-09 00:10:03 UTC (rev 7620)
+++ 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_basic.cc  
    2008-02-09 01:02:41 UTC (rev 7621)
@@ -34,6 +34,7 @@
 #include <assert.h>
 #include <math.h>
 #include <ad9862.h>
+#include <usrp_hwa_rx.h>
 
 using namespace ad9862;
 
@@ -833,6 +834,12 @@
                         (d_fpga_shadows[FR_DC_OFFSET_CL_EN] & ~mask) | (bits & 
mask));
 }
 
+usrpdb_hwa_sptr
+usrp_basic_rx::hwa(int side)
+{
+    return usrp_make_hwa_rx(this, side);
+}
+
 ////////////////////////////////////////////////////////////////
 //
 //                        usrp_basic_tx

Modified: 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_basic.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_basic.h   
    2008-02-09 00:10:03 UTC (rev 7620)
+++ 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_basic.h   
    2008-02-09 01:02:41 UTC (rev 7621)
@@ -40,6 +40,7 @@
 #define INCLUDED_USRP_BASIC_H
 
 #include <usrp_slots.h>
+#include <usrpdb_hwa.h>
 #include <string>
 
 struct usb_dev_handle;
@@ -311,7 +312,7 @@
   bool stop ();
 };
 
-/*!
+/*!
  * \brief class for accessing the receive side of the USRP
  */
 class usrp_basic_rx : public usrp_basic 
@@ -548,9 +549,11 @@
   // called in base class to derived class order
   bool start ();
   bool stop ();
+
+  usrpdb_hwa_sptr hwa(int side);
 };
 
-/*!
+ /*!
  * \brief class for accessing the transmit side of the USRP
  */
 class usrp_basic_tx : public usrp_basic 

Copied: 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_hwa_rx.cc 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrp/host/lib/legacy/usrp_hwa_rx.cc)
===================================================================
--- 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_hwa_rx.cc 
                            (rev 0)
+++ 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_hwa_rx.cc 
    2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,173 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrp_hwa_rx.h>
+#include <fpga_regs_standard.h>
+#include <stdexcept>
+#include <iostream>
+
+#define bmUSRP1_REFCLK_ENA   0x80
+#define bmUSRP1_REFCLK_DIV   0x7F
+#define USRP1_REFCLK_VAL(ena,div) \
+  ((ena?bmUSRP1_REFCLK_ENA:0) |   \
+   (div&bmUSRP1_REFCLK_DIV))
+
+usrpdb_hwa_sptr 
+usrp_make_hwa_rx(usrp_basic_rx *u, int side)
+{
+  return usrpdb_hwa_sptr(new usrp_hwa_rx(u, side));
+}
+
+usrp_hwa_rx::usrp_hwa_rx(usrp_basic_rx *u, int side)
+  : d_u(u),
+    d_side(side),
+    d_refclk_enable(false),
+    d_refclk_divisor(1)
+{
+  if (side == 0)
+    d_refclk_reg = FR_RX_A_REFCLK;
+  else
+    d_refclk_reg = FR_RX_B_REFCLK;
+}
+
+usrp_hwa_rx::~usrp_hwa_rx()
+{
+  // don't delete
+  d_u = 0;
+}
+
+unsigned int
+usrp_hwa_rx::side()
+{
+  return d_side;
+}
+
+float
+usrp_hwa_rx::fpga_master_clock_freq()
+{
+  return (float)d_u->fpga_master_clock_freq();
+}
+
+float
+usrp_hwa_rx::pga_gain()
+{
+  throw std::runtime_error("not implemented");
+}
+
+float
+usrp_hwa_rx::pga_min()
+{
+  return d_u->pga_min();
+}
+
+float
+usrp_hwa_rx::pga_max()
+{
+  return d_u->pga_max();
+}
+
+float
+usrp_hwa_rx::pga_db_per_step()
+{
+  return d_u->pga_db_per_step();
+}
+
+void
+usrp_hwa_rx::set_pga(float gain)
+{
+  bool ok = false;
+  ok &= d_u->set_pga(2*d_side+0, gain);
+  ok &= d_u->set_pga(2*d_side+1, gain);
+  if (!ok)
+    throw std::runtime_error("unable to set pga gain");
+}
+
+void
+usrp_hwa_rx::bypass_adc_buffers(bool bypass)
+{
+  bool ok = false;
+  ok &= d_u->set_adc_buffer_bypass(2*d_side+0, bypass);
+  ok &= d_u->set_adc_buffer_bypass(2*d_side+1, bypass);
+  if (!ok)
+    throw std::runtime_error("unable to bypass ADC buffers");
+}
+
+void
+usrp_hwa_rx::write_oe(unsigned short mask, unsigned short val)
+{
+  if (!d_u->_write_oe(d_side, mask, val))
+    throw std::runtime_error("unable to write output enable");
+}
+
+void
+usrp_hwa_rx::set_refclk_divisor(int divisor)
+{
+  d_refclk_divisor = divisor;
+  write_fpga_reg(d_refclk_reg, USRP1_REFCLK_VAL(d_refclk_enable, 
d_refclk_divisor));
+}
+
+void
+usrp_hwa_rx::enable_refclk(bool enable)
+{
+  d_refclk_enable = enable;
+  write_fpga_reg(d_refclk_reg, USRP1_REFCLK_VAL(d_refclk_enable, 
d_refclk_divisor));
+}
+
+float
+usrp_hwa_rx::refclk_frequency()
+{
+  return fpga_master_clock_freq()/d_refclk_divisor;
+}
+
+void
+usrp_hwa_rx::write_i2c(char addr, std::vector<unsigned char> seq)
+{
+  std::string s(seq.begin(), seq.end());
+  d_u->write_i2c(addr, s);
+}
+
+std::vector<unsigned char>
+usrp_hwa_rx::read_i2c(char addr, int len)
+{
+  std::string s = d_u->read_i2c(addr, len);
+  return std::vector<unsigned char>(s.begin(), s.end());
+}
+
+void
+usrp_hwa_rx::write_aux_dac(int which_adc, int val)
+{
+  bool ok = d_u->write_aux_dac(2*d_side+1, which_adc, val);
+  if (!ok)
+    throw std::runtime_error("unable to write AUX DAC");
+}
+
+void
+usrp_hwa_rx::write_fpga_reg(int regno, int val)
+{
+  bool ok = d_u->_write_fpga_reg(regno, val);
+  if (!ok)
+    throw std::runtime_error("unable to write FPGA register");
+}

Copied: 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_hwa_rx.h 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrp/host/lib/legacy/usrp_hwa_rx.h)
===================================================================
--- 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_hwa_rx.h  
                            (rev 0)
+++ 
gnuradio/branches/developers/jcorgan/usrpdb/usrp/host/lib/legacy/usrp_hwa_rx.h  
    2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_USRP_HWA_RX_H
+#define INCLUDED_USRP_HWA_RX_H
+
+#include <usrpdb_hwa.h>
+#include "usrp_basic.h"
+
+usrpdb_hwa_sptr usrp_make_hwa_rx(usrp_basic_rx *u, int side);
+
+class usrp_hwa_rx : public usrpdb_hwa
+{
+private:
+  usrp_hwa_rx(usrp_basic_rx *u, int side);
+  friend usrpdb_hwa_sptr usrp_make_hwa_rx(usrp_basic_rx *u, int side);
+
+  usrp_basic_rx *d_u;
+  int  d_side;           // 0 = A, 1 = B
+  bool d_refclk_enable;
+  int  d_refclk_divisor;
+  int  d_refclk_reg;
+
+public:
+  ~usrp_hwa_rx();
+
+  unsigned int side();
+  float fpga_master_clock_freq();
+  float pga_gain();
+  float pga_min();
+  float pga_max();
+  float pga_db_per_step();
+  void set_pga(float gain);
+  void bypass_adc_buffers(bool bypass);
+  void write_oe(unsigned short mask, unsigned short val);
+  void set_refclk_divisor(int divisor);
+  void enable_refclk(bool enable);
+  float refclk_frequency();
+  void write_i2c(char addr, std::vector<unsigned char> seq);
+  std::vector<unsigned char> read_i2c(char addr, int len);
+  void write_aux_dac(int which_adc, int val);
+  void write_fpga_reg(int regno, int val);
+};
+
+#endif /* INCLUDED_USRPDB_HWA_H */

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb (from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb)


Property changes on: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb
___________________________________________________________________
Name: svn:ignore
   + Makefile
Makefile.in
usrpdb.pc


Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/Makefile.am

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/Makefile.am (from 
rev 7620, gnuradio/branches/developers/jcorgan/t127/usrpdb/Makefile.am)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/Makefile.am              
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/Makefile.am      
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,29 @@
+#
+# Copyright 2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+EXTRA_DIST = \
+       usrpdb.pc.in
+
+SUBDIRS = src
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = \
+       usrpdb.pc

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src (from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src)


Property changes on: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src
___________________________________________________________________
Name: svn:ignore
   + Makefile
Makefile.in
.deps
.libs
usrpdb.cc
usrpdb.py
run_tests
*.pyc


Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/Makefile.am

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/Makefile.am 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/Makefile.am          
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/Makefile.am  
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,121 @@
+#
+# Copyright 2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+include $(top_srcdir)/Makefile.common
+
+# Install this stuff so that it ends up as the gnuradio.usrpdb module
+# This usually ends up at:
+#   ${prefix}/lib/python${python_version}/site-packages/gnuradio
+
+ourpythondir = $(grpythondir)
+ourlibdir    = $(grpyexecdir)
+
+EXTRA_DIST = run_tests.in
+TESTS = run_tests
+
+LOCAL_IFILES =                                 \
+       usrpdb.i                        \
+       usrpdb_base.i                   \
+       usrpdb_basic_rx.i               \
+       usrpdb_basic_tx.i               \
+       usrpdb_dbsrx.i                  \
+       usrpdb_hwa.i                    \
+       usrpdb_hwa_qa.i                 \
+       usrpdb_lfrx.i                   \
+       usrpdb_lftx.i
+
+REMOTE_IFILES =                                \
+       $(top_srcdir)/gnuradio-core/src/lib/swig/shared_ptr.i
+
+ALL_IFILES = $(LOCAL_IFILES) $(REMOTE_IFILES)
+
+BUILT_SOURCES =                        \
+       usrpdb.cc                       \
+       usrpdb.py                       
+
+ourpython_PYTHON =                     \
+       usrpdb.py
+
+INCLUDES = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS)
+
+SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES)
+
+lib_LTLIBRARIES = libusrpdb.la
+
+libusrpdb_la_CPPFLAGS = -Werror
+
+libusrpdb_la_SOURCES =                 \
+       usrpdb_base.cc                  \
+       usrpdb_basic_rx.cc              \
+       usrpdb_basic_tx.cc              \
+       usrpdb_dbsrx.cc                 \
+       usrpdb_hwa.cc                   \
+       usrpdb_hwa_qa.cc                \
+       usrpdb_lfrx.cc                  \
+       usrpdb_lftx.cc
+
+ourlib_LTLIBRARIES = _usrpdb.la
+
+_usrpdb_la_SOURCES =                   \
+       usrpdb.cc
+
+_usrpdb_la_CPPFLAGS = -fno-strict-aliasing
+
+_usrpdb_la_LIBADD =                    \
+       $(PYTHON_LDFLAGS)               \
+       libusrpdb.la                    \
+       -lstdc++                                
+
+libusrpdb_la_LDFLAGS = $(NO_UNDEFINED)
+
+_usrpdb_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+
+grinclude_HEADERS =                    \
+       usrpdb_base.h                   \
+       usrpdb_basic_rx.h               \
+       usrpdb_basic_tx.h               \
+       usrpdb_dbsrx.h                  \
+       usrpdb_hwa.h                    \
+       usrpdb_hwa_qa.h                 \
+       usrpdb_lfrx.h                   \
+       usrpdb_lftx.h
+
+swiginclude_HEADERS =                  \
+       $(LOCAL_IFILES)
+
+usrpdb.cc usrpdb.py: $(ALL_IFILES)
+       $(SWIG) $(SWIGPYTHONARGS) -module usrpdb -o usrpdb.cc 
$(top_srcdir)/usrpdb/src/usrpdb.i
+
+# Don't distribute output of swig
+dist-hook:
+       @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
+       @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
+
+noinst_PYTHON =                        \
+       qa_basic_rx.py                  \
+       qa_basic_tx.py                  \
+       qa_dbsrx.py                     \
+       qa_lfrx.py                      \
+       qa_lftx.py                      \
+       qa_usrpdb.py
+
+MOSTLYCLEANFILES = \
+       $(BUILT_SOURCES) *~ *.pyc

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_rx.py

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_rx.py 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_basic_rx.py)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_rx.py       
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_rx.py       
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+#
+# Copyright 2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from gnuradio import gr, gr_unittest
+import usrpdb
+
+class qa_basic_rx(gr_unittest.TestCase):
+
+    def setUp(self):
+       self.hwa = usrpdb.hwa_qa(0)
+       self.db = usrpdb.basic_rx(self.hwa)
+
+    def tearDown(self):
+       self.db = None
+       self.hwa = None
+
+    def test_000_freq_range(self):
+       expected_range = (0, 89999998976, 1e-6)
+       freq_range = self.db.freq_range()
+       self.assertFloatTuplesAlmostEqual(freq_range, expected_range, 5)
+
+    def test_001_set_freq(self):
+       actual_baseband_freq = self.db.set_freq(1e6)
+       self.assertEqual(actual_baseband_freq, 0.0)
+
+    def test_002_gain_range(self):
+       expected_range = (0.0, 20.0, 1.0)
+       gain_range = self.db.gain_range()
+       self.assertFloatTuplesAlmostEqual(gain_range, expected_range, 5)
+
+    def test_003_set_gain(self):
+       self.db.set_gain(10.0)  
+       self.assertEqual(self.hwa.pga_gain(), 10.0)
+
+    # FIXME: disabled due to ticket:181
+    def xtest_004_set_gain_bad(self):
+       self.assertRaises(ValueError,
+           lambda: self.db.set_gain(-10.0))
+
+    def test_005_is_quadrature(self):
+       self.assertFalse(self.db.is_quadrature())
+       
+if __name__ == '__main__':
+    gr_unittest.main ()

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_tx.py

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_tx.py 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_basic_tx.py)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_tx.py       
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_basic_tx.py       
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+#
+# Copyright 2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from gnuradio import gr, gr_unittest
+import usrpdb
+
+class qa_basic_tx(gr_unittest.TestCase):
+
+    def setUp(self):
+       self.hwa = usrpdb.hwa_qa(0)
+       self.db = usrpdb.basic_tx(self.hwa)
+
+    def tearDown(self):
+       self.db = None
+       self.hwa = None
+
+    def test_000_freq_range(self):
+       expected_range = (-89999998976.0, 89999998976, 1e-6)
+       freq_range = self.db.freq_range()
+       self.assertFloatTuplesAlmostEqual(freq_range, expected_range, 5)
+
+    def test_001_set_freq(self):
+       actual_baseband_freq = self.db.set_freq(1e6)
+       self.assertEqual(actual_baseband_freq, 0.0)
+
+    def test_002_gain_range(self):
+       expected_range = (0.0, 20.0, 1.0)
+       gain_range = self.db.gain_range()
+       self.assertFloatTuplesAlmostEqual(gain_range, expected_range, 5)
+
+    def test_003_set_gain(self):
+       self.db.set_gain(10.0)  
+       self.assertEqual(self.hwa.pga_gain(), 10.0)
+
+    # FIXME: disabled due to ticket:181 problem
+    def xtest_004_set_gain_bad(self):
+       self.assertRaises(ValueError,
+           lambda: self.db.set_gain(-10.0))
+
+    def test_005_is_quadrature(self):
+       self.assertTrue(self.db.is_quadrature())
+           
+if __name__ == '__main__':
+    gr_unittest.main ()

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_dbsrx.py

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_dbsrx.py 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_dbsrx.py)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_dbsrx.py          
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_dbsrx.py  
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+#
+# Copyright 2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from gnuradio import gr, gr_unittest
+import usrpdb
+
+class qa_dbsrx(gr_unittest.TestCase):
+
+    def setUp(self):
+       self.hwa = usrpdb.hwa_qa(0)
+       self.db = usrpdb.dbsrx(self.hwa)
+
+    def tearDown(self):
+       self.db = None
+       self.hwa = None
+
+    def test_000_freq_range(self):
+       expected_range = (500e6, 2.6e9, 1e6)
+       freq_range = self.db.freq_range()
+       self.assertFloatTuplesAlmostEqual(freq_range, expected_range, 5)
+
+    def test_001_set_freq(self):
+       actual_baseband_freq = self.db.set_freq(2.4e9)
+       self.assertEqual(actual_baseband_freq, 2.4e9)
+
+    def test_002_gain_range(self):
+       expected_range = (0, 104, 1)
+       gain_range = self.db.gain_range()
+       self.assertFloatTuplesAlmostEqual(gain_range, expected_range, 5)
+
+    def test_003_set_gain(self):
+       self.db.set_gain(52)    
+       # TODO: check gc values
+       
+    # FIXME: disabled due to ticket:181
+    def xtest_004_set_gain_bad(self):
+       self.assertRaises(ValueError,
+           lambda: self.db.set_gain(-10.0))    
+
+    def test_005_is_quadrature(self):
+       self.assertTrue(self.db.is_quadrature())
+       
+if __name__ == '__main__':
+    gr_unittest.main ()

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lfrx.py

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lfrx.py (from 
rev 7620, gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lfrx.py)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lfrx.py           
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lfrx.py   
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+#
+# Copyright 2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from gnuradio import gr, gr_unittest
+import usrpdb
+
+class qa_lfrx(gr_unittest.TestCase):
+
+    def setUp(self):
+       self.hwa = usrpdb.hwa_qa(0)
+       self.db = usrpdb.lfrx(self.hwa)
+
+    def tearDown(self):
+       self.db = None
+       self.hwa = None
+
+    def test_000_freq_range(self):
+       expected_range = (0, 32e6, 1e-6)
+       freq_range = self.db.freq_range()
+       self.assertFloatTuplesAlmostEqual(freq_range, expected_range, 5)
+
+    # Test inheritance from basic_tx
+    def test_001_gain_range(self):
+       expected_range = (0.0, 20.0, 1.0)
+       gain_range = self.db.gain_range()
+       self.assertFloatTuplesAlmostEqual(gain_range, expected_range, 5)
+
+if __name__ == '__main__':
+    gr_unittest.main ()

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lftx.py

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lftx.py (from 
rev 7620, gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lftx.py)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lftx.py           
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_lftx.py   
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,48 @@
+#!/usr/bin/env python
+#
+# Copyright 2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from gnuradio import gr, gr_unittest
+import usrpdb
+
+class qa_lftx(gr_unittest.TestCase):
+
+    def setUp(self):
+       self.hwa = usrpdb.hwa_qa(0)
+       self.db = usrpdb.lftx(self.hwa)
+
+    def tearDown(self):
+       self.db = None
+       self.hwa = None
+
+    def test_000_freq_range(self):
+       expected_range = (-32e6, 32e6, 1e-6)
+       freq_range = self.db.freq_range()
+       self.assertFloatTuplesAlmostEqual(freq_range, expected_range, 5)
+
+    # Test inheritance from basic_tx
+    def test_001_gain_range(self):
+       expected_range = (0.0, 20.0, 1.0)
+       gain_range = self.db.gain_range()
+       self.assertFloatTuplesAlmostEqual(gain_range, expected_range, 5)
+
+if __name__ == '__main__':
+    gr_unittest.main ()

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_usrpdb.py

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_usrpdb.py 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_usrpdb.py)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_usrpdb.py         
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/qa_usrpdb.py 
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+#
+# Copyright 2005,2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from gnuradio import gr, gr_unittest
+import usrpdb
+
+class qa_usrpdb (gr_unittest.TestCase):
+
+    def setUp(self):
+       self.hwa = usrpdb.hwa_qa(0)
+
+    def tearDown(self):
+       self.hwa = None
+
+    def test_000_nop(self):
+        pass
+    
+if __name__ == '__main__':
+    gr_unittest.main ()

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/run_tests.in

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/run_tests.in 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/run_tests.in)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/run_tests.in         
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/run_tests.in 
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# 1st parameter is absolute path to component source directory
+# 2nd parameter is absolute path to component build directory
+# 3rd parameter is path to Python QA directory
+
address@hidden@/run_tests.sh \
+    @abs_top_srcdir@/usrpdb \
+    @abs_top_builddir@/usrpdb \
+    @srcdir@

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb.i

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb.i (from 
rev 7620, gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb.i             
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb.i     
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,40 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%feature("autodoc", "1");
+
+%include <shared_ptr.i>
+%include <std_vector.i>
+
+namespace std {
+  %template() vector<float>;
+  %template() vector<unsigned char>;
+}
+
+%include "usrpdb_hwa.i"
+%include "usrpdb_hwa_qa.i"
+%include "usrpdb_base.i"
+%include "usrpdb_basic_rx.i"
+%include "usrpdb_basic_tx.i"
+%include "usrpdb_dbsrx.i"
+%include "usrpdb_lfrx.i"
+%include "usrpdb_lftx.i"

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.cc

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.cc 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_base.cc)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.cc       
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.cc       
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,78 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrpdb_base.h>
+
+usrpdb_base::usrpdb_base(usrpdb_hwa_sptr hwa)
+  : d_hwa(hwa)
+{
+}
+
+bool
+usrpdb_base::i_and_q_swapped()
+{
+  return false;
+}
+
+bool
+usrpdb_base::spectrum_inverted()
+{
+  return false;
+}
+
+void 
+usrpdb_base::set_enable(bool on)
+{
+  // nop
+}
+
+void
+usrpdb_base::set_auto_tr(bool on)
+{
+  // nop
+}
+
+void
+usrpdb_base::set_lo_offset(float offset)
+{
+  // nop
+}
+
+float
+usrpdb_base::lo_offset()
+{
+  return 0.0;
+}
+
+void
+usrpdb_base::select_antenna(int which)
+{
+  // nop
+}
+
+usrpdb_base::~usrpdb_base()
+{
+}

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.h

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.h 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_base.h)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.h        
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.h        
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,60 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_USRPDB_BASE_H
+#define INCLUDED_USRPDB_BASE_H
+
+#include <usrpdb_hwa.h>
+#include <vector>
+#include <boost/shared_ptr.hpp>
+
+class usrpdb_base;
+typedef boost::shared_ptr<usrpdb_base> usrpdb_base_sptr;
+
+class usrpdb_base 
+{
+protected:
+  usrpdb_hwa_sptr d_hwa;
+
+public:
+  usrpdb_base(usrpdb_hwa_sptr hwa);
+  virtual ~usrpdb_base();
+
+  // These methods MUST be overridden in derived classes
+  // (they raised NotImplemented exceptions in old db_base.py)
+  virtual std::vector<float> freq_range() = 0;
+  virtual float set_freq(float target_freq) = 0;
+  virtual std::vector<float> gain_range() = 0;
+  virtual void set_gain(float gain) = 0;
+  virtual bool is_quadrature() = 0;
+
+  // These methods MAY be overriden in derived classes, but have default ops
+  virtual bool i_and_q_swapped();            // false
+  virtual bool spectrum_inverted();          // false
+  virtual void set_enable(bool on);          // nop
+  virtual void set_auto_tr(bool on);         // nop
+  virtual void set_lo_offset(float offset);  // nop
+  virtual float lo_offset();                 // 0.0
+  virtual void select_antenna(int which);    // nop
+};
+
+#endif /* INCLUDED_USRPDB_BASE_H */

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.i

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.i 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_base.i)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.i        
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_base.i        
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%{
+#include "usrpdb_base.h"
+%}
+
+class usrpdb_base;
+typedef boost::shared_ptr<usrpdb_base> usrpdb_base_sptr;
+%template(usrpdb_base_sptr) boost::shared_ptr<usrpdb_base>;
+
+class usrpdb_base 
+{
+public:
+  usrpdb_base(usrpdb_hwa_sptr hwa);
+  virtual ~usrpdb_base();
+
+  // These methods MUST be overridden in derived classes
+  // (they raised NotImplemented exceptions in old db_base.py)
+  virtual std::vector<float> freq_range() = 0;
+  virtual float set_freq(float target_freq) = 0;
+  virtual std::vector<float> gain_range() = 0;
+  virtual void set_gain(float gain) = 0;
+  virtual bool is_quadrature() = 0;
+
+  // These methods MAY be overriden in derived classes, but have default ops
+  virtual bool i_and_q_swapped();            // false
+  virtual bool spectrum_inverted();          // false
+  virtual void set_enable(bool on);          // nop
+  virtual void set_auto_tr(bool on);         // nop
+  virtual void set_lo_offset(float offset);  // nop
+  virtual float lo_offset();                 // 0.0
+  virtual void select_antenna(int which);    // nop
+};

Deleted: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.cc

Copied: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.cc (from 
rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.cc)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.cc   
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.cc   
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,91 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrpdb_basic_rx.h>
+#include <stdexcept>
+
+usrpdb_base_sptr
+usrpdb_make_basic_rx(usrpdb_hwa_sptr hwa)
+{
+  return usrpdb_base_sptr(new usrpdb_basic_rx(hwa));
+}
+
+usrpdb_basic_rx::usrpdb_basic_rx(usrpdb_hwa_sptr hwa)
+  : usrpdb_base(hwa)
+{
+  d_hwa->bypass_adc_buffers(true);
+}
+
+std::vector<float>
+usrpdb_basic_rx::freq_range()
+{
+  // BasicRx boards report they can do essentially anything
+  std::vector<float> result(3);
+  result[0] = 0;
+  result[1] = 90e9;
+  result[2] = 1e-6;
+  return result;
+}
+
+float
+usrpdb_basic_rx::set_freq(float target_freq)
+{
+  // BasicRx boards don't have an LO, so they always return 0.0 as result
+  return 0.0;
+}
+
+std::vector<float>
+usrpdb_basic_rx::gain_range()
+{
+  // BasicRx boards have no gain, but report the DAC PGA settings
+  std::vector<float> result(3);
+  result[0] = d_hwa->pga_min();
+  result[1] = d_hwa->pga_max();
+  result[2] = d_hwa->pga_db_per_step();
+  return result;
+}
+
+void
+usrpdb_basic_rx::set_gain(float gain)
+{
+  // BasicRx boards have no gain, but adjust the DAC PGA setting
+  if (gain < d_hwa->pga_min() || gain > d_hwa->pga_max()) {
+    throw std::invalid_argument("gain value is out of range");
+  }
+
+  d_hwa->set_pga(gain);
+}
+
+bool
+usrpdb_basic_rx::is_quadrature()
+{
+  // Basic boards do not quadrature downsample
+  return false;
+}
+
+usrpdb_basic_rx::~usrpdb_basic_rx()
+{
+}

Deleted: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.h

Copied: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.h (from 
rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.h)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.h    
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.h    
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,47 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_USRPDB_BASIC_RX_H
+#define INCLUDED_USRPDB_BASIC_RX_H
+
+#include <usrpdb_base.h>
+
+usrpdb_base_sptr usrpdb_make_basic_rx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_basic_rx : public usrpdb_base
+{
+protected:
+  usrpdb_basic_rx(usrpdb_hwa_sptr hwa);
+
+  friend usrpdb_base_sptr usrpdb_make_basic_rx(usrpdb_hwa_sptr hwa);
+
+public:
+  virtual ~usrpdb_basic_rx();
+
+  virtual std::vector<float> freq_range();
+  virtual float set_freq(float target_freq);
+  virtual std::vector<float> gain_range();
+  virtual void set_gain(float gain);
+  virtual bool is_quadrature();
+};
+
+#endif /* INCLUDED_USRPDB_BASIC_RX_H */

Deleted: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.i

Copied: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.i (from 
rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.i)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.i    
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_rx.i    
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,47 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%{
+#include <usrpdb_basic_rx.h>
+%}
+
+%include "usrpdb_base.i"
+
+%rename(basic_rx) usrpdb_make_basic_rx;
+%ignore basic_rx;
+
+usrpdb_base_sptr usrpdb_make_basic_rx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_basic_rx : public usrpdb_base
+{
+protected:
+  usrpdb_basic_rx(usrpdb_hwa_sptr hwa);
+  
+public:
+  ~usrpdb_basic_rx();
+
+  std::vector<float> freq_range();
+  float set_freq(float target_freq);
+  std::vector<float> gain_range();
+  void set_gain(float gain) throw (std::invalid_argument);
+  bool is_quadrature();
+};

Deleted: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.cc

Copied: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.cc (from 
rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.cc)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.cc   
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.cc   
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,91 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrpdb_basic_tx.h>
+#include <stdexcept>
+
+usrpdb_base_sptr
+usrpdb_make_basic_tx(usrpdb_hwa_sptr hwa)
+{
+  return usrpdb_base_sptr(new usrpdb_basic_tx(hwa));
+}
+
+usrpdb_basic_tx::usrpdb_basic_tx(usrpdb_hwa_sptr hwa)
+  : usrpdb_base(hwa)
+{
+  // nop
+}
+
+std::vector<float>
+usrpdb_basic_tx::freq_range()
+{
+  // BasicTX boards report they can do essentially anything
+  std::vector<float> result(3);
+  result[0] = -90e9;
+  result[1] = 90e9;
+  result[2] = 1e-6;
+  return result;
+}
+
+float
+usrpdb_basic_tx::set_freq(float target_freq)
+{
+  // BasicTX boards don't have an LO, so they always return 0.0 as result
+  return 0.0;
+}
+
+std::vector<float>
+usrpdb_basic_tx::gain_range()
+{
+  // BasicTX boards have no gain, but report the DAC PGA settings
+  std::vector<float> result(3);
+  result[0] = d_hwa->pga_min();
+  result[1] = d_hwa->pga_max();
+  result[2] = d_hwa->pga_db_per_step();
+  return result;
+}
+
+void
+usrpdb_basic_tx::set_gain(float gain)
+{
+  // BasicTX boards have no gain, but adjust the DAC PGA setting
+  if (gain < d_hwa->pga_min() || gain > d_hwa->pga_max()) {
+    throw std::invalid_argument("gain value is out of range");
+  }
+
+  d_hwa->set_pga(gain);
+}
+
+bool
+usrpdb_basic_tx::is_quadrature()
+{
+  // BasicTX boards have I and Q
+  return true;
+}
+
+usrpdb_basic_tx::~usrpdb_basic_tx()
+{
+}

Deleted: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.h

Copied: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.h (from 
rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.h)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.h    
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.h    
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,47 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_USRPDB_BASIC_TX_H
+#define INCLUDED_USRPDB_BASIC_TX_H
+
+#include <usrpdb_base.h>
+
+usrpdb_base_sptr usrpdb_make_basic_tx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_basic_tx : public usrpdb_base
+{
+protected:
+  usrpdb_basic_tx(usrpdb_hwa_sptr hwa);
+
+  friend usrpdb_base_sptr usrpdb_make_basic_tx(usrpdb_hwa_sptr hwa);
+
+public:
+  virtual ~usrpdb_basic_tx();
+
+  virtual std::vector<float> freq_range();
+  virtual float set_freq(float target_freq);
+  virtual std::vector<float> gain_range();
+  virtual void set_gain(float gain);
+  virtual bool is_quadrature();
+};
+
+#endif /* INCLUDED_USRPDB_BASIC_TX_H */

Deleted: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.i

Copied: 
gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.i (from 
rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.i)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.i    
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_basic_tx.i    
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,48 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%{
+#include <usrpdb_basic_tx.h>
+%}
+
+%include "usrpdb_base.i"
+
+%rename(basic_tx) usrpdb_make_basic_tx;
+%ignore basic_tx;
+
+usrpdb_base_sptr usrpdb_make_basic_tx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_basic_tx : public usrpdb_base
+{
+protected:
+  usrpdb_basic_tx(usrpdb_hwa_sptr hwa);
+
+public:
+  ~usrpdb_basic_tx();
+
+  std::vector<float> freq_range();
+  float set_freq(float target_freq);
+  std::vector<float> gain_range();
+  void set_gain(float gain) throw (std::invalid_argument);
+  bool is_quadrature();
+};
+

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.cc

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.cc 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_dbsrx.cc)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.cc      
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.cc      
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,367 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrpdb_dbsrx.h>
+#include <stdexcept>
+#include <cmath>
+
+// i2c bus id, side A, side B
+static char s_i2c_addr[2] = { 0x67, 0x65 };
+
+usrpdb_base_sptr
+usrpdb_make_dbsrx(usrpdb_hwa_sptr hwa)
+{
+  return usrpdb_base_sptr(new usrpdb_dbsrx(hwa));
+}
+
+usrpdb_dbsrx::usrpdb_dbsrx(usrpdb_hwa_sptr hwa)
+  : usrpdb_base(hwa),
+    d_n(950),
+    d_div2(0),
+    d_osc(5),
+    d_cp(3),
+    d_r(4),
+    d_r_int(1),
+    d_fdac(127),
+    d_m(2),
+    d_dl(0),
+    d_ade(0),
+    d_adl(0),
+    d_gc1(0),
+    d_gc2(31),
+    d_diag(0)
+{
+  d_addr = s_i2c_addr[d_hwa->side()];
+  d_hwa->write_oe(0x0001, 0x0001);
+  d_hwa->set_refclk_divisor(16);
+  d_hwa->enable_refclk(true);
+  d_hwa->bypass_adc_buffers(true);
+
+  // Set startup gain to mid-point
+  std::vector<float> g = gain_range();
+  set_gain((g[0]+g[1])/2);
+}
+
+usrpdb_dbsrx::~usrpdb_dbsrx()
+{
+  d_hwa->enable_refclk(false);
+}
+
+std::vector<float>
+usrpdb_dbsrx::freq_range()
+{
+  std::vector<float> result(3);
+  result[0] = 500e6;
+  result[1] = 2.6e9;
+  result[2] = 1e6;
+  return result;
+}
+
+void
+usrpdb_dbsrx::write_reg(unsigned char regno, unsigned char val)
+{
+  assert(regno <= 5);
+  std::vector<unsigned char> seq(2);
+  seq[0] = regno;
+  seq[1] = val;
+  d_hwa->write_i2c(d_addr, seq);
+}
+
+void
+usrpdb_dbsrx::send_reg(unsigned char regno)
+{
+  assert(regno <= 5);
+
+  switch(regno) {
+    case 0:
+      write_reg(0, (d_div2<<7) + (d_n>>8));
+      break;
+
+    case 1:
+      write_reg(1, (d_n & 0xff));
+      break;
+
+    case 2:
+      write_reg(2, d_osc + (d_cp<<3) + (d_r_int<<5));
+      break;
+
+    case 3:
+      write_reg(3, d_fdac);
+      break;
+            
+    case 4:
+      write_reg(4, d_m + (d_dl<<5) + (d_ade<<6) + (d_adl<<7));
+      break;
+  }
+}
+
+std::vector<unsigned char>
+usrpdb_dbsrx::read_status()
+{
+  return d_hwa->read_i2c(d_addr, 2);
+}
+
+void
+usrpdb_dbsrx::set_div2(int div2)
+{
+  assert(div2 == 0 || div2 == 1);
+  d_div2 = div2;
+  send_reg(0);
+}
+
+void
+usrpdb_dbsrx::set_ade(int ade)
+{
+  assert(ade == 0 || ade == 1);
+  d_ade = ade;
+  send_reg(4);
+}
+
+void
+usrpdb_dbsrx::set_r(int r)
+{
+  assert(r >= 0 && r < 128);
+  d_r = r;
+  d_r_int = (int)round(log10(r)/log10(2.0))-1;
+  send_reg(2);
+}
+
+void
+usrpdb_dbsrx::set_n(int n)
+{
+  assert(n > 256 && n < 32768);
+  d_n = n;
+  send_reg(0);
+  send_reg(1);
+}
+
+void
+usrpdb_dbsrx::set_osc(int osc)
+{
+  assert(osc >= 0 && osc < 8);
+  d_osc = osc;
+  send_reg(2);
+}
+
+void
+usrpdb_dbsrx::set_cp(int cp)
+{
+  assert(cp >= 0 && cp < 4);
+  d_cp = cp;
+  send_reg(2);
+}
+
+void
+usrpdb_dbsrx::set_gc1(int gc1)
+{
+  assert(gc1 >= 0 && gc1 < 4096);
+  d_gc1 = gc1;
+  d_hwa->write_aux_dac(0, gc1);
+}
+
+void
+usrpdb_dbsrx::set_gc2(int gc2)
+{
+  assert(gc2 >= 0 && gc2 < 32);
+  d_gc2 = gc2;
+  send_reg(5);
+}
+
+void
+usrpdb_dbsrx::set_dl(int dl)
+{
+  assert(dl == 0 || dl == 1);
+  d_dl = dl;
+  send_reg(4);
+}
+
+void
+usrpdb_dbsrx::set_pga(float gain)
+{
+  assert(gain >= 0.0 && gain <= 20.0);
+  d_hwa->set_pga(gain);
+}
+
+float
+usrpdb_dbsrx::set_freq(float target_freq)
+{
+  if (target_freq < 500e6 || target_freq > 2.6e9)
+    throw std::invalid_argument("frequency out of range");
+
+  float vco_freq;
+    
+  if (target_freq < 1150e6) {
+    set_div2(0);
+    vco_freq = 4*target_freq;
+  }
+  else {
+    set_div2(1);
+    vco_freq = 2*target_freq;
+  }
+
+  set_ade(1);
+
+  // Calculate best 'r' and 'n' register values
+  // output = n*refclk_freq/r
+  // the higher r is, the worse the phase noise
+  int rmin=(int)std::max(2.0, d_hwa->refclk_frequency()/2e6);
+  int rmax=(int)std::min(128.0, d_hwa->refclk_frequency()/500e3);
+  int r=2, n=0, best_r=2, best_n=0;
+  float delta, best_delta = 10e6;
+
+  while (r < rmax) {
+    n = (int)round(target_freq/(d_hwa->refclk_frequency()/r));
+
+    if (r < rmin || n < 256) {
+      r *= 2;
+      continue;
+    }
+
+    delta = fabs(n*d_hwa->refclk_frequency()/r-target_freq);
+    if (delta < 75e3) {
+      best_r = r;
+      best_n = n;
+      break;
+    }
+    if (delta < best_delta*0.9) {
+      best_r = r;
+      best_n = n;
+      best_delta = delta;
+    }
+
+    r *= 2;
+  }
+
+  set_r(best_r);
+  set_n(best_n);
+
+  // Select VCO.  Initially based on desired center frequency,
+  // but check tuning voltage and adjust as necessary. See Maxim 2118
+  // double secret application note for details.
+  int vco;
+  if (vco_freq < 2433e6)
+    vco = 0;
+  else if (vco_freq < 2711e6)
+    vco = 1;
+  else if (vco_freq < 3025e6)
+    vco = 2;
+  else if (vco_freq < 3341e6)
+    vco = 3;
+  else if (vco_freq < 3727e6)
+    vco = 4;
+  else if (vco_freq < 4143e6)
+    vco = 5;
+  else if (vco_freq < 4493e6)
+    vco = 6;
+  else
+    vco = 7;
+
+  set_osc(vco);
+  int adc_val = 0;
+  while(adc_val == 0 || adc_val == 7) { // Tuning voltage is pegged
+    // NOTE: might need to insert a delay here
+    adc_val = read_status()[0]>>2;
+    if (adc_val == 0) {
+      if (vco <= 0)
+       throw std::runtime_error("unable to set frequency");
+      else
+       vco -= 1;
+    }
+    else if (adc_val ==7) {
+      if (vco >= 7)
+       throw std::runtime_error("unable to set frequency");
+      else
+       vco += 1;
+    }
+
+    set_osc(vco);
+  }
+
+  // Set charge pump current
+  if (adc_val == 1 || adc_val == 2)
+    set_cp(1);
+  else if (adc_val == 3 || adc_val == 4)
+    set_cp(2);
+  else
+    set_cp(3);
+
+  return d_n*d_hwa->refclk_frequency()/d_r;
+}
+
+std::vector<float>
+usrpdb_dbsrx::gain_range()
+{
+  std::vector<float> result(3);
+  result[0] = 0;
+  result[1] = 104;
+  result[2] = 1;
+  return result;
+}
+
+void
+usrpdb_dbsrx::set_gain(float gain)
+{
+  if (gain < 0 || gain > 104) {
+    throw std::invalid_argument("gain value is out of range");
+  }
+
+  int gc1=0, gc2=0, dl=0;
+
+  if (gain < 56.0) {
+    gc1 = (int)((-gain*1.85/56.0+2.6)*4096.0/3.3);
+    gain = 0.0;
+  }
+  else {
+    gc1 = 0;
+    gain -= 56.0;
+  }
+
+  if (gain < 24.0) {
+    gc2 = (int)round(31.0*(1-gain/24.0));
+    gain = 0.0;
+    
+  }
+  else {
+    gc2 = 0;
+    gain -= 24.0;
+  }
+
+  if (gain >= 4.58) {
+    dl = 1;
+    gain -= 4.58;
+  }
+
+  set_gc1(gc1);
+  set_gc2(gc2);
+  set_dl(dl);
+  set_pga(gain);
+}
+
+bool
+usrpdb_dbsrx::is_quadrature()
+{
+  return true;
+}

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.h

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.h 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_dbsrx.h)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.h       
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.h       
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,78 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_USRPDB_DBSRX_H
+#define INCLUDED_USRPDB_DBSRX_H
+
+#include <usrpdb_base.h>
+
+usrpdb_base_sptr usrpdb_make_dbsrx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_dbsrx : public usrpdb_base
+{
+private:
+  void write_reg(unsigned char regno, unsigned char value);
+  void send_reg(unsigned char regno);
+  void set_div2(int div2);
+  void set_ade(int ade);
+  void set_r(int r);
+  void set_n(int n);
+  void set_osc(int osc);
+  void set_cp(int cp);
+  void set_gc1(int gc1);
+  void set_gc2(int gc2);
+  void set_dl(int dl);
+  void set_pga(float gain);
+  std::vector<unsigned char> read_status();
+
+  char d_addr;
+  int d_n;
+  int d_div2;
+  int d_osc;
+  int d_cp;
+  int d_r;
+  int d_r_int;
+  int d_fdac;
+  int d_m;
+  int d_dl;
+  int d_ade;
+  int d_adl;
+  int d_gc1;
+  int d_gc2;
+  int d_diag;
+
+protected:
+  usrpdb_dbsrx(usrpdb_hwa_sptr hwa);
+  friend usrpdb_base_sptr usrpdb_make_dbsrx(usrpdb_hwa_sptr hwa);
+
+public:
+  virtual ~usrpdb_dbsrx();
+
+  // These are mandatory overrides
+  virtual std::vector<float> freq_range();
+  virtual float set_freq(float target_freq);
+  virtual std::vector<float> gain_range();
+  virtual void set_gain(float gain);
+  virtual bool is_quadrature();
+};
+
+#endif /* INCLUDED_USRPDB_DBSRX_H */

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.i

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.i 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_dbsrx.i)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.i       
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_dbsrx.i       
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,47 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%{
+#include <usrpdb_dbsrx.h>
+%}
+
+%include "usrpdb_base.i"
+
+%rename(dbsrx) usrpdb_make_dbsrx;
+%ignore dbsrx;
+
+usrpdb_base_sptr usrpdb_make_dbsrx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_dbsrx : public usrpdb_base
+{
+protected:
+  usrpdb_dbsrx(usrpdb_hwa_sptr hwa);
+  
+public:
+  ~usrpdb_dbsrx();
+
+  std::vector<float> freq_range();
+  float set_freq(float target_freq);
+  std::vector<float> gain_range();
+  void set_gain(float gain) throw (std::invalid_argument);
+  bool is_quadrature();
+};

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.cc

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.cc 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa.cc)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.cc        
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.cc        
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,35 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrpdb_hwa.h>
+
+usrpdb_hwa::usrpdb_hwa()
+{
+}
+
+usrpdb_hwa::~usrpdb_hwa()
+{
+}

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.h

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.h 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa.h)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.h         
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.h 
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,55 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_USRPDB_HWA_H
+#define INCLUDED_USRPDB_HWA_H
+
+#include <boost/shared_ptr.hpp>
+#include <vector>
+
+class usrpdb_hwa 
+{
+public:
+  usrpdb_hwa();
+  virtual ~usrpdb_hwa() = 0;
+
+  virtual unsigned int side() = 0;
+  virtual float fpga_master_clock_freq() = 0;
+  virtual float pga_gain() = 0;
+  virtual float pga_min() = 0;
+  virtual float pga_max() = 0;
+  virtual float pga_db_per_step() = 0;
+  virtual void set_pga(float gain) = 0;
+  virtual void bypass_adc_buffers(bool bypass) = 0;
+  virtual void write_oe(unsigned short mask, unsigned short val) = 0;
+  virtual void set_refclk_divisor(int divisor) = 0;
+  virtual void enable_refclk(bool enable) = 0;
+  virtual float refclk_frequency() = 0;
+  virtual void write_i2c(char addr, std::vector<unsigned char> seq) = 0;
+  virtual std::vector<unsigned char> read_i2c(char addr, int len) = 0;
+  virtual void write_aux_dac(int which_adc, int val) = 0;
+  virtual void write_fpga_reg(int regno, int val) = 0;
+};
+
+typedef boost::shared_ptr<usrpdb_hwa> usrpdb_hwa_sptr;
+
+#endif /* INCLUDED_USRPDB_HWA_H */

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.i

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.i 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa.i)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.i         
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa.i 
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%{
+#include <usrpdb_hwa.h>
+%}
+
+class usrpdb_hwa;
+typedef boost::shared_ptr<usrpdb_hwa> usrpdb_hwa_sptr;
+%template(usrpdb_hwa_sptr) boost::shared_ptr<usrpdb_hwa>;
+
+class usrpdb_hwa 
+{
+public:
+  usrpdb_hwa();
+  virtual ~usrpdb_hwa() = 0;
+
+  virtual unsigned int side();
+  virtual float fpga_master_clock_freq();
+  virtual float pga_gain() throw (std::runtime_error);
+  virtual float pga_min() throw (std::runtime_error);
+  virtual float pga_max() throw (std::runtime_error);
+  virtual float pga_db_per_step() throw (std::runtime_error);
+  virtual void set_pga(float gain) throw (std::runtime_error);
+  virtual void bypass_adc_buffers(bool bypass);
+  virtual void write_oe(unsigned short mask, unsigned short value);
+  virtual void set_refclk_divisor(int divisor);
+  virtual void enable_refclk(bool enable);
+  virtual float refclk_frequency();
+  virtual void write_i2c(char addr, std::vector<unsigned char> seq);
+  virtual std::vector<unsigned char> read_i2c(char addr, int len);
+  virtual void write_aux_dac(int which_adc, int val);
+  virtual void write_fpga_reg(int regno, int val);
+};

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.cc

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.cc 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.cc)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.cc     
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.cc     
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,189 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrpdb_hwa_qa.h>
+#include <iostream>
+#include <iomanip>
+
+#define USRPDB_HWA_QA_DEBUG 1
+
+usrpdb_hwa_sptr 
+usrpdb_make_qa_hwa(int side)
+{
+  return usrpdb_hwa_sptr(new usrpdb_hwa_qa(side));
+}
+
+usrpdb_hwa_qa::usrpdb_hwa_qa(int side)
+  : d_side(side),
+    d_pga_gain(0.0),
+    d_output_enable(0x0000),
+    d_refclk_divisor(1),
+    d_refclk_enabled(false)
+{
+}
+
+usrpdb_hwa_qa::~usrpdb_hwa_qa()
+{
+}
+
+#if USRPDB_HWA_QA_DEBUG
+inline std::ostream &operator <<(std::ostream &os, std::vector<unsigned char> 
&seq)
+{
+  for (unsigned int i = 0; i < seq.size(); i++)
+    os << std::setbase(16) << std::setw(2) << std::setfill('0') << 
((int)seq[i]) << " ";
+  return os;
+}
+#endif
+
+unsigned int
+usrpdb_hwa_qa::side()
+{
+    return d_side;
+}
+
+float
+usrpdb_hwa_qa::fpga_master_clock_freq()
+{
+  // mimic USRP1
+  return 64e6;
+}
+
+float
+usrpdb_hwa_qa::pga_gain()
+{
+  return d_pga_gain;
+}
+
+float
+usrpdb_hwa_qa::pga_min()
+{
+  // mimic USRP1
+  return 0.0;
+}
+
+float
+usrpdb_hwa_qa::pga_max()
+{
+  // mimic USRP1
+  return 20.0;
+}
+
+float
+usrpdb_hwa_qa::pga_db_per_step()
+{
+  // mimic USRP1
+  return (pga_max()-pga_min())/20.0;
+}
+
+void
+usrpdb_hwa_qa::set_pga(float gain)
+{
+  if (USRPDB_HWA_QA_DEBUG)
+    std::cout << "usrpdb_hwa_qa: setting PGA gain to " << gain << std::endl;
+  d_pga_gain = gain;
+}
+
+void
+usrpdb_hwa_qa::bypass_adc_buffers(bool bypass)
+{
+  if (USRPDB_HWA_QA_DEBUG)
+    std::cout << "usrpdb_hwa_qa: bypassing ADC buffers: " << bypass << 
std::endl;
+}
+
+void
+usrpdb_hwa_qa::write_oe(unsigned short mask, unsigned short val)
+{
+  if (USRPDB_HWA_QA_DEBUG)
+    std::cout << "usrpdb_hwa_qa: writing output enable with mask: " 
+             << mask << ", val: " << val << std::endl;
+
+  d_output_enable |= (val && mask);
+  d_output_enable &= (val | ~mask);
+}
+
+void
+usrpdb_hwa_qa::set_refclk_divisor(int divisor)
+{
+  if (USRPDB_HWA_QA_DEBUG)
+    std::cout << "usrpdb_hwa_qa: setting refclk divisor to " << divisor << 
std::endl;
+  d_refclk_divisor = divisor;
+}
+
+void
+usrpdb_hwa_qa::enable_refclk(bool enable)
+{
+  if (USRPDB_HWA_QA_DEBUG)
+    std::cout << "usrpdb_hwa_qa: setting refclk enable to " << enable << 
std::endl;
+  d_refclk_enabled = enable;
+}
+
+float
+usrpdb_hwa_qa::refclk_frequency()
+{
+  return fpga_master_clock_freq()/d_refclk_divisor;
+}
+
+void
+usrpdb_hwa_qa::write_i2c(char addr, std::vector<unsigned char> seq)
+{
+#if USRPDB_HWA_QA_DEBUG
+    std::cout << "usrpdb_hwa_qa: writing to I2C addr " << std::setbase(16) 
+              << std::setw(2) << std::setfill('0') << (int)addr 
+              << ": " << seq << std::setbase(10) << std::endl;
+#endif
+}
+
+std::vector<unsigned char>
+usrpdb_hwa_qa::read_i2c(char addr, int len)
+{
+  std::vector<unsigned char> result(len);
+
+  // Fake DBSRX
+  if (addr == 0x65 || addr == 0x67) {
+    int adc_val = 1;
+    unsigned char iq_dac = 0;
+    result[0] = adc_val << 2;
+    result[1] = iq_dac;
+  }
+
+  return result;
+}
+
+void
+usrpdb_hwa_qa::write_aux_dac(int which_adc, int val)
+{
+  if (USRPDB_HWA_QA_DEBUG)
+    std::cout << "usrpdb_hwa_qa: writing AUX DAC " << which_adc 
+             << " with: " << val << std::endl; 
+}
+
+void
+usrpdb_hwa_qa::write_fpga_reg(int regno, int val)
+{
+  if (USRPDB_HWA_QA_DEBUG)
+    std::cout << "usrpdb_hwa_qa: writing FPGA reg " << regno 
+              << " with " << val << std::endl; 
+}

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.h

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.h 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.h)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.h      
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.h      
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,66 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_USRPDB_HWA_QA_H
+#define INCLUDED_USRPDB_HWA_QA_H
+
+#include <usrpdb_hwa.h>
+#include <boost/shared_ptr.hpp>
+
+usrpdb_hwa_sptr usrpdb_make_qa_hwa(int side);
+
+class usrpdb_hwa_qa : public usrpdb_hwa
+{
+  usrpdb_hwa_qa(int side);
+
+  friend usrpdb_hwa_sptr usrpdb_make_qa_hwa(int side);
+
+  // Mimic dummy hardware
+  unsigned int d_side;
+  float d_pga_gain;
+  unsigned short d_output_enable;
+  int d_refclk_divisor;
+  bool d_refclk_enabled;
+        
+public:
+
+  ~usrpdb_hwa_qa();
+
+  unsigned int side();
+  float fpga_master_clock_freq();
+  float pga_gain();
+  float pga_min();
+  float pga_max();
+  float pga_db_per_step();
+  void set_pga(float gain);
+  void bypass_adc_buffers(bool bypass);
+  void write_oe(unsigned short mask, unsigned short val);
+  void set_refclk_divisor(int divisor);
+  void enable_refclk(bool enable);
+  float refclk_frequency();
+  void write_i2c(char addr, std::vector<unsigned char> seq);
+  std::vector<unsigned char> read_i2c(char addr, int len);
+  void write_aux_dac(int which_adc, int val);
+  void write_fpga_reg(int regno, int val);
+};
+
+#endif /* INCLUDED_USRPDB_HWA_QA_H */

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.i

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.i 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.i)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.i      
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_hwa_qa.i      
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,30 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%{
+#include <usrpdb_hwa_qa.h>
+%}
+
+%rename(hwa_qa) usrpdb_make_qa_hwa;
+%ignore hwa_qa;
+
+usrpdb_hwa_sptr usrpdb_make_qa_hwa(int side);

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.cc

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.cc 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.cc)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.cc       
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.cc       
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrpdb_lfrx.h>
+
+usrpdb_base_sptr
+usrpdb_make_lfrx(usrpdb_hwa_sptr hwa)
+{
+  return usrpdb_base_sptr(new usrpdb_lfrx(hwa));
+}
+
+usrpdb_lfrx::usrpdb_lfrx(usrpdb_hwa_sptr hwa)
+  : usrpdb_basic_rx(hwa)
+{
+}
+
+std::vector<float>
+usrpdb_lfrx::freq_range()
+{
+  // LFRX boards only handle first Nyquist range
+  std::vector<float> result(3);
+  result[0] = 0;
+  result[1] = 32e6;
+  result[2] = 1e-6;
+  return result;
+}
+
+usrpdb_lfrx::~usrpdb_lfrx()
+{
+}

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.h

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.h 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.h)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.h        
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.h        
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,43 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_USRPDB_LFRX_H
+#define INCLUDED_USRPDB_LFRX_H
+
+#include <usrpdb_basic_rx.h>
+
+usrpdb_base_sptr usrpdb_make_lfrx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_lfrx : public usrpdb_basic_rx
+{
+protected:
+  usrpdb_lfrx(usrpdb_hwa_sptr hwa);
+
+  friend usrpdb_base_sptr usrpdb_make_lfrx(usrpdb_hwa_sptr hwa);
+
+public:
+  virtual ~usrpdb_lfrx();
+
+  virtual std::vector<float> freq_range();
+};
+
+#endif /* INCLUDED_USRPDB_LFRX_H */

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.i

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.i 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.i)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.i        
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lfrx.i        
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,43 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%{
+#include <usrpdb_lfrx.h>
+%}
+
+%include "usrpdb_basic_rx.i"
+
+%rename(lfrx) usrpdb_make_lfrx;
+%ignore lfrx;
+
+usrpdb_base_sptr usrpdb_make_lfrx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_lfrx : public usrpdb_basic_rx
+{
+protected:
+  usrpdb_lfrx(usrpdb_hwa_sptr hwa);
+
+public:
+  ~usrpdb_lfrx();
+
+  std::vector<float> freq_range();
+};

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.cc

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.cc 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.cc)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.cc       
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.cc       
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,53 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <usrpdb_lftx.h>
+
+usrpdb_base_sptr
+usrpdb_make_lftx(usrpdb_hwa_sptr hwa)
+{
+  return usrpdb_base_sptr(new usrpdb_lftx(hwa));
+}
+
+usrpdb_lftx::usrpdb_lftx(usrpdb_hwa_sptr hwa)
+  : usrpdb_basic_tx(hwa)
+{
+}
+
+std::vector<float>
+usrpdb_lftx::freq_range()
+{
+  // LFTX boards only handle first Nyquist range
+  std::vector<float> result(3);
+  result[0] = -32e6;
+  result[1] = 32e6;
+  result[2] = 1e-6;
+  return result;
+}
+
+usrpdb_lftx::~usrpdb_lftx()
+{
+}

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.h

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.h 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.h)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.h        
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.h        
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,43 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_USRPDB_LFTX_H
+#define INCLUDED_USRPDB_LFTX_H
+
+#include <usrpdb_basic_tx.h>
+
+usrpdb_base_sptr usrpdb_make_lftx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_lftx : public usrpdb_basic_tx
+{
+protected:
+  usrpdb_lftx(usrpdb_hwa_sptr hwa);
+
+  friend usrpdb_base_sptr usrpdb_make_lftx(usrpdb_hwa_sptr hwa);
+
+public:
+  virtual ~usrpdb_lftx();
+
+  virtual std::vector<float> freq_range();
+};
+
+#endif /* INCLUDED_USRPDB_LFTX_H */

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.i

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.i 
(from rev 7620, 
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.i)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.i        
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/src/usrpdb_lftx.i        
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,43 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+%{
+#include <usrpdb_lftx.h>
+%}
+
+%include "usrpdb_basic_tx.i"
+
+%rename(lftx) usrpdb_make_lftx;
+%ignore lftx;
+
+usrpdb_base_sptr usrpdb_make_lftx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_lftx : public usrpdb_basic_tx
+{
+protected:
+  usrpdb_lftx(usrpdb_hwa_sptr hwa);
+
+public:
+  ~usrpdb_lftx();
+
+  std::vector<float> freq_range();
+};

Deleted: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/usrpdb.pc.in

Copied: gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/usrpdb.pc.in (from 
rev 7620, gnuradio/branches/developers/jcorgan/t127/usrpdb/usrpdb.pc.in)
===================================================================
--- gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/usrpdb.pc.in             
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/usrpdb/usrpdb/usrpdb.pc.in     
2008-02-09 01:02:41 UTC (rev 7621)
@@ -0,0 +1,11 @@
address@hidden@
address@hidden@
address@hidden@
address@hidden@
+
+Name: usrpdb
+Description: USRP daughterboard C++ interface
+Requires:
+Version: @VERSION@
+Libs: -L${libdir} -lusrpdb
+Cflags: -I${includedir} @DEFINES@





reply via email to

[Prev in Thread] Current Thread [Next in Thread]