commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r7126 - gnuradio/branches/developers/jcorgan/t127/usrp


From: jcorgan
Subject: [Commit-gnuradio] r7126 - gnuradio/branches/developers/jcorgan/t127/usrpdb/src
Date: Wed, 12 Dec 2007 08:19:20 -0700 (MST)

Author: jcorgan
Date: 2007-12-12 08:19:20 -0700 (Wed, 12 Dec 2007)
New Revision: 7126

Added:
   gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.cc
   gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.h
   gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.i
   gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrp_hwa.cc
   gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrp_hwa.h
Modified:
   gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
   gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_usrpdb.py
   gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
Log:
Work in progress.

Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am    
2007-12-12 09:29:01 UTC (rev 7125)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/Makefile.am    
2007-12-12 15:19:20 UTC (rev 7126)
@@ -32,8 +32,14 @@
 TESTS = run_tests
 
 LOCAL_IFILES =                                 \
-       $(top_srcdir)/usrpdb/src/usrpdb.i
+       $(top_srcdir)/usrpdb/src/usrpdb.i \
+       $(top_srcdir)/usrpdb/src/qa_hwa.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                       
@@ -45,27 +51,36 @@
 
 SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(STD_DEFINES_AND_INCLUDES)
 
+lib_LTLIBRARIES = libusrpdb.la
+
+libusrpdb_la_SOURCES =                 \
+       qa_hwa.cc                       \
+       usrp_hwa.cc
+
 ourlib_LTLIBRARIES = _usrpdb.la
 
 _usrpdb_la_SOURCES =                   \
        usrpdb.cc
 
-#grinclude_HEADERS =                   \
-#      usrpdb_sink.h                   \
-#      usrpdb_source.h                 
-
-swiginclude_HEADERS =                  \
-       $(LOCAL_IFILES)
-
 _usrpdb_la_LIBADD =                    \
        $(PYTHON_LDFLAGS)               \
+       libusrpdb.la                    \
        -lstdc++                                
 
-_usrpdb_la_LDFLAGS = $(NO_UNDEFINED) -module
+libusrp_la_LDFLAGS = $(NO_UNDEFINED)
 
-usrpdb.cc usrpdb.py: $(LOCAL_IFILES)
-       $(SWIG) $(SWIGPYTHONARGS) -module usrpdb -o usrpdb.cc $(LOCAL_IFILES)
+_usrpdb_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
 
+grinclude_HEADERS =                    \
+       usrp_hwa.h                      \
+       qa_hwa.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
@@ -75,4 +90,3 @@
 
 MOSTLYCLEANFILES = \
        $(BUILT_SOURCES) *~ *.pyc
-

Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.cc
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.cc              
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.cc      
2007-12-12 15:19:20 UTC (rev 7126)
@@ -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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <qa_hwa.h>
+
+qa_hwa_sptr qa_make_hwa()
+{
+  return qa_hwa_sptr(new qa_hwa());
+}
+
+qa_hwa::qa_hwa()
+{
+}
+
+qa_hwa::~qa_hwa()
+{
+}

Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.h
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.h               
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.h       
2007-12-12 15:19:20 UTC (rev 7126)
@@ -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_QA_HWA_H
+#define INCLUDED_QA_HWA_H
+
+#include <usrp_hwa.h>
+#include <boost/shared_ptr.hpp>
+
+class qa_hwa;
+typedef boost::shared_ptr<qa_hwa> qa_hwa_sptr;
+
+qa_hwa_sptr qa_make_hwa();
+
+class qa_hwa : usrp_hwa
+{
+  qa_hwa();
+
+  friend qa_hwa_sptr qa_make_hwa();
+  
+public:
+
+  int foo() const { return 42; }
+  ~qa_hwa();
+};
+
+#endif /* INCLUDED_QA_HWA_H */

Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.i
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.i               
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_hwa.i       
2007-12-12 15:19:20 UTC (rev 7126)
@@ -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 <qa_hwa.h>
+%}
+
+class qa_hwa;
+typedef boost::shared_ptr<qa_hwa> qa_hwa_sptr;
+%template(qa_hwa_sptr) boost::shared_ptr<qa_hwa>;
+%rename(qa_hwa) qa_make_hwa;
+%ignore qa_hwa;
+
+qa_hwa_sptr qa_make_hwa();
+
+class qa_hwa
+{
+protected:
+  qa_hwa();
+
+public:
+  int foo() const { return 42; }
+  ~qa_hwa();
+};

Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_usrpdb.py
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_usrpdb.py   
2007-12-12 09:29:01 UTC (rev 7125)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/qa_usrpdb.py   
2007-12-12 15:19:20 UTC (rev 7126)
@@ -25,14 +25,14 @@
 
 class qa_usrpdb (gr_unittest.TestCase):
 
-    def setUp (self):
-       pass
+    def setUp(self):
+       self.hwa = usrpdb.qa_hwa()
 
-    def tearDown (self):
-       pass
+    def tearDown(self):
+       self.hwa = None
 
-    def test_000_nop (self):
-        """Just see if we can import the module..."""
+    def test_000_foo(self):
+       self.assertEqual(self.hwa.foo(), 42)
         pass
     
 if __name__ == '__main__':

Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrp_hwa.cc
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrp_hwa.cc            
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrp_hwa.cc    
2007-12-12 15:19:20 UTC (rev 7126)
@@ -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 <usrp_hwa.h>
+
+usrp_hwa::usrp_hwa()
+{
+}
+
+usrp_hwa::~usrp_hwa()
+{
+}

Added: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrp_hwa.h
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrp_hwa.h             
                (rev 0)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrp_hwa.h     
2007-12-12 15:19:20 UTC (rev 7126)
@@ -0,0 +1,34 @@
+/* -*- 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_H
+#define INCLUDED_USRP_HWA_H
+
+class usrp_hwa 
+{
+public:
+  usrp_hwa();
+
+  virtual ~usrp_hwa() = 0;
+};
+
+#endif /* INCLUDED_USRP_HWA_H */

Modified: gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i
===================================================================
--- gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i       
2007-12-12 09:29:01 UTC (rev 7125)
+++ gnuradio/branches/developers/jcorgan/t127/usrpdb/src/usrpdb.i       
2007-12-12 15:19:20 UTC (rev 7126)
@@ -0,0 +1,26 @@
+/* -*- 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 "qa_hwa.i"





reply via email to

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