[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7205 - gnuradio/branches/developers/jcorgan/t127/usrp
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r7205 - gnuradio/branches/developers/jcorgan/t127/usrpdb/src |
Date: |
Sun, 16 Dec 2007 18:12:40 -0700 (MST) |
Author: jcorgan
Date: 2007-12-16 18:12:40 -0700 (Sun, 16 Dec 2007)
New Revision: 7205
Added:
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lftx.py
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.cc
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.h
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.i
Modified:
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
Log:
Added lftx class, passes check.
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
2007-12-17 01:04:56 UTC (rev 7204)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
2007-12-17 01:12:40 UTC (rev 7205)
@@ -38,7 +38,8 @@
usrpdb_basic_tx.i \
usrpdb_hwa.i \
usrpdb_hwa_qa.i \
- usrpdb_lfrx.i
+ usrpdb_lfrx.i \
+ usrpdb_lftx.i
REMOTE_IFILES = \
$(top_srcdir)/gnuradio-core/src/lib/swig/shared_ptr.i
@@ -64,7 +65,8 @@
usrpdb_basic_tx.cc \
usrpdb_hwa.cc \
usrpdb_hwa_qa.cc \
- usrpdb_lfrx.cc
+ usrpdb_lfrx.cc \
+ usrpdb_lftx.cc
ourlib_LTLIBRARIES = _usrpdb.la
@@ -86,7 +88,8 @@
usrpdb_basic_tx.h \
usrpdb_hwa.h \
usrpdb_hwa_qa.h \
- usrpdb_lfrx.h
+ usrpdb_lfrx.h \
+ usrpdb_lftx.h
swiginclude_HEADERS = \
$(LOCAL_IFILES)
@@ -103,6 +106,7 @@
qa_basic_rx.py \
qa_basic_tx.py \
qa_lfrx.py \
+ qa_lftx.py \
qa_usrpdb.py
MOSTLYCLEANFILES = \
Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lftx.py
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lftx.py
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_lftx.py
2007-12-17 01:12:40 UTC (rev 7205)
@@ -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()
+ 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 = (-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_lftx.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-17 01:04:56 UTC (rev 7204)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
2007-12-17 01:12:40 UTC (rev 7205)
@@ -34,3 +34,4 @@
%include "usrpdb_basic_rx.i"
%include "usrpdb_basic_tx.i"
%include "usrpdb_lfrx.i"
+%include "usrpdb_lftx.i"
Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.cc
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.cc
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.cc
2007-12-17 01:12:40 UTC (rev 7205)
@@ -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()
+{
+}
Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.h
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.h
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.h
2007-12-17 01:12:40 UTC (rev 7205)
@@ -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 */
Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.i
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.i
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_lftx.i
2007-12-17 01:12:40 UTC (rev 7205)
@@ -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();
+};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7205 - gnuradio/branches/developers/jcorgan/t127/usrpdb/src,
jcorgan <=