[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8362 - usrp2/branches/developers/jcorgan/gr-usrp2/hos
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r8362 - usrp2/branches/developers/jcorgan/gr-usrp2/host/lib |
Date: |
Sat, 10 May 2008 15:49:08 -0600 (MDT) |
Author: jcorgan
Date: 2008-05-10 15:49:00 -0600 (Sat, 10 May 2008)
New Revision: 8362
Added:
usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_base.cc
usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_base.h
usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_c.cc
usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_c.h
Modified:
usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/Makefile.am
usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2.i
Log:
Add source stubs.
Modified: usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/Makefile.am
===================================================================
--- usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/Makefile.am
2008-05-10 20:02:46 UTC (rev 8361)
+++ usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/Makefile.am
2008-05-10 21:49:00 UTC (rev 8362)
@@ -47,7 +47,9 @@
# C++ only GNU Radio applications link against this library
libgr_usrp2_la_SOURCES = \
usrp2_sink_base.cc \
- usrp2_sink_c.cc
+ usrp2_sink_c.cc \
+ usrp2_source_base.cc \
+ usrp2_source_c.cc
libgr_usrp2_la_LIBADD = \
libusrp2.la
@@ -62,9 +64,10 @@
strtod_si.h \
usrp2_basic.h \
usrp2_sink_base.h \
- usrp2_sink_c.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)
Modified: usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2.i
===================================================================
--- usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2.i 2008-05-10
20:02:46 UTC (rev 8361)
+++ usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2.i 2008-05-10
21:49:00 UTC (rev 8362)
@@ -27,5 +27,68 @@
%{
#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() throw (std::runtime_error);
+
+class usrp2_source_c : public usrp2_source_base {
+
+protected:
+ usrp2_source_c();
+
+public:
+ ~usrp2_source_c();
+
+};
Added: usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_base.cc
===================================================================
--- usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_base.cc
(rev 0)
+++ usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_base.cc
2008-05-10 21:49:00 UTC (rev 8362)
@@ -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_base.h>
+#include <gr_io_signature.h>
+
+usrp2_source_base::usrp2_source_base(const std::string &name,
+ gr_io_signature_sptr output_signature)
+ throw (std::runtime_error)
+ : gr_sync_block(name,
+ gr_make_io_signature(0, 0, 0),
+ output_signature)
+{
+}
+
+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;
+}
Added: usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_base.h
===================================================================
--- usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_base.h
(rev 0)
+++ usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_base.h
2008-05-10 21:49:00 UTC (rev 8362)
@@ -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_SOURCE_BASE_H
+#define INCLUDED_USRP2_SOURCE_BASE_H
+
+#include <gr_sync_block.h>
+#include <stdexcept>
+
+class usrp2_source_base : public gr_sync_block {
+
+private:
+
+protected:
+ usrp2_source_base(const std::string &name,
+ gr_io_signature_sptr output_signature)
+ throw (std::runtime_error);
+
+public:
+ ~usrp2_source_base();
+
+ int work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+};
+
+#endif /* INCLUDED_USRP2_SOURCE_BASE_H */
Added: usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_c.cc
===================================================================
--- usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_c.cc
(rev 0)
+++ usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_c.cc
2008-05-10 21:49:00 UTC (rev 8362)
@@ -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_source_c.h>
+#include <gr_io_signature.h>
+#include <usrp_standard.h>
+#include <usrp_bytesex.h>
+
+usrp2_source_c_sptr
+usrp2_make_source_c() throw (std::runtime_error)
+{
+ return usrp2_source_c_sptr(new usrp2_source_c());
+}
+
+usrp2_source_c::usrp2_source_c() throw (std::runtime_error)
+ : usrp2_source_base("usrp2_source_c",
+ gr_make_io_signature(1, 1, sizeof(gr_complex)))
+{
+}
+
+usrp2_source_c::~usrp2_source_c()
+{
+}
Added: usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_c.h
===================================================================
--- usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_c.h
(rev 0)
+++ usrp2/branches/developers/jcorgan/gr-usrp2/host/lib/usrp2_source_c.h
2008-05-10 21:49:00 UTC (rev 8362)
@@ -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_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() throw (std::runtime_error);
+
+class usrp2_source_c : public usrp2_source_base {
+
+private:
+ friend usrp2_source_c_sptr
+ usrp2_make_source_c() throw (std::runtime_error);
+
+protected:
+ usrp2_source_c() throw (std::runtime_error);
+
+public:
+ ~usrp2_source_c();
+};
+
+#endif /* INCLUDED_USRP2_SOURCE_C_H */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8362 - usrp2/branches/developers/jcorgan/gr-usrp2/host/lib,
jcorgan <=