[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r4536 - gnuradio/branches/developers/n4hy/ofdm/gnuradi
From: |
trondeau |
Subject: |
[Commit-gnuradio] r4536 - gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen |
Date: |
Tue, 20 Feb 2007 12:56:50 -0700 (MST) |
Author: trondeau
Date: 2007-02-20 12:56:50 -0700 (Tue, 20 Feb 2007)
New Revision: 4536
Added:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.cc.t
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.h.t
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.i.t
Modified:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/generate_common.py
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gengen_generated.i
Log:
added sample and hold circuit
Modified:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/generate_common.py
===================================================================
---
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/generate_common.py
2007-02-20 16:58:17 UTC (rev 4535)
+++
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/generate_common.py
2007-02-20 19:56:50 UTC (rev 4536)
@@ -57,7 +57,8 @@
others = (
('gr_chunks_to_symbols_XX', ('bf', 'bc', 'sf', 'sc', 'if', 'ic')),
('gr_unpacked_to_packed_XX', ('bb','ss','ii')),
- ('gr_packed_to_unpacked_XX', ('bb','ss','ii'))
+ ('gr_packed_to_unpacked_XX', ('bb','ss','ii')),
+ ('gr_sample_and_hold_XX', ('bb','ss','ii','ff'))
)
Modified:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gengen_generated.i
===================================================================
---
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gengen_generated.i
2007-02-20 16:58:17 UTC (rev 4535)
+++
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gengen_generated.i
2007-02-20 19:56:50 UTC (rev 4536)
@@ -56,6 +56,10 @@
#include <gr_packed_to_unpacked_bb.h>
#include <gr_packed_to_unpacked_ii.h>
#include <gr_packed_to_unpacked_ss.h>
+#include <gr_sample_and_hold_bb.h>
+#include <gr_sample_and_hold_ff.h>
+#include <gr_sample_and_hold_ii.h>
+#include <gr_sample_and_hold_ss.h>
#include <gr_sig_source_c.h>
#include <gr_sig_source_f.h>
#include <gr_sig_source_i.h>
@@ -133,6 +137,10 @@
%include <gr_packed_to_unpacked_bb.i>
%include <gr_packed_to_unpacked_ii.i>
%include <gr_packed_to_unpacked_ss.i>
+%include <gr_sample_and_hold_bb.i>
+%include <gr_sample_and_hold_ff.i>
+%include <gr_sample_and_hold_ii.i>
+%include <gr_sample_and_hold_ss.i>
%include <gr_sig_source_c.i>
%include <gr_sig_source_f.i>
%include <gr_sig_source_i.i>
Added:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.cc.t
===================================================================
---
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.cc.t
(rev 0)
+++
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.cc.t
2007-02-20 19:56:50 UTC (rev 4536)
@@ -0,0 +1,62 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004 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 2, 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@ ()
+{
+ return @SPTR_NAME@ (new @NAME@ ());
+}
+
address@hidden@::@NAME@ ()
+ : gr_sync_block ("@BASE_NAME@",
+ gr_make_io_signature (2, 2, sizeof (@I_TYPE@)),
+ gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
+ d_data(0)
+{
+}
+
+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];
+ @I_TYPE@ *ctrl = (@I_TYPE@ *) input_items[1];
+ @O_TYPE@ *optr = (@O_TYPE@ *) output_items[0];
+
+ for (int i = 0; i < noutput_items; i++){
+ if(ctrl[i] > 0.5) {
+ d_data = iptr[i];
+ }
+ optr[i] = d_data;
+ }
+ return noutput_items;
+}
Added:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.h.t
===================================================================
---
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.h.t
(rev 0)
+++
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.h.t
2007-02-20 19:56:50 UTC (rev 4536)
@@ -0,0 +1,57 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004 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 2, 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@ ();
+
+/*!
+ * \brief sample and hold circuit
+ * \ingroup block
+ *
+ * Samples the data stream (input stream 0) and holds the value
+ * if the control signal is 1 (intput stream 1).
+ */
+class @NAME@ : public gr_sync_block
+{
+ friend @SPTR_NAME@ address@hidden@ ();
+
+ @NAME@ ();
+
+ private:
+ @O_TYPE@ d_data;
+
+ public:
+ int work (int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+};
+
+#endif
Added:
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.i.t
===================================================================
---
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.i.t
(rev 0)
+++
gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen/gr_sample_and_hold_XX.i.t
2007-02-20 19:56:50 UTC (rev 4536)
@@ -0,0 +1,33 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004 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 2, 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@ ();
+
+class @NAME@ : public gr_sync_block
+{
+ private:
+ @NAME@ ();
+};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r4536 - gnuradio/branches/developers/n4hy/ofdm/gnuradio-core/src/lib/gengen,
trondeau <=