[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7159 - gnuradio/branches/developers/jcorgan/t127/usrp
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r7159 - gnuradio/branches/developers/jcorgan/t127/usrpdb/src |
Date: |
Thu, 13 Dec 2007 17:47:00 -0700 (MST) |
Author: jcorgan
Date: 2007-12-13 17:46:59 -0700 (Thu, 13 Dec 2007)
New Revision: 7159
Added:
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.cc
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.h
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.i
Removed:
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_qa_hwa.cc
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_qa_hwa.h
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_qa_hwa.i
Modified:
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_basic_tx.py
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_usrpdb.py
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
Log:
Rename usrpdb.qa_hwa to usrpdb.hwa_qa
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
2007-12-14 00:23:51 UTC (rev 7158)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
2007-12-14 00:46:59 UTC (rev 7159)
@@ -34,7 +34,7 @@
LOCAL_IFILES = \
$(top_srcdir)/usrpdb/src/usrpdb.i \
$(top_srcdir)/usrpdb/src/usrpdb_basic_tx.i \
- $(top_srcdir)/usrpdb/src/usrpdb_qa_hwa.i
+ $(top_srcdir)/usrpdb/src/usrpdb_hwa_qa.i
REMOTE_IFILES = \
$(top_srcdir)/gnuradio-core/src/lib/swig/shared_ptr.i
@@ -58,7 +58,7 @@
usrpdb_base.cc \
usrpdb_basic_tx.cc \
usrpdb_hwa.cc \
- usrpdb_qa_hwa.cc
+ usrpdb_hwa_qa.cc
ourlib_LTLIBRARIES = _usrpdb.la
@@ -78,7 +78,7 @@
usrpdb_base.h \
usrpdb_basic_tx.h \
usrpdb_hwa.h \
- usrpdb_qa_hwa.h
+ usrpdb_hwa_qa.h
swiginclude_HEADERS = \
$(LOCAL_IFILES)
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_basic_tx.py
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_basic_tx.py
2007-12-14 00:23:51 UTC (rev 7158)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_basic_tx.py
2007-12-14 00:46:59 UTC (rev 7159)
@@ -26,7 +26,7 @@
class qa_basic_tx(gr_unittest.TestCase):
def setUp(self):
- self.hwa = usrpdb.qa_hwa()
+ self.hwa = usrpdb.hwa_qa()
self.db = usrpdb.basic_tx(self.hwa)
def tearDown(self):
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_usrpdb.py
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_usrpdb.py
2007-12-14 00:23:51 UTC (rev 7158)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_usrpdb.py
2007-12-14 00:46:59 UTC (rev 7159)
@@ -26,7 +26,7 @@
class qa_usrpdb (gr_unittest.TestCase):
def setUp(self):
- self.hwa = usrpdb.qa_hwa()
+ self.hwa = usrpdb.hwa_qa()
def tearDown(self):
self.hwa = None
Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
2007-12-14 00:23:51 UTC (rev 7158)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
2007-12-14 00:46:59 UTC (rev 7159)
@@ -23,5 +23,5 @@
%feature("autodoc", "1");
%include <shared_ptr.i>
-%include "usrpdb_qa_hwa.i"
+%include "usrpdb_hwa_qa.i"
%include "usrpdb_basic_tx.i"
Copied: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.cc
(from rev 7153,
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_qa_hwa.cc)
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.cc
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.cc
2007-12-14 00:46:59 UTC (rev 7159)
@@ -0,0 +1,75 @@
+/* -*- 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>
+
+usrpdb_hwa_qa_sptr
+usrpdb_make_qa_hwa()
+{
+ return usrpdb_hwa_qa_sptr(new usrpdb_hwa_qa());
+}
+
+usrpdb_hwa_qa::usrpdb_hwa_qa()
+ : d_dac_pga_gain(0.0)
+{
+}
+
+float
+usrpdb_hwa_qa::dac_pga_gain()
+{
+ return d_dac_pga_gain;
+}
+
+float
+usrpdb_hwa_qa::dac_pga_min()
+{
+ // mimic USRP1
+ return -20.0;
+}
+
+float
+usrpdb_hwa_qa::dac_pga_max()
+{
+ // mimic USRP1
+ return 0.0;
+}
+
+float
+usrpdb_hwa_qa::dac_pga_db_per_step()
+{
+ // mimic USRP1
+ return (dac_pga_max()-dac_pga_min())/100.0;
+}
+
+void
+usrpdb_hwa_qa::set_dac_pga(float gain)
+{
+ d_dac_pga_gain = gain;
+}
+
+usrpdb_hwa_qa::~usrpdb_hwa_qa()
+{
+}
Copied: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.h
(from rev 7153,
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_qa_hwa.h)
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.h
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.h
2007-12-14 00:46:59 UTC (rev 7159)
@@ -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_QA_H
+#define INCLUDED_USRPDB_HWA_QA_H
+
+#include <usrpdb_hwa.h>
+#include <boost/shared_ptr.hpp>
+
+class usrpdb_hwa_qa;
+typedef boost::shared_ptr<usrpdb_hwa_qa> usrpdb_hwa_qa_sptr;
+
+usrpdb_hwa_qa_sptr usrpdb_make_qa_hwa();
+
+class usrpdb_hwa_qa : usrpdb_hwa
+{
+ usrpdb_hwa_qa();
+
+ friend usrpdb_hwa_qa_sptr usrpdb_make_qa_hwa();
+
+ // Mimic dummy hardware
+ float d_dac_pga_gain;
+
+public:
+
+ int foo() const { return 42; }
+ ~usrpdb_hwa_qa();
+
+ float dac_pga_gain();
+ float dac_pga_min();
+ float dac_pga_max();
+ float dac_pga_db_per_step();
+ void set_dac_pga(float gain);
+};
+
+#endif /* INCLUDED_USRPDB_HWA_QA_H */
Copied: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.i
(from rev 7153,
gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_qa_hwa.i)
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.i
(rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_hwa_qa.i
2007-12-14 00:46:59 UTC (rev 7159)
@@ -0,0 +1,51 @@
+/* -*- 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>
+%}
+
+#include <usrpdb_hwa.h>
+
+class usrpdb_hwa_qa;
+typedef boost::shared_ptr<usrpdb_hwa_qa> usrpdb_hwa_qa_sptr;
+%template(usrpdb_hwa_qa_sptr) boost::shared_ptr<usrpdb_hwa_qa>;
+%rename(hwa_qa) usrpdb_make_qa_hwa;
+%ignore hwa_qa;
+
+usrpdb_hwa_qa_sptr usrpdb_make_qa_hwa();
+
+class usrpdb_hwa_qa : public usrpdb_hwa
+{
+protected:
+ usrpdb_hwa_qa();
+
+public:
+ int foo() const { return 42; }
+ ~usrpdb_hwa_qa();
+
+ float dac_pga_gain();
+ float dac_pga_min();
+ float dac_pga_max();
+ float dac_pga_db_per_step();
+ void set_dac_pga(float gain);
+};
Deleted: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_qa_hwa.cc
Deleted: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_qa_hwa.h
Deleted: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb_qa_hwa.i
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7159 - gnuradio/branches/developers/jcorgan/t127/usrpdb/src,
jcorgan <=