commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r9422 - in usrp2/branches/developers/jcorgan/wip: host


From: jcorgan
Subject: [Commit-gnuradio] r9422 - in usrp2/branches/developers/jcorgan/wip: host host-ng host-ng/gr-usrp2 host-ng/include/usrp2 host-ng/lib
Date: Tue, 26 Aug 2008 17:56:02 -0600 (MDT)

Author: jcorgan
Date: 2008-08-26 17:56:01 -0600 (Tue, 26 Aug 2008)
New Revision: 9422

Added:
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/Makefile.am
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/test_gr_usrp2.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2.i
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.h
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.h
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.h
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.h
Removed:
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/Makefile.am
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/test_gr_usrp2.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2.i
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.h
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.h
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.h
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.h
   usrp2/branches/developers/jcorgan/wip/host/gr-usrp2/
Modified:
   usrp2/branches/developers/jcorgan/wip/host-ng/
   usrp2/branches/developers/jcorgan/wip/host-ng/Makefile.am
   usrp2/branches/developers/jcorgan/wip/host-ng/configure.ac
   usrp2/branches/developers/jcorgan/wip/host-ng/include/usrp2/usrp2.h
   usrp2/branches/developers/jcorgan/wip/host-ng/lib/usrp2.cc
   usrp2/branches/developers/jcorgan/wip/host-ng/lib/usrp2_impl.h
   usrp2/branches/developers/jcorgan/wip/host/Makefile.am
   usrp2/branches/developers/jcorgan/wip/host/configure.ac
Log:
Rolled forward r9181:9183 from jcorgan/gr-usrp2 to jcorgan/wip

Modified: usrp2/branches/developers/jcorgan/wip/host/Makefile.am
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host/Makefile.am      2008-08-26 
23:44:55 UTC (rev 9421)
+++ usrp2/branches/developers/jcorgan/wip/host/Makefile.am      2008-08-26 
23:56:01 UTC (rev 9422)
@@ -26,4 +26,4 @@
        configure \
        config.h.in
 
-SUBDIRS = config lib gr-usrp2 apps
+SUBDIRS = config lib apps

Modified: usrp2/branches/developers/jcorgan/wip/host/configure.ac
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host/configure.ac     2008-08-26 
23:44:55 UTC (rev 9421)
+++ usrp2/branches/developers/jcorgan/wip/host/configure.ac     2008-08-26 
23:56:01 UTC (rev 9422)
@@ -205,7 +205,6 @@
     Makefile \
     config/Makefile \
     apps/Makefile \
-    gr-usrp2/Makefile \
     lib/Makefile \
 ])
 


Property changes on: usrp2/branches/developers/jcorgan/wip/host-ng
___________________________________________________________________
Name: svn:ignore
   - configure
Makefile.in
config.log
config.status
config.guess
stamp-h1
config.h
ltmain.sh
config.sub
config.h.in
libtool
autom4te.cache
missing
aclocal.m4
Makefile
install-sh
depcomp
usrp2*.tar.gz

   + configure
Makefile.in
config.log
config.status
config.guess
stamp-h1
config.h
ltmain.sh
config.sub
config.h.in
libtool
autom4te.cache
missing
aclocal.m4
Makefile
install-sh
depcomp
usrp2*.tar.gz
py-compile


Modified: usrp2/branches/developers/jcorgan/wip/host-ng/Makefile.am
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/Makefile.am   2008-08-26 
23:44:55 UTC (rev 9421)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/Makefile.am   2008-08-26 
23:56:01 UTC (rev 9422)
@@ -26,4 +26,4 @@
        configure \
        config.h.in
 
-SUBDIRS = config include lib apps
+SUBDIRS = config include lib gr-usrp2 apps

Modified: usrp2/branches/developers/jcorgan/wip/host-ng/configure.ac
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/configure.ac  2008-08-26 
23:44:55 UTC (rev 9421)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/configure.ac  2008-08-26 
23:56:01 UTC (rev 9422)
@@ -221,6 +221,7 @@
     config/Makefile \
     include/Makefile \
     include/usrp2/Makefile \
+    gr-usrp2/Makefile \
     lib/Makefile \
 ])
 

Copied: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2 (from rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2)


Property changes on: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2
___________________________________________________________________
Name: svn:ignore
   + .libs
.deps
Makefile
Makefile.in
*.pyc
usrp2.cc
usrp2.py
test_gr_usrp2


Deleted: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/Makefile.am

Copied: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/Makefile.am 
(from rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/Makefile.am)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/Makefile.am          
                (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/Makefile.am  
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,94 @@
+#
+# Copyright 2007,2008 Free Software Foundation, Inc.
+#
+# This program 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 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+
+include $(top_srcdir)/Makefile.common
+
+AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES)
+
+lib_LTLIBRARIES = \
+       libgr_usrp2.la
+
+bin_PROGRAMS = \
+        test_gr_usrp2
+        
+test_gr_usrp2_SOURCES = test_gr_usrp2.cc
+test_gr_usrp2_LDADD = \
+    libgr_usrp2.la \
+    $(top_builddir)/lib/libusrp2ng.la
+
+libgr_usrp2_la_SOURCES = \
+       usrp2_source_base.cc \
+       usrp2_source_c.cc
+#      usrp2_sink_base.cc
+#      usrp2_sink_c.cc
+
+libgr_usrp2_la_LIBADD = \
+       $(top_builddir)/lib/libusrp2ng.la \
+        $(GNURADIO_CORE_LIBS)
+
+# These will get installed once this moves into GNU Radio trunk
+#include_HEADERS = \
+#      usrp2_sink_base.h \
+#      usrp2_sink_c.h \
+#      usrp2_source_base.h \
+#      usrp2_source_c.h
+
+# Export C++ GNU Radio driver to Python via SWIG
+#ourpythondir = $(grpythondir)
+#ourlibdir    = $(grpyexecdir)
+
+#SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(SWIGGRFLAGS) $(WITH_SWIG_INCLUDES) \
+#      $(WITH_INCLUDES)
+
+#LOCAL_IFILES = \
+#      usrp2.i                         
+
+#BUILT_SOURCES =       \
+#      usrp2.cc \
+#      usrp2.py                        
+
+#ourpython_PYTHON = \
+#      usrp2.py
+
+#ourlib_LTLIBRARIES = \
+#      _usrp2.la
+
+#_usrp2_la_SOURCES = \
+#      usrp2.cc
+
+#_usrp2_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
+
+#_usrp2_la_LIBADD = \
+#      $(PYTHON_LDFLAGS) \
+#      libgr_usrp2.la \
+#      $(GNURADIO_CORE_LIBS) \
+#      -lstdc++                        
+
+#_usrp2_la_CPPFLAGS = $(PYTHON_CPPFLAGS)
+
+#usrp2.cc usrp2.py: $(LOCAL_IFILES)
+#      $(SWIG) $(SWIGPYTHONARGS) -module usrp2 -o usrp2.cc $(LOCAL_IFILES)
+
+#swiginclude_HEADERS = \
+#      $(LOCAL_IFILES)
+
+# 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
+
+MOSTLYCLEANFILES += $(BUILT_SOURCES) *.pyc *~

Deleted: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/test_gr_usrp2.cc

Copied: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/test_gr_usrp2.cc 
(from rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/test_gr_usrp2.cc)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/test_gr_usrp2.cc     
                        (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/test_gr_usrp2.cc     
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,34 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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 "usrp2_source_c.h"
+
+int
+main(char *argc, char **argv)
+{
+  usrp2_source_c_sptr u2 = usrp2_make_source_c();
+  printf("Using USRP2 at %s\n", u2->mac_addr().c_str());
+}

Deleted: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2.i

Copied: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2.i (from 
rev 9183, usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/usrp2.i)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2.i              
                (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2.i      
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,97 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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");              // generate python docstrings
+
+%include "exception.i"
+%import "gnuradio.i"                           // the common stuff
+
+%{
+#include "gnuradio_swig_bug_workaround.h"      // mandatory bug fix
+#include "usrp2_sink_c.h"
+#include "usrp2_source_c.h"
+%}
+
+// ----------------------------------------------------------------
+
+class usrp2_sink_base : public gr_sync_block {
+
+protected:
+  usrp2_sink_base(const std::string &name,
+                 gr_io_signature_sptr input_signature) 
+    throw (std::runtime_error);
+
+public:
+  ~usrp2_sink_base();
+
+};
+
+// ----------------------------------------------------------------
+
+class usrp2_source_base : public gr_sync_block {
+
+protected:
+  usrp2_source_base(const std::string &name,
+                   gr_io_signature_sptr output_signature) 
+    throw (std::runtime_error);
+
+public:
+  ~usrp2_source_base();
+
+};
+
+// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(usrp2,sink_c)
+
+usrp2_sink_c_sptr
+usrp2_make_sink_c() throw (std::runtime_error);
+
+class usrp2_sink_c : public usrp2_sink_base {
+
+protected:
+  usrp2_sink_c();
+
+public:
+  ~usrp2_sink_c();
+
+};
+
+// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(usrp2,source_c)
+
+usrp2_source_c_sptr
+usrp2_make_source_c(const std::string &ifc="eth0",
+                   const std::string &mac="") 
+  throw (std::runtime_error);
+
+class usrp2_source_c : public usrp2_source_base {
+
+protected:
+  usrp2_source_c(const std::string &ifc,
+                const std::string &mac);
+
+public:
+  ~usrp2_source_c();
+
+};

Deleted: 
usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.cc

Copied: 
usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.cc (from 
rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/usrp2_sink_base.cc)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.cc   
                        (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.cc   
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,49 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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 <usrp2_sink_base.h>
+#include <gr_io_signature.h>
+
+usrp2_sink_base::usrp2_sink_base(const std::string &name,
+                                gr_io_signature_sptr input_signature) 
+  throw (std::runtime_error)
+  : gr_sync_block(name,
+                 input_signature,
+                 gr_make_io_signature(0, 0, 0))
+{
+}
+
+usrp2_sink_base::~usrp2_sink_base ()
+{
+}
+
+int
+usrp2_sink_base::work(int noutput_items,
+                     gr_vector_const_void_star &input_items,
+                     gr_vector_void_star &output_items)
+{
+  return noutput_items;
+}

Deleted: 
usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.h

Copied: 
usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.h (from 
rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/usrp2_sink_base.h)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.h    
                        (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_base.h    
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,46 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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_USRP2_SINK_BASE_H
+#define INCLUDED_USRP2_SINK_BASE_H
+
+#include <gr_sync_block.h>
+#include <stdexcept>
+
+class usrp2_sink_base : public gr_sync_block {
+
+private:
+
+protected:
+  usrp2_sink_base(const std::string &name,
+                 gr_io_signature_sptr input_signature) 
+    throw (std::runtime_error);
+  
+public:
+  ~usrp2_sink_base();
+  
+  int work(int noutput_items,
+          gr_vector_const_void_star &input_items,
+          gr_vector_void_star &output_items);
+};
+
+#endif /* INCLUDED_USRP2_SINK_BASE_H */

Deleted: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.cc

Copied: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.cc 
(from rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/usrp2_sink_c.cc)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.cc      
                        (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.cc      
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,46 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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 <usrp2_sink_c.h>
+#include <gr_io_signature.h>
+#include <usrp_standard.h>
+#include <usrp_bytesex.h>
+
+usrp2_sink_c_sptr
+usrp2_make_sink_c() throw (std::runtime_error)
+{
+  return usrp2_sink_c_sptr(new usrp2_sink_c());
+}
+
+usrp2_sink_c::usrp2_sink_c() throw (std::runtime_error)
+  : usrp2_sink_base("usrp2_sink_c",
+                   gr_make_io_signature(1, 1, sizeof(gr_complex)))
+{
+}
+
+usrp2_sink_c::~usrp2_sink_c()
+{
+}

Deleted: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.h

Copied: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.h 
(from rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/usrp2_sink_c.h)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.h       
                        (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_sink_c.h       
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,47 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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_USRP2_SINK_C_H
+#define INCLUDED_USRP2_SINK_C_H
+
+#include <usrp2_sink_base.h>
+
+class usrp2_sink_c;
+typedef boost::shared_ptr<usrp2_sink_c> usrp2_sink_c_sptr;
+
+usrp2_sink_c_sptr
+usrp2_make_sink_c() throw (std::runtime_error);
+
+class usrp2_sink_c : public usrp2_sink_base {
+private:
+
+  friend usrp2_sink_c_sptr
+  usrp2_make_sink_c() throw (std::runtime_error);
+
+protected:
+  usrp2_sink_c() throw (std::runtime_error);
+
+public:
+  ~usrp2_sink_c();
+};
+
+#endif /* INCLUDED_USRP2_SINK_C_H */

Deleted: 
usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.cc

Copied: 
usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.cc 
(from rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/usrp2_source_base.cc)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.cc 
                        (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.cc 
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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 <usrp2_source_base.h>
+#include <gr_io_signature.h>
+#include <iostream>
+
+#define USRP2_SOURCE_BASE_DEBUG 0
+
+usrp2_source_base::usrp2_source_base(const std::string &name,
+                                    gr_io_signature_sptr output_signature,
+                                    const std::string &interface,
+                                    const std::string &mac) 
+  throw (std::runtime_error)
+  : gr_sync_block(name,
+                 gr_make_io_signature(0, 0, 0),
+                 output_signature),
+    d_u2(usrp2::usrp2::sptr())
+{
+  d_u2 = usrp2::usrp2::make(interface, mac);
+  if (!d_u2)
+    throw std::runtime_error("Unable to initialize USRP2!");
+}
+
+usrp2_source_base::~usrp2_source_base ()
+{
+}
+
+int
+usrp2_source_base::work(int noutput_items,
+                       gr_vector_const_void_star &input_items,
+                       gr_vector_void_star &output_items)
+{
+  return noutput_items;
+}

Deleted: 
usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.h

Copied: 
usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.h 
(from rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/usrp2_source_base.h)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.h  
                        (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_base.h  
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,51 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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_USRP2_SOURCE_BASE_H
+#define INCLUDED_USRP2_SOURCE_BASE_H
+
+#include <gr_sync_block.h>
+#include <usrp2/usrp2.h>
+#include <stdexcept>
+
+class usrp2_source_base : public gr_sync_block {
+  
+protected:
+  usrp2_source_base(const std::string &name,
+                   gr_io_signature_sptr output_signature,
+                   const std::string &ifc = "eth0",
+                   const std::string &mac = "")
+    throw (std::runtime_error);
+
+  usrp2::usrp2::sptr d_u2;
+
+public:
+  ~usrp2_source_base();
+
+  const std::string &mac_addr() const { return d_u2->mac_addr(); }
+  
+  int work(int noutput_items,
+          gr_vector_const_void_star &input_items,
+          gr_vector_void_star &output_items);
+};
+
+#endif /* INCLUDED_USRP2_SOURCE_BASE_H */

Deleted: 
usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.cc

Copied: 
usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.cc (from 
rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/usrp2_source_c.cc)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.cc    
                        (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.cc    
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,49 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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 <usrp2_source_c.h>
+#include <gr_io_signature.h>
+
+usrp2_source_c_sptr
+usrp2_make_source_c(const std::string &interface,
+                   const std::string &mac_addr) 
+  throw (std::runtime_error)
+{
+  return usrp2_source_c_sptr(new usrp2_source_c(interface, mac_addr));
+}
+
+usrp2_source_c::usrp2_source_c(const std::string &interface,
+                              const std::string &mac_addr) 
+  throw (std::runtime_error)
+  : usrp2_source_base("usrp2_source_c",
+                     gr_make_io_signature(1, 1, sizeof(gr_complex)),
+                     interface, mac_addr)
+{
+}
+
+usrp2_source_c::~usrp2_source_c()
+{
+}

Deleted: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.h

Copied: usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.h 
(from rev 9183, 
usrp2/branches/developers/jcorgan/gr-usrp2/host-ng/gr-usrp2/usrp2_source_c.h)
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.h     
                        (rev 0)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/gr-usrp2/usrp2_source_c.h     
2008-08-26 23:56:01 UTC (rev 9422)
@@ -0,0 +1,51 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 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_USRP2_SOURCE_C_H
+#define INCLUDED_USRP2_SOURCE_C_H
+
+#include <usrp2_source_base.h>
+
+class usrp2_source_c;
+typedef boost::shared_ptr<usrp2_source_c> usrp2_source_c_sptr;
+
+usrp2_source_c_sptr
+usrp2_make_source_c(const std::string &ifc="eth0",
+                   const std::string &mac="") 
+  throw (std::runtime_error);
+
+class usrp2_source_c : public usrp2_source_base {
+
+private:
+  friend usrp2_source_c_sptr
+  usrp2_make_source_c(const std::string &ifc,
+                     const std::string &mac) throw (std::runtime_error);
+
+protected:
+  usrp2_source_c(const std::string &ifc="eth0",
+                const std::string &mac="") throw (std::runtime_error);
+
+public:
+  ~usrp2_source_c();
+};
+
+#endif /* INCLUDED_USRP2_SOURCE_C_H */

Modified: usrp2/branches/developers/jcorgan/wip/host-ng/include/usrp2/usrp2.h
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/include/usrp2/usrp2.h 
2008-08-26 23:44:55 UTC (rev 9421)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/include/usrp2/usrp2.h 
2008-08-26 23:56:01 UTC (rev 9422)
@@ -83,6 +83,11 @@
      */
     ~usrp2();  
 
+    /*!
+     * Returns the MAC address associated with this USRP
+     */
+     const std::string &mac_addr();
+
     /*
      * ----------------------------------------------------------------
      * Rx configuration and control

Modified: usrp2/branches/developers/jcorgan/wip/host-ng/lib/usrp2.cc
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/lib/usrp2.cc  2008-08-26 
23:44:55 UTC (rev 9421)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/lib/usrp2.cc  2008-08-26 
23:56:01 UTC (rev 9422)
@@ -104,6 +104,12 @@
     // NOP
   }
   
+  const std::string &
+  usrp2::mac_addr()
+  {
+    return d_impl->mac_addr();
+  }
+
   // Receive
 
   bool 

Modified: usrp2/branches/developers/jcorgan/wip/host-ng/lib/usrp2_impl.h
===================================================================
--- usrp2/branches/developers/jcorgan/wip/host-ng/lib/usrp2_impl.h      
2008-08-26 23:44:55 UTC (rev 9421)
+++ usrp2/branches/developers/jcorgan/wip/host-ng/lib/usrp2_impl.h      
2008-08-26 23:56:01 UTC (rev 9422)
@@ -43,7 +43,7 @@
 
     eth_buffer    *d_eth_buf;
     pktfilter     *d_pf;
-    std::string    d_addr;
+    std::string    d_addr;       // FIXME: use u2_mac_addr_t instead
     usrp2_thread  *d_bg_thread;
     volatile bool  d_bg_running; // TODO: multistate if needed
     
@@ -94,6 +94,7 @@
     
     void bg_loop();
 
+    const std::string &mac_addr() const { return d_addr; } // FIXME: convert 
from u2_mac_addr_t
     bool set_rx_gain(double gain);
     bool set_rx_center_freq(double frequency, tune_result *result);
     bool set_rx_decim(int decimation_factor);





reply via email to

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