[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7201 - gnuradio/branches/developers/jcorgan/t127/usrp
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r7201 - gnuradio/branches/developers/jcorgan/t127/usrpdb/src |
Date: |
Sun, 16 Dec 2007 16:32:51 -0700 (MST) |
Author: jcorgan
Date: 2007-12-16 16:32:51 -0700 (Sun, 16 Dec 2007)
New Revision: 7201
Added:
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lfrx.py
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.cc
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.h
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.i
Modified:
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.h
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.i
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.h
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.i
Log:
work in progress, broken
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
2007-12-15 23:30:45 UTC (rev 7200)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
2007-12-16 23:32:51 UTC (rev 7201)
@@ -37,7 +37,8 @@
usrpdb_basic_rx.i \
usrpdb_basic_tx.i \
usrpdb_hwa.i \
- usrpdb_hwa_qa.i
+ usrpdb_hwa_qa.i \
+ usrpdb_lfrx.i
REMOTE_IFILES = \
$(top_srcdir)/gnuradio-core/src/lib/swig/shared_ptr.i
@@ -62,7 +63,8 @@
usrpdb_basic_rx.cc \
usrpdb_basic_tx.cc \
usrpdb_hwa.cc \
- usrpdb_hwa_qa.cc
+ usrpdb_hwa_qa.cc \
+ usrpdb_lfrx.cc
ourlib_LTLIBRARIES = _usrpdb.la
@@ -83,7 +85,8 @@
usrpdb_basic_rx.h \
usrpdb_basic_tx.h \
usrpdb_hwa.h \
- usrpdb_hwa_qa.h
+ usrpdb_hwa_qa.h \
+ usrpdb_lfrx.h
swiginclude_HEADERS = \
$(LOCAL_IFILES)
@@ -99,6 +102,7 @@
noinst_PYTHON = \
qa_basic_rx.py \
qa_basic_tx.py \
+ qa_lfrx.py \
qa_usrpdb.py
MOSTLYCLEANFILES = \
Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lfrx.py
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lfrx.py
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lfrx.py
2007-12-16 23:32:51 UTC (rev 7201)
@@ -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()
+ 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 = (-20, 0, 0.2)
+ gain_range = self.db.gain_range()
+ self.assertFloatTuplesAlmostEqual(gain_range, expected_range, 5)
+
+if __name__ == '__main__':
+ gr_unittest.main ()
Property changes on:
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lfrx.py
___________________________________________________________________
Name: svn:executable
+ *
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
2007-12-15 23:30:45 UTC (rev 7200)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
2007-12-16 23:32:51 UTC (rev 7201)
@@ -26,3 +26,4 @@
%include "usrpdb_hwa_qa.i"
%include "usrpdb_basic_rx.i"
%include "usrpdb_basic_tx.i"
+%include "usrpdb_lfrx.i"
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.h
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.h
2007-12-15 23:30:45 UTC (rev 7200)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.h
2007-12-16 23:32:51 UTC (rev 7201)
@@ -32,7 +32,7 @@
class usrpdb_basic_rx : protected usrpdb_base
{
-private:
+protected:
usrpdb_basic_rx(usrpdb_hwa_sptr hwa);
friend usrpdb_basic_rx_sptr usrpdb_make_basic_rx(usrpdb_hwa_sptr hwa);
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.i
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.i
2007-12-15 23:30:45 UTC (rev 7200)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_rx.i
2007-12-16 23:32:51 UTC (rev 7201)
@@ -36,9 +36,9 @@
class usrpdb_basic_rx : protected usrpdb_base
{
-private:
+protected:
usrpdb_basic_rx(usrpdb_hwa_sptr hwa);
-
+
public:
~usrpdb_basic_rx();
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.h
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.h
2007-12-15 23:30:45 UTC (rev 7200)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.h
2007-12-16 23:32:51 UTC (rev 7201)
@@ -32,7 +32,7 @@
class usrpdb_basic_tx : protected usrpdb_base
{
-private:
+protected:
usrpdb_basic_tx(usrpdb_hwa_sptr hwa);
friend usrpdb_basic_tx_sptr usrpdb_make_basic_tx(usrpdb_hwa_sptr hwa);
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.i
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.i
2007-12-15 23:30:45 UTC (rev 7200)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_basic_tx.i
2007-12-16 23:32:51 UTC (rev 7201)
@@ -36,7 +36,7 @@
class usrpdb_basic_tx : protected usrpdb_base
{
-private:
+protected:
usrpdb_basic_tx(usrpdb_hwa_sptr hwa);
public:
Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.cc
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.cc
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.cc
2007-12-16 23:32:51 UTC (rev 7201)
@@ -0,0 +1,54 @@
+/* -*- 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>
+#include <stdexcept>
+
+usrpdb_lfrx_sptr
+usrpdb_make_lfrx(usrpdb_hwa_sptr hwa)
+{
+ return usrpdb_lfrx_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()
+{
+}
Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.h
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.h
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.h
2007-12-16 23:32:51 UTC (rev 7201)
@@ -0,0 +1,46 @@
+/* -*- 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>
+
+class usrpdb_lfrx;
+typedef boost::shared_ptr<usrpdb_lfrx> usrpdb_lfrx_sptr;
+
+usrpdb_lfrx_sptr usrpdb_make_lfrx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_lfrx : protected usrpdb_basic_rx
+{
+protected:
+ usrpdb_lfrx(usrpdb_hwa_sptr hwa);
+
+ friend usrpdb_lfrx_sptr usrpdb_make_lfrx(usrpdb_hwa_sptr hwa);
+
+public:
+ virtual ~usrpdb_lfrx();
+
+ virtual std::vector<float> freq_range();
+};
+
+#endif /* INCLUDED_USRPDB_LFRX_H */
Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.i
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.i
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lfrx.i
2007-12-16 23:32:51 UTC (rev 7201)
@@ -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_lfrx.h>
+%}
+
+%include "usrpdb_basic_rx.i"
+
+class usrpdb_lfrx;
+typedef boost::shared_ptr<usrpdb_lfrx> usrpdb_lfrx_sptr;
+%template(usrpdb_lfrx_sptr) boost::shared_ptr<usrpdb_lfrx>;
+%rename(lfrx) usrpdb_make_lfrx;
+%ignore lfrx;
+
+usrpdb_lfrx_sptr usrpdb_make_lfrx(usrpdb_hwa_sptr hwa);
+
+class usrpdb_lfrx : protected usrpdb_basic_rx
+{
+protected:
+ usrpdb_lfrx(usrpdb_hwa_sptr hwa);
+
+public:
+ ~usrpdb_lfrx();
+
+ std::vector<float> freq_range();
+ std::vector<float> gain_range();
+};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7201 - gnuradio/branches/developers/jcorgan/t127/usrpdb/src,
jcorgan <=