[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9737 - in gnuradio/branches/developers/jcorgan/dsss/g
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r9737 - in gnuradio/branches/developers/jcorgan/dsss/gr-dsss: include/dsss lib python |
Date: |
Tue, 7 Oct 2008 17:24:33 -0600 (MDT) |
Author: jcorgan
Date: 2008-10-07 17:24:31 -0600 (Tue, 07 Oct 2008)
New Revision: 9737
Added:
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/msequence_b.h
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/msequence_b.cc
Modified:
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/Makefile.am
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/code_gen_1b.h
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/Makefile.am
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/code_gen_1b.cc
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/qa_code_gen_1b.cc
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/python/code_gen_1b.i
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/python/dsss.i
Log:
wip
Modified:
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/Makefile.am
2008-10-07 23:17:28 UTC (rev 9736)
+++ gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/Makefile.am
2008-10-07 23:24:31 UTC (rev 9737)
@@ -23,4 +23,5 @@
ourincludedir = $(grincludedir)/dsss
ourinclude_HEADERS = \
- code_gen_1b.h
+ code_gen_1b.h \
+ msequence_b.h
Modified:
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/code_gen_1b.h
===================================================================
---
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/code_gen_1b.h
2008-10-07 23:17:28 UTC (rev 9736)
+++
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/code_gen_1b.h
2008-10-07 23:24:31 UTC (rev 9737)
@@ -22,25 +22,17 @@
#ifndef INCLUDED_DSSS_CODE_GEN_1B_H
#define INCLUDED_DSSS_CODE_GEN_1B_H
-#include <boost/shared_ptr.hpp>
+#include <gr_sync_block.h>
namespace dsss {
- class code_gen_1b;
- typedef boost::shared_ptr<code_gen_1b> code_gen_1b_sptr;
-
- code_gen_1b_sptr make_code_gen_1b();
-
- class code_gen_1b
+ class code_gen_1b : public gr_sync_block
{
- private:
- friend code_gen_1b_sptr make_code_gen_1b();
- code_gen_1b();
-
+ protected:
+ code_gen_1b(const std::string &name);
+
public:
~code_gen_1b();
-
- virtual unsigned char next();
};
} /* namespace dsss */
Added:
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/msequence_b.h
===================================================================
---
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/msequence_b.h
(rev 0)
+++
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/include/dsss/msequence_b.h
2008-10-07 23:24:31 UTC (rev 9737)
@@ -0,0 +1,54 @@
+/* -*- 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_DSSS_MSEQUENCE_B_H
+#define INCLUDED_DSSS_MSEQUENCE_B_H
+
+#include <dsss/code_gen_1b.h>
+#include <gri_glfsr.h>
+
+namespace dsss {
+
+ class msequence_b;
+ typedef boost::shared_ptr<msequence_b> msequence_b_sptr;
+
+ msequence_b_sptr make_msequence_b(int degree, int mask=0, int seed=1);
+
+ class msequence_b : public code_gen_1b
+ {
+ private:
+ friend msequence_b_sptr make_msequence_b(int degree, int mask, int seed);
+ msequence_b(int degree, int mask, int seed);
+
+ gri_glfsr *d_glfsr;
+
+ public:
+ ~msequence_b();
+
+
+ virtual int work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+} /* namespace dsss */
+
+#endif /* INCLUDED_DSSS_MSEQUENCE_B_H */
Modified: gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/Makefile.am
2008-10-07 23:17:28 UTC (rev 9736)
+++ gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/Makefile.am
2008-10-07 23:24:31 UTC (rev 9737)
@@ -36,11 +36,13 @@
# The main library
# ----------------------------------------------------------------
libgr_dsss_la_SOURCES = \
- code_gen_1b.cc
+ code_gen_1b.cc \
+ msequence_b.cc
libgr_dsss_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
-libgr_dsss_la_LIBADD =
+libgr_dsss_la_LIBADD = \
+ $(GNURADIO_CORE_LA)
# ----------------------------------------------------------------
# The QA library. Note libdsss.la in LIBADD
Modified: gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/code_gen_1b.cc
===================================================================
--- gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/code_gen_1b.cc
2008-10-07 23:17:28 UTC (rev 9736)
+++ gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/code_gen_1b.cc
2008-10-07 23:24:31 UTC (rev 9737)
@@ -24,17 +24,15 @@
#endif
#include <dsss/code_gen_1b.h>
+#include <gr_io_signature.h>
namespace dsss {
- code_gen_1b_sptr
- make_code_gen_1b()
+ code_gen_1b::code_gen_1b(const std::string &name)
+ : gr_sync_block(name,
+ gr_make_io_signature(0, 0, 0),
+ gr_make_io_signature(1, 1, 1))
{
- return code_gen_1b_sptr(new code_gen_1b());
- }
-
- code_gen_1b::code_gen_1b()
- {
// NOP
}
@@ -43,10 +41,4 @@
// NOP
}
- unsigned char
- code_gen_1b::next()
- {
- return 0;
- }
-
} /* namespace dsss */
Added: gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/msequence_b.cc
===================================================================
--- gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/msequence_b.cc
(rev 0)
+++ gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/msequence_b.cc
2008-10-07 23:24:31 UTC (rev 9737)
@@ -0,0 +1,58 @@
+/*
+ * 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 <dsss/msequence_b.h>
+
+namespace dsss {
+
+ msequence_b_sptr
+ make_msequence_b(int degree, int mask, int seed)
+ {
+ return msequence_b_sptr(new msequence_b(degree, mask, seed));
+ }
+
+ msequence_b::msequence_b(int degree, int mask, int seed)
+ : code_gen_1b("dsss.msequence_b")
+ {
+ if (mask == 0)
+ mask = gri_glfsr::glfsr_mask(degree);
+
+ d_glfsr = new gri_glfsr(mask, seed);
+ }
+
+ msequence_b::~msequence_b()
+ {
+ delete d_glfsr;
+ }
+
+ int
+ msequence_b::work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ return noutput_items;
+ }
+
+} /* namespace dsss */
Modified:
gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/qa_code_gen_1b.cc
===================================================================
--- gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/qa_code_gen_1b.cc
2008-10-07 23:17:28 UTC (rev 9736)
+++ gnuradio/branches/developers/jcorgan/dsss/gr-dsss/lib/qa_code_gen_1b.cc
2008-10-07 23:24:31 UTC (rev 9737)
@@ -26,6 +26,5 @@
void
qa_code_gen_1b::t1()
{
- dsss::code_gen_1b_sptr g = dsss::make_code_gen_1b();
- CPPUNIT_ASSERT(g->next() == 0);
+ CPPUNIT_ASSERT(true);
}
Modified: gnuradio/branches/developers/jcorgan/dsss/gr-dsss/python/code_gen_1b.i
===================================================================
--- gnuradio/branches/developers/jcorgan/dsss/gr-dsss/python/code_gen_1b.i
2008-10-07 23:17:28 UTC (rev 9736)
+++ gnuradio/branches/developers/jcorgan/dsss/gr-dsss/python/code_gen_1b.i
2008-10-07 23:24:31 UTC (rev 9737)
@@ -26,22 +26,12 @@
namespace dsss {
- // subset of GR_SWIG_BLOCK_MAGIC
- class code_gen_1b;
- typedef boost::shared_ptr<code_gen_1b> code_gen_1b_sptr;
- %template(code_gen_1b_sptr) boost::shared_ptr<code_gen_1b>;
- %rename(code_gen_1b) make_code_gen_1b;
- %ignore code_gen_1b;
-
- code_gen_1b_sptr make_code_gen_1b();
-
+ SWIG_SHARED_PTR(code_gen_1b_sptr, dsss::code_gen_1b);
+
class code_gen_1b
{
- private:
+ protected:
code_gen_1b();
-
- public:
- unsigned char next();
};
}
Modified: gnuradio/branches/developers/jcorgan/dsss/gr-dsss/python/dsss.i
===================================================================
--- gnuradio/branches/developers/jcorgan/dsss/gr-dsss/python/dsss.i
2008-10-07 23:17:28 UTC (rev 9736)
+++ gnuradio/branches/developers/jcorgan/dsss/gr-dsss/python/dsss.i
2008-10-07 23:24:31 UTC (rev 9737)
@@ -21,7 +21,7 @@
%feature("autodoc", "1"); // generate python docstrings
-%include <exception.i>
+//%include <exception.i>
%import <gnuradio.i> // the common stuff
%{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9737 - in gnuradio/branches/developers/jcorgan/dsss/gr-dsss: include/dsss lib python,
jcorgan <=