commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r10543 - gnuradio/branches/developers/michaelld/two_mo


From: michaelld
Subject: [Commit-gnuradio] r10543 - gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen
Date: Sun, 1 Mar 2009 12:41:41 -0700 (MST)

Author: michaelld
Date: 2009-03-01 12:41:41 -0700 (Sun, 01 Mar 2009)
New Revision: 10543

Added:
   
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.cc.t
   
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.h.t
   
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.i.t
Modified:
   
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/Makefile.am
   
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/Makefile.gen
   
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/generate_common.py
Log:
Created new templates for and_const_XX from blocks found in
gr-gpio/src/lib .  Updated automatically generated files.



Modified: 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/Makefile.am
    2009-02-28 20:02:18 UTC (rev 10542)
+++ 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/Makefile.am
    2009-03-01 19:41:41 UTC (rev 10543)
@@ -107,6 +107,9 @@
        gr_and_XX.cc.t                  \
        gr_and_XX.h.t                   \
        gr_and_XX.i.t                   \
+       gr_and_const_XX.cc.t            \
+       gr_and_const_XX.h.t             \
+       gr_and_const_XX.i.t             \
        gr_or_XX.cc.t                   \
        gr_or_XX.h.t                    \
        gr_or_XX.i.t                    \

Modified: 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/Makefile.gen
===================================================================
--- 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/Makefile.gen
   2009-02-28 20:02:18 UTC (rev 10542)
+++ 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/Makefile.gen
   2009-03-01 19:41:41 UTC (rev 10543)
@@ -20,6 +20,9 @@
        gr_add_vii.h \
        gr_add_vss.h \
        gr_and_bb.h \
+       gr_and_const_bb.h \
+       gr_and_const_ii.h \
+       gr_and_const_ss.h \
        gr_and_ii.h \
        gr_and_ss.h \
        gr_argmax_fs.h \
@@ -130,6 +133,9 @@
        gr_add_vii.i \
        gr_add_vss.i \
        gr_and_bb.i \
+       gr_and_const_bb.i \
+       gr_and_const_ii.i \
+       gr_and_const_ss.i \
        gr_and_ii.i \
        gr_and_ss.i \
        gr_argmax_fs.i \
@@ -240,6 +246,9 @@
        gr_add_vii.cc \
        gr_add_vss.cc \
        gr_and_bb.cc \
+       gr_and_const_bb.cc \
+       gr_and_const_ii.cc \
+       gr_and_const_ss.cc \
        gr_and_ii.cc \
        gr_and_ss.cc \
        gr_argmax_fs.cc \

Modified: 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/generate_common.py
===================================================================
--- 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/generate_common.py
     2009-02-28 20:02:18 UTC (rev 10542)
+++ 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/generate_common.py
     2009-03-01 19:41:41 UTC (rev 10543)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2004,2006,2007,2008 Free Software Foundation, Inc.
+# Copyright 2004,2006,2007,2008,2009 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -62,6 +62,7 @@
     ('gr_packed_to_unpacked_XX',    ('bb','ss','ii')),
     ('gr_xor_XX',                   ('bb','ss','ii')),
     ('gr_and_XX',                   ('bb','ss','ii')),
+    ('gr_and_const_XX',             ('bb','ss','ii')),
     ('gr_or_XX',                    ('bb','ss','ii')),
     ('gr_not_XX',                   ('bb','ss','ii')),
     ('gr_sample_and_hold_XX',       ('bb','ss','ii','ff')),

Added: 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.cc.t
===================================================================
--- 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.cc.t
                           (rev 0)
+++ 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.cc.t
   2009-03-01 19:41:41 UTC (rev 10543)
@@ -0,0 +1,72 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 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.
+ */
+
+// @WARNING@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <@address@hidden>
+#include <gr_io_signature.h>
+
address@hidden@
address@hidden@ (@I_TYPE@ k)
+{
+  return @SPTR_NAME@ (new @NAME@ (k));
+};
+
address@hidden@::@NAME@ (@I_TYPE@ k)
+  : gr_sync_block ("@BASE_NAME@",
+                  gr_make_io_signature (1, 1, sizeof (@I_TYPE@)),
+                  gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
+  d_k (k)
+{
+}
+
+int
address@hidden@::work (int noutput_items,
+             gr_vector_const_void_star &input_items,
+             gr_vector_void_star &output_items)
+{
+  @I_TYPE@ *iptr = (@I_TYPE@ *) input_items[0];
+  @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+  int  size = noutput_items;
+
+  while (size >= 8) {
+    *optr++ = *iptr++ & d_k;
+    *optr++ = *iptr++ & d_k;
+    *optr++ = *iptr++ & d_k;
+    *optr++ = *iptr++ & d_k;
+    *optr++ = *iptr++ & d_k;
+    *optr++ = *iptr++ & d_k;
+    *optr++ = *iptr++ & d_k;
+    *optr++ = *iptr++ & d_k;
+    size -= 8;
+  }
+
+  while (size-- > 0)
+    *optr++ = *iptr++ & d_k;
+
+  return (noutput_items);
+}

Added: 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.h.t
===================================================================
--- 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.h.t
                            (rev 0)
+++ 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.h.t
    2009-03-01 19:41:41 UTC (rev 10543)
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 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.
+ */
+
+// @WARNING@
+
+#ifndef @GUARD_NAME@
+#define @GUARD_NAME@
+
+#include <gr_sync_block.h>
+
+class @NAME@;
+typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
+
address@hidden@ address@hidden@ (@O_TYPE@ k);
+
+/*!
+ * \brief output_N = input_N & value
+ * \ingroup math
+ *
+ * bitwise boolean and of const to the data stream.
+ */
+class @NAME@ : public gr_sync_block
+{
+  friend @SPTR_NAME@ address@hidden@ (@O_TYPE@ k);
+
+  @O_TYPE@     d_k;            // the constant
+  @NAME@ (@O_TYPE@ k);
+
+ public:
+  @O_TYPE@ k () const { return d_k; }
+  void set_k (@O_TYPE@ k) { d_k = k; }
+
+  int work (int noutput_items,
+           gr_vector_const_void_star &input_items,
+           gr_vector_void_star &output_items);
+};
+
+#endif

Added: 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.i.t
===================================================================
--- 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.i.t
                            (rev 0)
+++ 
gnuradio/branches/developers/michaelld/two_mods/gnuradio-core/src/lib/gengen/gr_and_const_XX.i.t
    2009-03-01 19:41:41 UTC (rev 10543)
@@ -0,0 +1,37 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 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.
+ */
+
+// @WARNING@
+
+GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@)
+
address@hidden@ address@hidden@ (@O_TYPE@ k);
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+  @NAME@ (@O_TYPE@ k);
+
+ public:
+  @O_TYPE@ k () const { return d_k; }
+  void set_k (@O_TYPE@ k) { d_k = k; }
+};





reply via email to

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