From: Bdale Garbee Date: Mon, 13 Dec 2010 18:26:22 +0000 (-0700) Subject: make maintainer-clean removes these, and we want a clean orig.tar.gz X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=d522829d8cd5a386b4426de5157b46d5d1856900;p=debian%2Fgnuradio make maintainer-clean removes these, and we want a clean orig.tar.gz --- diff --git a/gnuradio-core/src/lib/filter/filter_generated.i b/gnuradio-core/src/lib/filter/filter_generated.i deleted file mode 100644 index 0be0d895..00000000 --- a/gnuradio-core/src/lib/filter/filter_generated.i +++ /dev/null @@ -1,54 +0,0 @@ -// -// This file is machine generated. All edits will be overwritten -// -%{ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -%} - -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccc.cc b/gnuradio-core/src/lib/filter/gr_fir_ccc.cc deleted file mode 100644 index 912aaa70..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_ccc.cc +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -gr_fir_ccc::~gr_fir_ccc () -{ -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccc.h b/gnuradio-core/src/lib/filter/gr_fir_ccc.h deleted file mode 100644 index 77e3f6af..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_ccc.h +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,2003 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: This file is automatically generated by generate_gr_fir_XXX.py - * Any changes made to this file will be overwritten. - */ - - -#ifndef INCLUDED_GR_FIR_CCC_H -#define INCLUDED_GR_FIR_CCC_H - -#include -#include -#include - -/*! - * \brief Abstract class for FIR with gr_complex input, gr_complex output and gr_complex taps - * \ingroup filter_primitive - * - * This is the abstract class for a Finite Impulse Response filter. - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_ccc { - -protected: - std::vector d_taps; // reversed taps - -public: - - // CONSTRUCTORS - - /*! - * \brief construct new FIR with given taps. - * - * Note that taps must be in forward order, e.g., coefficient 0 is - * stored in new_taps[0], coefficient 1 is stored in - * new_taps[1], etc. - */ - gr_fir_ccc () {} - gr_fir_ccc (const std::vector &taps) : d_taps (gr_reverse(taps)) {} - - virtual ~gr_fir_ccc (); - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual gr_complex filter (const gr_complex input[]) = 0; - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (gr_complex output[], const gr_complex input[], - unsigned long n) = 0; - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (gr_complex output[], const gr_complex input[], - unsigned long n, unsigned decimate) = 0; - - /*! - * \brief install \p new_taps as the current taps. - */ - virtual void set_taps (const std::vector &taps) - { - d_taps = gr_reverse(taps); - } - - // ACCESSORS - - /*! - * \return number of taps in filter. - */ - unsigned ntaps () const { return d_taps.size (); } - - /*! - * \return current taps - */ - virtual const std::vector get_taps () const - { - return gr_reverse(d_taps); - } -}; - -#endif /* INCLUDED_GR_FIR_CCC_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccc_generic.cc b/gnuradio-core/src/lib/filter/gr_fir_ccc_generic.cc deleted file mode 100644 index 25d92f7a..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_ccc_generic.cc +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -#if (2 == 4) - -gr_complex -gr_fir_ccc_generic::filter (const gr_complex input[]) -{ - static const int N_UNROLL = 4; - - gr_complex acc0 = 0; - gr_complex acc1 = 0; - gr_complex acc2 = 0; - gr_complex acc3 = 0; - - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * input[i + 0]; - acc1 += d_taps[i + 1] * input[i + 1]; - acc2 += d_taps[i + 2] * input[i + 2]; - acc3 += d_taps[i + 3] * input[i + 3]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * input[i]; - - return (gr_complex) (acc0 + acc1 + acc2 + acc3); -} - -#else - -gr_complex -gr_fir_ccc_generic::filter (const gr_complex input[]) -{ - static const int N_UNROLL = 2; - - gr_complex acc0 = 0; - gr_complex acc1 = 0; - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * input[i + 0]; - acc1 += d_taps[i + 1] * input[i + 1]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * input[i]; - - return (gr_complex) (acc0 + acc1); -} - -#endif // N_UNROLL - -void -gr_fir_ccc_generic::filterN (gr_complex output[], - const gr_complex input[], - unsigned long n) -{ - for (unsigned i = 0; i < n; i++) - output[i] = filter (&input[i]); -} - -void -gr_fir_ccc_generic::filterNdec (gr_complex output[], - const gr_complex input[], - unsigned long n, - unsigned decimate) -{ - unsigned j = 0; - for (unsigned i = 0; i < n; i++){ - output[i] = filter (&input[j]); - j += decimate; - } -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccc_generic.h b/gnuradio-core/src/lib/filter/gr_fir_ccc_generic.h deleted file mode 100644 index e71de8af..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_ccc_generic.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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_GR_FIR_CCC_GENERIC_H -#define INCLUDED_GR_FIR_CCC_GENERIC_H - -#include - -/*! - * \brief Concrete class for generic implementation of FIR with gr_complex input, gr_complex output and gr_complex taps - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_ccc_generic : public gr_fir_ccc { - -public: - - // CREATORS - - gr_fir_ccc_generic () {} - gr_fir_ccc_generic (const std::vector &taps) : gr_fir_ccc (taps) {} - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual gr_complex filter (const gr_complex input[]); - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (gr_complex output[], const gr_complex input[], - unsigned long n); - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (gr_complex output[], const gr_complex input[], - unsigned long n, unsigned decimate); - -}; - -#endif /* INCLUDED_GR_FIR_CCC_GENERIC_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccf.cc b/gnuradio-core/src/lib/filter/gr_fir_ccf.cc deleted file mode 100644 index 1a61038f..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_ccf.cc +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -gr_fir_ccf::~gr_fir_ccf () -{ -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccf.h b/gnuradio-core/src/lib/filter/gr_fir_ccf.h deleted file mode 100644 index 3e0f4379..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_ccf.h +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,2003 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: This file is automatically generated by generate_gr_fir_XXX.py - * Any changes made to this file will be overwritten. - */ - - -#ifndef INCLUDED_GR_FIR_CCF_H -#define INCLUDED_GR_FIR_CCF_H - -#include -#include -#include - -/*! - * \brief Abstract class for FIR with gr_complex input, gr_complex output and float taps - * \ingroup filter_primitive - * - * This is the abstract class for a Finite Impulse Response filter. - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_ccf { - -protected: - std::vector d_taps; // reversed taps - -public: - - // CONSTRUCTORS - - /*! - * \brief construct new FIR with given taps. - * - * Note that taps must be in forward order, e.g., coefficient 0 is - * stored in new_taps[0], coefficient 1 is stored in - * new_taps[1], etc. - */ - gr_fir_ccf () {} - gr_fir_ccf (const std::vector &taps) : d_taps (gr_reverse(taps)) {} - - virtual ~gr_fir_ccf (); - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual gr_complex filter (const gr_complex input[]) = 0; - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (gr_complex output[], const gr_complex input[], - unsigned long n) = 0; - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (gr_complex output[], const gr_complex input[], - unsigned long n, unsigned decimate) = 0; - - /*! - * \brief install \p new_taps as the current taps. - */ - virtual void set_taps (const std::vector &taps) - { - d_taps = gr_reverse(taps); - } - - // ACCESSORS - - /*! - * \return number of taps in filter. - */ - unsigned ntaps () const { return d_taps.size (); } - - /*! - * \return current taps - */ - virtual const std::vector get_taps () const - { - return gr_reverse(d_taps); - } -}; - -#endif /* INCLUDED_GR_FIR_CCF_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccf_generic.cc b/gnuradio-core/src/lib/filter/gr_fir_ccf_generic.cc deleted file mode 100644 index 6b0e1541..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_ccf_generic.cc +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -#if (2 == 4) - -gr_complex -gr_fir_ccf_generic::filter (const gr_complex input[]) -{ - static const int N_UNROLL = 4; - - gr_complex acc0 = 0; - gr_complex acc1 = 0; - gr_complex acc2 = 0; - gr_complex acc3 = 0; - - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * input[i + 0]; - acc1 += d_taps[i + 1] * input[i + 1]; - acc2 += d_taps[i + 2] * input[i + 2]; - acc3 += d_taps[i + 3] * input[i + 3]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * input[i]; - - return (gr_complex) (acc0 + acc1 + acc2 + acc3); -} - -#else - -gr_complex -gr_fir_ccf_generic::filter (const gr_complex input[]) -{ - static const int N_UNROLL = 2; - - gr_complex acc0 = 0; - gr_complex acc1 = 0; - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * input[i + 0]; - acc1 += d_taps[i + 1] * input[i + 1]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * input[i]; - - return (gr_complex) (acc0 + acc1); -} - -#endif // N_UNROLL - -void -gr_fir_ccf_generic::filterN (gr_complex output[], - const gr_complex input[], - unsigned long n) -{ - for (unsigned i = 0; i < n; i++) - output[i] = filter (&input[i]); -} - -void -gr_fir_ccf_generic::filterNdec (gr_complex output[], - const gr_complex input[], - unsigned long n, - unsigned decimate) -{ - unsigned j = 0; - for (unsigned i = 0; i < n; i++){ - output[i] = filter (&input[j]); - j += decimate; - } -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_ccf_generic.h b/gnuradio-core/src/lib/filter/gr_fir_ccf_generic.h deleted file mode 100644 index 63a2651a..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_ccf_generic.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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_GR_FIR_CCF_GENERIC_H -#define INCLUDED_GR_FIR_CCF_GENERIC_H - -#include - -/*! - * \brief Concrete class for generic implementation of FIR with gr_complex input, gr_complex output and float taps - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_ccf_generic : public gr_fir_ccf { - -public: - - // CREATORS - - gr_fir_ccf_generic () {} - gr_fir_ccf_generic (const std::vector &taps) : gr_fir_ccf (taps) {} - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual gr_complex filter (const gr_complex input[]); - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (gr_complex output[], const gr_complex input[], - unsigned long n); - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (gr_complex output[], const gr_complex input[], - unsigned long n, unsigned decimate); - -}; - -#endif /* INCLUDED_GR_FIR_CCF_GENERIC_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_fcc.cc b/gnuradio-core/src/lib/filter/gr_fir_fcc.cc deleted file mode 100644 index c3f27fd1..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fcc.cc +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -gr_fir_fcc::~gr_fir_fcc () -{ -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_fcc.h b/gnuradio-core/src/lib/filter/gr_fir_fcc.h deleted file mode 100644 index eb6ea393..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fcc.h +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,2003 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: This file is automatically generated by generate_gr_fir_XXX.py - * Any changes made to this file will be overwritten. - */ - - -#ifndef INCLUDED_GR_FIR_FCC_H -#define INCLUDED_GR_FIR_FCC_H - -#include -#include -#include - -/*! - * \brief Abstract class for FIR with float input, gr_complex output and gr_complex taps - * \ingroup filter_primitive - * - * This is the abstract class for a Finite Impulse Response filter. - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_fcc { - -protected: - std::vector d_taps; // reversed taps - -public: - - // CONSTRUCTORS - - /*! - * \brief construct new FIR with given taps. - * - * Note that taps must be in forward order, e.g., coefficient 0 is - * stored in new_taps[0], coefficient 1 is stored in - * new_taps[1], etc. - */ - gr_fir_fcc () {} - gr_fir_fcc (const std::vector &taps) : d_taps (gr_reverse(taps)) {} - - virtual ~gr_fir_fcc (); - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual gr_complex filter (const float input[]) = 0; - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (gr_complex output[], const float input[], - unsigned long n) = 0; - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (gr_complex output[], const float input[], - unsigned long n, unsigned decimate) = 0; - - /*! - * \brief install \p new_taps as the current taps. - */ - virtual void set_taps (const std::vector &taps) - { - d_taps = gr_reverse(taps); - } - - // ACCESSORS - - /*! - * \return number of taps in filter. - */ - unsigned ntaps () const { return d_taps.size (); } - - /*! - * \return current taps - */ - virtual const std::vector get_taps () const - { - return gr_reverse(d_taps); - } -}; - -#endif /* INCLUDED_GR_FIR_FCC_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_fcc_generic.cc b/gnuradio-core/src/lib/filter/gr_fir_fcc_generic.cc deleted file mode 100644 index aa99a92f..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fcc_generic.cc +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -#if (2 == 4) - -gr_complex -gr_fir_fcc_generic::filter (const float input[]) -{ - static const int N_UNROLL = 4; - - gr_complex acc0 = 0; - gr_complex acc1 = 0; - gr_complex acc2 = 0; - gr_complex acc3 = 0; - - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * input[i + 0]; - acc1 += d_taps[i + 1] * input[i + 1]; - acc2 += d_taps[i + 2] * input[i + 2]; - acc3 += d_taps[i + 3] * input[i + 3]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * input[i]; - - return (gr_complex) (acc0 + acc1 + acc2 + acc3); -} - -#else - -gr_complex -gr_fir_fcc_generic::filter (const float input[]) -{ - static const int N_UNROLL = 2; - - gr_complex acc0 = 0; - gr_complex acc1 = 0; - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * input[i + 0]; - acc1 += d_taps[i + 1] * input[i + 1]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * input[i]; - - return (gr_complex) (acc0 + acc1); -} - -#endif // N_UNROLL - -void -gr_fir_fcc_generic::filterN (gr_complex output[], - const float input[], - unsigned long n) -{ - for (unsigned i = 0; i < n; i++) - output[i] = filter (&input[i]); -} - -void -gr_fir_fcc_generic::filterNdec (gr_complex output[], - const float input[], - unsigned long n, - unsigned decimate) -{ - unsigned j = 0; - for (unsigned i = 0; i < n; i++){ - output[i] = filter (&input[j]); - j += decimate; - } -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_fcc_generic.h b/gnuradio-core/src/lib/filter/gr_fir_fcc_generic.h deleted file mode 100644 index e63de12f..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fcc_generic.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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_GR_FIR_FCC_GENERIC_H -#define INCLUDED_GR_FIR_FCC_GENERIC_H - -#include - -/*! - * \brief Concrete class for generic implementation of FIR with float input, gr_complex output and gr_complex taps - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_fcc_generic : public gr_fir_fcc { - -public: - - // CREATORS - - gr_fir_fcc_generic () {} - gr_fir_fcc_generic (const std::vector &taps) : gr_fir_fcc (taps) {} - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual gr_complex filter (const float input[]); - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (gr_complex output[], const float input[], - unsigned long n); - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (gr_complex output[], const float input[], - unsigned long n, unsigned decimate); - -}; - -#endif /* INCLUDED_GR_FIR_FCC_GENERIC_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff.cc b/gnuradio-core/src/lib/filter/gr_fir_fff.cc deleted file mode 100644 index e8300b52..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fff.cc +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -gr_fir_fff::~gr_fir_fff () -{ -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff.h b/gnuradio-core/src/lib/filter/gr_fir_fff.h deleted file mode 100644 index be0be492..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fff.h +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,2003 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: This file is automatically generated by generate_gr_fir_XXX.py - * Any changes made to this file will be overwritten. - */ - - -#ifndef INCLUDED_GR_FIR_FFF_H -#define INCLUDED_GR_FIR_FFF_H - -#include - -#include - -/*! - * \brief Abstract class for FIR with float input, float output and float taps - * \ingroup filter_primitive - * - * This is the abstract class for a Finite Impulse Response filter. - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_fff { - -protected: - std::vector d_taps; // reversed taps - -public: - - // CONSTRUCTORS - - /*! - * \brief construct new FIR with given taps. - * - * Note that taps must be in forward order, e.g., coefficient 0 is - * stored in new_taps[0], coefficient 1 is stored in - * new_taps[1], etc. - */ - gr_fir_fff () {} - gr_fir_fff (const std::vector &taps) : d_taps (gr_reverse(taps)) {} - - virtual ~gr_fir_fff (); - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual float filter (const float input[]) = 0; - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (float output[], const float input[], - unsigned long n) = 0; - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (float output[], const float input[], - unsigned long n, unsigned decimate) = 0; - - /*! - * \brief install \p new_taps as the current taps. - */ - virtual void set_taps (const std::vector &taps) - { - d_taps = gr_reverse(taps); - } - - // ACCESSORS - - /*! - * \return number of taps in filter. - */ - unsigned ntaps () const { return d_taps.size (); } - - /*! - * \return current taps - */ - virtual const std::vector get_taps () const - { - return gr_reverse(d_taps); - } -}; - -#endif /* INCLUDED_GR_FIR_FFF_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff_generic.cc b/gnuradio-core/src/lib/filter/gr_fir_fff_generic.cc deleted file mode 100644 index cc2dcaa2..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fff_generic.cc +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -#if (4 == 4) - -float -gr_fir_fff_generic::filter (const float input[]) -{ - static const int N_UNROLL = 4; - - float acc0 = 0; - float acc1 = 0; - float acc2 = 0; - float acc3 = 0; - - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * input[i + 0]; - acc1 += d_taps[i + 1] * input[i + 1]; - acc2 += d_taps[i + 2] * input[i + 2]; - acc3 += d_taps[i + 3] * input[i + 3]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * input[i]; - - return (float) (acc0 + acc1 + acc2 + acc3); -} - -#else - -float -gr_fir_fff_generic::filter (const float input[]) -{ - static const int N_UNROLL = 2; - - float acc0 = 0; - float acc1 = 0; - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * input[i + 0]; - acc1 += d_taps[i + 1] * input[i + 1]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * input[i]; - - return (float) (acc0 + acc1); -} - -#endif // N_UNROLL - -void -gr_fir_fff_generic::filterN (float output[], - const float input[], - unsigned long n) -{ - for (unsigned i = 0; i < n; i++) - output[i] = filter (&input[i]); -} - -void -gr_fir_fff_generic::filterNdec (float output[], - const float input[], - unsigned long n, - unsigned decimate) -{ - unsigned j = 0; - for (unsigned i = 0; i < n; i++){ - output[i] = filter (&input[j]); - j += decimate; - } -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_fff_generic.h b/gnuradio-core/src/lib/filter/gr_fir_fff_generic.h deleted file mode 100644 index 86bc71be..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fff_generic.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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_GR_FIR_FFF_GENERIC_H -#define INCLUDED_GR_FIR_FFF_GENERIC_H - -#include - -/*! - * \brief Concrete class for generic implementation of FIR with float input, float output and float taps - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_fff_generic : public gr_fir_fff { - -public: - - // CREATORS - - gr_fir_fff_generic () {} - gr_fir_fff_generic (const std::vector &taps) : gr_fir_fff (taps) {} - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual float filter (const float input[]); - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (float output[], const float input[], - unsigned long n); - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (float output[], const float input[], - unsigned long n, unsigned decimate); - -}; - -#endif /* INCLUDED_GR_FIR_FFF_GENERIC_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_ccc.cc b/gnuradio-core/src/lib/filter/gr_fir_filter_ccc.cc deleted file mode 100644 index 5f5909f5..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_ccc.cc +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_fir_filter_ccc_sptr gr_make_fir_filter_ccc (int decimation, const std::vector &taps) -{ - return gr_fir_filter_ccc_sptr (new gr_fir_filter_ccc (decimation, taps)); -} - - -gr_fir_filter_ccc::gr_fir_filter_ccc (int decimation, const std::vector &taps) - : gr_sync_decimator ("fir_filter_ccc", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decimation), - d_updated (false) -{ - d_fir = gr_fir_util::create_gr_fir_ccc (taps); - set_history (d_fir->ntaps ()); -} - -gr_fir_filter_ccc::~gr_fir_filter_ccc () -{ - delete d_fir; -} - -void -gr_fir_filter_ccc::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; -} - -int -gr_fir_filter_ccc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *in = (gr_complex *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - d_fir->set_taps (d_new_taps); - set_history (d_fir->ntaps ()); - d_updated = false; - return 0; // history requirements may have changed. - } - - if (decimation() == 1) - d_fir->filterN (out, in, noutput_items); - - else - d_fir->filterNdec (out, in, noutput_items, decimation()); - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_ccc.h b/gnuradio-core/src/lib/filter/gr_fir_filter_ccc.h deleted file mode 100644 index f33b2dcb..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_ccc.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_FIR_FILTER_CCC_H -#define INCLUDED_GR_FIR_FILTER_CCC_H - -#include - -class gr_fir_filter_ccc; -typedef boost::shared_ptr gr_fir_filter_ccc_sptr; -gr_fir_filter_ccc_sptr gr_make_fir_filter_ccc (int decimation, const std::vector &taps); - -class gr_fir_ccc; - -/*! - * \brief FIR filter with gr_complex input, gr_complex output and gr_complex taps - * \ingroup filter_blk - */ -class gr_fir_filter_ccc : public gr_sync_decimator -{ - private: - friend gr_fir_filter_ccc_sptr gr_make_fir_filter_ccc (int decimation, const std::vector &taps); - - gr_fir_ccc *d_fir; - std::vector d_new_taps; - bool d_updated; - - /*! - * Construct a FIR filter with the given taps - */ - gr_fir_filter_ccc (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_ccc (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_ccc.i b/gnuradio-core/src/lib/filter/gr_fir_filter_ccc.i deleted file mode 100644 index 8207b4b2..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_ccc.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,fir_filter_ccc) - -gr_fir_filter_ccc_sptr gr_make_fir_filter_ccc (int decimation, const std::vector &taps); - -class gr_fir_filter_ccc : public gr_sync_decimator -{ - private: - gr_fir_filter_ccc (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_ccc (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_ccf.cc b/gnuradio-core/src/lib/filter/gr_fir_filter_ccf.cc deleted file mode 100644 index c36c8f3b..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_ccf.cc +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_fir_filter_ccf_sptr gr_make_fir_filter_ccf (int decimation, const std::vector &taps) -{ - return gr_fir_filter_ccf_sptr (new gr_fir_filter_ccf (decimation, taps)); -} - - -gr_fir_filter_ccf::gr_fir_filter_ccf (int decimation, const std::vector &taps) - : gr_sync_decimator ("fir_filter_ccf", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decimation), - d_updated (false) -{ - d_fir = gr_fir_util::create_gr_fir_ccf (taps); - set_history (d_fir->ntaps ()); -} - -gr_fir_filter_ccf::~gr_fir_filter_ccf () -{ - delete d_fir; -} - -void -gr_fir_filter_ccf::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; -} - -int -gr_fir_filter_ccf::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *in = (gr_complex *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - d_fir->set_taps (d_new_taps); - set_history (d_fir->ntaps ()); - d_updated = false; - return 0; // history requirements may have changed. - } - - if (decimation() == 1) - d_fir->filterN (out, in, noutput_items); - - else - d_fir->filterNdec (out, in, noutput_items, decimation()); - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_ccf.h b/gnuradio-core/src/lib/filter/gr_fir_filter_ccf.h deleted file mode 100644 index 6f74532d..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_ccf.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_FIR_FILTER_CCF_H -#define INCLUDED_GR_FIR_FILTER_CCF_H - -#include - -class gr_fir_filter_ccf; -typedef boost::shared_ptr gr_fir_filter_ccf_sptr; -gr_fir_filter_ccf_sptr gr_make_fir_filter_ccf (int decimation, const std::vector &taps); - -class gr_fir_ccf; - -/*! - * \brief FIR filter with gr_complex input, gr_complex output and float taps - * \ingroup filter_blk - */ -class gr_fir_filter_ccf : public gr_sync_decimator -{ - private: - friend gr_fir_filter_ccf_sptr gr_make_fir_filter_ccf (int decimation, const std::vector &taps); - - gr_fir_ccf *d_fir; - std::vector d_new_taps; - bool d_updated; - - /*! - * Construct a FIR filter with the given taps - */ - gr_fir_filter_ccf (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_ccf (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_ccf.i b/gnuradio-core/src/lib/filter/gr_fir_filter_ccf.i deleted file mode 100644 index ba9cee14..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_ccf.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,fir_filter_ccf) - -gr_fir_filter_ccf_sptr gr_make_fir_filter_ccf (int decimation, const std::vector &taps); - -class gr_fir_filter_ccf : public gr_sync_decimator -{ - private: - gr_fir_filter_ccf (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_ccf (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_fcc.cc b/gnuradio-core/src/lib/filter/gr_fir_filter_fcc.cc deleted file mode 100644 index 1785653e..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_fcc.cc +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_fir_filter_fcc_sptr gr_make_fir_filter_fcc (int decimation, const std::vector &taps) -{ - return gr_fir_filter_fcc_sptr (new gr_fir_filter_fcc (decimation, taps)); -} - - -gr_fir_filter_fcc::gr_fir_filter_fcc (int decimation, const std::vector &taps) - : gr_sync_decimator ("fir_filter_fcc", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decimation), - d_updated (false) -{ - d_fir = gr_fir_util::create_gr_fir_fcc (taps); - set_history (d_fir->ntaps ()); -} - -gr_fir_filter_fcc::~gr_fir_filter_fcc () -{ - delete d_fir; -} - -void -gr_fir_filter_fcc::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; -} - -int -gr_fir_filter_fcc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *in = (float *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - d_fir->set_taps (d_new_taps); - set_history (d_fir->ntaps ()); - d_updated = false; - return 0; // history requirements may have changed. - } - - if (decimation() == 1) - d_fir->filterN (out, in, noutput_items); - - else - d_fir->filterNdec (out, in, noutput_items, decimation()); - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_fcc.h b/gnuradio-core/src/lib/filter/gr_fir_filter_fcc.h deleted file mode 100644 index e9d06d29..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_fcc.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_FIR_FILTER_FCC_H -#define INCLUDED_GR_FIR_FILTER_FCC_H - -#include - -class gr_fir_filter_fcc; -typedef boost::shared_ptr gr_fir_filter_fcc_sptr; -gr_fir_filter_fcc_sptr gr_make_fir_filter_fcc (int decimation, const std::vector &taps); - -class gr_fir_fcc; - -/*! - * \brief FIR filter with float input, gr_complex output and gr_complex taps - * \ingroup filter_blk - */ -class gr_fir_filter_fcc : public gr_sync_decimator -{ - private: - friend gr_fir_filter_fcc_sptr gr_make_fir_filter_fcc (int decimation, const std::vector &taps); - - gr_fir_fcc *d_fir; - std::vector d_new_taps; - bool d_updated; - - /*! - * Construct a FIR filter with the given taps - */ - gr_fir_filter_fcc (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_fcc (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_fcc.i b/gnuradio-core/src/lib/filter/gr_fir_filter_fcc.i deleted file mode 100644 index 7dcbc38a..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_fcc.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,fir_filter_fcc) - -gr_fir_filter_fcc_sptr gr_make_fir_filter_fcc (int decimation, const std::vector &taps); - -class gr_fir_filter_fcc : public gr_sync_decimator -{ - private: - gr_fir_filter_fcc (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_fcc (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_fff.cc b/gnuradio-core/src/lib/filter/gr_fir_filter_fff.cc deleted file mode 100644 index ccd03342..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_fff.cc +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_fir_filter_fff_sptr gr_make_fir_filter_fff (int decimation, const std::vector &taps) -{ - return gr_fir_filter_fff_sptr (new gr_fir_filter_fff (decimation, taps)); -} - - -gr_fir_filter_fff::gr_fir_filter_fff (int decimation, const std::vector &taps) - : gr_sync_decimator ("fir_filter_fff", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (float)), - decimation), - d_updated (false) -{ - d_fir = gr_fir_util::create_gr_fir_fff (taps); - set_history (d_fir->ntaps ()); -} - -gr_fir_filter_fff::~gr_fir_filter_fff () -{ - delete d_fir; -} - -void -gr_fir_filter_fff::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; -} - -int -gr_fir_filter_fff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *in = (float *) input_items[0]; - float *out = (float *) output_items[0]; - - if (d_updated) { - d_fir->set_taps (d_new_taps); - set_history (d_fir->ntaps ()); - d_updated = false; - return 0; // history requirements may have changed. - } - - if (decimation() == 1) - d_fir->filterN (out, in, noutput_items); - - else - d_fir->filterNdec (out, in, noutput_items, decimation()); - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_fff.h b/gnuradio-core/src/lib/filter/gr_fir_filter_fff.h deleted file mode 100644 index d7615144..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_fff.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_FIR_FILTER_FFF_H -#define INCLUDED_GR_FIR_FILTER_FFF_H - -#include - -class gr_fir_filter_fff; -typedef boost::shared_ptr gr_fir_filter_fff_sptr; -gr_fir_filter_fff_sptr gr_make_fir_filter_fff (int decimation, const std::vector &taps); - -class gr_fir_fff; - -/*! - * \brief FIR filter with float input, float output and float taps - * \ingroup filter_blk - */ -class gr_fir_filter_fff : public gr_sync_decimator -{ - private: - friend gr_fir_filter_fff_sptr gr_make_fir_filter_fff (int decimation, const std::vector &taps); - - gr_fir_fff *d_fir; - std::vector d_new_taps; - bool d_updated; - - /*! - * Construct a FIR filter with the given taps - */ - gr_fir_filter_fff (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_fff (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_fff.i b/gnuradio-core/src/lib/filter/gr_fir_filter_fff.i deleted file mode 100644 index 28489434..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_fff.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,fir_filter_fff) - -gr_fir_filter_fff_sptr gr_make_fir_filter_fff (int decimation, const std::vector &taps); - -class gr_fir_filter_fff : public gr_sync_decimator -{ - private: - gr_fir_filter_fff (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_fff (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_fsf.cc b/gnuradio-core/src/lib/filter/gr_fir_filter_fsf.cc deleted file mode 100644 index 25b5a276..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_fsf.cc +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_fir_filter_fsf_sptr gr_make_fir_filter_fsf (int decimation, const std::vector &taps) -{ - return gr_fir_filter_fsf_sptr (new gr_fir_filter_fsf (decimation, taps)); -} - - -gr_fir_filter_fsf::gr_fir_filter_fsf (int decimation, const std::vector &taps) - : gr_sync_decimator ("fir_filter_fsf", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (short)), - decimation), - d_updated (false) -{ - d_fir = gr_fir_util::create_gr_fir_fsf (taps); - set_history (d_fir->ntaps ()); -} - -gr_fir_filter_fsf::~gr_fir_filter_fsf () -{ - delete d_fir; -} - -void -gr_fir_filter_fsf::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; -} - -int -gr_fir_filter_fsf::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *in = (float *) input_items[0]; - short *out = (short *) output_items[0]; - - if (d_updated) { - d_fir->set_taps (d_new_taps); - set_history (d_fir->ntaps ()); - d_updated = false; - return 0; // history requirements may have changed. - } - - if (decimation() == 1) - d_fir->filterN (out, in, noutput_items); - - else - d_fir->filterNdec (out, in, noutput_items, decimation()); - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_fsf.h b/gnuradio-core/src/lib/filter/gr_fir_filter_fsf.h deleted file mode 100644 index dcb6e031..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_fsf.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_FIR_FILTER_FSF_H -#define INCLUDED_GR_FIR_FILTER_FSF_H - -#include - -class gr_fir_filter_fsf; -typedef boost::shared_ptr gr_fir_filter_fsf_sptr; -gr_fir_filter_fsf_sptr gr_make_fir_filter_fsf (int decimation, const std::vector &taps); - -class gr_fir_fsf; - -/*! - * \brief FIR filter with float input, short output and float taps - * \ingroup filter_blk - */ -class gr_fir_filter_fsf : public gr_sync_decimator -{ - private: - friend gr_fir_filter_fsf_sptr gr_make_fir_filter_fsf (int decimation, const std::vector &taps); - - gr_fir_fsf *d_fir; - std::vector d_new_taps; - bool d_updated; - - /*! - * Construct a FIR filter with the given taps - */ - gr_fir_filter_fsf (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_fsf (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_fsf.i b/gnuradio-core/src/lib/filter/gr_fir_filter_fsf.i deleted file mode 100644 index 196a98d9..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_fsf.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,fir_filter_fsf) - -gr_fir_filter_fsf_sptr gr_make_fir_filter_fsf (int decimation, const std::vector &taps); - -class gr_fir_filter_fsf : public gr_sync_decimator -{ - private: - gr_fir_filter_fsf (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_fsf (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_scc.cc b/gnuradio-core/src/lib/filter/gr_fir_filter_scc.cc deleted file mode 100644 index a59c7ab2..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_scc.cc +++ /dev/null @@ -1,88 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_fir_filter_scc_sptr gr_make_fir_filter_scc (int decimation, const std::vector &taps) -{ - return gr_fir_filter_scc_sptr (new gr_fir_filter_scc (decimation, taps)); -} - - -gr_fir_filter_scc::gr_fir_filter_scc (int decimation, const std::vector &taps) - : gr_sync_decimator ("fir_filter_scc", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decimation), - d_updated (false) -{ - d_fir = gr_fir_util::create_gr_fir_scc (taps); - set_history (d_fir->ntaps ()); -} - -gr_fir_filter_scc::~gr_fir_filter_scc () -{ - delete d_fir; -} - -void -gr_fir_filter_scc::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; -} - -int -gr_fir_filter_scc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *in = (short *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - d_fir->set_taps (d_new_taps); - set_history (d_fir->ntaps ()); - d_updated = false; - return 0; // history requirements may have changed. - } - - if (decimation() == 1) - d_fir->filterN (out, in, noutput_items); - - else - d_fir->filterNdec (out, in, noutput_items, decimation()); - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_scc.h b/gnuradio-core/src/lib/filter/gr_fir_filter_scc.h deleted file mode 100644 index a48de056..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_scc.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_FIR_FILTER_SCC_H -#define INCLUDED_GR_FIR_FILTER_SCC_H - -#include - -class gr_fir_filter_scc; -typedef boost::shared_ptr gr_fir_filter_scc_sptr; -gr_fir_filter_scc_sptr gr_make_fir_filter_scc (int decimation, const std::vector &taps); - -class gr_fir_scc; - -/*! - * \brief FIR filter with short input, gr_complex output and gr_complex taps - * \ingroup filter_blk - */ -class gr_fir_filter_scc : public gr_sync_decimator -{ - private: - friend gr_fir_filter_scc_sptr gr_make_fir_filter_scc (int decimation, const std::vector &taps); - - gr_fir_scc *d_fir; - std::vector d_new_taps; - bool d_updated; - - /*! - * Construct a FIR filter with the given taps - */ - gr_fir_filter_scc (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_scc (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_scc.i b/gnuradio-core/src/lib/filter/gr_fir_filter_scc.i deleted file mode 100644 index 503870e4..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_filter_scc.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,fir_filter_scc) - -gr_fir_filter_scc_sptr gr_make_fir_filter_scc (int decimation, const std::vector &taps); - -class gr_fir_filter_scc : public gr_sync_decimator -{ - private: - gr_fir_filter_scc (int decimation, const std::vector &taps); - - public: - ~gr_fir_filter_scc (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_fir_fsf.cc b/gnuradio-core/src/lib/filter/gr_fir_fsf.cc deleted file mode 100644 index 1eb7af5f..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fsf.cc +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -gr_fir_fsf::~gr_fir_fsf () -{ -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_fsf.h b/gnuradio-core/src/lib/filter/gr_fir_fsf.h deleted file mode 100644 index fba0ff41..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fsf.h +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,2003 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: This file is automatically generated by generate_gr_fir_XXX.py - * Any changes made to this file will be overwritten. - */ - - -#ifndef INCLUDED_GR_FIR_FSF_H -#define INCLUDED_GR_FIR_FSF_H - -#include - -#include - -/*! - * \brief Abstract class for FIR with float input, short output and float taps - * \ingroup filter_primitive - * - * This is the abstract class for a Finite Impulse Response filter. - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_fsf { - -protected: - std::vector d_taps; // reversed taps - -public: - - // CONSTRUCTORS - - /*! - * \brief construct new FIR with given taps. - * - * Note that taps must be in forward order, e.g., coefficient 0 is - * stored in new_taps[0], coefficient 1 is stored in - * new_taps[1], etc. - */ - gr_fir_fsf () {} - gr_fir_fsf (const std::vector &taps) : d_taps (gr_reverse(taps)) {} - - virtual ~gr_fir_fsf (); - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual short filter (const float input[]) = 0; - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (short output[], const float input[], - unsigned long n) = 0; - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (short output[], const float input[], - unsigned long n, unsigned decimate) = 0; - - /*! - * \brief install \p new_taps as the current taps. - */ - virtual void set_taps (const std::vector &taps) - { - d_taps = gr_reverse(taps); - } - - // ACCESSORS - - /*! - * \return number of taps in filter. - */ - unsigned ntaps () const { return d_taps.size (); } - - /*! - * \return current taps - */ - virtual const std::vector get_taps () const - { - return gr_reverse(d_taps); - } -}; - -#endif /* INCLUDED_GR_FIR_FSF_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_fsf_generic.cc b/gnuradio-core/src/lib/filter/gr_fir_fsf_generic.cc deleted file mode 100644 index e8f7239d..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fsf_generic.cc +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -#if (4 == 4) - -short -gr_fir_fsf_generic::filter (const float input[]) -{ - static const int N_UNROLL = 4; - - float acc0 = 0; - float acc1 = 0; - float acc2 = 0; - float acc3 = 0; - - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * input[i + 0]; - acc1 += d_taps[i + 1] * input[i + 1]; - acc2 += d_taps[i + 2] * input[i + 2]; - acc3 += d_taps[i + 3] * input[i + 3]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * input[i]; - - return (short) (acc0 + acc1 + acc2 + acc3); -} - -#else - -short -gr_fir_fsf_generic::filter (const float input[]) -{ - static const int N_UNROLL = 2; - - float acc0 = 0; - float acc1 = 0; - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * input[i + 0]; - acc1 += d_taps[i + 1] * input[i + 1]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * input[i]; - - return (short) (acc0 + acc1); -} - -#endif // N_UNROLL - -void -gr_fir_fsf_generic::filterN (short output[], - const float input[], - unsigned long n) -{ - for (unsigned i = 0; i < n; i++) - output[i] = filter (&input[i]); -} - -void -gr_fir_fsf_generic::filterNdec (short output[], - const float input[], - unsigned long n, - unsigned decimate) -{ - unsigned j = 0; - for (unsigned i = 0; i < n; i++){ - output[i] = filter (&input[j]); - j += decimate; - } -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_fsf_generic.h b/gnuradio-core/src/lib/filter/gr_fir_fsf_generic.h deleted file mode 100644 index 318c7d9a..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_fsf_generic.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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_GR_FIR_FSF_GENERIC_H -#define INCLUDED_GR_FIR_FSF_GENERIC_H - -#include - -/*! - * \brief Concrete class for generic implementation of FIR with float input, short output and float taps - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_fsf_generic : public gr_fir_fsf { - -public: - - // CREATORS - - gr_fir_fsf_generic () {} - gr_fir_fsf_generic (const std::vector &taps) : gr_fir_fsf (taps) {} - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual short filter (const float input[]); - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (short output[], const float input[], - unsigned long n); - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (short output[], const float input[], - unsigned long n, unsigned decimate); - -}; - -#endif /* INCLUDED_GR_FIR_FSF_GENERIC_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_scc.cc b/gnuradio-core/src/lib/filter/gr_fir_scc.cc deleted file mode 100644 index 5e0342ad..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_scc.cc +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -gr_fir_scc::~gr_fir_scc () -{ -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_scc.h b/gnuradio-core/src/lib/filter/gr_fir_scc.h deleted file mode 100644 index 37f0305e..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_scc.h +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,2003 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: This file is automatically generated by generate_gr_fir_XXX.py - * Any changes made to this file will be overwritten. - */ - - -#ifndef INCLUDED_GR_FIR_SCC_H -#define INCLUDED_GR_FIR_SCC_H - -#include -#include -#include - -/*! - * \brief Abstract class for FIR with short input, gr_complex output and gr_complex taps - * \ingroup filter_primitive - * - * This is the abstract class for a Finite Impulse Response filter. - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_scc { - -protected: - std::vector d_taps; // reversed taps - -public: - - // CONSTRUCTORS - - /*! - * \brief construct new FIR with given taps. - * - * Note that taps must be in forward order, e.g., coefficient 0 is - * stored in new_taps[0], coefficient 1 is stored in - * new_taps[1], etc. - */ - gr_fir_scc () {} - gr_fir_scc (const std::vector &taps) : d_taps (gr_reverse(taps)) {} - - virtual ~gr_fir_scc (); - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual gr_complex filter (const short input[]) = 0; - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (gr_complex output[], const short input[], - unsigned long n) = 0; - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (gr_complex output[], const short input[], - unsigned long n, unsigned decimate) = 0; - - /*! - * \brief install \p new_taps as the current taps. - */ - virtual void set_taps (const std::vector &taps) - { - d_taps = gr_reverse(taps); - } - - // ACCESSORS - - /*! - * \return number of taps in filter. - */ - unsigned ntaps () const { return d_taps.size (); } - - /*! - * \return current taps - */ - virtual const std::vector get_taps () const - { - return gr_reverse(d_taps); - } -}; - -#endif /* INCLUDED_GR_FIR_SCC_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_scc_generic.cc b/gnuradio-core/src/lib/filter/gr_fir_scc_generic.cc deleted file mode 100644 index 8a2e5ada..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_scc_generic.cc +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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 -#endif -#include - -#if (2 == 4) - -gr_complex -gr_fir_scc_generic::filter (const short input[]) -{ - static const int N_UNROLL = 4; - - gr_complex acc0 = 0; - gr_complex acc1 = 0; - gr_complex acc2 = 0; - gr_complex acc3 = 0; - - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * (float) input[i + 0]; - acc1 += d_taps[i + 1] * (float) input[i + 1]; - acc2 += d_taps[i + 2] * (float) input[i + 2]; - acc3 += d_taps[i + 3] * (float) input[i + 3]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * (float) input[i]; - - return (gr_complex) (acc0 + acc1 + acc2 + acc3); -} - -#else - -gr_complex -gr_fir_scc_generic::filter (const short input[]) -{ - static const int N_UNROLL = 2; - - gr_complex acc0 = 0; - gr_complex acc1 = 0; - - unsigned i = 0; - unsigned n = (ntaps () / N_UNROLL) * N_UNROLL; - - for (i = 0; i < n; i += N_UNROLL){ - acc0 += d_taps[i + 0] * (float) input[i + 0]; - acc1 += d_taps[i + 1] * (float) input[i + 1]; - } - - for (; i < ntaps (); i++) - acc0 += d_taps[i] * (float) input[i]; - - return (gr_complex) (acc0 + acc1); -} - -#endif // N_UNROLL - -void -gr_fir_scc_generic::filterN (gr_complex output[], - const short input[], - unsigned long n) -{ - for (unsigned i = 0; i < n; i++) - output[i] = filter (&input[i]); -} - -void -gr_fir_scc_generic::filterNdec (gr_complex output[], - const short input[], - unsigned long n, - unsigned decimate) -{ - unsigned j = 0; - for (unsigned i = 0; i < n; i++){ - output[i] = filter (&input[j]); - j += decimate; - } -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_scc_generic.h b/gnuradio-core/src/lib/filter/gr_fir_scc_generic.h deleted file mode 100644 index 650c15e2..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_scc_generic.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002 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_GR_FIR_SCC_GENERIC_H -#define INCLUDED_GR_FIR_SCC_GENERIC_H - -#include - -/*! - * \brief Concrete class for generic implementation of FIR with short input, gr_complex output and gr_complex taps - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), 'i' (int) - */ - -class gr_fir_scc_generic : public gr_fir_scc { - -public: - - // CREATORS - - gr_fir_scc_generic () {} - gr_fir_scc_generic (const std::vector &taps) : gr_fir_scc (taps) {} - - // MANIPULATORS - - /*! - * \brief compute a single output value. - * - * \p input must have ntaps() valid entries. - * input[0] .. input[ntaps() - 1] are referenced to compute the output value. - * - * \returns the filtered input value. - */ - virtual gr_complex filter (const short input[]); - - /*! - * \brief compute an array of N output values. - * - * \p input must have (n - 1 + ntaps()) valid entries. - * input[0] .. input[n - 1 + ntaps() - 1] are referenced to compute the output values. - */ - virtual void filterN (gr_complex output[], const short input[], - unsigned long n); - - /*! - * \brief compute an array of N output values, decimating the input - * - * \p input must have (decimate * (n - 1) + ntaps()) valid entries. - * input[0] .. input[decimate * (n - 1) + ntaps() - 1] are referenced to - * compute the output values. - */ - virtual void filterNdec (gr_complex output[], const short input[], - unsigned long n, unsigned decimate); - -}; - -#endif /* INCLUDED_GR_FIR_SCC_GENERIC_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_sysconfig.cc b/gnuradio-core/src/lib/filter/gr_fir_sysconfig.cc deleted file mode 100644 index 947db4ee..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_sysconfig.cc +++ /dev/null @@ -1,35 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by generate_gr_fir_sysconfig.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include - -gr_fir_sysconfig::~gr_fir_sysconfig () -{ -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_sysconfig.h b/gnuradio-core/src/lib/filter/gr_fir_sysconfig.h deleted file mode 100644 index b988e490..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_sysconfig.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by generate_gr_fir_sysconfig.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_FIR_SYSCONFIG_H -#define INCLUDED_GR_FIR_SYSCONFIG_H - -#include - -#include - -/*! - * \brief abstract base class for configuring the automatic selection of the - * fastest gr_fir for your platform. - * - * This is used internally by gr_fir_util. - */ - -class gr_fir_sysconfig { -public: - virtual ~gr_fir_sysconfig (); - - virtual gr_fir_ccf *create_gr_fir_ccf (const std::vector &taps) = 0; - virtual gr_fir_fcc *create_gr_fir_fcc (const std::vector &taps) = 0; - virtual gr_fir_ccc *create_gr_fir_ccc (const std::vector &taps) = 0; - virtual gr_fir_fff *create_gr_fir_fff (const std::vector &taps) = 0; - virtual gr_fir_scc *create_gr_fir_scc (const std::vector &taps) = 0; - virtual gr_fir_fsf *create_gr_fir_fsf (const std::vector &taps) = 0; - - virtual void get_gr_fir_ccf_info (std::vector *info) = 0; - virtual void get_gr_fir_fcc_info (std::vector *info) = 0; - virtual void get_gr_fir_ccc_info (std::vector *info) = 0; - virtual void get_gr_fir_fff_info (std::vector *info) = 0; - virtual void get_gr_fir_scc_info (std::vector *info) = 0; - virtual void get_gr_fir_fsf_info (std::vector *info) = 0; - -}; - -/* - * This returns the single instance of the appropriate derived class. - * This function must be defined only once in the system, and should be defined - * in the platform specific code. - */ - -gr_fir_sysconfig *gr_fir_sysconfig_singleton (); - - -#endif /* INCLUDED_GR_FIR_SYSCONFIG_H */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_generic.cc b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_generic.cc deleted file mode 100644 index f5ba6d4f..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_generic.cc +++ /dev/null @@ -1,180 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by - * generate_gr_fir_sysconfig_generic.py. - * - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include - -#include -#include -#include -#include -#include -#include - -/* - * ---------------------------------------------------------------- - * static functions that serve as constructors returned by info - * ---------------------------------------------------------------- - */ - -static gr_fir_ccf * -make_gr_fir_ccf (const std::vector &taps) -{ - return new gr_fir_ccf_generic (taps); -} - -static gr_fir_fcc * -make_gr_fir_fcc (const std::vector &taps) -{ - return new gr_fir_fcc_generic (taps); -} - -static gr_fir_ccc * -make_gr_fir_ccc (const std::vector &taps) -{ - return new gr_fir_ccc_generic (taps); -} - -static gr_fir_fff * -make_gr_fir_fff (const std::vector &taps) -{ - return new gr_fir_fff_generic (taps); -} - -static gr_fir_scc * -make_gr_fir_scc (const std::vector &taps) -{ - return new gr_fir_scc_generic (taps); -} - -static gr_fir_fsf * -make_gr_fir_fsf (const std::vector &taps) -{ - return new gr_fir_fsf_generic (taps); -} - -/* - * ---------------------------------------------------------------- - * return instances of the generic C++ versions of these classes. - * ---------------------------------------------------------------- - */ - -gr_fir_ccf * -gr_fir_sysconfig_generic::create_gr_fir_ccf (const std::vector &taps) -{ - return make_gr_fir_ccf (taps); -} - -gr_fir_fcc * -gr_fir_sysconfig_generic::create_gr_fir_fcc (const std::vector &taps) -{ - return make_gr_fir_fcc (taps); -} - -gr_fir_ccc * -gr_fir_sysconfig_generic::create_gr_fir_ccc (const std::vector &taps) -{ - return make_gr_fir_ccc (taps); -} - -gr_fir_fff * -gr_fir_sysconfig_generic::create_gr_fir_fff (const std::vector &taps) -{ - return make_gr_fir_fff (taps); -} - -gr_fir_scc * -gr_fir_sysconfig_generic::create_gr_fir_scc (const std::vector &taps) -{ - return make_gr_fir_scc (taps); -} - -gr_fir_fsf * -gr_fir_sysconfig_generic::create_gr_fir_fsf (const std::vector &taps) -{ - return make_gr_fir_fsf (taps); -} - -/* - * Return info about available implementations. - * - * This is the bottom of the concrete hierarchy, so we set the - * size of the vector to 1, and install our info. Classes derived - * from us invoke us first, then append their own info. - */ - -void -gr_fir_sysconfig_generic::get_gr_fir_ccf_info (std::vector *info) -{ - info->resize (1); - (*info)[0].name = "generic"; - (*info)[0].create = make_gr_fir_ccf; -} - -void -gr_fir_sysconfig_generic::get_gr_fir_fcc_info (std::vector *info) -{ - info->resize (1); - (*info)[0].name = "generic"; - (*info)[0].create = make_gr_fir_fcc; -} - -void -gr_fir_sysconfig_generic::get_gr_fir_ccc_info (std::vector *info) -{ - info->resize (1); - (*info)[0].name = "generic"; - (*info)[0].create = make_gr_fir_ccc; -} - -void -gr_fir_sysconfig_generic::get_gr_fir_fff_info (std::vector *info) -{ - info->resize (1); - (*info)[0].name = "generic"; - (*info)[0].create = make_gr_fir_fff; -} - -void -gr_fir_sysconfig_generic::get_gr_fir_scc_info (std::vector *info) -{ - info->resize (1); - (*info)[0].name = "generic"; - (*info)[0].create = make_gr_fir_scc; -} - -void -gr_fir_sysconfig_generic::get_gr_fir_fsf_info (std::vector *info) -{ - info->resize (1); - (*info)[0].name = "generic"; - (*info)[0].create = make_gr_fir_fsf; -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_generic.h b/gnuradio-core/src/lib/filter/gr_fir_sysconfig_generic.h deleted file mode 100644 index 747c8c03..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_sysconfig_generic.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by - * generate_gr_fir_sysconfig_generic.py. - * - * Any changes made to this file will be overwritten. - */ - -#ifndef _GR_FIR_SYSCONFIG_GENERIC_H_ -#define _GR_FIR_SYSCONFIG_GENERIC_H_ - -#include - - -class gr_fir_sysconfig_generic : public gr_fir_sysconfig { -public: - virtual gr_fir_ccf *create_gr_fir_ccf (const std::vector &taps); - virtual gr_fir_fcc *create_gr_fir_fcc (const std::vector &taps); - virtual gr_fir_ccc *create_gr_fir_ccc (const std::vector &taps); - virtual gr_fir_fff *create_gr_fir_fff (const std::vector &taps); - virtual gr_fir_scc *create_gr_fir_scc (const std::vector &taps); - virtual gr_fir_fsf *create_gr_fir_fsf (const std::vector &taps); - - virtual void get_gr_fir_ccf_info (std::vector *info); - virtual void get_gr_fir_fcc_info (std::vector *info); - virtual void get_gr_fir_ccc_info (std::vector *info); - virtual void get_gr_fir_fff_info (std::vector *info); - virtual void get_gr_fir_scc_info (std::vector *info); - virtual void get_gr_fir_fsf_info (std::vector *info); - -}; - - -#endif /* _GR_FIR_SYSCONFIG_GENERIC_H_ */ diff --git a/gnuradio-core/src/lib/filter/gr_fir_util.cc b/gnuradio-core/src/lib/filter/gr_fir_util.cc deleted file mode 100644 index 747f56e8..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_util.cc +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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 -#endif -#include -#include - -// -// There's no problem that can't be solved by the addition of -// another layer of indirection... -// - -// --- constructors --- - - -gr_fir_ccf * -gr_fir_util::create_gr_fir_ccf (const std::vector &taps) -{ - return gr_fir_sysconfig_singleton()->create_gr_fir_ccf (taps); -} - -gr_fir_fcc * -gr_fir_util::create_gr_fir_fcc (const std::vector &taps) -{ - return gr_fir_sysconfig_singleton()->create_gr_fir_fcc (taps); -} - -gr_fir_ccc * -gr_fir_util::create_gr_fir_ccc (const std::vector &taps) -{ - return gr_fir_sysconfig_singleton()->create_gr_fir_ccc (taps); -} - -gr_fir_fff * -gr_fir_util::create_gr_fir_fff (const std::vector &taps) -{ - return gr_fir_sysconfig_singleton()->create_gr_fir_fff (taps); -} - -gr_fir_scc * -gr_fir_util::create_gr_fir_scc (const std::vector &taps) -{ - return gr_fir_sysconfig_singleton()->create_gr_fir_scc (taps); -} - -gr_fir_fsf * -gr_fir_util::create_gr_fir_fsf (const std::vector &taps) -{ - return gr_fir_sysconfig_singleton()->create_gr_fir_fsf (taps); -} - -// --- info gatherers --- - - -void -gr_fir_util::get_gr_fir_ccf_info (std::vector *info) -{ - gr_fir_sysconfig_singleton()->get_gr_fir_ccf_info (info); -} - -void -gr_fir_util::get_gr_fir_fcc_info (std::vector *info) -{ - gr_fir_sysconfig_singleton()->get_gr_fir_fcc_info (info); -} - -void -gr_fir_util::get_gr_fir_ccc_info (std::vector *info) -{ - gr_fir_sysconfig_singleton()->get_gr_fir_ccc_info (info); -} - -void -gr_fir_util::get_gr_fir_fff_info (std::vector *info) -{ - gr_fir_sysconfig_singleton()->get_gr_fir_fff_info (info); -} - -void -gr_fir_util::get_gr_fir_scc_info (std::vector *info) -{ - gr_fir_sysconfig_singleton()->get_gr_fir_scc_info (info); -} - -void -gr_fir_util::get_gr_fir_fsf_info (std::vector *info) -{ - gr_fir_sysconfig_singleton()->get_gr_fir_fsf_info (info); -} diff --git a/gnuradio-core/src/lib/filter/gr_fir_util.h b/gnuradio-core/src/lib/filter/gr_fir_util.h deleted file mode 100644 index 2db98bfe..00000000 --- a/gnuradio-core/src/lib/filter/gr_fir_util.h +++ /dev/null @@ -1,117 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by - * generate_gr_fir_util.py. - * - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_FIR_UTIL_H -#define INCLUDED_GR_FIR_UTIL_H - -/*! - * \brief routines to create gr_fir_XXX's - * - * This class handles selecting the fastest version of the finite - * implulse response filter available for your platform. This - * interface should be used by the rest of the system for creating - * gr_fir_XXX's. - * - * The trailing suffix has the form _IOT where I codes the input type, - * O codes the output type, and T codes the tap type. - * I,O,T are elements of the set 's' (short), 'f' (float), 'c' (gr_complex), - * 'i' (short) - */ - -#include - -class gr_fir_ccf; -class gr_fir_fcc; -class gr_fir_ccc; -class gr_fir_fff; -class gr_fir_scc; -class gr_fir_fsf; - -// structures returned by get_gr_fir_XXX_info methods - - -struct gr_fir_ccf_info { - const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" - gr_fir_ccf *(*create)(const std::vector &taps); -}; - -struct gr_fir_fcc_info { - const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" - gr_fir_fcc *(*create)(const std::vector &taps); -}; - -struct gr_fir_ccc_info { - const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" - gr_fir_ccc *(*create)(const std::vector &taps); -}; - -struct gr_fir_fff_info { - const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" - gr_fir_fff *(*create)(const std::vector &taps); -}; - -struct gr_fir_scc_info { - const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" - gr_fir_scc *(*create)(const std::vector &taps); -}; - -struct gr_fir_fsf_info { - const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!" - gr_fir_fsf *(*create)(const std::vector &taps); -}; - -struct gr_fir_util { - - // create a fast version of gr_fir_XXX. - - static gr_fir_ccf *create_gr_fir_ccf (const std::vector &taps); - static gr_fir_fcc *create_gr_fir_fcc (const std::vector &taps); - static gr_fir_ccc *create_gr_fir_ccc (const std::vector &taps); - static gr_fir_fff *create_gr_fir_fff (const std::vector &taps); - static gr_fir_scc *create_gr_fir_scc (const std::vector &taps); - static gr_fir_fsf *create_gr_fir_fsf (const std::vector &taps); - - // Get information about all gr_fir_XXX implementations. - // This is useful for benchmarking, testing, etc without having to - // know a priori what's linked into this image - // - // The caller must pass in a valid pointer to a vector. - // The vector will be filled with structs describing the - // available implementations. - - static void get_gr_fir_ccf_info (std::vector *info); - static void get_gr_fir_fcc_info (std::vector *info); - static void get_gr_fir_ccc_info (std::vector *info); - static void get_gr_fir_fff_info (std::vector *info); - static void get_gr_fir_scc_info (std::vector *info); - static void get_gr_fir_fsf_info (std::vector *info); - -}; - -#endif /* INCLUDED_GR_FIR_UTIL_H */ diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccc.cc b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccc.cc deleted file mode 100644 index a27bc1e8..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccc.cc +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_freq_xlating_fir_filter_ccc_sptr -gr_make_freq_xlating_fir_filter_ccc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq) -{ - return gr_freq_xlating_fir_filter_ccc_sptr (new gr_freq_xlating_fir_filter_ccc (decimation, taps, center_freq, sampling_freq)); -} - - -gr_freq_xlating_fir_filter_ccc::gr_freq_xlating_fir_filter_ccc ( - - int decimation, - const std::vector &taps, - double center_freq, - double sampling_freq) - - : gr_sync_decimator ("freq_xlating_fir_filter_ccc", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decimation), - d_proto_taps (taps), d_center_freq (center_freq), d_sampling_freq (sampling_freq), - d_updated (false) -{ - std::vector dummy_taps; - d_composite_fir = gr_fir_util::create_gr_fir_ccc (dummy_taps); - - set_history (d_proto_taps.size ()); - build_composite_fir (); -} - -gr_freq_xlating_fir_filter_ccc::~gr_freq_xlating_fir_filter_ccc () -{ - delete d_composite_fir; -} - -void -gr_freq_xlating_fir_filter_ccc::build_composite_fir () -{ - std::vector ctaps (d_proto_taps.size ()); - - float fwT0 = 2 * M_PI * d_center_freq / d_sampling_freq; - for (unsigned int i = 0; i < d_proto_taps.size (); i++) - ctaps[i] = d_proto_taps[i] * exp (gr_complex (0, i * fwT0)); - - d_composite_fir->set_taps (gr_reverse(ctaps)); - d_r.set_phase_incr (exp (gr_complex (0, fwT0 * decimation ()))); -} - -void -gr_freq_xlating_fir_filter_ccc::set_center_freq (double center_freq) -{ - d_center_freq = center_freq; - d_updated = true; -} - -void -gr_freq_xlating_fir_filter_ccc::set_taps (const std::vector &taps) -{ - d_proto_taps = taps; - d_updated = true; -} - -int -gr_freq_xlating_fir_filter_ccc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *in = (gr_complex *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - // rebuild composite FIR if the center freq has changed - - if (d_updated){ - set_history (d_proto_taps.size ()); - build_composite_fir (); - d_updated = false; - return 0; // history requirements may have changed. - } - - unsigned j = 0; - for (int i = 0; i < noutput_items; i++){ - out[i] = d_r.rotate (d_composite_fir->filter (&in[j])); - j += decimation (); - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccc.h b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccc.h deleted file mode 100644 index 706d9460..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccc.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py Any changes made to this file - * will be overwritten. - */ - -#ifndef INCLUDED_GR_FREQ_XLATING_FIR_FILTER_CCC_H -#define INCLUDED_GR_FREQ_XLATING_FIR_FILTER_CCC_H - -#include -#include - -class gr_freq_xlating_fir_filter_ccc; -typedef boost::shared_ptr gr_freq_xlating_fir_filter_ccc_sptr; - -/*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ -gr_freq_xlating_fir_filter_ccc_sptr -gr_make_freq_xlating_fir_filter_ccc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_fir_ccc; - -/*! - * \brief FIR filter combined with frequency translation with gr_complex input, gr_complex output and gr_complex taps - * \ingroup filter_blk - * - * This class efficiently combines a frequency translation - * (typically "down conversion") with a FIR filter (typically low-pass) - * and decimation. It is ideally suited for a "channel selection filter" - * and can be efficiently used to select and decimate a narrow band signal - * out of wide bandwidth input. - * - * Uses a single input array to produce a single output array. - * Additional inputs and/or outputs are ignored. - */ -class gr_freq_xlating_fir_filter_ccc : public gr_sync_decimator -{ - public: - virtual ~gr_freq_xlating_fir_filter_ccc (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - private: - friend gr_freq_xlating_fir_filter_ccc_sptr - gr_make_freq_xlating_fir_filter_ccc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - protected: - std::vector d_proto_taps; - gr_fir_ccc *d_composite_fir; - gr_rotator d_r; - double d_center_freq; - double d_sampling_freq; - bool d_updated; - - virtual void build_composite_fir (); - - /*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ - gr_freq_xlating_fir_filter_ccc (int decimation, - const std::vector &taps, - double center_freq, double sampling_freq); -}; - -#endif /* _gr_freq_xlating_fir_filter_ccc_H_ */ diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccc.i b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccc.i deleted file mode 100644 index 0b981f52..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccc.i +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,freq_xlating_fir_filter_ccc) - -gr_freq_xlating_fir_filter_ccc_sptr -gr_make_freq_xlating_fir_filter_ccc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_freq_xlating_fir_filter_ccc : public gr_sync_decimator -{ - protected: - gr_freq_xlating_fir_filter_ccc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - public: - ~gr_freq_xlating_fir_filter_ccc (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccf.cc b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccf.cc deleted file mode 100644 index 6f3d9876..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccf.cc +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_freq_xlating_fir_filter_ccf_sptr -gr_make_freq_xlating_fir_filter_ccf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq) -{ - return gr_freq_xlating_fir_filter_ccf_sptr (new gr_freq_xlating_fir_filter_ccf (decimation, taps, center_freq, sampling_freq)); -} - - -gr_freq_xlating_fir_filter_ccf::gr_freq_xlating_fir_filter_ccf ( - - int decimation, - const std::vector &taps, - double center_freq, - double sampling_freq) - - : gr_sync_decimator ("freq_xlating_fir_filter_ccf", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decimation), - d_proto_taps (taps), d_center_freq (center_freq), d_sampling_freq (sampling_freq), - d_updated (false) -{ - std::vector dummy_taps; - d_composite_fir = gr_fir_util::create_gr_fir_ccc (dummy_taps); - - set_history (d_proto_taps.size ()); - build_composite_fir (); -} - -gr_freq_xlating_fir_filter_ccf::~gr_freq_xlating_fir_filter_ccf () -{ - delete d_composite_fir; -} - -void -gr_freq_xlating_fir_filter_ccf::build_composite_fir () -{ - std::vector ctaps (d_proto_taps.size ()); - - float fwT0 = 2 * M_PI * d_center_freq / d_sampling_freq; - for (unsigned int i = 0; i < d_proto_taps.size (); i++) - ctaps[i] = d_proto_taps[i] * exp (gr_complex (0, i * fwT0)); - - d_composite_fir->set_taps (gr_reverse(ctaps)); - d_r.set_phase_incr (exp (gr_complex (0, fwT0 * decimation ()))); -} - -void -gr_freq_xlating_fir_filter_ccf::set_center_freq (double center_freq) -{ - d_center_freq = center_freq; - d_updated = true; -} - -void -gr_freq_xlating_fir_filter_ccf::set_taps (const std::vector &taps) -{ - d_proto_taps = taps; - d_updated = true; -} - -int -gr_freq_xlating_fir_filter_ccf::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *in = (gr_complex *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - // rebuild composite FIR if the center freq has changed - - if (d_updated){ - set_history (d_proto_taps.size ()); - build_composite_fir (); - d_updated = false; - return 0; // history requirements may have changed. - } - - unsigned j = 0; - for (int i = 0; i < noutput_items; i++){ - out[i] = d_r.rotate (d_composite_fir->filter (&in[j])); - j += decimation (); - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccf.h b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccf.h deleted file mode 100644 index 681d82bb..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccf.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py Any changes made to this file - * will be overwritten. - */ - -#ifndef INCLUDED_GR_FREQ_XLATING_FIR_FILTER_CCF_H -#define INCLUDED_GR_FREQ_XLATING_FIR_FILTER_CCF_H - -#include -#include - -class gr_freq_xlating_fir_filter_ccf; -typedef boost::shared_ptr gr_freq_xlating_fir_filter_ccf_sptr; - -/*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ -gr_freq_xlating_fir_filter_ccf_sptr -gr_make_freq_xlating_fir_filter_ccf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_fir_ccc; - -/*! - * \brief FIR filter combined with frequency translation with gr_complex input, gr_complex output and float taps - * \ingroup filter_blk - * - * This class efficiently combines a frequency translation - * (typically "down conversion") with a FIR filter (typically low-pass) - * and decimation. It is ideally suited for a "channel selection filter" - * and can be efficiently used to select and decimate a narrow band signal - * out of wide bandwidth input. - * - * Uses a single input array to produce a single output array. - * Additional inputs and/or outputs are ignored. - */ -class gr_freq_xlating_fir_filter_ccf : public gr_sync_decimator -{ - public: - virtual ~gr_freq_xlating_fir_filter_ccf (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - private: - friend gr_freq_xlating_fir_filter_ccf_sptr - gr_make_freq_xlating_fir_filter_ccf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - protected: - std::vector d_proto_taps; - gr_fir_ccc *d_composite_fir; - gr_rotator d_r; - double d_center_freq; - double d_sampling_freq; - bool d_updated; - - virtual void build_composite_fir (); - - /*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ - gr_freq_xlating_fir_filter_ccf (int decimation, - const std::vector &taps, - double center_freq, double sampling_freq); -}; - -#endif /* _gr_freq_xlating_fir_filter_ccf_H_ */ diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccf.i b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccf.i deleted file mode 100644 index 84e38594..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_ccf.i +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,freq_xlating_fir_filter_ccf) - -gr_freq_xlating_fir_filter_ccf_sptr -gr_make_freq_xlating_fir_filter_ccf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_freq_xlating_fir_filter_ccf : public gr_sync_decimator -{ - protected: - gr_freq_xlating_fir_filter_ccf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - public: - ~gr_freq_xlating_fir_filter_ccf (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcc.cc b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcc.cc deleted file mode 100644 index 9adb8701..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcc.cc +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_freq_xlating_fir_filter_fcc_sptr -gr_make_freq_xlating_fir_filter_fcc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq) -{ - return gr_freq_xlating_fir_filter_fcc_sptr (new gr_freq_xlating_fir_filter_fcc (decimation, taps, center_freq, sampling_freq)); -} - - -gr_freq_xlating_fir_filter_fcc::gr_freq_xlating_fir_filter_fcc ( - - int decimation, - const std::vector &taps, - double center_freq, - double sampling_freq) - - : gr_sync_decimator ("freq_xlating_fir_filter_fcc", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decimation), - d_proto_taps (taps), d_center_freq (center_freq), d_sampling_freq (sampling_freq), - d_updated (false) -{ - std::vector dummy_taps; - d_composite_fir = gr_fir_util::create_gr_fir_fcc (dummy_taps); - - set_history (d_proto_taps.size ()); - build_composite_fir (); -} - -gr_freq_xlating_fir_filter_fcc::~gr_freq_xlating_fir_filter_fcc () -{ - delete d_composite_fir; -} - -void -gr_freq_xlating_fir_filter_fcc::build_composite_fir () -{ - std::vector ctaps (d_proto_taps.size ()); - - float fwT0 = 2 * M_PI * d_center_freq / d_sampling_freq; - for (unsigned int i = 0; i < d_proto_taps.size (); i++) - ctaps[i] = d_proto_taps[i] * exp (gr_complex (0, i * fwT0)); - - d_composite_fir->set_taps (gr_reverse(ctaps)); - d_r.set_phase_incr (exp (gr_complex (0, fwT0 * decimation ()))); -} - -void -gr_freq_xlating_fir_filter_fcc::set_center_freq (double center_freq) -{ - d_center_freq = center_freq; - d_updated = true; -} - -void -gr_freq_xlating_fir_filter_fcc::set_taps (const std::vector &taps) -{ - d_proto_taps = taps; - d_updated = true; -} - -int -gr_freq_xlating_fir_filter_fcc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *in = (float *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - // rebuild composite FIR if the center freq has changed - - if (d_updated){ - set_history (d_proto_taps.size ()); - build_composite_fir (); - d_updated = false; - return 0; // history requirements may have changed. - } - - unsigned j = 0; - for (int i = 0; i < noutput_items; i++){ - out[i] = d_r.rotate (d_composite_fir->filter (&in[j])); - j += decimation (); - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcc.h b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcc.h deleted file mode 100644 index 0087fb8d..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcc.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py Any changes made to this file - * will be overwritten. - */ - -#ifndef INCLUDED_GR_FREQ_XLATING_FIR_FILTER_FCC_H -#define INCLUDED_GR_FREQ_XLATING_FIR_FILTER_FCC_H - -#include -#include - -class gr_freq_xlating_fir_filter_fcc; -typedef boost::shared_ptr gr_freq_xlating_fir_filter_fcc_sptr; - -/*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ -gr_freq_xlating_fir_filter_fcc_sptr -gr_make_freq_xlating_fir_filter_fcc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_fir_fcc; - -/*! - * \brief FIR filter combined with frequency translation with float input, gr_complex output and gr_complex taps - * \ingroup filter_blk - * - * This class efficiently combines a frequency translation - * (typically "down conversion") with a FIR filter (typically low-pass) - * and decimation. It is ideally suited for a "channel selection filter" - * and can be efficiently used to select and decimate a narrow band signal - * out of wide bandwidth input. - * - * Uses a single input array to produce a single output array. - * Additional inputs and/or outputs are ignored. - */ -class gr_freq_xlating_fir_filter_fcc : public gr_sync_decimator -{ - public: - virtual ~gr_freq_xlating_fir_filter_fcc (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - private: - friend gr_freq_xlating_fir_filter_fcc_sptr - gr_make_freq_xlating_fir_filter_fcc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - protected: - std::vector d_proto_taps; - gr_fir_fcc *d_composite_fir; - gr_rotator d_r; - double d_center_freq; - double d_sampling_freq; - bool d_updated; - - virtual void build_composite_fir (); - - /*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ - gr_freq_xlating_fir_filter_fcc (int decimation, - const std::vector &taps, - double center_freq, double sampling_freq); -}; - -#endif /* _gr_freq_xlating_fir_filter_fcc_H_ */ diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcc.i b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcc.i deleted file mode 100644 index 7af521d9..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcc.i +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,freq_xlating_fir_filter_fcc) - -gr_freq_xlating_fir_filter_fcc_sptr -gr_make_freq_xlating_fir_filter_fcc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_freq_xlating_fir_filter_fcc : public gr_sync_decimator -{ - protected: - gr_freq_xlating_fir_filter_fcc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - public: - ~gr_freq_xlating_fir_filter_fcc (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcf.cc b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcf.cc deleted file mode 100644 index ac1bcbd3..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcf.cc +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_freq_xlating_fir_filter_fcf_sptr -gr_make_freq_xlating_fir_filter_fcf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq) -{ - return gr_freq_xlating_fir_filter_fcf_sptr (new gr_freq_xlating_fir_filter_fcf (decimation, taps, center_freq, sampling_freq)); -} - - -gr_freq_xlating_fir_filter_fcf::gr_freq_xlating_fir_filter_fcf ( - - int decimation, - const std::vector &taps, - double center_freq, - double sampling_freq) - - : gr_sync_decimator ("freq_xlating_fir_filter_fcf", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decimation), - d_proto_taps (taps), d_center_freq (center_freq), d_sampling_freq (sampling_freq), - d_updated (false) -{ - std::vector dummy_taps; - d_composite_fir = gr_fir_util::create_gr_fir_fcc (dummy_taps); - - set_history (d_proto_taps.size ()); - build_composite_fir (); -} - -gr_freq_xlating_fir_filter_fcf::~gr_freq_xlating_fir_filter_fcf () -{ - delete d_composite_fir; -} - -void -gr_freq_xlating_fir_filter_fcf::build_composite_fir () -{ - std::vector ctaps (d_proto_taps.size ()); - - float fwT0 = 2 * M_PI * d_center_freq / d_sampling_freq; - for (unsigned int i = 0; i < d_proto_taps.size (); i++) - ctaps[i] = d_proto_taps[i] * exp (gr_complex (0, i * fwT0)); - - d_composite_fir->set_taps (gr_reverse(ctaps)); - d_r.set_phase_incr (exp (gr_complex (0, fwT0 * decimation ()))); -} - -void -gr_freq_xlating_fir_filter_fcf::set_center_freq (double center_freq) -{ - d_center_freq = center_freq; - d_updated = true; -} - -void -gr_freq_xlating_fir_filter_fcf::set_taps (const std::vector &taps) -{ - d_proto_taps = taps; - d_updated = true; -} - -int -gr_freq_xlating_fir_filter_fcf::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *in = (float *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - // rebuild composite FIR if the center freq has changed - - if (d_updated){ - set_history (d_proto_taps.size ()); - build_composite_fir (); - d_updated = false; - return 0; // history requirements may have changed. - } - - unsigned j = 0; - for (int i = 0; i < noutput_items; i++){ - out[i] = d_r.rotate (d_composite_fir->filter (&in[j])); - j += decimation (); - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcf.h b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcf.h deleted file mode 100644 index 760ce0ee..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcf.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py Any changes made to this file - * will be overwritten. - */ - -#ifndef INCLUDED_GR_FREQ_XLATING_FIR_FILTER_FCF_H -#define INCLUDED_GR_FREQ_XLATING_FIR_FILTER_FCF_H - -#include -#include - -class gr_freq_xlating_fir_filter_fcf; -typedef boost::shared_ptr gr_freq_xlating_fir_filter_fcf_sptr; - -/*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ -gr_freq_xlating_fir_filter_fcf_sptr -gr_make_freq_xlating_fir_filter_fcf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_fir_fcc; - -/*! - * \brief FIR filter combined with frequency translation with float input, gr_complex output and float taps - * \ingroup filter_blk - * - * This class efficiently combines a frequency translation - * (typically "down conversion") with a FIR filter (typically low-pass) - * and decimation. It is ideally suited for a "channel selection filter" - * and can be efficiently used to select and decimate a narrow band signal - * out of wide bandwidth input. - * - * Uses a single input array to produce a single output array. - * Additional inputs and/or outputs are ignored. - */ -class gr_freq_xlating_fir_filter_fcf : public gr_sync_decimator -{ - public: - virtual ~gr_freq_xlating_fir_filter_fcf (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - private: - friend gr_freq_xlating_fir_filter_fcf_sptr - gr_make_freq_xlating_fir_filter_fcf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - protected: - std::vector d_proto_taps; - gr_fir_fcc *d_composite_fir; - gr_rotator d_r; - double d_center_freq; - double d_sampling_freq; - bool d_updated; - - virtual void build_composite_fir (); - - /*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ - gr_freq_xlating_fir_filter_fcf (int decimation, - const std::vector &taps, - double center_freq, double sampling_freq); -}; - -#endif /* _gr_freq_xlating_fir_filter_fcf_H_ */ diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcf.i b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcf.i deleted file mode 100644 index fa31a074..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_fcf.i +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,freq_xlating_fir_filter_fcf) - -gr_freq_xlating_fir_filter_fcf_sptr -gr_make_freq_xlating_fir_filter_fcf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_freq_xlating_fir_filter_fcf : public gr_sync_decimator -{ - protected: - gr_freq_xlating_fir_filter_fcf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - public: - ~gr_freq_xlating_fir_filter_fcf (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scc.cc b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scc.cc deleted file mode 100644 index f274378e..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scc.cc +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_freq_xlating_fir_filter_scc_sptr -gr_make_freq_xlating_fir_filter_scc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq) -{ - return gr_freq_xlating_fir_filter_scc_sptr (new gr_freq_xlating_fir_filter_scc (decimation, taps, center_freq, sampling_freq)); -} - - -gr_freq_xlating_fir_filter_scc::gr_freq_xlating_fir_filter_scc ( - - int decimation, - const std::vector &taps, - double center_freq, - double sampling_freq) - - : gr_sync_decimator ("freq_xlating_fir_filter_scc", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decimation), - d_proto_taps (taps), d_center_freq (center_freq), d_sampling_freq (sampling_freq), - d_updated (false) -{ - std::vector dummy_taps; - d_composite_fir = gr_fir_util::create_gr_fir_scc (dummy_taps); - - set_history (d_proto_taps.size ()); - build_composite_fir (); -} - -gr_freq_xlating_fir_filter_scc::~gr_freq_xlating_fir_filter_scc () -{ - delete d_composite_fir; -} - -void -gr_freq_xlating_fir_filter_scc::build_composite_fir () -{ - std::vector ctaps (d_proto_taps.size ()); - - float fwT0 = 2 * M_PI * d_center_freq / d_sampling_freq; - for (unsigned int i = 0; i < d_proto_taps.size (); i++) - ctaps[i] = d_proto_taps[i] * exp (gr_complex (0, i * fwT0)); - - d_composite_fir->set_taps (gr_reverse(ctaps)); - d_r.set_phase_incr (exp (gr_complex (0, fwT0 * decimation ()))); -} - -void -gr_freq_xlating_fir_filter_scc::set_center_freq (double center_freq) -{ - d_center_freq = center_freq; - d_updated = true; -} - -void -gr_freq_xlating_fir_filter_scc::set_taps (const std::vector &taps) -{ - d_proto_taps = taps; - d_updated = true; -} - -int -gr_freq_xlating_fir_filter_scc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *in = (short *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - // rebuild composite FIR if the center freq has changed - - if (d_updated){ - set_history (d_proto_taps.size ()); - build_composite_fir (); - d_updated = false; - return 0; // history requirements may have changed. - } - - unsigned j = 0; - for (int i = 0; i < noutput_items; i++){ - out[i] = d_r.rotate (d_composite_fir->filter (&in[j])); - j += decimation (); - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scc.h b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scc.h deleted file mode 100644 index 012bc1d5..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scc.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py Any changes made to this file - * will be overwritten. - */ - -#ifndef INCLUDED_GR_FREQ_XLATING_FIR_FILTER_SCC_H -#define INCLUDED_GR_FREQ_XLATING_FIR_FILTER_SCC_H - -#include -#include - -class gr_freq_xlating_fir_filter_scc; -typedef boost::shared_ptr gr_freq_xlating_fir_filter_scc_sptr; - -/*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ -gr_freq_xlating_fir_filter_scc_sptr -gr_make_freq_xlating_fir_filter_scc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_fir_scc; - -/*! - * \brief FIR filter combined with frequency translation with short input, gr_complex output and gr_complex taps - * \ingroup filter_blk - * - * This class efficiently combines a frequency translation - * (typically "down conversion") with a FIR filter (typically low-pass) - * and decimation. It is ideally suited for a "channel selection filter" - * and can be efficiently used to select and decimate a narrow band signal - * out of wide bandwidth input. - * - * Uses a single input array to produce a single output array. - * Additional inputs and/or outputs are ignored. - */ -class gr_freq_xlating_fir_filter_scc : public gr_sync_decimator -{ - public: - virtual ~gr_freq_xlating_fir_filter_scc (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - private: - friend gr_freq_xlating_fir_filter_scc_sptr - gr_make_freq_xlating_fir_filter_scc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - protected: - std::vector d_proto_taps; - gr_fir_scc *d_composite_fir; - gr_rotator d_r; - double d_center_freq; - double d_sampling_freq; - bool d_updated; - - virtual void build_composite_fir (); - - /*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ - gr_freq_xlating_fir_filter_scc (int decimation, - const std::vector &taps, - double center_freq, double sampling_freq); -}; - -#endif /* _gr_freq_xlating_fir_filter_scc_H_ */ diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scc.i b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scc.i deleted file mode 100644 index 202df87e..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scc.i +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,freq_xlating_fir_filter_scc) - -gr_freq_xlating_fir_filter_scc_sptr -gr_make_freq_xlating_fir_filter_scc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_freq_xlating_fir_filter_scc : public gr_sync_decimator -{ - protected: - gr_freq_xlating_fir_filter_scc (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - public: - ~gr_freq_xlating_fir_filter_scc (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scf.cc b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scf.cc deleted file mode 100644 index 96f94245..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scf.cc +++ /dev/null @@ -1,123 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -gr_freq_xlating_fir_filter_scf_sptr -gr_make_freq_xlating_fir_filter_scf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq) -{ - return gr_freq_xlating_fir_filter_scf_sptr (new gr_freq_xlating_fir_filter_scf (decimation, taps, center_freq, sampling_freq)); -} - - -gr_freq_xlating_fir_filter_scf::gr_freq_xlating_fir_filter_scf ( - - int decimation, - const std::vector &taps, - double center_freq, - double sampling_freq) - - : gr_sync_decimator ("freq_xlating_fir_filter_scf", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decimation), - d_proto_taps (taps), d_center_freq (center_freq), d_sampling_freq (sampling_freq), - d_updated (false) -{ - std::vector dummy_taps; - d_composite_fir = gr_fir_util::create_gr_fir_scc (dummy_taps); - - set_history (d_proto_taps.size ()); - build_composite_fir (); -} - -gr_freq_xlating_fir_filter_scf::~gr_freq_xlating_fir_filter_scf () -{ - delete d_composite_fir; -} - -void -gr_freq_xlating_fir_filter_scf::build_composite_fir () -{ - std::vector ctaps (d_proto_taps.size ()); - - float fwT0 = 2 * M_PI * d_center_freq / d_sampling_freq; - for (unsigned int i = 0; i < d_proto_taps.size (); i++) - ctaps[i] = d_proto_taps[i] * exp (gr_complex (0, i * fwT0)); - - d_composite_fir->set_taps (gr_reverse(ctaps)); - d_r.set_phase_incr (exp (gr_complex (0, fwT0 * decimation ()))); -} - -void -gr_freq_xlating_fir_filter_scf::set_center_freq (double center_freq) -{ - d_center_freq = center_freq; - d_updated = true; -} - -void -gr_freq_xlating_fir_filter_scf::set_taps (const std::vector &taps) -{ - d_proto_taps = taps; - d_updated = true; -} - -int -gr_freq_xlating_fir_filter_scf::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *in = (short *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - // rebuild composite FIR if the center freq has changed - - if (d_updated){ - set_history (d_proto_taps.size ()); - build_composite_fir (); - d_updated = false; - return 0; // history requirements may have changed. - } - - unsigned j = 0; - for (int i = 0; i < noutput_items; i++){ - out[i] = d_r.rotate (d_composite_fir->filter (&in[j])); - j += decimation (); - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scf.h b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scf.h deleted file mode 100644 index e8cb02aa..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scf.h +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2002,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py Any changes made to this file - * will be overwritten. - */ - -#ifndef INCLUDED_GR_FREQ_XLATING_FIR_FILTER_SCF_H -#define INCLUDED_GR_FREQ_XLATING_FIR_FILTER_SCF_H - -#include -#include - -class gr_freq_xlating_fir_filter_scf; -typedef boost::shared_ptr gr_freq_xlating_fir_filter_scf_sptr; - -/*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ -gr_freq_xlating_fir_filter_scf_sptr -gr_make_freq_xlating_fir_filter_scf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_fir_scc; - -/*! - * \brief FIR filter combined with frequency translation with short input, gr_complex output and float taps - * \ingroup filter_blk - * - * This class efficiently combines a frequency translation - * (typically "down conversion") with a FIR filter (typically low-pass) - * and decimation. It is ideally suited for a "channel selection filter" - * and can be efficiently used to select and decimate a narrow band signal - * out of wide bandwidth input. - * - * Uses a single input array to produce a single output array. - * Additional inputs and/or outputs are ignored. - */ -class gr_freq_xlating_fir_filter_scf : public gr_sync_decimator -{ - public: - virtual ~gr_freq_xlating_fir_filter_scf (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - private: - friend gr_freq_xlating_fir_filter_scf_sptr - gr_make_freq_xlating_fir_filter_scf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - protected: - std::vector d_proto_taps; - gr_fir_scc *d_composite_fir; - gr_rotator d_r; - double d_center_freq; - double d_sampling_freq; - bool d_updated; - - virtual void build_composite_fir (); - - /*! - * Construct a FIR filter with the given taps and a composite frequency - * translation that shifts center_freq down to zero Hz. The frequency - * translation logically comes before the filtering operation. - */ - gr_freq_xlating_fir_filter_scf (int decimation, - const std::vector &taps, - double center_freq, double sampling_freq); -}; - -#endif /* _gr_freq_xlating_fir_filter_scf_H_ */ diff --git a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scf.i b/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scf.i deleted file mode 100644 index 6c128f50..00000000 --- a/gnuradio-core/src/lib/filter/gr_freq_xlating_fir_filter_scf.i +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2003,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 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: This file is automatically generated by - * generate_gr_freq_xlating_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,freq_xlating_fir_filter_scf) - -gr_freq_xlating_fir_filter_scf_sptr -gr_make_freq_xlating_fir_filter_scf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - -class gr_freq_xlating_fir_filter_scf : public gr_sync_decimator -{ - protected: - gr_freq_xlating_fir_filter_scf (int decimation, const std::vector &taps, - double center_freq, double sampling_freq); - - public: - ~gr_freq_xlating_fir_filter_scf (); - - void set_center_freq (double center_freq); - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccc.cc b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccc.cc deleted file mode 100644 index f1550ad2..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccc.cc +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_interp_fir_filter_ccc_sptr gr_make_interp_fir_filter_ccc (unsigned interpolation, const std::vector &taps) -{ - return gr_interp_fir_filter_ccc_sptr (new gr_interp_fir_filter_ccc (interpolation, taps)); -} - - -gr_interp_fir_filter_ccc::gr_interp_fir_filter_ccc (unsigned interpolation, const std::vector &taps) - : gr_sync_interpolator ("interp_fir_filter_ccc", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - interpolation), - d_updated (false), d_firs (interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_ccc (dummy_taps); - - set_taps (taps); - install_taps(d_new_taps); -} - -gr_interp_fir_filter_ccc::~gr_interp_fir_filter_ccc () -{ - int interp = interpolation (); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_interp_fir_filter_ccc::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_interp_fir_filter_ccc::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -int -gr_interp_fir_filter_ccc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const gr_complex *in = (const gr_complex *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirements may have changed. - } - - int nfilters = interpolation (); - int ni = noutput_items / interpolation (); - - for (int i = 0; i < ni; i++){ - for (int nf = 0; nf < nfilters; nf++) - out[nf] = d_firs[nf]->filter (&in[i]); - out += nfilters; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccc.h b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccc.h deleted file mode 100644 index 24cd3745..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccc.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_INTERP_FIR_FILTER_CCC_H -#define INCLUDED_GR_INTERP_FIR_FILTER_CCC_H - -#include - -class gr_interp_fir_filter_ccc; -typedef boost::shared_ptr gr_interp_fir_filter_ccc_sptr; -gr_interp_fir_filter_ccc_sptr gr_make_interp_fir_filter_ccc (unsigned interpolation, const std::vector &taps); - -class gr_fir_ccc; - -/*! - * \brief Interpolating FIR filter with gr_complex input, gr_complex output and gr_complex taps - * \ingroup filter_blk - */ -class gr_interp_fir_filter_ccc : public gr_sync_interpolator -{ - private: - friend gr_interp_fir_filter_ccc_sptr gr_make_interp_fir_filter_ccc (unsigned interpolation, const std::vector &taps); - - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - /*! - * Construct a FIR filter with the given taps - */ - gr_interp_fir_filter_ccc (unsigned interpolation, const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_interp_fir_filter_ccc (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccc.i b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccc.i deleted file mode 100644 index f128b68b..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccc.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,interp_fir_filter_ccc) - -gr_interp_fir_filter_ccc_sptr gr_make_interp_fir_filter_ccc (int interpolation, const std::vector &taps); - -class gr_interp_fir_filter_ccc : public gr_sync_interpolator -{ - private: - gr_interp_fir_filter_ccc (int interpolation, const std::vector &taps); - - public: - ~gr_interp_fir_filter_ccc (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccf.cc b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccf.cc deleted file mode 100644 index 00eed72d..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccf.cc +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_interp_fir_filter_ccf_sptr gr_make_interp_fir_filter_ccf (unsigned interpolation, const std::vector &taps) -{ - return gr_interp_fir_filter_ccf_sptr (new gr_interp_fir_filter_ccf (interpolation, taps)); -} - - -gr_interp_fir_filter_ccf::gr_interp_fir_filter_ccf (unsigned interpolation, const std::vector &taps) - : gr_sync_interpolator ("interp_fir_filter_ccf", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - interpolation), - d_updated (false), d_firs (interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_ccf (dummy_taps); - - set_taps (taps); - install_taps(d_new_taps); -} - -gr_interp_fir_filter_ccf::~gr_interp_fir_filter_ccf () -{ - int interp = interpolation (); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_interp_fir_filter_ccf::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_interp_fir_filter_ccf::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -int -gr_interp_fir_filter_ccf::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const gr_complex *in = (const gr_complex *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirements may have changed. - } - - int nfilters = interpolation (); - int ni = noutput_items / interpolation (); - - for (int i = 0; i < ni; i++){ - for (int nf = 0; nf < nfilters; nf++) - out[nf] = d_firs[nf]->filter (&in[i]); - out += nfilters; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccf.h b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccf.h deleted file mode 100644 index bc97de98..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccf.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_INTERP_FIR_FILTER_CCF_H -#define INCLUDED_GR_INTERP_FIR_FILTER_CCF_H - -#include - -class gr_interp_fir_filter_ccf; -typedef boost::shared_ptr gr_interp_fir_filter_ccf_sptr; -gr_interp_fir_filter_ccf_sptr gr_make_interp_fir_filter_ccf (unsigned interpolation, const std::vector &taps); - -class gr_fir_ccf; - -/*! - * \brief Interpolating FIR filter with gr_complex input, gr_complex output and float taps - * \ingroup filter_blk - */ -class gr_interp_fir_filter_ccf : public gr_sync_interpolator -{ - private: - friend gr_interp_fir_filter_ccf_sptr gr_make_interp_fir_filter_ccf (unsigned interpolation, const std::vector &taps); - - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - /*! - * Construct a FIR filter with the given taps - */ - gr_interp_fir_filter_ccf (unsigned interpolation, const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_interp_fir_filter_ccf (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccf.i b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccf.i deleted file mode 100644 index d174601f..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_ccf.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,interp_fir_filter_ccf) - -gr_interp_fir_filter_ccf_sptr gr_make_interp_fir_filter_ccf (int interpolation, const std::vector &taps); - -class gr_interp_fir_filter_ccf : public gr_sync_interpolator -{ - private: - gr_interp_fir_filter_ccf (int interpolation, const std::vector &taps); - - public: - ~gr_interp_fir_filter_ccf (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fcc.cc b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fcc.cc deleted file mode 100644 index deaf8758..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fcc.cc +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_interp_fir_filter_fcc_sptr gr_make_interp_fir_filter_fcc (unsigned interpolation, const std::vector &taps) -{ - return gr_interp_fir_filter_fcc_sptr (new gr_interp_fir_filter_fcc (interpolation, taps)); -} - - -gr_interp_fir_filter_fcc::gr_interp_fir_filter_fcc (unsigned interpolation, const std::vector &taps) - : gr_sync_interpolator ("interp_fir_filter_fcc", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - interpolation), - d_updated (false), d_firs (interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_fcc (dummy_taps); - - set_taps (taps); - install_taps(d_new_taps); -} - -gr_interp_fir_filter_fcc::~gr_interp_fir_filter_fcc () -{ - int interp = interpolation (); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_interp_fir_filter_fcc::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_interp_fir_filter_fcc::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -int -gr_interp_fir_filter_fcc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *in = (const float *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirements may have changed. - } - - int nfilters = interpolation (); - int ni = noutput_items / interpolation (); - - for (int i = 0; i < ni; i++){ - for (int nf = 0; nf < nfilters; nf++) - out[nf] = d_firs[nf]->filter (&in[i]); - out += nfilters; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fcc.h b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fcc.h deleted file mode 100644 index f4dee3d6..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fcc.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_INTERP_FIR_FILTER_FCC_H -#define INCLUDED_GR_INTERP_FIR_FILTER_FCC_H - -#include - -class gr_interp_fir_filter_fcc; -typedef boost::shared_ptr gr_interp_fir_filter_fcc_sptr; -gr_interp_fir_filter_fcc_sptr gr_make_interp_fir_filter_fcc (unsigned interpolation, const std::vector &taps); - -class gr_fir_fcc; - -/*! - * \brief Interpolating FIR filter with float input, gr_complex output and gr_complex taps - * \ingroup filter_blk - */ -class gr_interp_fir_filter_fcc : public gr_sync_interpolator -{ - private: - friend gr_interp_fir_filter_fcc_sptr gr_make_interp_fir_filter_fcc (unsigned interpolation, const std::vector &taps); - - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - /*! - * Construct a FIR filter with the given taps - */ - gr_interp_fir_filter_fcc (unsigned interpolation, const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_interp_fir_filter_fcc (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fcc.i b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fcc.i deleted file mode 100644 index 126bf361..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fcc.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,interp_fir_filter_fcc) - -gr_interp_fir_filter_fcc_sptr gr_make_interp_fir_filter_fcc (int interpolation, const std::vector &taps); - -class gr_interp_fir_filter_fcc : public gr_sync_interpolator -{ - private: - gr_interp_fir_filter_fcc (int interpolation, const std::vector &taps); - - public: - ~gr_interp_fir_filter_fcc (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fff.cc b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fff.cc deleted file mode 100644 index 51d76b1e..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fff.cc +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_interp_fir_filter_fff_sptr gr_make_interp_fir_filter_fff (unsigned interpolation, const std::vector &taps) -{ - return gr_interp_fir_filter_fff_sptr (new gr_interp_fir_filter_fff (interpolation, taps)); -} - - -gr_interp_fir_filter_fff::gr_interp_fir_filter_fff (unsigned interpolation, const std::vector &taps) - : gr_sync_interpolator ("interp_fir_filter_fff", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (float)), - interpolation), - d_updated (false), d_firs (interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_fff (dummy_taps); - - set_taps (taps); - install_taps(d_new_taps); -} - -gr_interp_fir_filter_fff::~gr_interp_fir_filter_fff () -{ - int interp = interpolation (); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_interp_fir_filter_fff::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_interp_fir_filter_fff::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -int -gr_interp_fir_filter_fff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *in = (const float *) input_items[0]; - float *out = (float *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirements may have changed. - } - - int nfilters = interpolation (); - int ni = noutput_items / interpolation (); - - for (int i = 0; i < ni; i++){ - for (int nf = 0; nf < nfilters; nf++) - out[nf] = d_firs[nf]->filter (&in[i]); - out += nfilters; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fff.h b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fff.h deleted file mode 100644 index 176c5228..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fff.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_INTERP_FIR_FILTER_FFF_H -#define INCLUDED_GR_INTERP_FIR_FILTER_FFF_H - -#include - -class gr_interp_fir_filter_fff; -typedef boost::shared_ptr gr_interp_fir_filter_fff_sptr; -gr_interp_fir_filter_fff_sptr gr_make_interp_fir_filter_fff (unsigned interpolation, const std::vector &taps); - -class gr_fir_fff; - -/*! - * \brief Interpolating FIR filter with float input, float output and float taps - * \ingroup filter_blk - */ -class gr_interp_fir_filter_fff : public gr_sync_interpolator -{ - private: - friend gr_interp_fir_filter_fff_sptr gr_make_interp_fir_filter_fff (unsigned interpolation, const std::vector &taps); - - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - /*! - * Construct a FIR filter with the given taps - */ - gr_interp_fir_filter_fff (unsigned interpolation, const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_interp_fir_filter_fff (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fff.i b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fff.i deleted file mode 100644 index 96f42911..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fff.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,interp_fir_filter_fff) - -gr_interp_fir_filter_fff_sptr gr_make_interp_fir_filter_fff (int interpolation, const std::vector &taps); - -class gr_interp_fir_filter_fff : public gr_sync_interpolator -{ - private: - gr_interp_fir_filter_fff (int interpolation, const std::vector &taps); - - public: - ~gr_interp_fir_filter_fff (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fsf.cc b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fsf.cc deleted file mode 100644 index dcdb3fd8..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fsf.cc +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_interp_fir_filter_fsf_sptr gr_make_interp_fir_filter_fsf (unsigned interpolation, const std::vector &taps) -{ - return gr_interp_fir_filter_fsf_sptr (new gr_interp_fir_filter_fsf (interpolation, taps)); -} - - -gr_interp_fir_filter_fsf::gr_interp_fir_filter_fsf (unsigned interpolation, const std::vector &taps) - : gr_sync_interpolator ("interp_fir_filter_fsf", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (short)), - interpolation), - d_updated (false), d_firs (interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_fsf (dummy_taps); - - set_taps (taps); - install_taps(d_new_taps); -} - -gr_interp_fir_filter_fsf::~gr_interp_fir_filter_fsf () -{ - int interp = interpolation (); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_interp_fir_filter_fsf::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_interp_fir_filter_fsf::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -int -gr_interp_fir_filter_fsf::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *in = (const float *) input_items[0]; - short *out = (short *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirements may have changed. - } - - int nfilters = interpolation (); - int ni = noutput_items / interpolation (); - - for (int i = 0; i < ni; i++){ - for (int nf = 0; nf < nfilters; nf++) - out[nf] = d_firs[nf]->filter (&in[i]); - out += nfilters; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fsf.h b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fsf.h deleted file mode 100644 index de7333bd..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fsf.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_INTERP_FIR_FILTER_FSF_H -#define INCLUDED_GR_INTERP_FIR_FILTER_FSF_H - -#include - -class gr_interp_fir_filter_fsf; -typedef boost::shared_ptr gr_interp_fir_filter_fsf_sptr; -gr_interp_fir_filter_fsf_sptr gr_make_interp_fir_filter_fsf (unsigned interpolation, const std::vector &taps); - -class gr_fir_fsf; - -/*! - * \brief Interpolating FIR filter with float input, short output and float taps - * \ingroup filter_blk - */ -class gr_interp_fir_filter_fsf : public gr_sync_interpolator -{ - private: - friend gr_interp_fir_filter_fsf_sptr gr_make_interp_fir_filter_fsf (unsigned interpolation, const std::vector &taps); - - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - /*! - * Construct a FIR filter with the given taps - */ - gr_interp_fir_filter_fsf (unsigned interpolation, const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_interp_fir_filter_fsf (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fsf.i b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fsf.i deleted file mode 100644 index 6861db47..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_fsf.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,interp_fir_filter_fsf) - -gr_interp_fir_filter_fsf_sptr gr_make_interp_fir_filter_fsf (int interpolation, const std::vector &taps); - -class gr_interp_fir_filter_fsf : public gr_sync_interpolator -{ - private: - gr_interp_fir_filter_fsf (int interpolation, const std::vector &taps); - - public: - ~gr_interp_fir_filter_fsf (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_scc.cc b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_scc.cc deleted file mode 100644 index 65cf2ece..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_scc.cc +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_interp_fir_filter_scc_sptr gr_make_interp_fir_filter_scc (unsigned interpolation, const std::vector &taps) -{ - return gr_interp_fir_filter_scc_sptr (new gr_interp_fir_filter_scc (interpolation, taps)); -} - - -gr_interp_fir_filter_scc::gr_interp_fir_filter_scc (unsigned interpolation, const std::vector &taps) - : gr_sync_interpolator ("interp_fir_filter_scc", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - interpolation), - d_updated (false), d_firs (interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_scc (dummy_taps); - - set_taps (taps); - install_taps(d_new_taps); -} - -gr_interp_fir_filter_scc::~gr_interp_fir_filter_scc () -{ - int interp = interpolation (); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_interp_fir_filter_scc::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_interp_fir_filter_scc::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -int -gr_interp_fir_filter_scc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const short *in = (const short *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirements may have changed. - } - - int nfilters = interpolation (); - int ni = noutput_items / interpolation (); - - for (int i = 0; i < ni; i++){ - for (int nf = 0; nf < nfilters; nf++) - out[nf] = d_firs[nf]->filter (&in[i]); - out += nfilters; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_scc.h b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_scc.h deleted file mode 100644 index bbf427f3..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_scc.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_gr_fir_filter_XXX.py - * Any changes made to this file will be overwritten. - */ - -#ifndef INCLUDED_GR_INTERP_FIR_FILTER_SCC_H -#define INCLUDED_GR_INTERP_FIR_FILTER_SCC_H - -#include - -class gr_interp_fir_filter_scc; -typedef boost::shared_ptr gr_interp_fir_filter_scc_sptr; -gr_interp_fir_filter_scc_sptr gr_make_interp_fir_filter_scc (unsigned interpolation, const std::vector &taps); - -class gr_fir_scc; - -/*! - * \brief Interpolating FIR filter with short input, gr_complex output and gr_complex taps - * \ingroup filter_blk - */ -class gr_interp_fir_filter_scc : public gr_sync_interpolator -{ - private: - friend gr_interp_fir_filter_scc_sptr gr_make_interp_fir_filter_scc (unsigned interpolation, const std::vector &taps); - - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - /*! - * Construct a FIR filter with the given taps - */ - gr_interp_fir_filter_scc (unsigned interpolation, const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_interp_fir_filter_scc (); - - void set_taps (const std::vector &taps); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_scc.i b/gnuradio-core/src/lib/filter/gr_interp_fir_filter_scc.i deleted file mode 100644 index 5bf3386e..00000000 --- a/gnuradio-core/src/lib/filter/gr_interp_fir_filter_scc.i +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- 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 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: This file is automatically generated by generate_GrFIRfilterXXX.py - * Any changes made to this file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,interp_fir_filter_scc) - -gr_interp_fir_filter_scc_sptr gr_make_interp_fir_filter_scc (int interpolation, const std::vector &taps); - -class gr_interp_fir_filter_scc : public gr_sync_interpolator -{ - private: - gr_interp_fir_filter_scc (int interpolation, const std::vector &taps); - - public: - ~gr_interp_fir_filter_scc (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccc.cc b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccc.cc deleted file mode 100644 index 99d682c1..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccc.cc +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- 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 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_rational_resampler_base_ccc_sptr -gr_make_rational_resampler_base_ccc (unsigned interpolation, - unsigned decimation, - const std::vector &taps) -{ - return gr_rational_resampler_base_ccc_sptr (new gr_rational_resampler_base_ccc (interpolation, decimation, taps)); -} - -gr_rational_resampler_base_ccc::gr_rational_resampler_base_ccc (unsigned interpolation, unsigned decimation, - const std::vector &taps) - : gr_block ("rational_resampler_base_ccc", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex))), - d_history(1), - d_interpolation(interpolation), d_decimation(decimation), - d_ctr(0), d_updated(false), - d_firs(interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - if (decimation == 0) - throw std::out_of_range ("decimation must be > 0"); - - set_relative_rate (1.0 * interpolation / decimation); - set_output_multiple (1); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_ccc (dummy_taps); - - set_taps (taps); - install_taps (d_new_taps); -} - -gr_rational_resampler_base_ccc::~gr_rational_resampler_base_ccc () -{ - int interp = interpolation(); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_rational_resampler_base_ccc::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_rational_resampler_base_ccc::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -void -gr_rational_resampler_base_ccc::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - int nreqd = std::max((unsigned)1, (int)((double) (noutput_items+1) * decimation() / interpolation()) + history() - 1); - unsigned ninputs = ninput_items_required.size (); - for (unsigned i = 0; i < ninputs; i++) - ninput_items_required[i] = nreqd; -} - -int -gr_rational_resampler_base_ccc::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const gr_complex *in = (const gr_complex *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirement may have increased. - } - - unsigned int ctr = d_ctr; - - int i = 0; - while (i < noutput_items){ - out[i++] = d_firs[ctr]->filter(in); - ctr += decimation(); - while (ctr >= interpolation()){ - ctr -= interpolation(); - in++; - } - } - - d_ctr = ctr; - consume_each(in - (gr_complex *) input_items[0]); - return i; -} diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccc.h b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccc.h deleted file mode 100644 index 68a0128b..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccc.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifndef INCLUDED_GR_RATIONAL_RESAMPLER_BASE_CCC_H -#define INCLUDED_GR_RATIONAL_RESAMPLER_BASE_CCC_H - -#include - -class gr_rational_resampler_base_ccc; -typedef boost::shared_ptr gr_rational_resampler_base_ccc_sptr; -gr_rational_resampler_base_ccc_sptr -gr_make_rational_resampler_base_ccc (unsigned interpolation, - unsigned decimation, - const std::vector &taps); - -class gr_fir_ccc; - -/*! - * \brief Rational Resampling Polyphase FIR filter with gr_complex input, gr_complex output and gr_complex taps - * \ingroup filter_blk - */ -class gr_rational_resampler_base_ccc : public gr_block -{ - private: - unsigned d_history; - unsigned d_interpolation, d_decimation; - unsigned d_ctr; - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - friend gr_rational_resampler_base_ccc_sptr - gr_make_rational_resampler_base_ccc (unsigned interpolation, unsigned decimation, const std::vector &taps); - - - /*! - * Construct a FIR filter with the given taps - */ - gr_rational_resampler_base_ccc (unsigned interpolation, unsigned decimation, - const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_rational_resampler_base_ccc (); - unsigned history () const { return d_history; } - void set_history (unsigned history) { d_history = history; } - - unsigned interpolation() const { return d_interpolation; } - unsigned decimation() const { return d_decimation; } - - void set_taps (const std::vector &taps); - - void forecast (int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccc.i b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccc.i deleted file mode 100644 index acb7a1ce..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccc.i +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,rational_resampler_base_ccc); - -gr_rational_resampler_base_ccc_sptr gr_make_rational_resampler_base_ccc (int interpolation, int decimation, const std::vector &taps); - -class gr_rational_resampler_base_ccc : public gr_block -{ - private: - gr_rational_resampler_base_ccc (int interpolation, int decimation, const std::vector &taps); - - public: - ~gr_rational_resampler_base_ccc (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccf.cc b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccf.cc deleted file mode 100644 index feadb146..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccf.cc +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- 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 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_rational_resampler_base_ccf_sptr -gr_make_rational_resampler_base_ccf (unsigned interpolation, - unsigned decimation, - const std::vector &taps) -{ - return gr_rational_resampler_base_ccf_sptr (new gr_rational_resampler_base_ccf (interpolation, decimation, taps)); -} - -gr_rational_resampler_base_ccf::gr_rational_resampler_base_ccf (unsigned interpolation, unsigned decimation, - const std::vector &taps) - : gr_block ("rational_resampler_base_ccf", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex))), - d_history(1), - d_interpolation(interpolation), d_decimation(decimation), - d_ctr(0), d_updated(false), - d_firs(interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - if (decimation == 0) - throw std::out_of_range ("decimation must be > 0"); - - set_relative_rate (1.0 * interpolation / decimation); - set_output_multiple (1); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_ccf (dummy_taps); - - set_taps (taps); - install_taps (d_new_taps); -} - -gr_rational_resampler_base_ccf::~gr_rational_resampler_base_ccf () -{ - int interp = interpolation(); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_rational_resampler_base_ccf::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_rational_resampler_base_ccf::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -void -gr_rational_resampler_base_ccf::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - int nreqd = std::max((unsigned)1, (int)((double) (noutput_items+1) * decimation() / interpolation()) + history() - 1); - unsigned ninputs = ninput_items_required.size (); - for (unsigned i = 0; i < ninputs; i++) - ninput_items_required[i] = nreqd; -} - -int -gr_rational_resampler_base_ccf::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const gr_complex *in = (const gr_complex *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirement may have increased. - } - - unsigned int ctr = d_ctr; - - int i = 0; - while (i < noutput_items){ - out[i++] = d_firs[ctr]->filter(in); - ctr += decimation(); - while (ctr >= interpolation()){ - ctr -= interpolation(); - in++; - } - } - - d_ctr = ctr; - consume_each(in - (gr_complex *) input_items[0]); - return i; -} diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccf.h b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccf.h deleted file mode 100644 index 48fd3d9d..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccf.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifndef INCLUDED_GR_RATIONAL_RESAMPLER_BASE_CCF_H -#define INCLUDED_GR_RATIONAL_RESAMPLER_BASE_CCF_H - -#include - -class gr_rational_resampler_base_ccf; -typedef boost::shared_ptr gr_rational_resampler_base_ccf_sptr; -gr_rational_resampler_base_ccf_sptr -gr_make_rational_resampler_base_ccf (unsigned interpolation, - unsigned decimation, - const std::vector &taps); - -class gr_fir_ccf; - -/*! - * \brief Rational Resampling Polyphase FIR filter with gr_complex input, gr_complex output and float taps - * \ingroup filter_blk - */ -class gr_rational_resampler_base_ccf : public gr_block -{ - private: - unsigned d_history; - unsigned d_interpolation, d_decimation; - unsigned d_ctr; - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - friend gr_rational_resampler_base_ccf_sptr - gr_make_rational_resampler_base_ccf (unsigned interpolation, unsigned decimation, const std::vector &taps); - - - /*! - * Construct a FIR filter with the given taps - */ - gr_rational_resampler_base_ccf (unsigned interpolation, unsigned decimation, - const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_rational_resampler_base_ccf (); - unsigned history () const { return d_history; } - void set_history (unsigned history) { d_history = history; } - - unsigned interpolation() const { return d_interpolation; } - unsigned decimation() const { return d_decimation; } - - void set_taps (const std::vector &taps); - - void forecast (int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccf.i b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccf.i deleted file mode 100644 index 174d73c4..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_ccf.i +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,rational_resampler_base_ccf); - -gr_rational_resampler_base_ccf_sptr gr_make_rational_resampler_base_ccf (int interpolation, int decimation, const std::vector &taps); - -class gr_rational_resampler_base_ccf : public gr_block -{ - private: - gr_rational_resampler_base_ccf (int interpolation, int decimation, const std::vector &taps); - - public: - ~gr_rational_resampler_base_ccf (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fcc.cc b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fcc.cc deleted file mode 100644 index b0065dce..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fcc.cc +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- 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 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_rational_resampler_base_fcc_sptr -gr_make_rational_resampler_base_fcc (unsigned interpolation, - unsigned decimation, - const std::vector &taps) -{ - return gr_rational_resampler_base_fcc_sptr (new gr_rational_resampler_base_fcc (interpolation, decimation, taps)); -} - -gr_rational_resampler_base_fcc::gr_rational_resampler_base_fcc (unsigned interpolation, unsigned decimation, - const std::vector &taps) - : gr_block ("rational_resampler_base_fcc", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (gr_complex))), - d_history(1), - d_interpolation(interpolation), d_decimation(decimation), - d_ctr(0), d_updated(false), - d_firs(interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - if (decimation == 0) - throw std::out_of_range ("decimation must be > 0"); - - set_relative_rate (1.0 * interpolation / decimation); - set_output_multiple (1); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_fcc (dummy_taps); - - set_taps (taps); - install_taps (d_new_taps); -} - -gr_rational_resampler_base_fcc::~gr_rational_resampler_base_fcc () -{ - int interp = interpolation(); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_rational_resampler_base_fcc::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_rational_resampler_base_fcc::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -void -gr_rational_resampler_base_fcc::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - int nreqd = std::max((unsigned)1, (int)((double) (noutput_items+1) * decimation() / interpolation()) + history() - 1); - unsigned ninputs = ninput_items_required.size (); - for (unsigned i = 0; i < ninputs; i++) - ninput_items_required[i] = nreqd; -} - -int -gr_rational_resampler_base_fcc::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *in = (const float *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirement may have increased. - } - - unsigned int ctr = d_ctr; - - int i = 0; - while (i < noutput_items){ - out[i++] = d_firs[ctr]->filter(in); - ctr += decimation(); - while (ctr >= interpolation()){ - ctr -= interpolation(); - in++; - } - } - - d_ctr = ctr; - consume_each(in - (float *) input_items[0]); - return i; -} diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fcc.h b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fcc.h deleted file mode 100644 index a3f90ca2..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fcc.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifndef INCLUDED_GR_RATIONAL_RESAMPLER_BASE_FCC_H -#define INCLUDED_GR_RATIONAL_RESAMPLER_BASE_FCC_H - -#include - -class gr_rational_resampler_base_fcc; -typedef boost::shared_ptr gr_rational_resampler_base_fcc_sptr; -gr_rational_resampler_base_fcc_sptr -gr_make_rational_resampler_base_fcc (unsigned interpolation, - unsigned decimation, - const std::vector &taps); - -class gr_fir_fcc; - -/*! - * \brief Rational Resampling Polyphase FIR filter with float input, gr_complex output and gr_complex taps - * \ingroup filter_blk - */ -class gr_rational_resampler_base_fcc : public gr_block -{ - private: - unsigned d_history; - unsigned d_interpolation, d_decimation; - unsigned d_ctr; - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - friend gr_rational_resampler_base_fcc_sptr - gr_make_rational_resampler_base_fcc (unsigned interpolation, unsigned decimation, const std::vector &taps); - - - /*! - * Construct a FIR filter with the given taps - */ - gr_rational_resampler_base_fcc (unsigned interpolation, unsigned decimation, - const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_rational_resampler_base_fcc (); - unsigned history () const { return d_history; } - void set_history (unsigned history) { d_history = history; } - - unsigned interpolation() const { return d_interpolation; } - unsigned decimation() const { return d_decimation; } - - void set_taps (const std::vector &taps); - - void forecast (int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fcc.i b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fcc.i deleted file mode 100644 index 0789e785..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fcc.i +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,rational_resampler_base_fcc); - -gr_rational_resampler_base_fcc_sptr gr_make_rational_resampler_base_fcc (int interpolation, int decimation, const std::vector &taps); - -class gr_rational_resampler_base_fcc : public gr_block -{ - private: - gr_rational_resampler_base_fcc (int interpolation, int decimation, const std::vector &taps); - - public: - ~gr_rational_resampler_base_fcc (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fff.cc b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fff.cc deleted file mode 100644 index 7320ae3a..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fff.cc +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- 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 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_rational_resampler_base_fff_sptr -gr_make_rational_resampler_base_fff (unsigned interpolation, - unsigned decimation, - const std::vector &taps) -{ - return gr_rational_resampler_base_fff_sptr (new gr_rational_resampler_base_fff (interpolation, decimation, taps)); -} - -gr_rational_resampler_base_fff::gr_rational_resampler_base_fff (unsigned interpolation, unsigned decimation, - const std::vector &taps) - : gr_block ("rational_resampler_base_fff", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (float))), - d_history(1), - d_interpolation(interpolation), d_decimation(decimation), - d_ctr(0), d_updated(false), - d_firs(interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - if (decimation == 0) - throw std::out_of_range ("decimation must be > 0"); - - set_relative_rate (1.0 * interpolation / decimation); - set_output_multiple (1); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_fff (dummy_taps); - - set_taps (taps); - install_taps (d_new_taps); -} - -gr_rational_resampler_base_fff::~gr_rational_resampler_base_fff () -{ - int interp = interpolation(); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_rational_resampler_base_fff::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_rational_resampler_base_fff::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -void -gr_rational_resampler_base_fff::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - int nreqd = std::max((unsigned)1, (int)((double) (noutput_items+1) * decimation() / interpolation()) + history() - 1); - unsigned ninputs = ninput_items_required.size (); - for (unsigned i = 0; i < ninputs; i++) - ninput_items_required[i] = nreqd; -} - -int -gr_rational_resampler_base_fff::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *in = (const float *) input_items[0]; - float *out = (float *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirement may have increased. - } - - unsigned int ctr = d_ctr; - - int i = 0; - while (i < noutput_items){ - out[i++] = d_firs[ctr]->filter(in); - ctr += decimation(); - while (ctr >= interpolation()){ - ctr -= interpolation(); - in++; - } - } - - d_ctr = ctr; - consume_each(in - (float *) input_items[0]); - return i; -} diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fff.h b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fff.h deleted file mode 100644 index 31a5b81d..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fff.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifndef INCLUDED_GR_RATIONAL_RESAMPLER_BASE_FFF_H -#define INCLUDED_GR_RATIONAL_RESAMPLER_BASE_FFF_H - -#include - -class gr_rational_resampler_base_fff; -typedef boost::shared_ptr gr_rational_resampler_base_fff_sptr; -gr_rational_resampler_base_fff_sptr -gr_make_rational_resampler_base_fff (unsigned interpolation, - unsigned decimation, - const std::vector &taps); - -class gr_fir_fff; - -/*! - * \brief Rational Resampling Polyphase FIR filter with float input, float output and float taps - * \ingroup filter_blk - */ -class gr_rational_resampler_base_fff : public gr_block -{ - private: - unsigned d_history; - unsigned d_interpolation, d_decimation; - unsigned d_ctr; - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - friend gr_rational_resampler_base_fff_sptr - gr_make_rational_resampler_base_fff (unsigned interpolation, unsigned decimation, const std::vector &taps); - - - /*! - * Construct a FIR filter with the given taps - */ - gr_rational_resampler_base_fff (unsigned interpolation, unsigned decimation, - const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_rational_resampler_base_fff (); - unsigned history () const { return d_history; } - void set_history (unsigned history) { d_history = history; } - - unsigned interpolation() const { return d_interpolation; } - unsigned decimation() const { return d_decimation; } - - void set_taps (const std::vector &taps); - - void forecast (int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fff.i b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fff.i deleted file mode 100644 index 5cb1a380..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fff.i +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,rational_resampler_base_fff); - -gr_rational_resampler_base_fff_sptr gr_make_rational_resampler_base_fff (int interpolation, int decimation, const std::vector &taps); - -class gr_rational_resampler_base_fff : public gr_block -{ - private: - gr_rational_resampler_base_fff (int interpolation, int decimation, const std::vector &taps); - - public: - ~gr_rational_resampler_base_fff (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fsf.cc b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fsf.cc deleted file mode 100644 index 8195f3d6..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fsf.cc +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- 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 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_rational_resampler_base_fsf_sptr -gr_make_rational_resampler_base_fsf (unsigned interpolation, - unsigned decimation, - const std::vector &taps) -{ - return gr_rational_resampler_base_fsf_sptr (new gr_rational_resampler_base_fsf (interpolation, decimation, taps)); -} - -gr_rational_resampler_base_fsf::gr_rational_resampler_base_fsf (unsigned interpolation, unsigned decimation, - const std::vector &taps) - : gr_block ("rational_resampler_base_fsf", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (short))), - d_history(1), - d_interpolation(interpolation), d_decimation(decimation), - d_ctr(0), d_updated(false), - d_firs(interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - if (decimation == 0) - throw std::out_of_range ("decimation must be > 0"); - - set_relative_rate (1.0 * interpolation / decimation); - set_output_multiple (1); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_fsf (dummy_taps); - - set_taps (taps); - install_taps (d_new_taps); -} - -gr_rational_resampler_base_fsf::~gr_rational_resampler_base_fsf () -{ - int interp = interpolation(); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_rational_resampler_base_fsf::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_rational_resampler_base_fsf::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -void -gr_rational_resampler_base_fsf::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - int nreqd = std::max((unsigned)1, (int)((double) (noutput_items+1) * decimation() / interpolation()) + history() - 1); - unsigned ninputs = ninput_items_required.size (); - for (unsigned i = 0; i < ninputs; i++) - ninput_items_required[i] = nreqd; -} - -int -gr_rational_resampler_base_fsf::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *in = (const float *) input_items[0]; - short *out = (short *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirement may have increased. - } - - unsigned int ctr = d_ctr; - - int i = 0; - while (i < noutput_items){ - out[i++] = d_firs[ctr]->filter(in); - ctr += decimation(); - while (ctr >= interpolation()){ - ctr -= interpolation(); - in++; - } - } - - d_ctr = ctr; - consume_each(in - (float *) input_items[0]); - return i; -} diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fsf.h b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fsf.h deleted file mode 100644 index 22654292..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fsf.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifndef INCLUDED_GR_RATIONAL_RESAMPLER_BASE_FSF_H -#define INCLUDED_GR_RATIONAL_RESAMPLER_BASE_FSF_H - -#include - -class gr_rational_resampler_base_fsf; -typedef boost::shared_ptr gr_rational_resampler_base_fsf_sptr; -gr_rational_resampler_base_fsf_sptr -gr_make_rational_resampler_base_fsf (unsigned interpolation, - unsigned decimation, - const std::vector &taps); - -class gr_fir_fsf; - -/*! - * \brief Rational Resampling Polyphase FIR filter with float input, short output and float taps - * \ingroup filter_blk - */ -class gr_rational_resampler_base_fsf : public gr_block -{ - private: - unsigned d_history; - unsigned d_interpolation, d_decimation; - unsigned d_ctr; - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - friend gr_rational_resampler_base_fsf_sptr - gr_make_rational_resampler_base_fsf (unsigned interpolation, unsigned decimation, const std::vector &taps); - - - /*! - * Construct a FIR filter with the given taps - */ - gr_rational_resampler_base_fsf (unsigned interpolation, unsigned decimation, - const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_rational_resampler_base_fsf (); - unsigned history () const { return d_history; } - void set_history (unsigned history) { d_history = history; } - - unsigned interpolation() const { return d_interpolation; } - unsigned decimation() const { return d_decimation; } - - void set_taps (const std::vector &taps); - - void forecast (int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fsf.i b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fsf.i deleted file mode 100644 index 636ac0a4..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_fsf.i +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,rational_resampler_base_fsf); - -gr_rational_resampler_base_fsf_sptr gr_make_rational_resampler_base_fsf (int interpolation, int decimation, const std::vector &taps); - -class gr_rational_resampler_base_fsf : public gr_block -{ - private: - gr_rational_resampler_base_fsf (int interpolation, int decimation, const std::vector &taps); - - public: - ~gr_rational_resampler_base_fsf (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_scc.cc b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_scc.cc deleted file mode 100644 index d315e722..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_scc.cc +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- 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 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -gr_rational_resampler_base_scc_sptr -gr_make_rational_resampler_base_scc (unsigned interpolation, - unsigned decimation, - const std::vector &taps) -{ - return gr_rational_resampler_base_scc_sptr (new gr_rational_resampler_base_scc (interpolation, decimation, taps)); -} - -gr_rational_resampler_base_scc::gr_rational_resampler_base_scc (unsigned interpolation, unsigned decimation, - const std::vector &taps) - : gr_block ("rational_resampler_base_scc", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (gr_complex))), - d_history(1), - d_interpolation(interpolation), d_decimation(decimation), - d_ctr(0), d_updated(false), - d_firs(interpolation) -{ - if (interpolation == 0) - throw std::out_of_range ("interpolation must be > 0"); - if (decimation == 0) - throw std::out_of_range ("decimation must be > 0"); - - set_relative_rate (1.0 * interpolation / decimation); - set_output_multiple (1); - - std::vector dummy_taps; - - for (unsigned i = 0; i < interpolation; i++) - d_firs[i] = gr_fir_util::create_gr_fir_scc (dummy_taps); - - set_taps (taps); - install_taps (d_new_taps); -} - -gr_rational_resampler_base_scc::~gr_rational_resampler_base_scc () -{ - int interp = interpolation(); - for (int i = 0; i < interp; i++) - delete d_firs[i]; -} - -void -gr_rational_resampler_base_scc::set_taps (const std::vector &taps) -{ - d_new_taps = taps; - d_updated = true; - - // round up length to a multiple of the interpolation factor - int n = taps.size () % interpolation (); - if (n > 0){ - n = interpolation () - n; - while (n-- > 0) - d_new_taps.insert(d_new_taps.begin(), 0); - } - - assert (d_new_taps.size () % interpolation () == 0); -} - - -void -gr_rational_resampler_base_scc::install_taps (const std::vector &taps) -{ - int nfilters = interpolation (); - int nt = taps.size () / nfilters; - - assert (nt * nfilters == (int) taps.size ()); - - std::vector< std::vector > xtaps (nfilters); - - for (int n = 0; n < nfilters; n++) - xtaps[n].resize (nt); - - for (int i = 0; i < (int) taps.size(); i++) - xtaps[i % nfilters][i / nfilters] = taps[i]; - - for (int n = 0; n < nfilters; n++) - d_firs[n]->set_taps (xtaps[n]); - - set_history (nt); - d_updated = false; - -#if 0 - for (int i = 0; i < nfilters; i++){ - std::cout << "filter[" << i << "] = "; - for (int j = 0; j < nt; j++) - std::cout << xtaps[i][j] << " "; - - std::cout << "\n"; - } -#endif - -} - -void -gr_rational_resampler_base_scc::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - int nreqd = std::max((unsigned)1, (int)((double) (noutput_items+1) * decimation() / interpolation()) + history() - 1); - unsigned ninputs = ninput_items_required.size (); - for (unsigned i = 0; i < ninputs; i++) - ninput_items_required[i] = nreqd; -} - -int -gr_rational_resampler_base_scc::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const short *in = (const short *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - if (d_updated) { - install_taps (d_new_taps); - return 0; // history requirement may have increased. - } - - unsigned int ctr = d_ctr; - - int i = 0; - while (i < noutput_items){ - out[i++] = d_firs[ctr]->filter(in); - ctr += decimation(); - while (ctr >= interpolation()){ - ctr -= interpolation(); - in++; - } - } - - d_ctr = ctr; - consume_each(in - (short *) input_items[0]); - return i; -} diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_scc.h b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_scc.h deleted file mode 100644 index c90295ea..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_scc.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -#ifndef INCLUDED_GR_RATIONAL_RESAMPLER_BASE_SCC_H -#define INCLUDED_GR_RATIONAL_RESAMPLER_BASE_SCC_H - -#include - -class gr_rational_resampler_base_scc; -typedef boost::shared_ptr gr_rational_resampler_base_scc_sptr; -gr_rational_resampler_base_scc_sptr -gr_make_rational_resampler_base_scc (unsigned interpolation, - unsigned decimation, - const std::vector &taps); - -class gr_fir_scc; - -/*! - * \brief Rational Resampling Polyphase FIR filter with short input, gr_complex output and gr_complex taps - * \ingroup filter_blk - */ -class gr_rational_resampler_base_scc : public gr_block -{ - private: - unsigned d_history; - unsigned d_interpolation, d_decimation; - unsigned d_ctr; - std::vector d_new_taps; - bool d_updated; - std::vector d_firs; - - friend gr_rational_resampler_base_scc_sptr - gr_make_rational_resampler_base_scc (unsigned interpolation, unsigned decimation, const std::vector &taps); - - - /*! - * Construct a FIR filter with the given taps - */ - gr_rational_resampler_base_scc (unsigned interpolation, unsigned decimation, - const std::vector &taps); - - void install_taps (const std::vector &taps); - - public: - ~gr_rational_resampler_base_scc (); - unsigned history () const { return d_history; } - void set_history (unsigned history) { d_history = history; } - - unsigned interpolation() const { return d_interpolation; } - unsigned decimation() const { return d_decimation; } - - void set_taps (const std::vector &taps); - - void forecast (int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_scc.i b/gnuradio-core/src/lib/filter/gr_rational_resampler_base_scc.i deleted file mode 100644 index 4180794f..00000000 --- a/gnuradio-core/src/lib/filter/gr_rational_resampler_base_scc.i +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2005 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: This file is automatically generated by - * generate_gr_rational_resampler_base_XXX.py Any changes made to this - * file will be overwritten. - */ - -GR_SWIG_BLOCK_MAGIC(gr,rational_resampler_base_scc); - -gr_rational_resampler_base_scc_sptr gr_make_rational_resampler_base_scc (int interpolation, int decimation, const std::vector &taps); - -class gr_rational_resampler_base_scc : public gr_block -{ - private: - gr_rational_resampler_base_scc (int interpolation, int decimation, const std::vector &taps); - - public: - ~gr_rational_resampler_base_scc (); - - void set_taps (const std::vector &taps); -}; diff --git a/gnuradio-core/src/lib/filter/stamp-sources-generate b/gnuradio-core/src/lib/filter/stamp-sources-generate deleted file mode 100644 index e69de29b..00000000 diff --git a/gnuradio-core/src/lib/gengen/gengen_generated.i b/gnuradio-core/src/lib/gengen/gengen_generated.i deleted file mode 100644 index 3013b7b3..00000000 --- a/gnuradio-core/src/lib/gengen/gengen_generated.i +++ /dev/null @@ -1,212 +0,0 @@ -// -// This file is machine generated. All edits will be overwritten -// -%{ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -%} - -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include diff --git a/gnuradio-core/src/lib/gengen/gr_add_cc.cc b/gnuradio-core/src/lib/gengen/gr_add_cc.cc deleted file mode 100644 index 26b33fea..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_cc.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_cc_sptr -gr_make_add_cc (size_t vlen) -{ - return gr_add_cc_sptr (new gr_add_cc (vlen)); -} - -gr_add_cc::gr_add_cc (size_t vlen) - : gr_sync_block ("add_cc", - gr_make_io_signature (1, -1, sizeof (gr_complex)*vlen), - gr_make_io_signature (1, 1, sizeof (gr_complex)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_add_cc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *optr = (gr_complex *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items*d_vlen; i++){ - gr_complex acc = ((gr_complex *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc += ((gr_complex *) input_items[j])[i]; - - *optr++ = (gr_complex) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_cc.h b/gnuradio-core/src/lib/gengen/gr_add_cc.h deleted file mode 100644 index 5f8a0848..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_cc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_CC_H -#define INCLUDED_GR_ADD_CC_H - -#include - -class gr_add_cc; -typedef boost::shared_ptr gr_add_cc_sptr; - -gr_add_cc_sptr gr_make_add_cc (size_t vlen = 1); - -/*! - * \brief output = sum (input_0, input_1, ...) - * \ingroup math_blk - * - * Add across all input streams. - */ -class gr_add_cc : public gr_sync_block -{ - friend gr_add_cc_sptr gr_make_add_cc (size_t vlen); - - gr_add_cc (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_cc.i b/gnuradio-core/src/lib/gengen/gr_add_cc.i deleted file mode 100644 index 71b4b5b7..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_cc.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_cc) - -gr_add_cc_sptr gr_make_add_cc (size_t vlen = 1); - -class gr_add_cc : public gr_sync_block -{ - private: - gr_add_cc (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_cc.cc b/gnuradio-core/src/lib/gengen/gr_add_const_cc.cc deleted file mode 100644 index 6dbfc8a2..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_cc.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_const_cc_sptr -gr_make_add_const_cc (gr_complex k) -{ - return gr_add_const_cc_sptr (new gr_add_const_cc (k)); -} - -gr_add_const_cc::gr_add_const_cc (gr_complex k) - : gr_sync_block ("add_const_cc", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex))), - d_k (k) -{ -} - -int -gr_add_const_cc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *iptr = (gr_complex *) input_items[0]; - gr_complex *optr = (gr_complex *) 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; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_cc.h b/gnuradio-core/src/lib/gengen/gr_add_const_cc.h deleted file mode 100644 index f155eb8b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_cc.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_CONST_CC_H -#define INCLUDED_GR_ADD_CONST_CC_H - -#include - -class gr_add_const_cc; -typedef boost::shared_ptr gr_add_const_cc_sptr; - -gr_add_const_cc_sptr gr_make_add_const_cc (gr_complex k); - -/*! - * \brief output = input + constant - * \ingroup math_blk - */ -class gr_add_const_cc : public gr_sync_block -{ - friend gr_add_const_cc_sptr gr_make_add_const_cc (gr_complex k); - - gr_complex d_k; // the constant - gr_add_const_cc (gr_complex k); - - public: - gr_complex k () const { return d_k; } - void set_k (gr_complex k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_cc.i b/gnuradio-core/src/lib/gengen/gr_add_const_cc.i deleted file mode 100644 index 4de00afd..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_cc.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_const_cc) - -gr_add_const_cc_sptr gr_make_add_const_cc (gr_complex k); - -class gr_add_const_cc : public gr_sync_block -{ - private: - gr_add_const_cc (gr_complex k); - - public: - gr_complex k () const { return d_k; } - void set_k (gr_complex k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_ff.cc b/gnuradio-core/src/lib/gengen/gr_add_const_ff.cc deleted file mode 100644 index 09478771..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_ff.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_const_ff_sptr -gr_make_add_const_ff (float k) -{ - return gr_add_const_ff_sptr (new gr_add_const_ff (k)); -} - -gr_add_const_ff::gr_add_const_ff (float k) - : gr_sync_block ("add_const_ff", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (float))), - d_k (k) -{ -} - -int -gr_add_const_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *iptr = (float *) input_items[0]; - float *optr = (float *) 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; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_ff.h b/gnuradio-core/src/lib/gengen/gr_add_const_ff.h deleted file mode 100644 index de32a6ed..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_ff.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_CONST_FF_H -#define INCLUDED_GR_ADD_CONST_FF_H - -#include - -class gr_add_const_ff; -typedef boost::shared_ptr gr_add_const_ff_sptr; - -gr_add_const_ff_sptr gr_make_add_const_ff (float k); - -/*! - * \brief output = input + constant - * \ingroup math_blk - */ -class gr_add_const_ff : public gr_sync_block -{ - friend gr_add_const_ff_sptr gr_make_add_const_ff (float k); - - float d_k; // the constant - gr_add_const_ff (float k); - - public: - float k () const { return d_k; } - void set_k (float k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_ff.i b/gnuradio-core/src/lib/gengen/gr_add_const_ff.i deleted file mode 100644 index 02f047b6..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_ff.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_const_ff) - -gr_add_const_ff_sptr gr_make_add_const_ff (float k); - -class gr_add_const_ff : public gr_sync_block -{ - private: - gr_add_const_ff (float k); - - public: - float k () const { return d_k; } - void set_k (float k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_ii.cc b/gnuradio-core/src/lib/gengen/gr_add_const_ii.cc deleted file mode 100644 index 799446df..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_ii.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_const_ii_sptr -gr_make_add_const_ii (int k) -{ - return gr_add_const_ii_sptr (new gr_add_const_ii (k)); -} - -gr_add_const_ii::gr_add_const_ii (int k) - : gr_sync_block ("add_const_ii", - gr_make_io_signature (1, 1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int))), - d_k (k) -{ -} - -int -gr_add_const_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *iptr = (int *) input_items[0]; - int *optr = (int *) 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; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_ii.h b/gnuradio-core/src/lib/gengen/gr_add_const_ii.h deleted file mode 100644 index 285d24b3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_ii.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_CONST_II_H -#define INCLUDED_GR_ADD_CONST_II_H - -#include - -class gr_add_const_ii; -typedef boost::shared_ptr gr_add_const_ii_sptr; - -gr_add_const_ii_sptr gr_make_add_const_ii (int k); - -/*! - * \brief output = input + constant - * \ingroup math_blk - */ -class gr_add_const_ii : public gr_sync_block -{ - friend gr_add_const_ii_sptr gr_make_add_const_ii (int k); - - int d_k; // the constant - gr_add_const_ii (int k); - - public: - int k () const { return d_k; } - void set_k (int k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_ii.i b/gnuradio-core/src/lib/gengen/gr_add_const_ii.i deleted file mode 100644 index 1bc1baca..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_ii.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_const_ii) - -gr_add_const_ii_sptr gr_make_add_const_ii (int k); - -class gr_add_const_ii : public gr_sync_block -{ - private: - gr_add_const_ii (int k); - - public: - int k () const { return d_k; } - void set_k (int k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_sf.cc b/gnuradio-core/src/lib/gengen/gr_add_const_sf.cc deleted file mode 100644 index e1f39193..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_sf.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_const_sf_sptr -gr_make_add_const_sf (float k) -{ - return gr_add_const_sf_sptr (new gr_add_const_sf (k)); -} - -gr_add_const_sf::gr_add_const_sf (float k) - : gr_sync_block ("add_const_sf", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (float))), - d_k (k) -{ -} - -int -gr_add_const_sf::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *iptr = (short *) input_items[0]; - float *optr = (float *) 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; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_sf.h b/gnuradio-core/src/lib/gengen/gr_add_const_sf.h deleted file mode 100644 index 859af8b2..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_sf.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_CONST_SF_H -#define INCLUDED_GR_ADD_CONST_SF_H - -#include - -class gr_add_const_sf; -typedef boost::shared_ptr gr_add_const_sf_sptr; - -gr_add_const_sf_sptr gr_make_add_const_sf (float k); - -/*! - * \brief output = input + constant - * \ingroup math_blk - */ -class gr_add_const_sf : public gr_sync_block -{ - friend gr_add_const_sf_sptr gr_make_add_const_sf (float k); - - float d_k; // the constant - gr_add_const_sf (float k); - - public: - float k () const { return d_k; } - void set_k (float k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_sf.i b/gnuradio-core/src/lib/gengen/gr_add_const_sf.i deleted file mode 100644 index 9dfaa8e8..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_sf.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_const_sf) - -gr_add_const_sf_sptr gr_make_add_const_sf (short k); - -class gr_add_const_sf : public gr_sync_block -{ - private: - gr_add_const_sf (short k); - - public: - short k () const { return d_k; } - void set_k (short k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_ss.cc b/gnuradio-core/src/lib/gengen/gr_add_const_ss.cc deleted file mode 100644 index 30882391..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_ss.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_const_ss_sptr -gr_make_add_const_ss (short k) -{ - return gr_add_const_ss_sptr (new gr_add_const_ss (k)); -} - -gr_add_const_ss::gr_add_const_ss (short k) - : gr_sync_block ("add_const_ss", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short))), - d_k (k) -{ -} - -int -gr_add_const_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *iptr = (short *) input_items[0]; - short *optr = (short *) 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; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_ss.h b/gnuradio-core/src/lib/gengen/gr_add_const_ss.h deleted file mode 100644 index de79c3de..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_ss.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_CONST_SS_H -#define INCLUDED_GR_ADD_CONST_SS_H - -#include - -class gr_add_const_ss; -typedef boost::shared_ptr gr_add_const_ss_sptr; - -gr_add_const_ss_sptr gr_make_add_const_ss (short k); - -/*! - * \brief output = input + constant - * \ingroup math_blk - */ -class gr_add_const_ss : public gr_sync_block -{ - friend gr_add_const_ss_sptr gr_make_add_const_ss (short k); - - short d_k; // the constant - gr_add_const_ss (short k); - - public: - short k () const { return d_k; } - void set_k (short k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_ss.i b/gnuradio-core/src/lib/gengen/gr_add_const_ss.i deleted file mode 100644 index ff093e9b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_ss.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_const_ss) - -gr_add_const_ss_sptr gr_make_add_const_ss (short k); - -class gr_add_const_ss : public gr_sync_block -{ - private: - gr_add_const_ss (short k); - - public: - short k () const { return d_k; } - void set_k (short k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vcc.cc b/gnuradio-core/src/lib/gengen/gr_add_const_vcc.cc deleted file mode 100644 index 1dad044d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vcc.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_const_vcc_sptr -gr_make_add_const_vcc (const std::vector k) -{ - return gr_add_const_vcc_sptr (new gr_add_const_vcc (k)); -} - -gr_add_const_vcc::gr_add_const_vcc (const std::vector k) - : gr_sync_block ("add_const_vcc", - gr_make_io_signature (1, 1, sizeof(gr_complex)*k.size()), - gr_make_io_signature (1, 1, sizeof(gr_complex)*k.size())) -{ - d_k = k; -} - -int -gr_add_const_vcc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *iptr = (gr_complex *)input_items[0]; - gr_complex *optr = (gr_complex *)output_items[0]; - - int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(gr_complex); - - for (int i = 0; i < noutput_items; i++) - for (int j = 0; j < nitems_per_block; j++) - *optr++ = *iptr++ + d_k[j]; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vcc.h b/gnuradio-core/src/lib/gengen/gr_add_const_vcc.h deleted file mode 100644 index 50a79dec..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vcc.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_CONST_VCC_H -#define INCLUDED_GR_ADD_CONST_VCC_H - -#include - -class gr_add_const_vcc; -typedef boost::shared_ptr gr_add_const_vcc_sptr; - -gr_add_const_vcc_sptr gr_make_add_const_vcc (const std::vector k); - -/*! - * \brief output vector = input vector + constant vector - * \ingroup math_blk - */ -class gr_add_const_vcc : public gr_sync_block -{ - friend gr_add_const_vcc_sptr gr_make_add_const_vcc (const std::vector k); - - std::vector d_k; // the constant - gr_add_const_vcc (const std::vector k); - - public: - const std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vcc.i b/gnuradio-core/src/lib/gengen/gr_add_const_vcc.i deleted file mode 100644 index af25d679..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vcc.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_const_vcc) - -gr_add_const_vcc_sptr gr_make_add_const_vcc (const std::vector k); - -class gr_add_const_vcc : public gr_sync_block -{ - private: - gr_add_const_vcc (const std::vector k); - - public: - std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vff.cc b/gnuradio-core/src/lib/gengen/gr_add_const_vff.cc deleted file mode 100644 index 145c7d14..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vff.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_const_vff_sptr -gr_make_add_const_vff (const std::vector k) -{ - return gr_add_const_vff_sptr (new gr_add_const_vff (k)); -} - -gr_add_const_vff::gr_add_const_vff (const std::vector k) - : gr_sync_block ("add_const_vff", - gr_make_io_signature (1, 1, sizeof(float)*k.size()), - gr_make_io_signature (1, 1, sizeof(float)*k.size())) -{ - d_k = k; -} - -int -gr_add_const_vff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *iptr = (float *)input_items[0]; - float *optr = (float *)output_items[0]; - - int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(float); - - for (int i = 0; i < noutput_items; i++) - for (int j = 0; j < nitems_per_block; j++) - *optr++ = *iptr++ + d_k[j]; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vff.h b/gnuradio-core/src/lib/gengen/gr_add_const_vff.h deleted file mode 100644 index 70f52c9a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vff.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_CONST_VFF_H -#define INCLUDED_GR_ADD_CONST_VFF_H - -#include - -class gr_add_const_vff; -typedef boost::shared_ptr gr_add_const_vff_sptr; - -gr_add_const_vff_sptr gr_make_add_const_vff (const std::vector k); - -/*! - * \brief output vector = input vector + constant vector - * \ingroup math_blk - */ -class gr_add_const_vff : public gr_sync_block -{ - friend gr_add_const_vff_sptr gr_make_add_const_vff (const std::vector k); - - std::vector d_k; // the constant - gr_add_const_vff (const std::vector k); - - public: - const std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vff.i b/gnuradio-core/src/lib/gengen/gr_add_const_vff.i deleted file mode 100644 index 54ac5600..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vff.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_const_vff) - -gr_add_const_vff_sptr gr_make_add_const_vff (const std::vector k); - -class gr_add_const_vff : public gr_sync_block -{ - private: - gr_add_const_vff (const std::vector k); - - public: - std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vii.cc b/gnuradio-core/src/lib/gengen/gr_add_const_vii.cc deleted file mode 100644 index 9421c224..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vii.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_const_vii_sptr -gr_make_add_const_vii (const std::vector k) -{ - return gr_add_const_vii_sptr (new gr_add_const_vii (k)); -} - -gr_add_const_vii::gr_add_const_vii (const std::vector k) - : gr_sync_block ("add_const_vii", - gr_make_io_signature (1, 1, sizeof(int)*k.size()), - gr_make_io_signature (1, 1, sizeof(int)*k.size())) -{ - d_k = k; -} - -int -gr_add_const_vii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *iptr = (int *)input_items[0]; - int *optr = (int *)output_items[0]; - - int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(int); - - for (int i = 0; i < noutput_items; i++) - for (int j = 0; j < nitems_per_block; j++) - *optr++ = *iptr++ + d_k[j]; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vii.h b/gnuradio-core/src/lib/gengen/gr_add_const_vii.h deleted file mode 100644 index c0ac8d2f..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vii.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_CONST_VII_H -#define INCLUDED_GR_ADD_CONST_VII_H - -#include - -class gr_add_const_vii; -typedef boost::shared_ptr gr_add_const_vii_sptr; - -gr_add_const_vii_sptr gr_make_add_const_vii (const std::vector k); - -/*! - * \brief output vector = input vector + constant vector - * \ingroup math_blk - */ -class gr_add_const_vii : public gr_sync_block -{ - friend gr_add_const_vii_sptr gr_make_add_const_vii (const std::vector k); - - std::vector d_k; // the constant - gr_add_const_vii (const std::vector k); - - public: - const std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vii.i b/gnuradio-core/src/lib/gengen/gr_add_const_vii.i deleted file mode 100644 index 8ade8664..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vii.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_const_vii) - -gr_add_const_vii_sptr gr_make_add_const_vii (const std::vector k); - -class gr_add_const_vii : public gr_sync_block -{ - private: - gr_add_const_vii (const std::vector k); - - public: - std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vss.cc b/gnuradio-core/src/lib/gengen/gr_add_const_vss.cc deleted file mode 100644 index 8fd55bb3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vss.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_const_vss_sptr -gr_make_add_const_vss (const std::vector k) -{ - return gr_add_const_vss_sptr (new gr_add_const_vss (k)); -} - -gr_add_const_vss::gr_add_const_vss (const std::vector k) - : gr_sync_block ("add_const_vss", - gr_make_io_signature (1, 1, sizeof(short)*k.size()), - gr_make_io_signature (1, 1, sizeof(short)*k.size())) -{ - d_k = k; -} - -int -gr_add_const_vss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *iptr = (short *)input_items[0]; - short *optr = (short *)output_items[0]; - - int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(short); - - for (int i = 0; i < noutput_items; i++) - for (int j = 0; j < nitems_per_block; j++) - *optr++ = *iptr++ + d_k[j]; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vss.h b/gnuradio-core/src/lib/gengen/gr_add_const_vss.h deleted file mode 100644 index 54b61ca9..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vss.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_CONST_VSS_H -#define INCLUDED_GR_ADD_CONST_VSS_H - -#include - -class gr_add_const_vss; -typedef boost::shared_ptr gr_add_const_vss_sptr; - -gr_add_const_vss_sptr gr_make_add_const_vss (const std::vector k); - -/*! - * \brief output vector = input vector + constant vector - * \ingroup math_blk - */ -class gr_add_const_vss : public gr_sync_block -{ - friend gr_add_const_vss_sptr gr_make_add_const_vss (const std::vector k); - - std::vector d_k; // the constant - gr_add_const_vss (const std::vector k); - - public: - const std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_const_vss.i b/gnuradio-core/src/lib/gengen/gr_add_const_vss.i deleted file mode 100644 index d92bfe4a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_const_vss.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_const_vss) - -gr_add_const_vss_sptr gr_make_add_const_vss (const std::vector k); - -class gr_add_const_vss : public gr_sync_block -{ - private: - gr_add_const_vss (const std::vector k); - - public: - std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_ff.cc b/gnuradio-core/src/lib/gengen/gr_add_ff.cc deleted file mode 100644 index 18207c5b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_ff.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_ff_sptr -gr_make_add_ff (size_t vlen) -{ - return gr_add_ff_sptr (new gr_add_ff (vlen)); -} - -gr_add_ff::gr_add_ff (size_t vlen) - : gr_sync_block ("add_ff", - gr_make_io_signature (1, -1, sizeof (float)*vlen), - gr_make_io_signature (1, 1, sizeof (float)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_add_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *optr = (float *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items*d_vlen; i++){ - float acc = ((float *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc += ((float *) input_items[j])[i]; - - *optr++ = (float) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_ff.h b/gnuradio-core/src/lib/gengen/gr_add_ff.h deleted file mode 100644 index 0e25d46a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_ff.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_FF_H -#define INCLUDED_GR_ADD_FF_H - -#include - -class gr_add_ff; -typedef boost::shared_ptr gr_add_ff_sptr; - -gr_add_ff_sptr gr_make_add_ff (size_t vlen = 1); - -/*! - * \brief output = sum (input_0, input_1, ...) - * \ingroup math_blk - * - * Add across all input streams. - */ -class gr_add_ff : public gr_sync_block -{ - friend gr_add_ff_sptr gr_make_add_ff (size_t vlen); - - gr_add_ff (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_ff.i b/gnuradio-core/src/lib/gengen/gr_add_ff.i deleted file mode 100644 index 9d8f4c81..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_ff.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_ff) - -gr_add_ff_sptr gr_make_add_ff (size_t vlen = 1); - -class gr_add_ff : public gr_sync_block -{ - private: - gr_add_ff (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_ii.cc b/gnuradio-core/src/lib/gengen/gr_add_ii.cc deleted file mode 100644 index bbc5fc74..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_ii.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_ii_sptr -gr_make_add_ii (size_t vlen) -{ - return gr_add_ii_sptr (new gr_add_ii (vlen)); -} - -gr_add_ii::gr_add_ii (size_t vlen) - : gr_sync_block ("add_ii", - gr_make_io_signature (1, -1, sizeof (int)*vlen), - gr_make_io_signature (1, 1, sizeof (int)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_add_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items*d_vlen; i++){ - int acc = ((int *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc += ((int *) input_items[j])[i]; - - *optr++ = (int) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_ii.h b/gnuradio-core/src/lib/gengen/gr_add_ii.h deleted file mode 100644 index 694675cd..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_ii.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_II_H -#define INCLUDED_GR_ADD_II_H - -#include - -class gr_add_ii; -typedef boost::shared_ptr gr_add_ii_sptr; - -gr_add_ii_sptr gr_make_add_ii (size_t vlen = 1); - -/*! - * \brief output = sum (input_0, input_1, ...) - * \ingroup math_blk - * - * Add across all input streams. - */ -class gr_add_ii : public gr_sync_block -{ - friend gr_add_ii_sptr gr_make_add_ii (size_t vlen); - - gr_add_ii (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_ii.i b/gnuradio-core/src/lib/gengen/gr_add_ii.i deleted file mode 100644 index 0519468f..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_ii) - -gr_add_ii_sptr gr_make_add_ii (size_t vlen = 1); - -class gr_add_ii : public gr_sync_block -{ - private: - gr_add_ii (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_add_ss.cc b/gnuradio-core/src/lib/gengen/gr_add_ss.cc deleted file mode 100644 index 4af4fec2..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_ss.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_add_ss_sptr -gr_make_add_ss (size_t vlen) -{ - return gr_add_ss_sptr (new gr_add_ss (vlen)); -} - -gr_add_ss::gr_add_ss (size_t vlen) - : gr_sync_block ("add_ss", - gr_make_io_signature (1, -1, sizeof (short)*vlen), - gr_make_io_signature (1, 1, sizeof (short)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_add_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items*d_vlen; i++){ - short acc = ((short *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc += ((short *) input_items[j])[i]; - - *optr++ = (short) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_add_ss.h b/gnuradio-core/src/lib/gengen/gr_add_ss.h deleted file mode 100644 index 49322e3a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_ss.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ADD_SS_H -#define INCLUDED_GR_ADD_SS_H - -#include - -class gr_add_ss; -typedef boost::shared_ptr gr_add_ss_sptr; - -gr_add_ss_sptr gr_make_add_ss (size_t vlen = 1); - -/*! - * \brief output = sum (input_0, input_1, ...) - * \ingroup math_blk - * - * Add across all input streams. - */ -class gr_add_ss : public gr_sync_block -{ - friend gr_add_ss_sptr gr_make_add_ss (size_t vlen); - - gr_add_ss (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_add_ss.i b/gnuradio-core/src/lib/gengen/gr_add_ss.i deleted file mode 100644 index 1f60fb65..00000000 --- a/gnuradio-core/src/lib/gengen/gr_add_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,add_ss) - -gr_add_ss_sptr gr_make_add_ss (size_t vlen = 1); - -class gr_add_ss : public gr_sync_block -{ - private: - gr_add_ss (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_and_bb.cc b/gnuradio-core/src/lib/gengen/gr_and_bb.cc deleted file mode 100644 index 17437559..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_bb.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_and_bb_sptr -gr_make_and_bb () -{ - return gr_and_bb_sptr (new gr_and_bb ()); -} - -gr_and_bb::gr_and_bb () - : gr_sync_block ("and_bb", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, 1, sizeof (unsigned char))) -{ -} - -int -gr_and_bb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned char *optr = (unsigned char *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items; i++) { - unsigned char acc = ((unsigned char *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc = acc & ((unsigned char *) input_items[j])[i]; - - *optr++ = (unsigned char) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_and_bb.h b/gnuradio-core/src/lib/gengen/gr_and_bb.h deleted file mode 100644 index 70fc3884..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_bb.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_AND_BB_H -#define INCLUDED_GR_AND_BB_H - -#include - -class gr_and_bb; -typedef boost::shared_ptr gr_and_bb_sptr; - -gr_and_bb_sptr gr_make_and_bb (); - -/*! - * \brief output = input_0 & input_1 & , ... & input_N) - * \ingroup math_blk - * - * bitwise boolean and across all input streams. - */ -class gr_and_bb : public gr_sync_block -{ - friend gr_and_bb_sptr gr_make_and_bb (); - - gr_and_bb (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_and_bb.i b/gnuradio-core/src/lib/gengen/gr_and_bb.i deleted file mode 100644 index c0eefb00..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_bb.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,and_bb) - -gr_and_bb_sptr gr_make_and_bb (); - -class gr_and_bb : public gr_sync_block -{ - private: - gr_and_bb (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_bb.cc b/gnuradio-core/src/lib/gengen/gr_and_const_bb.cc deleted file mode 100644 index 818396f7..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_const_bb.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_and_const_bb_sptr -gr_make_and_const_bb (unsigned char k) -{ - return gr_and_const_bb_sptr (new gr_and_const_bb (k)); -}; - -gr_and_const_bb::gr_and_const_bb (unsigned char k) - : gr_sync_block ("and_const_bb", - gr_make_io_signature (1, 1, sizeof (unsigned char)), - gr_make_io_signature (1, 1, sizeof (unsigned char))), - d_k (k) -{ -} - -int -gr_and_const_bb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned char *iptr = (unsigned char *) input_items[0]; - unsigned char *optr = (unsigned char *) 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); -} diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_bb.h b/gnuradio-core/src/lib/gengen/gr_and_const_bb.h deleted file mode 100644 index 80e8ea28..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_const_bb.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_AND_CONST_BB_H -#define INCLUDED_GR_AND_CONST_BB_H - -#include - -class gr_and_const_bb; -typedef boost::shared_ptr gr_and_const_bb_sptr; - -gr_and_const_bb_sptr gr_make_and_const_bb (unsigned char k); - -/*! - * \brief output_N = input_N & value - * \ingroup math_blk - * - * bitwise boolean and of const to the data stream. - */ -class gr_and_const_bb : public gr_sync_block -{ - friend gr_and_const_bb_sptr gr_make_and_const_bb (unsigned char k); - - unsigned char d_k; // the constant - gr_and_const_bb (unsigned char k); - - public: - unsigned char k () const { return d_k; } - void set_k (unsigned char k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_bb.i b/gnuradio-core/src/lib/gengen/gr_and_const_bb.i deleted file mode 100644 index 3456e7ca..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_const_bb.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,and_const_bb) - -gr_and_const_bb_sptr gr_make_and_const_bb (unsigned char k); - -class gr_and_const_bb : public gr_sync_block -{ - private: - gr_and_const_bb (unsigned char k); - - public: - unsigned char k () const { return d_k; } - void set_k (unsigned char k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_ii.cc b/gnuradio-core/src/lib/gengen/gr_and_const_ii.cc deleted file mode 100644 index 8b01c95d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_const_ii.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_and_const_ii_sptr -gr_make_and_const_ii (int k) -{ - return gr_and_const_ii_sptr (new gr_and_const_ii (k)); -}; - -gr_and_const_ii::gr_and_const_ii (int k) - : gr_sync_block ("and_const_ii", - gr_make_io_signature (1, 1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int))), - d_k (k) -{ -} - -int -gr_and_const_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *iptr = (int *) input_items[0]; - int *optr = (int *) 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); -} diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_ii.h b/gnuradio-core/src/lib/gengen/gr_and_const_ii.h deleted file mode 100644 index 80c01765..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_const_ii.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_AND_CONST_II_H -#define INCLUDED_GR_AND_CONST_II_H - -#include - -class gr_and_const_ii; -typedef boost::shared_ptr gr_and_const_ii_sptr; - -gr_and_const_ii_sptr gr_make_and_const_ii (int k); - -/*! - * \brief output_N = input_N & value - * \ingroup math_blk - * - * bitwise boolean and of const to the data stream. - */ -class gr_and_const_ii : public gr_sync_block -{ - friend gr_and_const_ii_sptr gr_make_and_const_ii (int k); - - int d_k; // the constant - gr_and_const_ii (int k); - - public: - int k () const { return d_k; } - void set_k (int k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_ii.i b/gnuradio-core/src/lib/gengen/gr_and_const_ii.i deleted file mode 100644 index c637c22c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_const_ii.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,and_const_ii) - -gr_and_const_ii_sptr gr_make_and_const_ii (int k); - -class gr_and_const_ii : public gr_sync_block -{ - private: - gr_and_const_ii (int k); - - public: - int k () const { return d_k; } - void set_k (int k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_ss.cc b/gnuradio-core/src/lib/gengen/gr_and_const_ss.cc deleted file mode 100644 index a27c8112..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_const_ss.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_and_const_ss_sptr -gr_make_and_const_ss (short k) -{ - return gr_and_const_ss_sptr (new gr_and_const_ss (k)); -}; - -gr_and_const_ss::gr_and_const_ss (short k) - : gr_sync_block ("and_const_ss", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short))), - d_k (k) -{ -} - -int -gr_and_const_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *iptr = (short *) input_items[0]; - short *optr = (short *) 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); -} diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_ss.h b/gnuradio-core/src/lib/gengen/gr_and_const_ss.h deleted file mode 100644 index cb3b2d72..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_const_ss.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_AND_CONST_SS_H -#define INCLUDED_GR_AND_CONST_SS_H - -#include - -class gr_and_const_ss; -typedef boost::shared_ptr gr_and_const_ss_sptr; - -gr_and_const_ss_sptr gr_make_and_const_ss (short k); - -/*! - * \brief output_N = input_N & value - * \ingroup math_blk - * - * bitwise boolean and of const to the data stream. - */ -class gr_and_const_ss : public gr_sync_block -{ - friend gr_and_const_ss_sptr gr_make_and_const_ss (short k); - - short d_k; // the constant - gr_and_const_ss (short k); - - public: - short k () const { return d_k; } - void set_k (short k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_and_const_ss.i b/gnuradio-core/src/lib/gengen/gr_and_const_ss.i deleted file mode 100644 index c2934387..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_const_ss.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,and_const_ss) - -gr_and_const_ss_sptr gr_make_and_const_ss (short k); - -class gr_and_const_ss : public gr_sync_block -{ - private: - gr_and_const_ss (short k); - - public: - short k () const { return d_k; } - void set_k (short k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_and_ii.cc b/gnuradio-core/src/lib/gengen/gr_and_ii.cc deleted file mode 100644 index a38aaf10..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_ii.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_and_ii_sptr -gr_make_and_ii () -{ - return gr_and_ii_sptr (new gr_and_ii ()); -} - -gr_and_ii::gr_and_ii () - : gr_sync_block ("and_ii", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int))) -{ -} - -int -gr_and_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items; i++) { - int acc = ((int *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc = acc & ((int *) input_items[j])[i]; - - *optr++ = (int) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_and_ii.h b/gnuradio-core/src/lib/gengen/gr_and_ii.h deleted file mode 100644 index 2e772576..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_ii.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_AND_II_H -#define INCLUDED_GR_AND_II_H - -#include - -class gr_and_ii; -typedef boost::shared_ptr gr_and_ii_sptr; - -gr_and_ii_sptr gr_make_and_ii (); - -/*! - * \brief output = input_0 & input_1 & , ... & input_N) - * \ingroup math_blk - * - * bitwise boolean and across all input streams. - */ -class gr_and_ii : public gr_sync_block -{ - friend gr_and_ii_sptr gr_make_and_ii (); - - gr_and_ii (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_and_ii.i b/gnuradio-core/src/lib/gengen/gr_and_ii.i deleted file mode 100644 index c45d7e1d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,and_ii) - -gr_and_ii_sptr gr_make_and_ii (); - -class gr_and_ii : public gr_sync_block -{ - private: - gr_and_ii (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_and_ss.cc b/gnuradio-core/src/lib/gengen/gr_and_ss.cc deleted file mode 100644 index 5fd4f21c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_ss.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_and_ss_sptr -gr_make_and_ss () -{ - return gr_and_ss_sptr (new gr_and_ss ()); -} - -gr_and_ss::gr_and_ss () - : gr_sync_block ("and_ss", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short))) -{ -} - -int -gr_and_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items; i++) { - short acc = ((short *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc = acc & ((short *) input_items[j])[i]; - - *optr++ = (short) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_and_ss.h b/gnuradio-core/src/lib/gengen/gr_and_ss.h deleted file mode 100644 index a35a9f9e..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_ss.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_AND_SS_H -#define INCLUDED_GR_AND_SS_H - -#include - -class gr_and_ss; -typedef boost::shared_ptr gr_and_ss_sptr; - -gr_and_ss_sptr gr_make_and_ss (); - -/*! - * \brief output = input_0 & input_1 & , ... & input_N) - * \ingroup math_blk - * - * bitwise boolean and across all input streams. - */ -class gr_and_ss : public gr_sync_block -{ - friend gr_and_ss_sptr gr_make_and_ss (); - - gr_and_ss (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_and_ss.i b/gnuradio-core/src/lib/gengen/gr_and_ss.i deleted file mode 100644 index 46f196f3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_and_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,and_ss) - -gr_and_ss_sptr gr_make_and_ss (); - -class gr_and_ss : public gr_sync_block -{ - private: - gr_and_ss (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_fs.cc b/gnuradio-core/src/lib/gengen/gr_argmax_fs.cc deleted file mode 100644 index 1e974def..00000000 --- a/gnuradio-core/src/lib/gengen/gr_argmax_fs.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_argmax_fs_sptr -gr_make_argmax_fs ( size_t vlen ) -{ - return gr_argmax_fs_sptr ( new gr_argmax_fs(vlen)); -} - -gr_argmax_fs::gr_argmax_fs( size_t vlen) - : gr_sync_block ( "argmax_fs", - gr_make_io_signature (1, -1, vlen*sizeof (float)), - gr_make_io_signature (2, 2, sizeof (short))), - d_vlen(vlen) -{ -} - - -int -gr_argmax_fs::work( int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - int ninputs = input_items.size (); - - short *x_optr = (short *) output_items[0]; - short *y_optr = (short *) output_items[1]; - - for (int i=0; i max) { - max = ((float *) input_items[k])[i*d_vlen + j]; - x = j; - y = k; - } - } - } - - *x_optr++ = (short) x; - *y_optr++ = (short) y; - } - return noutput_items; -} - diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_fs.h b/gnuradio-core/src/lib/gengen/gr_argmax_fs.h deleted file mode 100644 index de1099d3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_argmax_fs.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ARGMAX_FS_H -#define INCLUDED_GR_ARGMAX_FS_H - -#include - -class gr_argmax_fs; -typedef boost::shared_ptr gr_argmax_fs_sptr; - -gr_argmax_fs_sptr gr_make_argmax_fs (size_t vlen); - - -class gr_argmax_fs : public gr_sync_block -{ - friend gr_argmax_fs_sptr gr_make_argmax_fs (size_t vlen); - - gr_argmax_fs (size_t vlen); - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_fs.i b/gnuradio-core/src/lib/gengen/gr_argmax_fs.i deleted file mode 100644 index 2c2ff22e..00000000 --- a/gnuradio-core/src/lib/gengen/gr_argmax_fs.i +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,argmax_fs) - -gr_argmax_fs_sptr gr_make_argmax_fs (size_t vlen); - -class gr_argmax_fs : public gr_sync_block -{ - private: - gr_argmax_fs (size_t vlen); - size_t d_vlen; -}; diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_is.cc b/gnuradio-core/src/lib/gengen/gr_argmax_is.cc deleted file mode 100644 index 09c4b15d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_argmax_is.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_argmax_is_sptr -gr_make_argmax_is ( size_t vlen ) -{ - return gr_argmax_is_sptr ( new gr_argmax_is(vlen)); -} - -gr_argmax_is::gr_argmax_is( size_t vlen) - : gr_sync_block ( "argmax_is", - gr_make_io_signature (1, -1, vlen*sizeof (int)), - gr_make_io_signature (2, 2, sizeof (short))), - d_vlen(vlen) -{ -} - - -int -gr_argmax_is::work( int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - int ninputs = input_items.size (); - - short *x_optr = (short *) output_items[0]; - short *y_optr = (short *) output_items[1]; - - for (int i=0; i max) { - max = ((int *) input_items[k])[i*d_vlen + j]; - x = j; - y = k; - } - } - } - - *x_optr++ = (short) x; - *y_optr++ = (short) y; - } - return noutput_items; -} - diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_is.h b/gnuradio-core/src/lib/gengen/gr_argmax_is.h deleted file mode 100644 index 2e7595ac..00000000 --- a/gnuradio-core/src/lib/gengen/gr_argmax_is.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ARGMAX_IS_H -#define INCLUDED_GR_ARGMAX_IS_H - -#include - -class gr_argmax_is; -typedef boost::shared_ptr gr_argmax_is_sptr; - -gr_argmax_is_sptr gr_make_argmax_is (size_t vlen); - - -class gr_argmax_is : public gr_sync_block -{ - friend gr_argmax_is_sptr gr_make_argmax_is (size_t vlen); - - gr_argmax_is (size_t vlen); - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_is.i b/gnuradio-core/src/lib/gengen/gr_argmax_is.i deleted file mode 100644 index b5b64e8d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_argmax_is.i +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,argmax_is) - -gr_argmax_is_sptr gr_make_argmax_is (size_t vlen); - -class gr_argmax_is : public gr_sync_block -{ - private: - gr_argmax_is (size_t vlen); - size_t d_vlen; -}; diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_ss.cc b/gnuradio-core/src/lib/gengen/gr_argmax_ss.cc deleted file mode 100644 index 0008a6dc..00000000 --- a/gnuradio-core/src/lib/gengen/gr_argmax_ss.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_argmax_ss_sptr -gr_make_argmax_ss ( size_t vlen ) -{ - return gr_argmax_ss_sptr ( new gr_argmax_ss(vlen)); -} - -gr_argmax_ss::gr_argmax_ss( size_t vlen) - : gr_sync_block ( "argmax_ss", - gr_make_io_signature (1, -1, vlen*sizeof (short)), - gr_make_io_signature (2, 2, sizeof (short))), - d_vlen(vlen) -{ -} - - -int -gr_argmax_ss::work( int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - int ninputs = input_items.size (); - - short *x_optr = (short *) output_items[0]; - short *y_optr = (short *) output_items[1]; - - for (int i=0; i max) { - max = ((short *) input_items[k])[i*d_vlen + j]; - x = j; - y = k; - } - } - } - - *x_optr++ = (short) x; - *y_optr++ = (short) y; - } - return noutput_items; -} - diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_ss.h b/gnuradio-core/src/lib/gengen/gr_argmax_ss.h deleted file mode 100644 index 182fb77a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_argmax_ss.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_ARGMAX_SS_H -#define INCLUDED_GR_ARGMAX_SS_H - -#include - -class gr_argmax_ss; -typedef boost::shared_ptr gr_argmax_ss_sptr; - -gr_argmax_ss_sptr gr_make_argmax_ss (size_t vlen); - - -class gr_argmax_ss : public gr_sync_block -{ - friend gr_argmax_ss_sptr gr_make_argmax_ss (size_t vlen); - - gr_argmax_ss (size_t vlen); - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_argmax_ss.i b/gnuradio-core/src/lib/gengen/gr_argmax_ss.i deleted file mode 100644 index 9905d460..00000000 --- a/gnuradio-core/src/lib/gengen/gr_argmax_ss.i +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,argmax_ss) - -gr_argmax_ss_sptr gr_make_argmax_ss (size_t vlen); - -class gr_argmax_ss : public gr_sync_block -{ - private: - gr_argmax_ss (size_t vlen); - size_t d_vlen; -}; diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bc.cc b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bc.cc deleted file mode 100644 index bc7e34a3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bc.cc +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - -gr_chunks_to_symbols_bc_sptr -gr_make_chunks_to_symbols_bc (const std::vector &symbol_table, const int D) -{ - return gr_chunks_to_symbols_bc_sptr (new gr_chunks_to_symbols_bc (symbol_table,D)); -} - -gr_chunks_to_symbols_bc::gr_chunks_to_symbols_bc (const std::vector &symbol_table, const int D) - : gr_sync_interpolator ("chunks_to_symbols_bc", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, -1, sizeof (gr_complex)), - D), - d_D (D), - d_symbol_table (symbol_table) -{ -} - -int -gr_chunks_to_symbols_bc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_D == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class gr_chunks_to_symbols_bc; -typedef boost::shared_ptr gr_chunks_to_symbols_bc_sptr; - -gr_chunks_to_symbols_bc_sptr gr_make_chunks_to_symbols_bc (const std::vector &symbol_table, const int D = 1); - -/*! - * \brief Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in \p D dimensions (\p D = 1 by default) - * \ingroup converter_blk - * - * input: stream of unsigned char; output: stream of gr_complex - * - * out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1 - * - * The combination of gr_packed_to_unpacked_XX followed by - * gr_chunks_to_symbols_XY handles the general case of mapping - * from a stream of bytes or shorts into arbitrary float - * or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ - -class gr_chunks_to_symbols_bc : public gr_sync_interpolator -{ - friend gr_chunks_to_symbols_bc_sptr gr_make_chunks_to_symbols_bc (const std::vector &symbol_table, const int D); - - int d_D; - std::vector d_symbol_table; - gr_chunks_to_symbols_bc (const std::vector &symbol_table, const int D = 1); - - public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bc.i b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bc.i deleted file mode 100644 index e8f23748..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bc.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,chunks_to_symbols_bc); - -gr_chunks_to_symbols_bc_sptr gr_make_chunks_to_symbols_bc (const std::vector &symbol_table, const int D = 1); - -class gr_chunks_to_symbols_bc : public gr_sync_interpolator -{ -private: - gr_chunks_to_symbols_bc (const std::vector &symbol_table, const int D = 1); - -public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bf.cc b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bf.cc deleted file mode 100644 index 25ee9cb6..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bf.cc +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - -gr_chunks_to_symbols_bf_sptr -gr_make_chunks_to_symbols_bf (const std::vector &symbol_table, const int D) -{ - return gr_chunks_to_symbols_bf_sptr (new gr_chunks_to_symbols_bf (symbol_table,D)); -} - -gr_chunks_to_symbols_bf::gr_chunks_to_symbols_bf (const std::vector &symbol_table, const int D) - : gr_sync_interpolator ("chunks_to_symbols_bf", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, -1, sizeof (float)), - D), - d_D (D), - d_symbol_table (symbol_table) -{ -} - -int -gr_chunks_to_symbols_bf::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_D == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class gr_chunks_to_symbols_bf; -typedef boost::shared_ptr gr_chunks_to_symbols_bf_sptr; - -gr_chunks_to_symbols_bf_sptr gr_make_chunks_to_symbols_bf (const std::vector &symbol_table, const int D = 1); - -/*! - * \brief Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in \p D dimensions (\p D = 1 by default) - * \ingroup converter_blk - * - * input: stream of unsigned char; output: stream of float - * - * out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1 - * - * The combination of gr_packed_to_unpacked_XX followed by - * gr_chunks_to_symbols_XY handles the general case of mapping - * from a stream of bytes or shorts into arbitrary float - * or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ - -class gr_chunks_to_symbols_bf : public gr_sync_interpolator -{ - friend gr_chunks_to_symbols_bf_sptr gr_make_chunks_to_symbols_bf (const std::vector &symbol_table, const int D); - - int d_D; - std::vector d_symbol_table; - gr_chunks_to_symbols_bf (const std::vector &symbol_table, const int D = 1); - - public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bf.i b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bf.i deleted file mode 100644 index 31e176a5..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_bf.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,chunks_to_symbols_bf); - -gr_chunks_to_symbols_bf_sptr gr_make_chunks_to_symbols_bf (const std::vector &symbol_table, const int D = 1); - -class gr_chunks_to_symbols_bf : public gr_sync_interpolator -{ -private: - gr_chunks_to_symbols_bf (const std::vector &symbol_table, const int D = 1); - -public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_ic.cc b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_ic.cc deleted file mode 100644 index fd706c31..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_ic.cc +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - -gr_chunks_to_symbols_ic_sptr -gr_make_chunks_to_symbols_ic (const std::vector &symbol_table, const int D) -{ - return gr_chunks_to_symbols_ic_sptr (new gr_chunks_to_symbols_ic (symbol_table,D)); -} - -gr_chunks_to_symbols_ic::gr_chunks_to_symbols_ic (const std::vector &symbol_table, const int D) - : gr_sync_interpolator ("chunks_to_symbols_ic", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (gr_complex)), - D), - d_D (D), - d_symbol_table (symbol_table) -{ -} - -int -gr_chunks_to_symbols_ic::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_D == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class gr_chunks_to_symbols_ic; -typedef boost::shared_ptr gr_chunks_to_symbols_ic_sptr; - -gr_chunks_to_symbols_ic_sptr gr_make_chunks_to_symbols_ic (const std::vector &symbol_table, const int D = 1); - -/*! - * \brief Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in \p D dimensions (\p D = 1 by default) - * \ingroup converter_blk - * - * input: stream of int; output: stream of gr_complex - * - * out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1 - * - * The combination of gr_packed_to_unpacked_XX followed by - * gr_chunks_to_symbols_XY handles the general case of mapping - * from a stream of bytes or shorts into arbitrary float - * or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ - -class gr_chunks_to_symbols_ic : public gr_sync_interpolator -{ - friend gr_chunks_to_symbols_ic_sptr gr_make_chunks_to_symbols_ic (const std::vector &symbol_table, const int D); - - int d_D; - std::vector d_symbol_table; - gr_chunks_to_symbols_ic (const std::vector &symbol_table, const int D = 1); - - public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_ic.i b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_ic.i deleted file mode 100644 index 571e2eb1..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_ic.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,chunks_to_symbols_ic); - -gr_chunks_to_symbols_ic_sptr gr_make_chunks_to_symbols_ic (const std::vector &symbol_table, const int D = 1); - -class gr_chunks_to_symbols_ic : public gr_sync_interpolator -{ -private: - gr_chunks_to_symbols_ic (const std::vector &symbol_table, const int D = 1); - -public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_if.cc b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_if.cc deleted file mode 100644 index 5751f737..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_if.cc +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - -gr_chunks_to_symbols_if_sptr -gr_make_chunks_to_symbols_if (const std::vector &symbol_table, const int D) -{ - return gr_chunks_to_symbols_if_sptr (new gr_chunks_to_symbols_if (symbol_table,D)); -} - -gr_chunks_to_symbols_if::gr_chunks_to_symbols_if (const std::vector &symbol_table, const int D) - : gr_sync_interpolator ("chunks_to_symbols_if", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (float)), - D), - d_D (D), - d_symbol_table (symbol_table) -{ -} - -int -gr_chunks_to_symbols_if::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_D == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class gr_chunks_to_symbols_if; -typedef boost::shared_ptr gr_chunks_to_symbols_if_sptr; - -gr_chunks_to_symbols_if_sptr gr_make_chunks_to_symbols_if (const std::vector &symbol_table, const int D = 1); - -/*! - * \brief Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in \p D dimensions (\p D = 1 by default) - * \ingroup converter_blk - * - * input: stream of int; output: stream of float - * - * out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1 - * - * The combination of gr_packed_to_unpacked_XX followed by - * gr_chunks_to_symbols_XY handles the general case of mapping - * from a stream of bytes or shorts into arbitrary float - * or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ - -class gr_chunks_to_symbols_if : public gr_sync_interpolator -{ - friend gr_chunks_to_symbols_if_sptr gr_make_chunks_to_symbols_if (const std::vector &symbol_table, const int D); - - int d_D; - std::vector d_symbol_table; - gr_chunks_to_symbols_if (const std::vector &symbol_table, const int D = 1); - - public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_if.i b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_if.i deleted file mode 100644 index 4ead6b43..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_if.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,chunks_to_symbols_if); - -gr_chunks_to_symbols_if_sptr gr_make_chunks_to_symbols_if (const std::vector &symbol_table, const int D = 1); - -class gr_chunks_to_symbols_if : public gr_sync_interpolator -{ -private: - gr_chunks_to_symbols_if (const std::vector &symbol_table, const int D = 1); - -public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sc.cc b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sc.cc deleted file mode 100644 index 32f6c6ee..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sc.cc +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - -gr_chunks_to_symbols_sc_sptr -gr_make_chunks_to_symbols_sc (const std::vector &symbol_table, const int D) -{ - return gr_chunks_to_symbols_sc_sptr (new gr_chunks_to_symbols_sc (symbol_table,D)); -} - -gr_chunks_to_symbols_sc::gr_chunks_to_symbols_sc (const std::vector &symbol_table, const int D) - : gr_sync_interpolator ("chunks_to_symbols_sc", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (gr_complex)), - D), - d_D (D), - d_symbol_table (symbol_table) -{ -} - -int -gr_chunks_to_symbols_sc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_D == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class gr_chunks_to_symbols_sc; -typedef boost::shared_ptr gr_chunks_to_symbols_sc_sptr; - -gr_chunks_to_symbols_sc_sptr gr_make_chunks_to_symbols_sc (const std::vector &symbol_table, const int D = 1); - -/*! - * \brief Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in \p D dimensions (\p D = 1 by default) - * \ingroup converter_blk - * - * input: stream of short; output: stream of gr_complex - * - * out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1 - * - * The combination of gr_packed_to_unpacked_XX followed by - * gr_chunks_to_symbols_XY handles the general case of mapping - * from a stream of bytes or shorts into arbitrary float - * or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ - -class gr_chunks_to_symbols_sc : public gr_sync_interpolator -{ - friend gr_chunks_to_symbols_sc_sptr gr_make_chunks_to_symbols_sc (const std::vector &symbol_table, const int D); - - int d_D; - std::vector d_symbol_table; - gr_chunks_to_symbols_sc (const std::vector &symbol_table, const int D = 1); - - public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sc.i b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sc.i deleted file mode 100644 index fa67b031..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sc.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,chunks_to_symbols_sc); - -gr_chunks_to_symbols_sc_sptr gr_make_chunks_to_symbols_sc (const std::vector &symbol_table, const int D = 1); - -class gr_chunks_to_symbols_sc : public gr_sync_interpolator -{ -private: - gr_chunks_to_symbols_sc (const std::vector &symbol_table, const int D = 1); - -public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sf.cc b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sf.cc deleted file mode 100644 index 079c4c05..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sf.cc +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - -gr_chunks_to_symbols_sf_sptr -gr_make_chunks_to_symbols_sf (const std::vector &symbol_table, const int D) -{ - return gr_chunks_to_symbols_sf_sptr (new gr_chunks_to_symbols_sf (symbol_table,D)); -} - -gr_chunks_to_symbols_sf::gr_chunks_to_symbols_sf (const std::vector &symbol_table, const int D) - : gr_sync_interpolator ("chunks_to_symbols_sf", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (float)), - D), - d_D (D), - d_symbol_table (symbol_table) -{ -} - -int -gr_chunks_to_symbols_sf::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (noutput_items % d_D == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class gr_chunks_to_symbols_sf; -typedef boost::shared_ptr gr_chunks_to_symbols_sf_sptr; - -gr_chunks_to_symbols_sf_sptr gr_make_chunks_to_symbols_sf (const std::vector &symbol_table, const int D = 1); - -/*! - * \brief Map a stream of symbol indexes (unpacked bytes or shorts) to stream of float or complex onstellation points.in \p D dimensions (\p D = 1 by default) - * \ingroup converter_blk - * - * input: stream of short; output: stream of float - * - * out[n D + k] = symbol_table[in[n] D + k], k=0,1,...,D-1 - * - * The combination of gr_packed_to_unpacked_XX followed by - * gr_chunks_to_symbols_XY handles the general case of mapping - * from a stream of bytes or shorts into arbitrary float - * or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ - -class gr_chunks_to_symbols_sf : public gr_sync_interpolator -{ - friend gr_chunks_to_symbols_sf_sptr gr_make_chunks_to_symbols_sf (const std::vector &symbol_table, const int D); - - int d_D; - std::vector d_symbol_table; - gr_chunks_to_symbols_sf (const std::vector &symbol_table, const int D = 1); - - public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sf.i b/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sf.i deleted file mode 100644 index fb3a74dc..00000000 --- a/gnuradio-core/src/lib/gengen/gr_chunks_to_symbols_sf.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,chunks_to_symbols_sf); - -gr_chunks_to_symbols_sf_sptr gr_make_chunks_to_symbols_sf (const std::vector &symbol_table, const int D = 1); - -class gr_chunks_to_symbols_sf : public gr_sync_interpolator -{ -private: - gr_chunks_to_symbols_sf (const std::vector &symbol_table, const int D = 1); - -public: - int D () const { return d_D; } - std::vector symbol_table () const { return d_symbol_table; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_divide_cc.cc b/gnuradio-core/src/lib/gengen/gr_divide_cc.cc deleted file mode 100644 index 4ab9aa5a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_cc.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_divide_cc_sptr -gr_make_divide_cc (size_t vlen) -{ - return gr_divide_cc_sptr (new gr_divide_cc (vlen)); -} - -gr_divide_cc::gr_divide_cc (size_t vlen) - : gr_sync_block ("divide_cc", - gr_make_io_signature (1, -1, sizeof (gr_complex)*vlen), - gr_make_io_signature (1, 1, sizeof (gr_complex)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_divide_cc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *optr = (gr_complex *) output_items[0]; - - int ninputs = input_items.size (); - - if (ninputs == 1){ // compute reciprocal - for (int i = 0; i < noutput_items*d_vlen; i++) - *optr++ = (gr_complex) ((gr_complex) 1 / - ((gr_complex *) input_items[0])[i]); - } - - else { - for (int i = 0; i < noutput_items*d_vlen; i++){ - gr_complex acc = ((gr_complex *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc /= ((gr_complex *) input_items[j])[i]; - - *optr++ = (gr_complex) acc; - } - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_divide_cc.h b/gnuradio-core/src/lib/gengen/gr_divide_cc.h deleted file mode 100644 index f0e7f7fe..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_cc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_DIVIDE_CC_H -#define INCLUDED_GR_DIVIDE_CC_H - -#include - -class gr_divide_cc; -typedef boost::shared_ptr gr_divide_cc_sptr; - -gr_divide_cc_sptr gr_make_divide_cc (size_t vlen = 1); - -/*! - * \brief output = input_0 / input_1 / input_x ...) - * \ingroup math_blk - * - * Divide across all input streams. - */ -class gr_divide_cc : public gr_sync_block -{ - friend gr_divide_cc_sptr gr_make_divide_cc (size_t vlen); - - gr_divide_cc (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_divide_cc.i b/gnuradio-core/src/lib/gengen/gr_divide_cc.i deleted file mode 100644 index 64b0cd79..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_cc.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,divide_cc) - -gr_divide_cc_sptr gr_make_divide_cc (size_t vlen = 1); - -class gr_divide_cc : public gr_sync_block -{ - private: - gr_divide_cc (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_divide_ff.cc b/gnuradio-core/src/lib/gengen/gr_divide_ff.cc deleted file mode 100644 index a33cbf52..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_ff.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_divide_ff_sptr -gr_make_divide_ff (size_t vlen) -{ - return gr_divide_ff_sptr (new gr_divide_ff (vlen)); -} - -gr_divide_ff::gr_divide_ff (size_t vlen) - : gr_sync_block ("divide_ff", - gr_make_io_signature (1, -1, sizeof (float)*vlen), - gr_make_io_signature (1, 1, sizeof (float)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_divide_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *optr = (float *) output_items[0]; - - int ninputs = input_items.size (); - - if (ninputs == 1){ // compute reciprocal - for (int i = 0; i < noutput_items*d_vlen; i++) - *optr++ = (float) ((float) 1 / - ((float *) input_items[0])[i]); - } - - else { - for (int i = 0; i < noutput_items*d_vlen; i++){ - float acc = ((float *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc /= ((float *) input_items[j])[i]; - - *optr++ = (float) acc; - } - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_divide_ff.h b/gnuradio-core/src/lib/gengen/gr_divide_ff.h deleted file mode 100644 index 67c6a7f3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_ff.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_DIVIDE_FF_H -#define INCLUDED_GR_DIVIDE_FF_H - -#include - -class gr_divide_ff; -typedef boost::shared_ptr gr_divide_ff_sptr; - -gr_divide_ff_sptr gr_make_divide_ff (size_t vlen = 1); - -/*! - * \brief output = input_0 / input_1 / input_x ...) - * \ingroup math_blk - * - * Divide across all input streams. - */ -class gr_divide_ff : public gr_sync_block -{ - friend gr_divide_ff_sptr gr_make_divide_ff (size_t vlen); - - gr_divide_ff (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_divide_ff.i b/gnuradio-core/src/lib/gengen/gr_divide_ff.i deleted file mode 100644 index c88cae15..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_ff.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,divide_ff) - -gr_divide_ff_sptr gr_make_divide_ff (size_t vlen = 1); - -class gr_divide_ff : public gr_sync_block -{ - private: - gr_divide_ff (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_divide_ii.cc b/gnuradio-core/src/lib/gengen/gr_divide_ii.cc deleted file mode 100644 index e4d82131..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_ii.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_divide_ii_sptr -gr_make_divide_ii (size_t vlen) -{ - return gr_divide_ii_sptr (new gr_divide_ii (vlen)); -} - -gr_divide_ii::gr_divide_ii (size_t vlen) - : gr_sync_block ("divide_ii", - gr_make_io_signature (1, -1, sizeof (int)*vlen), - gr_make_io_signature (1, 1, sizeof (int)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_divide_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - - int ninputs = input_items.size (); - - if (ninputs == 1){ // compute reciprocal - for (int i = 0; i < noutput_items*d_vlen; i++) - *optr++ = (int) ((int) 1 / - ((int *) input_items[0])[i]); - } - - else { - for (int i = 0; i < noutput_items*d_vlen; i++){ - int acc = ((int *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc /= ((int *) input_items[j])[i]; - - *optr++ = (int) acc; - } - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_divide_ii.h b/gnuradio-core/src/lib/gengen/gr_divide_ii.h deleted file mode 100644 index 8c73288c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_ii.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_DIVIDE_II_H -#define INCLUDED_GR_DIVIDE_II_H - -#include - -class gr_divide_ii; -typedef boost::shared_ptr gr_divide_ii_sptr; - -gr_divide_ii_sptr gr_make_divide_ii (size_t vlen = 1); - -/*! - * \brief output = input_0 / input_1 / input_x ...) - * \ingroup math_blk - * - * Divide across all input streams. - */ -class gr_divide_ii : public gr_sync_block -{ - friend gr_divide_ii_sptr gr_make_divide_ii (size_t vlen); - - gr_divide_ii (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_divide_ii.i b/gnuradio-core/src/lib/gengen/gr_divide_ii.i deleted file mode 100644 index db42d271..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,divide_ii) - -gr_divide_ii_sptr gr_make_divide_ii (size_t vlen = 1); - -class gr_divide_ii : public gr_sync_block -{ - private: - gr_divide_ii (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_divide_ss.cc b/gnuradio-core/src/lib/gengen/gr_divide_ss.cc deleted file mode 100644 index 53f6cef7..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_ss.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_divide_ss_sptr -gr_make_divide_ss (size_t vlen) -{ - return gr_divide_ss_sptr (new gr_divide_ss (vlen)); -} - -gr_divide_ss::gr_divide_ss (size_t vlen) - : gr_sync_block ("divide_ss", - gr_make_io_signature (1, -1, sizeof (short)*vlen), - gr_make_io_signature (1, 1, sizeof (short)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_divide_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - - int ninputs = input_items.size (); - - if (ninputs == 1){ // compute reciprocal - for (int i = 0; i < noutput_items*d_vlen; i++) - *optr++ = (short) ((short) 1 / - ((short *) input_items[0])[i]); - } - - else { - for (int i = 0; i < noutput_items*d_vlen; i++){ - short acc = ((short *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc /= ((short *) input_items[j])[i]; - - *optr++ = (short) acc; - } - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_divide_ss.h b/gnuradio-core/src/lib/gengen/gr_divide_ss.h deleted file mode 100644 index cbda2ed0..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_ss.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_DIVIDE_SS_H -#define INCLUDED_GR_DIVIDE_SS_H - -#include - -class gr_divide_ss; -typedef boost::shared_ptr gr_divide_ss_sptr; - -gr_divide_ss_sptr gr_make_divide_ss (size_t vlen = 1); - -/*! - * \brief output = input_0 / input_1 / input_x ...) - * \ingroup math_blk - * - * Divide across all input streams. - */ -class gr_divide_ss : public gr_sync_block -{ - friend gr_divide_ss_sptr gr_make_divide_ss (size_t vlen); - - gr_divide_ss (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_divide_ss.i b/gnuradio-core/src/lib/gengen/gr_divide_ss.i deleted file mode 100644 index a4d06282..00000000 --- a/gnuradio-core/src/lib/gengen/gr_divide_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,divide_ss) - -gr_divide_ss_sptr gr_make_divide_ss (size_t vlen = 1); - -class gr_divide_ss : public gr_sync_block -{ - private: - gr_divide_ss (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_cc.cc b/gnuradio-core/src/lib/gengen/gr_integrate_cc.cc deleted file mode 100644 index 44527131..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_cc.cc +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_integrate_cc_sptr -gr_make_integrate_cc (int decim) -{ - return gr_integrate_cc_sptr (new gr_integrate_cc (decim)); -} - -gr_integrate_cc::gr_integrate_cc (int decim) - : gr_sync_decimator ("integrate_cc", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex)), - decim), - d_decim(decim), - d_count(0) -{ -} - -gr_integrate_cc::~gr_integrate_cc () -{ -} - -int -gr_integrate_cc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const gr_complex *in = (const gr_complex *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - for (int i = 0; i < noutput_items; i++) { - out[i] = (gr_complex)0; - for (int j = 0; j < d_decim; j++) - out[i] += in[i*d_decim+j]; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_cc.h b/gnuradio-core/src/lib/gengen/gr_integrate_cc.h deleted file mode 100644 index 40719531..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_cc.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_INTEGRATE_CC_H -#define INCLUDED_GR_INTEGRATE_CC_H - -#include - -class gr_integrate_cc; - -typedef boost::shared_ptr gr_integrate_cc_sptr; - -gr_integrate_cc_sptr gr_make_integrate_cc (int decim); - -/*! - * \brief output = sum(input[0]...input[n]) - * \ingroup math_blk - * - * Integrate successive samples in input stream and decimate - */ -class gr_integrate_cc : public gr_sync_decimator -{ -private: - friend gr_integrate_cc_sptr gr_make_integrate_cc(int decim); - - gr_integrate_cc (int decim); - - int d_decim; - int d_count; - -public: - ~gr_integrate_cc (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_GR_INTEGRATE_CC_H */ diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_cc.i b/gnuradio-core/src/lib/gengen/gr_integrate_cc.i deleted file mode 100644 index b3657f62..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_cc.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,integrate_cc); - -gr_integrate_cc_sptr gr_make_integrate_cc (int decim); - -class gr_integrate_cc : public gr_sync_decimator -{ -private: - gr_integrate_cc (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_ff.cc b/gnuradio-core/src/lib/gengen/gr_integrate_ff.cc deleted file mode 100644 index 7794255a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_ff.cc +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_integrate_ff_sptr -gr_make_integrate_ff (int decim) -{ - return gr_integrate_ff_sptr (new gr_integrate_ff (decim)); -} - -gr_integrate_ff::gr_integrate_ff (int decim) - : gr_sync_decimator ("integrate_ff", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (float)), - decim), - d_decim(decim), - d_count(0) -{ -} - -gr_integrate_ff::~gr_integrate_ff () -{ -} - -int -gr_integrate_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const float *in = (const float *) input_items[0]; - float *out = (float *) output_items[0]; - - for (int i = 0; i < noutput_items; i++) { - out[i] = (float)0; - for (int j = 0; j < d_decim; j++) - out[i] += in[i*d_decim+j]; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_ff.h b/gnuradio-core/src/lib/gengen/gr_integrate_ff.h deleted file mode 100644 index e9ada5d3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_ff.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_INTEGRATE_FF_H -#define INCLUDED_GR_INTEGRATE_FF_H - -#include - -class gr_integrate_ff; - -typedef boost::shared_ptr gr_integrate_ff_sptr; - -gr_integrate_ff_sptr gr_make_integrate_ff (int decim); - -/*! - * \brief output = sum(input[0]...input[n]) - * \ingroup math_blk - * - * Integrate successive samples in input stream and decimate - */ -class gr_integrate_ff : public gr_sync_decimator -{ -private: - friend gr_integrate_ff_sptr gr_make_integrate_ff(int decim); - - gr_integrate_ff (int decim); - - int d_decim; - int d_count; - -public: - ~gr_integrate_ff (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_GR_INTEGRATE_FF_H */ diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_ff.i b/gnuradio-core/src/lib/gengen/gr_integrate_ff.i deleted file mode 100644 index 7557516f..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_ff.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,integrate_ff); - -gr_integrate_ff_sptr gr_make_integrate_ff (int decim); - -class gr_integrate_ff : public gr_sync_decimator -{ -private: - gr_integrate_ff (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_ii.cc b/gnuradio-core/src/lib/gengen/gr_integrate_ii.cc deleted file mode 100644 index 473a3e26..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_ii.cc +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_integrate_ii_sptr -gr_make_integrate_ii (int decim) -{ - return gr_integrate_ii_sptr (new gr_integrate_ii (decim)); -} - -gr_integrate_ii::gr_integrate_ii (int decim) - : gr_sync_decimator ("integrate_ii", - gr_make_io_signature (1, 1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int)), - decim), - d_decim(decim), - d_count(0) -{ -} - -gr_integrate_ii::~gr_integrate_ii () -{ -} - -int -gr_integrate_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const int *in = (const int *) input_items[0]; - int *out = (int *) output_items[0]; - - for (int i = 0; i < noutput_items; i++) { - out[i] = (int)0; - for (int j = 0; j < d_decim; j++) - out[i] += in[i*d_decim+j]; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_ii.h b/gnuradio-core/src/lib/gengen/gr_integrate_ii.h deleted file mode 100644 index 822b2425..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_ii.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_INTEGRATE_II_H -#define INCLUDED_GR_INTEGRATE_II_H - -#include - -class gr_integrate_ii; - -typedef boost::shared_ptr gr_integrate_ii_sptr; - -gr_integrate_ii_sptr gr_make_integrate_ii (int decim); - -/*! - * \brief output = sum(input[0]...input[n]) - * \ingroup math_blk - * - * Integrate successive samples in input stream and decimate - */ -class gr_integrate_ii : public gr_sync_decimator -{ -private: - friend gr_integrate_ii_sptr gr_make_integrate_ii(int decim); - - gr_integrate_ii (int decim); - - int d_decim; - int d_count; - -public: - ~gr_integrate_ii (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_GR_INTEGRATE_II_H */ diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_ii.i b/gnuradio-core/src/lib/gengen/gr_integrate_ii.i deleted file mode 100644 index 30745bf2..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,integrate_ii); - -gr_integrate_ii_sptr gr_make_integrate_ii (int decim); - -class gr_integrate_ii : public gr_sync_decimator -{ -private: - gr_integrate_ii (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_ss.cc b/gnuradio-core/src/lib/gengen/gr_integrate_ss.cc deleted file mode 100644 index bda6e38e..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_ss.cc +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_integrate_ss_sptr -gr_make_integrate_ss (int decim) -{ - return gr_integrate_ss_sptr (new gr_integrate_ss (decim)); -} - -gr_integrate_ss::gr_integrate_ss (int decim) - : gr_sync_decimator ("integrate_ss", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short)), - decim), - d_decim(decim), - d_count(0) -{ -} - -gr_integrate_ss::~gr_integrate_ss () -{ -} - -int -gr_integrate_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - const short *in = (const short *) input_items[0]; - short *out = (short *) output_items[0]; - - for (int i = 0; i < noutput_items; i++) { - out[i] = (short)0; - for (int j = 0; j < d_decim; j++) - out[i] += in[i*d_decim+j]; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_ss.h b/gnuradio-core/src/lib/gengen/gr_integrate_ss.h deleted file mode 100644 index cf3a06b2..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_ss.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_INTEGRATE_SS_H -#define INCLUDED_GR_INTEGRATE_SS_H - -#include - -class gr_integrate_ss; - -typedef boost::shared_ptr gr_integrate_ss_sptr; - -gr_integrate_ss_sptr gr_make_integrate_ss (int decim); - -/*! - * \brief output = sum(input[0]...input[n]) - * \ingroup math_blk - * - * Integrate successive samples in input stream and decimate - */ -class gr_integrate_ss : public gr_sync_decimator -{ -private: - friend gr_integrate_ss_sptr gr_make_integrate_ss(int decim); - - gr_integrate_ss (int decim); - - int d_decim; - int d_count; - -public: - ~gr_integrate_ss (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif /* INCLUDED_GR_INTEGRATE_SS_H */ diff --git a/gnuradio-core/src/lib/gengen/gr_integrate_ss.i b/gnuradio-core/src/lib/gengen/gr_integrate_ss.i deleted file mode 100644 index c00149b0..00000000 --- a/gnuradio-core/src/lib/gengen/gr_integrate_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,integrate_ss); - -gr_integrate_ss_sptr gr_make_integrate_ss (int decim); - -class gr_integrate_ss : public gr_sync_decimator -{ -private: - gr_integrate_ss (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_max_ff.cc b/gnuradio-core/src/lib/gengen/gr_max_ff.cc deleted file mode 100644 index b370c66d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_max_ff.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_max_ff_sptr -gr_make_max_ff ( size_t vlen ) -{ - return gr_max_ff_sptr ( new gr_max_ff(vlen)); -} - -gr_max_ff::gr_max_ff( size_t vlen) - : gr_sync_block ( "max_ff", - gr_make_io_signature (1, -1, vlen*sizeof (float)), - gr_make_io_signature (1, 1, sizeof (float))), - d_vlen(vlen) -{ -} - -int -gr_max_ff::work( int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *optr = (float *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i=0; i max) { - max = ((float*) input_items[k])[i*d_vlen + j]; - } - } - } - - *optr++ = (float) max; - } - return noutput_items; -} - diff --git a/gnuradio-core/src/lib/gengen/gr_max_ff.h b/gnuradio-core/src/lib/gengen/gr_max_ff.h deleted file mode 100644 index ce0b0555..00000000 --- a/gnuradio-core/src/lib/gengen/gr_max_ff.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MAX_FF_H -#define INCLUDED_GR_MAX_FF_H - -#include - -class gr_max_ff; -typedef boost::shared_ptr gr_max_ff_sptr; - -gr_max_ff_sptr gr_make_max_ff (size_t vlen); - - -class gr_max_ff : public gr_sync_block -{ - friend gr_max_ff_sptr gr_make_max_ff (size_t vlen); - - gr_max_ff (size_t vlen); - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_max_ff.i b/gnuradio-core/src/lib/gengen/gr_max_ff.i deleted file mode 100644 index 06e8885b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_max_ff.i +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,max_ff) - -gr_max_ff_sptr gr_make_max_ff (size_t vlen); - -class gr_max_ff : public gr_sync_block -{ - private: - gr_max_ff (size_t vlen); - size_t d_vlen; -}; diff --git a/gnuradio-core/src/lib/gengen/gr_max_ii.cc b/gnuradio-core/src/lib/gengen/gr_max_ii.cc deleted file mode 100644 index 6933ad52..00000000 --- a/gnuradio-core/src/lib/gengen/gr_max_ii.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_max_ii_sptr -gr_make_max_ii ( size_t vlen ) -{ - return gr_max_ii_sptr ( new gr_max_ii(vlen)); -} - -gr_max_ii::gr_max_ii( size_t vlen) - : gr_sync_block ( "max_ii", - gr_make_io_signature (1, -1, vlen*sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int))), - d_vlen(vlen) -{ -} - -int -gr_max_ii::work( int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i=0; i max) { - max = ((int*) input_items[k])[i*d_vlen + j]; - } - } - } - - *optr++ = (int) max; - } - return noutput_items; -} - diff --git a/gnuradio-core/src/lib/gengen/gr_max_ii.h b/gnuradio-core/src/lib/gengen/gr_max_ii.h deleted file mode 100644 index ebffdaae..00000000 --- a/gnuradio-core/src/lib/gengen/gr_max_ii.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MAX_II_H -#define INCLUDED_GR_MAX_II_H - -#include - -class gr_max_ii; -typedef boost::shared_ptr gr_max_ii_sptr; - -gr_max_ii_sptr gr_make_max_ii (size_t vlen); - - -class gr_max_ii : public gr_sync_block -{ - friend gr_max_ii_sptr gr_make_max_ii (size_t vlen); - - gr_max_ii (size_t vlen); - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_max_ii.i b/gnuradio-core/src/lib/gengen/gr_max_ii.i deleted file mode 100644 index 050b9022..00000000 --- a/gnuradio-core/src/lib/gengen/gr_max_ii.i +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,max_ii) - -gr_max_ii_sptr gr_make_max_ii (size_t vlen); - -class gr_max_ii : public gr_sync_block -{ - private: - gr_max_ii (size_t vlen); - size_t d_vlen; -}; diff --git a/gnuradio-core/src/lib/gengen/gr_max_ss.cc b/gnuradio-core/src/lib/gengen/gr_max_ss.cc deleted file mode 100644 index 9121344c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_max_ss.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_max_ss_sptr -gr_make_max_ss ( size_t vlen ) -{ - return gr_max_ss_sptr ( new gr_max_ss(vlen)); -} - -gr_max_ss::gr_max_ss( size_t vlen) - : gr_sync_block ( "max_ss", - gr_make_io_signature (1, -1, vlen*sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short))), - d_vlen(vlen) -{ -} - -int -gr_max_ss::work( int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i=0; i max) { - max = ((short*) input_items[k])[i*d_vlen + j]; - } - } - } - - *optr++ = (short) max; - } - return noutput_items; -} - diff --git a/gnuradio-core/src/lib/gengen/gr_max_ss.h b/gnuradio-core/src/lib/gengen/gr_max_ss.h deleted file mode 100644 index ae68e4f1..00000000 --- a/gnuradio-core/src/lib/gengen/gr_max_ss.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MAX_SS_H -#define INCLUDED_GR_MAX_SS_H - -#include - -class gr_max_ss; -typedef boost::shared_ptr gr_max_ss_sptr; - -gr_max_ss_sptr gr_make_max_ss (size_t vlen); - - -class gr_max_ss : public gr_sync_block -{ - friend gr_max_ss_sptr gr_make_max_ss (size_t vlen); - - gr_max_ss (size_t vlen); - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_max_ss.i b/gnuradio-core/src/lib/gengen/gr_max_ss.i deleted file mode 100644 index a081326d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_max_ss.i +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,max_ss) - -gr_max_ss_sptr gr_make_max_ss (size_t vlen); - -class gr_max_ss : public gr_sync_block -{ - private: - gr_max_ss (size_t vlen); - size_t d_vlen; -}; diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_cc.cc b/gnuradio-core/src/lib/gengen/gr_moving_average_cc.cc deleted file mode 100644 index 96c5d561..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_cc.cc +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_moving_average_cc_sptr -gr_make_moving_average_cc (int length, gr_complex scale, int max_iter) -{ - return gr_moving_average_cc_sptr (new gr_moving_average_cc (length, scale, max_iter)); -} - -gr_moving_average_cc::gr_moving_average_cc (int length, gr_complex scale, int max_iter) - : gr_sync_block ("moving_average_cc", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex))), - d_length(length), - d_scale(scale), - d_max_iter(max_iter), - d_new_length(length), - d_new_scale(scale), - d_updated(false) -{ - set_history(length); -} - -gr_moving_average_cc::~gr_moving_average_cc () -{ -} - -void -gr_moving_average_cc::set_length_and_scale(int length, gr_complex scale) -{ - d_new_length = length; - d_new_scale = scale; - d_updated = true; -} - -int -gr_moving_average_cc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - if (d_updated) { - d_length = d_new_length; - d_scale = d_new_scale; - set_history(d_length); - d_updated = false; - return 0; // history requirements might have changed - } - - const gr_complex *in = (const gr_complex *) input_items[0]; - gr_complex *out = (gr_complex *) output_items[0]; - - gr_complex sum = 0; - int num_iter = (noutput_items>d_max_iter) ? d_max_iter : noutput_items; - for (int i = 0; i < d_length-1 ; i++) { - sum += in[i]; - } - - for (int i = 0; i < num_iter; i++) { - sum += in[i+d_length-1]; - out[i] = sum * d_scale; - sum -= in[i]; - } - - return num_iter; -} diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_cc.h b/gnuradio-core/src/lib/gengen/gr_moving_average_cc.h deleted file mode 100644 index 981933d1..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_cc.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MOVING_AVERAGE_CC_H -#define INCLUDED_GR_MOVING_AVERAGE_CC_H - -#include - -class gr_moving_average_cc; - -typedef boost::shared_ptr gr_moving_average_cc_sptr; - -gr_moving_average_cc_sptr gr_make_moving_average_cc (int length, gr_complex scale, int max_iter = 4096); - -/*! - * \brief output is the moving sum of the last N samples, scaled by the scale factor - * \ingroup filter_blk - * - * max_iter limits how long we go without flushing the accumulator - * This is necessary to avoid numerical instability for float and complex. - */ -class gr_moving_average_cc : public gr_sync_block -{ -private: - friend gr_moving_average_cc_sptr gr_make_moving_average_cc(int length, gr_complex scale, int max_iter); - - gr_moving_average_cc (int length, gr_complex scale, int max_iter = 4096); - - int d_length; - gr_complex d_scale; - int d_max_iter; - - int d_new_length; - gr_complex d_new_scale; - bool d_updated; - -public: - ~gr_moving_average_cc (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - int length() const { return d_new_length; } - gr_complex scale() const { return d_new_scale; } - - void set_length_and_scale(int length, gr_complex scale); -}; - -#endif /* INCLUDED_GR_MOVING_AVERAGE_CC_H */ diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_cc.i b/gnuradio-core/src/lib/gengen/gr_moving_average_cc.i deleted file mode 100644 index 8102e55c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_cc.i +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,moving_average_cc); - -gr_moving_average_cc_sptr gr_make_moving_average_cc (int length, gr_complex scale, int max_iter=4096); - -class gr_moving_average_cc : public gr_sync_block -{ -private: - gr_moving_average_cc (); - - public: - int length() const; - gr_complex scale() const; - void set_length_and_scale(int length, gr_complex scale); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_ff.cc b/gnuradio-core/src/lib/gengen/gr_moving_average_ff.cc deleted file mode 100644 index 364c905b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_ff.cc +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_moving_average_ff_sptr -gr_make_moving_average_ff (int length, float scale, int max_iter) -{ - return gr_moving_average_ff_sptr (new gr_moving_average_ff (length, scale, max_iter)); -} - -gr_moving_average_ff::gr_moving_average_ff (int length, float scale, int max_iter) - : gr_sync_block ("moving_average_ff", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (float))), - d_length(length), - d_scale(scale), - d_max_iter(max_iter), - d_new_length(length), - d_new_scale(scale), - d_updated(false) -{ - set_history(length); -} - -gr_moving_average_ff::~gr_moving_average_ff () -{ -} - -void -gr_moving_average_ff::set_length_and_scale(int length, float scale) -{ - d_new_length = length; - d_new_scale = scale; - d_updated = true; -} - -int -gr_moving_average_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - if (d_updated) { - d_length = d_new_length; - d_scale = d_new_scale; - set_history(d_length); - d_updated = false; - return 0; // history requirements might have changed - } - - const float *in = (const float *) input_items[0]; - float *out = (float *) output_items[0]; - - float sum = 0; - int num_iter = (noutput_items>d_max_iter) ? d_max_iter : noutput_items; - for (int i = 0; i < d_length-1 ; i++) { - sum += in[i]; - } - - for (int i = 0; i < num_iter; i++) { - sum += in[i+d_length-1]; - out[i] = sum * d_scale; - sum -= in[i]; - } - - return num_iter; -} diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_ff.h b/gnuradio-core/src/lib/gengen/gr_moving_average_ff.h deleted file mode 100644 index 404fd147..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_ff.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MOVING_AVERAGE_FF_H -#define INCLUDED_GR_MOVING_AVERAGE_FF_H - -#include - -class gr_moving_average_ff; - -typedef boost::shared_ptr gr_moving_average_ff_sptr; - -gr_moving_average_ff_sptr gr_make_moving_average_ff (int length, float scale, int max_iter = 4096); - -/*! - * \brief output is the moving sum of the last N samples, scaled by the scale factor - * \ingroup filter_blk - * - * max_iter limits how long we go without flushing the accumulator - * This is necessary to avoid numerical instability for float and complex. - */ -class gr_moving_average_ff : public gr_sync_block -{ -private: - friend gr_moving_average_ff_sptr gr_make_moving_average_ff(int length, float scale, int max_iter); - - gr_moving_average_ff (int length, float scale, int max_iter = 4096); - - int d_length; - float d_scale; - int d_max_iter; - - int d_new_length; - float d_new_scale; - bool d_updated; - -public: - ~gr_moving_average_ff (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - int length() const { return d_new_length; } - float scale() const { return d_new_scale; } - - void set_length_and_scale(int length, float scale); -}; - -#endif /* INCLUDED_GR_MOVING_AVERAGE_FF_H */ diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_ff.i b/gnuradio-core/src/lib/gengen/gr_moving_average_ff.i deleted file mode 100644 index 1e3a6706..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_ff.i +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,moving_average_ff); - -gr_moving_average_ff_sptr gr_make_moving_average_ff (int length, float scale, int max_iter=4096); - -class gr_moving_average_ff : public gr_sync_block -{ -private: - gr_moving_average_ff (); - - public: - int length() const; - float scale() const; - void set_length_and_scale(int length, float scale); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_ii.cc b/gnuradio-core/src/lib/gengen/gr_moving_average_ii.cc deleted file mode 100644 index 4cb6470c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_ii.cc +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_moving_average_ii_sptr -gr_make_moving_average_ii (int length, int scale, int max_iter) -{ - return gr_moving_average_ii_sptr (new gr_moving_average_ii (length, scale, max_iter)); -} - -gr_moving_average_ii::gr_moving_average_ii (int length, int scale, int max_iter) - : gr_sync_block ("moving_average_ii", - gr_make_io_signature (1, 1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int))), - d_length(length), - d_scale(scale), - d_max_iter(max_iter), - d_new_length(length), - d_new_scale(scale), - d_updated(false) -{ - set_history(length); -} - -gr_moving_average_ii::~gr_moving_average_ii () -{ -} - -void -gr_moving_average_ii::set_length_and_scale(int length, int scale) -{ - d_new_length = length; - d_new_scale = scale; - d_updated = true; -} - -int -gr_moving_average_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - if (d_updated) { - d_length = d_new_length; - d_scale = d_new_scale; - set_history(d_length); - d_updated = false; - return 0; // history requirements might have changed - } - - const int *in = (const int *) input_items[0]; - int *out = (int *) output_items[0]; - - int sum = 0; - int num_iter = (noutput_items>d_max_iter) ? d_max_iter : noutput_items; - for (int i = 0; i < d_length-1 ; i++) { - sum += in[i]; - } - - for (int i = 0; i < num_iter; i++) { - sum += in[i+d_length-1]; - out[i] = sum * d_scale; - sum -= in[i]; - } - - return num_iter; -} diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_ii.h b/gnuradio-core/src/lib/gengen/gr_moving_average_ii.h deleted file mode 100644 index b979b0e6..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_ii.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MOVING_AVERAGE_II_H -#define INCLUDED_GR_MOVING_AVERAGE_II_H - -#include - -class gr_moving_average_ii; - -typedef boost::shared_ptr gr_moving_average_ii_sptr; - -gr_moving_average_ii_sptr gr_make_moving_average_ii (int length, int scale, int max_iter = 4096); - -/*! - * \brief output is the moving sum of the last N samples, scaled by the scale factor - * \ingroup filter_blk - * - * max_iter limits how long we go without flushing the accumulator - * This is necessary to avoid numerical instability for float and complex. - */ -class gr_moving_average_ii : public gr_sync_block -{ -private: - friend gr_moving_average_ii_sptr gr_make_moving_average_ii(int length, int scale, int max_iter); - - gr_moving_average_ii (int length, int scale, int max_iter = 4096); - - int d_length; - int d_scale; - int d_max_iter; - - int d_new_length; - int d_new_scale; - bool d_updated; - -public: - ~gr_moving_average_ii (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - int length() const { return d_new_length; } - int scale() const { return d_new_scale; } - - void set_length_and_scale(int length, int scale); -}; - -#endif /* INCLUDED_GR_MOVING_AVERAGE_II_H */ diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_ii.i b/gnuradio-core/src/lib/gengen/gr_moving_average_ii.i deleted file mode 100644 index 3306f3f9..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_ii.i +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,moving_average_ii); - -gr_moving_average_ii_sptr gr_make_moving_average_ii (int length, int scale, int max_iter=4096); - -class gr_moving_average_ii : public gr_sync_block -{ -private: - gr_moving_average_ii (); - - public: - int length() const; - int scale() const; - void set_length_and_scale(int length, int scale); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_ss.cc b/gnuradio-core/src/lib/gengen/gr_moving_average_ss.cc deleted file mode 100644 index 3ce01750..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_ss.cc +++ /dev/null @@ -1,93 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_moving_average_ss_sptr -gr_make_moving_average_ss (int length, short scale, int max_iter) -{ - return gr_moving_average_ss_sptr (new gr_moving_average_ss (length, scale, max_iter)); -} - -gr_moving_average_ss::gr_moving_average_ss (int length, short scale, int max_iter) - : gr_sync_block ("moving_average_ss", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short))), - d_length(length), - d_scale(scale), - d_max_iter(max_iter), - d_new_length(length), - d_new_scale(scale), - d_updated(false) -{ - set_history(length); -} - -gr_moving_average_ss::~gr_moving_average_ss () -{ -} - -void -gr_moving_average_ss::set_length_and_scale(int length, short scale) -{ - d_new_length = length; - d_new_scale = scale; - d_updated = true; -} - -int -gr_moving_average_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - if (d_updated) { - d_length = d_new_length; - d_scale = d_new_scale; - set_history(d_length); - d_updated = false; - return 0; // history requirements might have changed - } - - const short *in = (const short *) input_items[0]; - short *out = (short *) output_items[0]; - - short sum = 0; - int num_iter = (noutput_items>d_max_iter) ? d_max_iter : noutput_items; - for (int i = 0; i < d_length-1 ; i++) { - sum += in[i]; - } - - for (int i = 0; i < num_iter; i++) { - sum += in[i+d_length-1]; - out[i] = sum * d_scale; - sum -= in[i]; - } - - return num_iter; -} diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_ss.h b/gnuradio-core/src/lib/gengen/gr_moving_average_ss.h deleted file mode 100644 index bbb9d9fb..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_ss.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MOVING_AVERAGE_SS_H -#define INCLUDED_GR_MOVING_AVERAGE_SS_H - -#include - -class gr_moving_average_ss; - -typedef boost::shared_ptr gr_moving_average_ss_sptr; - -gr_moving_average_ss_sptr gr_make_moving_average_ss (int length, short scale, int max_iter = 4096); - -/*! - * \brief output is the moving sum of the last N samples, scaled by the scale factor - * \ingroup filter_blk - * - * max_iter limits how long we go without flushing the accumulator - * This is necessary to avoid numerical instability for float and complex. - */ -class gr_moving_average_ss : public gr_sync_block -{ -private: - friend gr_moving_average_ss_sptr gr_make_moving_average_ss(int length, short scale, int max_iter); - - gr_moving_average_ss (int length, short scale, int max_iter = 4096); - - int d_length; - short d_scale; - int d_max_iter; - - int d_new_length; - short d_new_scale; - bool d_updated; - -public: - ~gr_moving_average_ss (); - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - int length() const { return d_new_length; } - short scale() const { return d_new_scale; } - - void set_length_and_scale(int length, short scale); -}; - -#endif /* INCLUDED_GR_MOVING_AVERAGE_SS_H */ diff --git a/gnuradio-core/src/lib/gengen/gr_moving_average_ss.i b/gnuradio-core/src/lib/gengen/gr_moving_average_ss.i deleted file mode 100644 index 1473892c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_moving_average_ss.i +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,moving_average_ss); - -gr_moving_average_ss_sptr gr_make_moving_average_ss (int length, short scale, int max_iter=4096); - -class gr_moving_average_ss : public gr_sync_block -{ -private: - gr_moving_average_ss (); - - public: - int length() const; - short scale() const; - void set_length_and_scale(int length, short scale); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_cc.cc b/gnuradio-core/src/lib/gengen/gr_multiply_cc.cc deleted file mode 100644 index 05b42118..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_cc.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_cc_sptr -gr_make_multiply_cc (size_t vlen) -{ - return gr_multiply_cc_sptr (new gr_multiply_cc (vlen)); -} - -gr_multiply_cc::gr_multiply_cc (size_t vlen) - : gr_sync_block ("multiply_cc", - gr_make_io_signature (1, -1, sizeof (gr_complex)*vlen), - gr_make_io_signature (1, 1, sizeof (gr_complex)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_multiply_cc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *optr = (gr_complex *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items*d_vlen; i++){ - gr_complex acc = ((gr_complex *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc *= ((gr_complex *) input_items[j])[i]; - - *optr++ = (gr_complex) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_cc.h b/gnuradio-core/src/lib/gengen/gr_multiply_cc.h deleted file mode 100644 index 4c072aad..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_cc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_CC_H -#define INCLUDED_GR_MULTIPLY_CC_H - -#include - -class gr_multiply_cc; -typedef boost::shared_ptr gr_multiply_cc_sptr; - -gr_multiply_cc_sptr gr_make_multiply_cc (size_t vlen = 1); - -/*! - * \brief output = prod (input_0, input_1, ...) - * \ingroup math_blk - * - * Multiply across all input streams. - */ -class gr_multiply_cc : public gr_sync_block -{ - friend gr_multiply_cc_sptr gr_make_multiply_cc (size_t vlen); - - gr_multiply_cc (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_cc.i b/gnuradio-core/src/lib/gengen/gr_multiply_cc.i deleted file mode 100644 index 43e02302..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_cc.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_cc) - -gr_multiply_cc_sptr gr_make_multiply_cc (size_t vlen = 1); - -class gr_multiply_cc : public gr_sync_block -{ - private: - gr_multiply_cc (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_cc.cc b/gnuradio-core/src/lib/gengen/gr_multiply_const_cc.cc deleted file mode 100644 index a409e6ff..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_cc.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_const_cc_sptr -gr_make_multiply_const_cc (gr_complex k) -{ - return gr_multiply_const_cc_sptr (new gr_multiply_const_cc (k)); -} - -gr_multiply_const_cc::gr_multiply_const_cc (gr_complex k) - : gr_sync_block ("multiply_const_cc", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex))), - d_k (k) -{ -} - -int -gr_multiply_const_cc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *iptr = (gr_complex *) input_items[0]; - gr_complex *optr = (gr_complex *) 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; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_cc.h b/gnuradio-core/src/lib/gengen/gr_multiply_const_cc.h deleted file mode 100644 index 31d8e989..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_cc.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_CONST_CC_H -#define INCLUDED_GR_MULTIPLY_CONST_CC_H - -#include - -class gr_multiply_const_cc; -typedef boost::shared_ptr gr_multiply_const_cc_sptr; - -gr_multiply_const_cc_sptr gr_make_multiply_const_cc (gr_complex k); - -/*! - * \brief output = input * constant - * \ingroup math_blk - */ -class gr_multiply_const_cc : public gr_sync_block -{ - friend gr_multiply_const_cc_sptr gr_make_multiply_const_cc (gr_complex k); - - gr_complex d_k; // the constant - gr_multiply_const_cc (gr_complex k); - - public: - gr_complex k () const { return d_k; } - void set_k (gr_complex k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_cc.i b/gnuradio-core/src/lib/gengen/gr_multiply_const_cc.i deleted file mode 100644 index 7e19be59..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_cc.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_const_cc) - -gr_multiply_const_cc_sptr gr_make_multiply_const_cc (gr_complex k); - -class gr_multiply_const_cc : public gr_sync_block -{ - private: - gr_multiply_const_cc (gr_complex k); - - public: - gr_complex k () const { return d_k; } - void set_k (gr_complex k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_ff.cc b/gnuradio-core/src/lib/gengen/gr_multiply_const_ff.cc deleted file mode 100644 index 69b0adb1..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_ff.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_const_ff_sptr -gr_make_multiply_const_ff (float k) -{ - return gr_multiply_const_ff_sptr (new gr_multiply_const_ff (k)); -} - -gr_multiply_const_ff::gr_multiply_const_ff (float k) - : gr_sync_block ("multiply_const_ff", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (float))), - d_k (k) -{ -} - -int -gr_multiply_const_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *iptr = (float *) input_items[0]; - float *optr = (float *) 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; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_ff.h b/gnuradio-core/src/lib/gengen/gr_multiply_const_ff.h deleted file mode 100644 index 75eccbc3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_ff.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_CONST_FF_H -#define INCLUDED_GR_MULTIPLY_CONST_FF_H - -#include - -class gr_multiply_const_ff; -typedef boost::shared_ptr gr_multiply_const_ff_sptr; - -gr_multiply_const_ff_sptr gr_make_multiply_const_ff (float k); - -/*! - * \brief output = input * constant - * \ingroup math_blk - */ -class gr_multiply_const_ff : public gr_sync_block -{ - friend gr_multiply_const_ff_sptr gr_make_multiply_const_ff (float k); - - float d_k; // the constant - gr_multiply_const_ff (float k); - - public: - float k () const { return d_k; } - void set_k (float k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_ff.i b/gnuradio-core/src/lib/gengen/gr_multiply_const_ff.i deleted file mode 100644 index 734d2fc4..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_ff.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_const_ff) - -gr_multiply_const_ff_sptr gr_make_multiply_const_ff (float k); - -class gr_multiply_const_ff : public gr_sync_block -{ - private: - gr_multiply_const_ff (float k); - - public: - float k () const { return d_k; } - void set_k (float k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_ii.cc b/gnuradio-core/src/lib/gengen/gr_multiply_const_ii.cc deleted file mode 100644 index 634681f1..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_ii.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_const_ii_sptr -gr_make_multiply_const_ii (int k) -{ - return gr_multiply_const_ii_sptr (new gr_multiply_const_ii (k)); -} - -gr_multiply_const_ii::gr_multiply_const_ii (int k) - : gr_sync_block ("multiply_const_ii", - gr_make_io_signature (1, 1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int))), - d_k (k) -{ -} - -int -gr_multiply_const_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *iptr = (int *) input_items[0]; - int *optr = (int *) 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; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_ii.h b/gnuradio-core/src/lib/gengen/gr_multiply_const_ii.h deleted file mode 100644 index 3ca5cf43..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_ii.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_CONST_II_H -#define INCLUDED_GR_MULTIPLY_CONST_II_H - -#include - -class gr_multiply_const_ii; -typedef boost::shared_ptr gr_multiply_const_ii_sptr; - -gr_multiply_const_ii_sptr gr_make_multiply_const_ii (int k); - -/*! - * \brief output = input * constant - * \ingroup math_blk - */ -class gr_multiply_const_ii : public gr_sync_block -{ - friend gr_multiply_const_ii_sptr gr_make_multiply_const_ii (int k); - - int d_k; // the constant - gr_multiply_const_ii (int k); - - public: - int k () const { return d_k; } - void set_k (int k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_ii.i b/gnuradio-core/src/lib/gengen/gr_multiply_const_ii.i deleted file mode 100644 index 620941c4..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_ii.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_const_ii) - -gr_multiply_const_ii_sptr gr_make_multiply_const_ii (int k); - -class gr_multiply_const_ii : public gr_sync_block -{ - private: - gr_multiply_const_ii (int k); - - public: - int k () const { return d_k; } - void set_k (int k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_ss.cc b/gnuradio-core/src/lib/gengen/gr_multiply_const_ss.cc deleted file mode 100644 index ad539273..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_ss.cc +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_const_ss_sptr -gr_make_multiply_const_ss (short k) -{ - return gr_multiply_const_ss_sptr (new gr_multiply_const_ss (k)); -} - -gr_multiply_const_ss::gr_multiply_const_ss (short k) - : gr_sync_block ("multiply_const_ss", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short))), - d_k (k) -{ -} - -int -gr_multiply_const_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *iptr = (short *) input_items[0]; - short *optr = (short *) 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; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_ss.h b/gnuradio-core/src/lib/gengen/gr_multiply_const_ss.h deleted file mode 100644 index 150be9b0..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_ss.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_CONST_SS_H -#define INCLUDED_GR_MULTIPLY_CONST_SS_H - -#include - -class gr_multiply_const_ss; -typedef boost::shared_ptr gr_multiply_const_ss_sptr; - -gr_multiply_const_ss_sptr gr_make_multiply_const_ss (short k); - -/*! - * \brief output = input * constant - * \ingroup math_blk - */ -class gr_multiply_const_ss : public gr_sync_block -{ - friend gr_multiply_const_ss_sptr gr_make_multiply_const_ss (short k); - - short d_k; // the constant - gr_multiply_const_ss (short k); - - public: - short k () const { return d_k; } - void set_k (short k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_ss.i b/gnuradio-core/src/lib/gengen/gr_multiply_const_ss.i deleted file mode 100644 index eb4fb7ff..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_ss.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_const_ss) - -gr_multiply_const_ss_sptr gr_make_multiply_const_ss (short k); - -class gr_multiply_const_ss : public gr_sync_block -{ - private: - gr_multiply_const_ss (short k); - - public: - short k () const { return d_k; } - void set_k (short k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vcc.cc b/gnuradio-core/src/lib/gengen/gr_multiply_const_vcc.cc deleted file mode 100644 index 686a1f42..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vcc.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_const_vcc_sptr -gr_make_multiply_const_vcc (const std::vector k) -{ - return gr_multiply_const_vcc_sptr (new gr_multiply_const_vcc (k)); -} - -gr_multiply_const_vcc::gr_multiply_const_vcc (const std::vector k) - : gr_sync_block ("multiply_const_vcc", - gr_make_io_signature (1, 1, sizeof(gr_complex)*k.size()), - gr_make_io_signature (1, 1, sizeof(gr_complex)*k.size())) -{ - d_k = k; -} - -int -gr_multiply_const_vcc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *iptr = (gr_complex *)input_items[0]; - gr_complex *optr = (gr_complex *)output_items[0]; - - int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(gr_complex); - - for (int i = 0; i < noutput_items; i++) - for (int j = 0; j < nitems_per_block; j++) - *optr++ = *iptr++ * d_k[j]; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vcc.h b/gnuradio-core/src/lib/gengen/gr_multiply_const_vcc.h deleted file mode 100644 index c30f2492..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vcc.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_CONST_VCC_H -#define INCLUDED_GR_MULTIPLY_CONST_VCC_H - -#include - -class gr_multiply_const_vcc; -typedef boost::shared_ptr gr_multiply_const_vcc_sptr; - -gr_multiply_const_vcc_sptr gr_make_multiply_const_vcc (const std::vector k); - -/*! - * \brief output vector = input vector * constant vector (element-wise) - * \ingroup math_blk - */ -class gr_multiply_const_vcc : public gr_sync_block -{ - friend gr_multiply_const_vcc_sptr gr_make_multiply_const_vcc (const std::vector k); - - std::vector d_k; // the constant - gr_multiply_const_vcc (const std::vector k); - - public: - const std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vcc.i b/gnuradio-core/src/lib/gengen/gr_multiply_const_vcc.i deleted file mode 100644 index dbe4e43d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vcc.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_const_vcc) - -gr_multiply_const_vcc_sptr gr_make_multiply_const_vcc (const std::vector k); - -class gr_multiply_const_vcc : public gr_sync_block -{ - private: - gr_multiply_const_vcc (const std::vector k); - - public: - std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vff.cc b/gnuradio-core/src/lib/gengen/gr_multiply_const_vff.cc deleted file mode 100644 index b4315c2a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vff.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_const_vff_sptr -gr_make_multiply_const_vff (const std::vector k) -{ - return gr_multiply_const_vff_sptr (new gr_multiply_const_vff (k)); -} - -gr_multiply_const_vff::gr_multiply_const_vff (const std::vector k) - : gr_sync_block ("multiply_const_vff", - gr_make_io_signature (1, 1, sizeof(float)*k.size()), - gr_make_io_signature (1, 1, sizeof(float)*k.size())) -{ - d_k = k; -} - -int -gr_multiply_const_vff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *iptr = (float *)input_items[0]; - float *optr = (float *)output_items[0]; - - int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(float); - - for (int i = 0; i < noutput_items; i++) - for (int j = 0; j < nitems_per_block; j++) - *optr++ = *iptr++ * d_k[j]; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vff.h b/gnuradio-core/src/lib/gengen/gr_multiply_const_vff.h deleted file mode 100644 index fb5a67ba..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vff.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_CONST_VFF_H -#define INCLUDED_GR_MULTIPLY_CONST_VFF_H - -#include - -class gr_multiply_const_vff; -typedef boost::shared_ptr gr_multiply_const_vff_sptr; - -gr_multiply_const_vff_sptr gr_make_multiply_const_vff (const std::vector k); - -/*! - * \brief output vector = input vector * constant vector (element-wise) - * \ingroup math_blk - */ -class gr_multiply_const_vff : public gr_sync_block -{ - friend gr_multiply_const_vff_sptr gr_make_multiply_const_vff (const std::vector k); - - std::vector d_k; // the constant - gr_multiply_const_vff (const std::vector k); - - public: - const std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vff.i b/gnuradio-core/src/lib/gengen/gr_multiply_const_vff.i deleted file mode 100644 index 2c9d9112..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vff.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_const_vff) - -gr_multiply_const_vff_sptr gr_make_multiply_const_vff (const std::vector k); - -class gr_multiply_const_vff : public gr_sync_block -{ - private: - gr_multiply_const_vff (const std::vector k); - - public: - std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vii.cc b/gnuradio-core/src/lib/gengen/gr_multiply_const_vii.cc deleted file mode 100644 index 19092ba3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vii.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_const_vii_sptr -gr_make_multiply_const_vii (const std::vector k) -{ - return gr_multiply_const_vii_sptr (new gr_multiply_const_vii (k)); -} - -gr_multiply_const_vii::gr_multiply_const_vii (const std::vector k) - : gr_sync_block ("multiply_const_vii", - gr_make_io_signature (1, 1, sizeof(int)*k.size()), - gr_make_io_signature (1, 1, sizeof(int)*k.size())) -{ - d_k = k; -} - -int -gr_multiply_const_vii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *iptr = (int *)input_items[0]; - int *optr = (int *)output_items[0]; - - int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(int); - - for (int i = 0; i < noutput_items; i++) - for (int j = 0; j < nitems_per_block; j++) - *optr++ = *iptr++ * d_k[j]; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vii.h b/gnuradio-core/src/lib/gengen/gr_multiply_const_vii.h deleted file mode 100644 index 2117c261..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vii.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_CONST_VII_H -#define INCLUDED_GR_MULTIPLY_CONST_VII_H - -#include - -class gr_multiply_const_vii; -typedef boost::shared_ptr gr_multiply_const_vii_sptr; - -gr_multiply_const_vii_sptr gr_make_multiply_const_vii (const std::vector k); - -/*! - * \brief output vector = input vector * constant vector (element-wise) - * \ingroup math_blk - */ -class gr_multiply_const_vii : public gr_sync_block -{ - friend gr_multiply_const_vii_sptr gr_make_multiply_const_vii (const std::vector k); - - std::vector d_k; // the constant - gr_multiply_const_vii (const std::vector k); - - public: - const std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vii.i b/gnuradio-core/src/lib/gengen/gr_multiply_const_vii.i deleted file mode 100644 index 4b79288d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vii.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_const_vii) - -gr_multiply_const_vii_sptr gr_make_multiply_const_vii (const std::vector k); - -class gr_multiply_const_vii : public gr_sync_block -{ - private: - gr_multiply_const_vii (const std::vector k); - - public: - std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vss.cc b/gnuradio-core/src/lib/gengen/gr_multiply_const_vss.cc deleted file mode 100644 index d2bde15e..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vss.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_const_vss_sptr -gr_make_multiply_const_vss (const std::vector k) -{ - return gr_multiply_const_vss_sptr (new gr_multiply_const_vss (k)); -} - -gr_multiply_const_vss::gr_multiply_const_vss (const std::vector k) - : gr_sync_block ("multiply_const_vss", - gr_make_io_signature (1, 1, sizeof(short)*k.size()), - gr_make_io_signature (1, 1, sizeof(short)*k.size())) -{ - d_k = k; -} - -int -gr_multiply_const_vss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *iptr = (short *)input_items[0]; - short *optr = (short *)output_items[0]; - - int nitems_per_block = output_signature()->sizeof_stream_item(0)/sizeof(short); - - for (int i = 0; i < noutput_items; i++) - for (int j = 0; j < nitems_per_block; j++) - *optr++ = *iptr++ * d_k[j]; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vss.h b/gnuradio-core/src/lib/gengen/gr_multiply_const_vss.h deleted file mode 100644 index d1411481..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vss.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_CONST_VSS_H -#define INCLUDED_GR_MULTIPLY_CONST_VSS_H - -#include - -class gr_multiply_const_vss; -typedef boost::shared_ptr gr_multiply_const_vss_sptr; - -gr_multiply_const_vss_sptr gr_make_multiply_const_vss (const std::vector k); - -/*! - * \brief output vector = input vector * constant vector (element-wise) - * \ingroup math_blk - */ -class gr_multiply_const_vss : public gr_sync_block -{ - friend gr_multiply_const_vss_sptr gr_make_multiply_const_vss (const std::vector k); - - std::vector d_k; // the constant - gr_multiply_const_vss (const std::vector k); - - public: - const std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_const_vss.i b/gnuradio-core/src/lib/gengen/gr_multiply_const_vss.i deleted file mode 100644 index f00ca305..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_const_vss.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_const_vss) - -gr_multiply_const_vss_sptr gr_make_multiply_const_vss (const std::vector k); - -class gr_multiply_const_vss : public gr_sync_block -{ - private: - gr_multiply_const_vss (const std::vector k); - - public: - std::vector k () const { return d_k; } - void set_k (const std::vector k) { d_k = k; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_ff.cc b/gnuradio-core/src/lib/gengen/gr_multiply_ff.cc deleted file mode 100644 index 72779429..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_ff.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_ff_sptr -gr_make_multiply_ff (size_t vlen) -{ - return gr_multiply_ff_sptr (new gr_multiply_ff (vlen)); -} - -gr_multiply_ff::gr_multiply_ff (size_t vlen) - : gr_sync_block ("multiply_ff", - gr_make_io_signature (1, -1, sizeof (float)*vlen), - gr_make_io_signature (1, 1, sizeof (float)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_multiply_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *optr = (float *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items*d_vlen; i++){ - float acc = ((float *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc *= ((float *) input_items[j])[i]; - - *optr++ = (float) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_ff.h b/gnuradio-core/src/lib/gengen/gr_multiply_ff.h deleted file mode 100644 index c60a8543..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_ff.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_FF_H -#define INCLUDED_GR_MULTIPLY_FF_H - -#include - -class gr_multiply_ff; -typedef boost::shared_ptr gr_multiply_ff_sptr; - -gr_multiply_ff_sptr gr_make_multiply_ff (size_t vlen = 1); - -/*! - * \brief output = prod (input_0, input_1, ...) - * \ingroup math_blk - * - * Multiply across all input streams. - */ -class gr_multiply_ff : public gr_sync_block -{ - friend gr_multiply_ff_sptr gr_make_multiply_ff (size_t vlen); - - gr_multiply_ff (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_ff.i b/gnuradio-core/src/lib/gengen/gr_multiply_ff.i deleted file mode 100644 index 5af9209b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_ff.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_ff) - -gr_multiply_ff_sptr gr_make_multiply_ff (size_t vlen = 1); - -class gr_multiply_ff : public gr_sync_block -{ - private: - gr_multiply_ff (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_ii.cc b/gnuradio-core/src/lib/gengen/gr_multiply_ii.cc deleted file mode 100644 index 3032339a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_ii.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_ii_sptr -gr_make_multiply_ii (size_t vlen) -{ - return gr_multiply_ii_sptr (new gr_multiply_ii (vlen)); -} - -gr_multiply_ii::gr_multiply_ii (size_t vlen) - : gr_sync_block ("multiply_ii", - gr_make_io_signature (1, -1, sizeof (int)*vlen), - gr_make_io_signature (1, 1, sizeof (int)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_multiply_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items*d_vlen; i++){ - int acc = ((int *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc *= ((int *) input_items[j])[i]; - - *optr++ = (int) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_ii.h b/gnuradio-core/src/lib/gengen/gr_multiply_ii.h deleted file mode 100644 index 420e82ba..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_ii.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_II_H -#define INCLUDED_GR_MULTIPLY_II_H - -#include - -class gr_multiply_ii; -typedef boost::shared_ptr gr_multiply_ii_sptr; - -gr_multiply_ii_sptr gr_make_multiply_ii (size_t vlen = 1); - -/*! - * \brief output = prod (input_0, input_1, ...) - * \ingroup math_blk - * - * Multiply across all input streams. - */ -class gr_multiply_ii : public gr_sync_block -{ - friend gr_multiply_ii_sptr gr_make_multiply_ii (size_t vlen); - - gr_multiply_ii (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_ii.i b/gnuradio-core/src/lib/gengen/gr_multiply_ii.i deleted file mode 100644 index cbcc7375..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_ii) - -gr_multiply_ii_sptr gr_make_multiply_ii (size_t vlen = 1); - -class gr_multiply_ii : public gr_sync_block -{ - private: - gr_multiply_ii (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_ss.cc b/gnuradio-core/src/lib/gengen/gr_multiply_ss.cc deleted file mode 100644 index 6b379d8e..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_ss.cc +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_multiply_ss_sptr -gr_make_multiply_ss (size_t vlen) -{ - return gr_multiply_ss_sptr (new gr_multiply_ss (vlen)); -} - -gr_multiply_ss::gr_multiply_ss (size_t vlen) - : gr_sync_block ("multiply_ss", - gr_make_io_signature (1, -1, sizeof (short)*vlen), - gr_make_io_signature (1, 1, sizeof (short)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_multiply_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items*d_vlen; i++){ - short acc = ((short *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc *= ((short *) input_items[j])[i]; - - *optr++ = (short) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_ss.h b/gnuradio-core/src/lib/gengen/gr_multiply_ss.h deleted file mode 100644 index 8dceb947..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_ss.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MULTIPLY_SS_H -#define INCLUDED_GR_MULTIPLY_SS_H - -#include - -class gr_multiply_ss; -typedef boost::shared_ptr gr_multiply_ss_sptr; - -gr_multiply_ss_sptr gr_make_multiply_ss (size_t vlen = 1); - -/*! - * \brief output = prod (input_0, input_1, ...) - * \ingroup math_blk - * - * Multiply across all input streams. - */ -class gr_multiply_ss : public gr_sync_block -{ - friend gr_multiply_ss_sptr gr_make_multiply_ss (size_t vlen); - - gr_multiply_ss (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_multiply_ss.i b/gnuradio-core/src/lib/gengen/gr_multiply_ss.i deleted file mode 100644 index 461a8fc9..00000000 --- a/gnuradio-core/src/lib/gengen/gr_multiply_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,multiply_ss) - -gr_multiply_ss_sptr gr_make_multiply_ss (size_t vlen = 1); - -class gr_multiply_ss : public gr_sync_block -{ - private: - gr_multiply_ss (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_mute_cc.cc b/gnuradio-core/src/lib/gengen/gr_mute_cc.cc deleted file mode 100644 index 0de4e288..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_cc.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - - -gr_mute_cc_sptr -gr_make_mute_cc (bool mute) -{ - return gr_mute_cc_sptr (new gr_mute_cc (mute)); -} - -gr_mute_cc::gr_mute_cc (bool mute) - : gr_sync_block ("mute_cc", - gr_make_io_signature (1, 1, sizeof (gr_complex)), - gr_make_io_signature (1, 1, sizeof (gr_complex))), - d_mute (mute) -{ -} - -int -gr_mute_cc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *iptr = (gr_complex *) input_items[0]; - gr_complex *optr = (gr_complex *) output_items[0]; - - int size = noutput_items; - - if (d_mute){ - memset (optr, 0, noutput_items * sizeof(gr_complex)); - } - else { - while (size >= 8){ - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - size -= 8; - } - - while (size-- > 0) - *optr++ = *iptr++; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_mute_cc.h b/gnuradio-core/src/lib/gengen/gr_mute_cc.h deleted file mode 100644 index 51e5dc41..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_cc.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MUTE_CC_H -#define INCLUDED_GR_MUTE_CC_H - -#include - -class gr_mute_cc; -typedef boost::shared_ptr gr_mute_cc_sptr; - -gr_mute_cc_sptr gr_make_mute_cc (bool mute=false); - -/*! - * \brief output = input or zero if muted. - * \ingroup level_blk - */ -class gr_mute_cc : public gr_sync_block -{ - friend gr_mute_cc_sptr gr_make_mute_cc (bool mute); - - bool d_mute; - gr_mute_cc (bool mute); - - public: - bool mute () const { return d_mute; } - void set_mute (bool mute) { d_mute = mute; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_mute_cc.i b/gnuradio-core/src/lib/gengen/gr_mute_cc.i deleted file mode 100644 index e527762a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_cc.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,mute_cc) - -gr_mute_cc_sptr gr_make_mute_cc(bool mute=false); - -class gr_mute_cc : public gr_sync_block -{ - private: - gr_mute_cc (bool mute); - - public: - bool mute () const { return d_mute; } - void set_mute (bool mute) { d_mute = mute; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_mute_ff.cc b/gnuradio-core/src/lib/gengen/gr_mute_ff.cc deleted file mode 100644 index 59f819b3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_ff.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - - -gr_mute_ff_sptr -gr_make_mute_ff (bool mute) -{ - return gr_mute_ff_sptr (new gr_mute_ff (mute)); -} - -gr_mute_ff::gr_mute_ff (bool mute) - : gr_sync_block ("mute_ff", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (float))), - d_mute (mute) -{ -} - -int -gr_mute_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *iptr = (float *) input_items[0]; - float *optr = (float *) output_items[0]; - - int size = noutput_items; - - if (d_mute){ - memset (optr, 0, noutput_items * sizeof(float)); - } - else { - while (size >= 8){ - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - size -= 8; - } - - while (size-- > 0) - *optr++ = *iptr++; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_mute_ff.h b/gnuradio-core/src/lib/gengen/gr_mute_ff.h deleted file mode 100644 index 3a76fd8d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_ff.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MUTE_FF_H -#define INCLUDED_GR_MUTE_FF_H - -#include - -class gr_mute_ff; -typedef boost::shared_ptr gr_mute_ff_sptr; - -gr_mute_ff_sptr gr_make_mute_ff (bool mute=false); - -/*! - * \brief output = input or zero if muted. - * \ingroup level_blk - */ -class gr_mute_ff : public gr_sync_block -{ - friend gr_mute_ff_sptr gr_make_mute_ff (bool mute); - - bool d_mute; - gr_mute_ff (bool mute); - - public: - bool mute () const { return d_mute; } - void set_mute (bool mute) { d_mute = mute; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_mute_ff.i b/gnuradio-core/src/lib/gengen/gr_mute_ff.i deleted file mode 100644 index 63bf0a1b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_ff.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,mute_ff) - -gr_mute_ff_sptr gr_make_mute_ff(bool mute=false); - -class gr_mute_ff : public gr_sync_block -{ - private: - gr_mute_ff (bool mute); - - public: - bool mute () const { return d_mute; } - void set_mute (bool mute) { d_mute = mute; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_mute_ii.cc b/gnuradio-core/src/lib/gengen/gr_mute_ii.cc deleted file mode 100644 index 94f5ea8c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_ii.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - - -gr_mute_ii_sptr -gr_make_mute_ii (bool mute) -{ - return gr_mute_ii_sptr (new gr_mute_ii (mute)); -} - -gr_mute_ii::gr_mute_ii (bool mute) - : gr_sync_block ("mute_ii", - gr_make_io_signature (1, 1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int))), - d_mute (mute) -{ -} - -int -gr_mute_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *iptr = (int *) input_items[0]; - int *optr = (int *) output_items[0]; - - int size = noutput_items; - - if (d_mute){ - memset (optr, 0, noutput_items * sizeof(int)); - } - else { - while (size >= 8){ - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - size -= 8; - } - - while (size-- > 0) - *optr++ = *iptr++; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_mute_ii.h b/gnuradio-core/src/lib/gengen/gr_mute_ii.h deleted file mode 100644 index d809f8e6..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_ii.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MUTE_II_H -#define INCLUDED_GR_MUTE_II_H - -#include - -class gr_mute_ii; -typedef boost::shared_ptr gr_mute_ii_sptr; - -gr_mute_ii_sptr gr_make_mute_ii (bool mute=false); - -/*! - * \brief output = input or zero if muted. - * \ingroup level_blk - */ -class gr_mute_ii : public gr_sync_block -{ - friend gr_mute_ii_sptr gr_make_mute_ii (bool mute); - - bool d_mute; - gr_mute_ii (bool mute); - - public: - bool mute () const { return d_mute; } - void set_mute (bool mute) { d_mute = mute; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_mute_ii.i b/gnuradio-core/src/lib/gengen/gr_mute_ii.i deleted file mode 100644 index c52c56ff..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_ii.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,mute_ii) - -gr_mute_ii_sptr gr_make_mute_ii(bool mute=false); - -class gr_mute_ii : public gr_sync_block -{ - private: - gr_mute_ii (bool mute); - - public: - bool mute () const { return d_mute; } - void set_mute (bool mute) { d_mute = mute; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_mute_ss.cc b/gnuradio-core/src/lib/gengen/gr_mute_ss.cc deleted file mode 100644 index cb912ea1..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_ss.cc +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - - -gr_mute_ss_sptr -gr_make_mute_ss (bool mute) -{ - return gr_mute_ss_sptr (new gr_mute_ss (mute)); -} - -gr_mute_ss::gr_mute_ss (bool mute) - : gr_sync_block ("mute_ss", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short))), - d_mute (mute) -{ -} - -int -gr_mute_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *iptr = (short *) input_items[0]; - short *optr = (short *) output_items[0]; - - int size = noutput_items; - - if (d_mute){ - memset (optr, 0, noutput_items * sizeof(short)); - } - else { - while (size >= 8){ - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - *optr++ = *iptr++; - size -= 8; - } - - while (size-- > 0) - *optr++ = *iptr++; - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_mute_ss.h b/gnuradio-core/src/lib/gengen/gr_mute_ss.h deleted file mode 100644 index 80ca5f96..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_ss.h +++ /dev/null @@ -1,55 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_MUTE_SS_H -#define INCLUDED_GR_MUTE_SS_H - -#include - -class gr_mute_ss; -typedef boost::shared_ptr gr_mute_ss_sptr; - -gr_mute_ss_sptr gr_make_mute_ss (bool mute=false); - -/*! - * \brief output = input or zero if muted. - * \ingroup level_blk - */ -class gr_mute_ss : public gr_sync_block -{ - friend gr_mute_ss_sptr gr_make_mute_ss (bool mute); - - bool d_mute; - gr_mute_ss (bool mute); - - public: - bool mute () const { return d_mute; } - void set_mute (bool mute) { d_mute = mute; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_mute_ss.i b/gnuradio-core/src/lib/gengen/gr_mute_ss.i deleted file mode 100644 index 580b943b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_mute_ss.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,mute_ss) - -gr_mute_ss_sptr gr_make_mute_ss(bool mute=false); - -class gr_mute_ss : public gr_sync_block -{ - private: - gr_mute_ss (bool mute); - - public: - bool mute () const { return d_mute; } - void set_mute (bool mute) { d_mute = mute; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_c.cc b/gnuradio-core/src/lib/gengen/gr_noise_source_c.cc deleted file mode 100644 index 04ab4d73..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_c.cc +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - - -gr_noise_source_c_sptr -gr_make_noise_source_c (gr_noise_type_t type, float ampl, long seed) -{ - return gr_noise_source_c_sptr (new gr_noise_source_c (type, ampl, seed)); -} - - -gr_noise_source_c::gr_noise_source_c (gr_noise_type_t type, float ampl, long seed) - : gr_sync_block ("noise_source_c", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (gr_complex))), - d_type (type), - d_ampl (ampl), - d_rng (seed) -{ -} - -int -gr_noise_source_c::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *out = (gr_complex *) output_items[0]; - - switch (d_type){ -#if 1 // complex? - - case GR_UNIFORM: - for (int i = 0; i < noutput_items; i++) - out[i] = gr_complex (d_ampl * ((d_rng.ran1 () * 2.0) - 1.0), - d_ampl * ((d_rng.ran1 () * 2.0) - 1.0)); - break; - - case GR_GAUSSIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = d_ampl * d_rng.rayleigh_complex (); - break; - -#else // nope... - - case GR_UNIFORM: - for (int i = 0; i < noutput_items; i++) - out[i] = (gr_complex)(d_ampl * ((d_rng.ran1 () * 2.0) - 1.0)); - break; - - case GR_GAUSSIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = (gr_complex)(d_ampl * d_rng.gasdev ()); - break; - - case GR_LAPLACIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = (gr_complex)(d_ampl * d_rng.laplacian ()); - break; - - case GR_IMPULSE: // FIXME changeable impulse settings - for (int i = 0; i < noutput_items; i++) - out[i] = (gr_complex)(d_ampl * d_rng.impulse (9)); - break; -#endif - - default: - throw std::runtime_error ("invalid type"); - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_c.h b/gnuradio-core/src/lib/gengen/gr_noise_source_c.h deleted file mode 100644 index 6d5cc2d0..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_c.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_NOISE_SOURCE_C_H -#define INCLUDED_GR_NOISE_SOURCE_C_H - -#include -#include -#include - - -class gr_noise_source_c; -typedef boost::shared_ptr gr_noise_source_c_sptr; - -gr_noise_source_c_sptr -gr_make_noise_source_c (gr_noise_type_t type, float ampl, long seed = 3021); - -/*! - * \brief random number source - * \ingroup source_blk - */ -class gr_noise_source_c : public gr_sync_block { - friend gr_noise_source_c_sptr - gr_make_noise_source_c (gr_noise_type_t type, float ampl, long seed); - - gr_noise_type_t d_type; - float d_ampl; - gr_random d_rng; - - gr_noise_source_c (gr_noise_type_t type, float ampl, long seed = 3021); - - public: - void set_type (gr_noise_type_t type) { d_type = type; } - void set_amplitude (float ampl) { d_ampl = ampl; } - - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_c.i b/gnuradio-core/src/lib/gengen/gr_noise_source_c.i deleted file mode 100644 index 6687b850..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_c.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,noise_source_c); - -gr_noise_source_c_sptr -gr_make_noise_source_c (gr_noise_type_t type, float ampl, long seed = 3021); - -class gr_noise_source_c : public gr_block { - private: - gr_noise_source_c (gr_noise_type_t type, float ampl, long seed = 3021); - - public: - void set_type (gr_noise_type_t type) { d_type = type; } - void set_amplitude (float ampl) { d_ampl = ampl; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_f.cc b/gnuradio-core/src/lib/gengen/gr_noise_source_f.cc deleted file mode 100644 index 1067c9d4..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_f.cc +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - - -gr_noise_source_f_sptr -gr_make_noise_source_f (gr_noise_type_t type, float ampl, long seed) -{ - return gr_noise_source_f_sptr (new gr_noise_source_f (type, ampl, seed)); -} - - -gr_noise_source_f::gr_noise_source_f (gr_noise_type_t type, float ampl, long seed) - : gr_sync_block ("noise_source_f", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (float))), - d_type (type), - d_ampl (ampl), - d_rng (seed) -{ -} - -int -gr_noise_source_f::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *out = (float *) output_items[0]; - - switch (d_type){ -#if 0 // complex? - - case GR_UNIFORM: - for (int i = 0; i < noutput_items; i++) - out[i] = gr_complex (d_ampl * ((d_rng.ran1 () * 2.0) - 1.0), - d_ampl * ((d_rng.ran1 () * 2.0) - 1.0)); - break; - - case GR_GAUSSIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = d_ampl * d_rng.rayleigh_complex (); - break; - -#else // nope... - - case GR_UNIFORM: - for (int i = 0; i < noutput_items; i++) - out[i] = (float)(d_ampl * ((d_rng.ran1 () * 2.0) - 1.0)); - break; - - case GR_GAUSSIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = (float)(d_ampl * d_rng.gasdev ()); - break; - - case GR_LAPLACIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = (float)(d_ampl * d_rng.laplacian ()); - break; - - case GR_IMPULSE: // FIXME changeable impulse settings - for (int i = 0; i < noutput_items; i++) - out[i] = (float)(d_ampl * d_rng.impulse (9)); - break; -#endif - - default: - throw std::runtime_error ("invalid type"); - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_f.h b/gnuradio-core/src/lib/gengen/gr_noise_source_f.h deleted file mode 100644 index d07361eb..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_f.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_NOISE_SOURCE_F_H -#define INCLUDED_GR_NOISE_SOURCE_F_H - -#include -#include -#include - - -class gr_noise_source_f; -typedef boost::shared_ptr gr_noise_source_f_sptr; - -gr_noise_source_f_sptr -gr_make_noise_source_f (gr_noise_type_t type, float ampl, long seed = 3021); - -/*! - * \brief random number source - * \ingroup source_blk - */ -class gr_noise_source_f : public gr_sync_block { - friend gr_noise_source_f_sptr - gr_make_noise_source_f (gr_noise_type_t type, float ampl, long seed); - - gr_noise_type_t d_type; - float d_ampl; - gr_random d_rng; - - gr_noise_source_f (gr_noise_type_t type, float ampl, long seed = 3021); - - public: - void set_type (gr_noise_type_t type) { d_type = type; } - void set_amplitude (float ampl) { d_ampl = ampl; } - - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_f.i b/gnuradio-core/src/lib/gengen/gr_noise_source_f.i deleted file mode 100644 index 0fb3326c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_f.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,noise_source_f); - -gr_noise_source_f_sptr -gr_make_noise_source_f (gr_noise_type_t type, float ampl, long seed = 3021); - -class gr_noise_source_f : public gr_block { - private: - gr_noise_source_f (gr_noise_type_t type, float ampl, long seed = 3021); - - public: - void set_type (gr_noise_type_t type) { d_type = type; } - void set_amplitude (float ampl) { d_ampl = ampl; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_i.cc b/gnuradio-core/src/lib/gengen/gr_noise_source_i.cc deleted file mode 100644 index a191ccaa..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_i.cc +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - - -gr_noise_source_i_sptr -gr_make_noise_source_i (gr_noise_type_t type, float ampl, long seed) -{ - return gr_noise_source_i_sptr (new gr_noise_source_i (type, ampl, seed)); -} - - -gr_noise_source_i::gr_noise_source_i (gr_noise_type_t type, float ampl, long seed) - : gr_sync_block ("noise_source_i", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (int))), - d_type (type), - d_ampl (ampl), - d_rng (seed) -{ -} - -int -gr_noise_source_i::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *out = (int *) output_items[0]; - - switch (d_type){ -#if 0 // complex? - - case GR_UNIFORM: - for (int i = 0; i < noutput_items; i++) - out[i] = gr_complex (d_ampl * ((d_rng.ran1 () * 2.0) - 1.0), - d_ampl * ((d_rng.ran1 () * 2.0) - 1.0)); - break; - - case GR_GAUSSIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = d_ampl * d_rng.rayleigh_complex (); - break; - -#else // nope... - - case GR_UNIFORM: - for (int i = 0; i < noutput_items; i++) - out[i] = (int)(d_ampl * ((d_rng.ran1 () * 2.0) - 1.0)); - break; - - case GR_GAUSSIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = (int)(d_ampl * d_rng.gasdev ()); - break; - - case GR_LAPLACIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = (int)(d_ampl * d_rng.laplacian ()); - break; - - case GR_IMPULSE: // FIXME changeable impulse settings - for (int i = 0; i < noutput_items; i++) - out[i] = (int)(d_ampl * d_rng.impulse (9)); - break; -#endif - - default: - throw std::runtime_error ("invalid type"); - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_i.h b/gnuradio-core/src/lib/gengen/gr_noise_source_i.h deleted file mode 100644 index b3272370..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_i.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_NOISE_SOURCE_I_H -#define INCLUDED_GR_NOISE_SOURCE_I_H - -#include -#include -#include - - -class gr_noise_source_i; -typedef boost::shared_ptr gr_noise_source_i_sptr; - -gr_noise_source_i_sptr -gr_make_noise_source_i (gr_noise_type_t type, float ampl, long seed = 3021); - -/*! - * \brief random number source - * \ingroup source_blk - */ -class gr_noise_source_i : public gr_sync_block { - friend gr_noise_source_i_sptr - gr_make_noise_source_i (gr_noise_type_t type, float ampl, long seed); - - gr_noise_type_t d_type; - float d_ampl; - gr_random d_rng; - - gr_noise_source_i (gr_noise_type_t type, float ampl, long seed = 3021); - - public: - void set_type (gr_noise_type_t type) { d_type = type; } - void set_amplitude (float ampl) { d_ampl = ampl; } - - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_i.i b/gnuradio-core/src/lib/gengen/gr_noise_source_i.i deleted file mode 100644 index e18d81cc..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_i.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,noise_source_i); - -gr_noise_source_i_sptr -gr_make_noise_source_i (gr_noise_type_t type, float ampl, long seed = 3021); - -class gr_noise_source_i : public gr_block { - private: - gr_noise_source_i (gr_noise_type_t type, float ampl, long seed = 3021); - - public: - void set_type (gr_noise_type_t type) { d_type = type; } - void set_amplitude (float ampl) { d_ampl = ampl; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_s.cc b/gnuradio-core/src/lib/gengen/gr_noise_source_s.cc deleted file mode 100644 index 6ccafcf9..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_s.cc +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - - -gr_noise_source_s_sptr -gr_make_noise_source_s (gr_noise_type_t type, float ampl, long seed) -{ - return gr_noise_source_s_sptr (new gr_noise_source_s (type, ampl, seed)); -} - - -gr_noise_source_s::gr_noise_source_s (gr_noise_type_t type, float ampl, long seed) - : gr_sync_block ("noise_source_s", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (short))), - d_type (type), - d_ampl (ampl), - d_rng (seed) -{ -} - -int -gr_noise_source_s::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *out = (short *) output_items[0]; - - switch (d_type){ -#if 0 // complex? - - case GR_UNIFORM: - for (int i = 0; i < noutput_items; i++) - out[i] = gr_complex (d_ampl * ((d_rng.ran1 () * 2.0) - 1.0), - d_ampl * ((d_rng.ran1 () * 2.0) - 1.0)); - break; - - case GR_GAUSSIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = d_ampl * d_rng.rayleigh_complex (); - break; - -#else // nope... - - case GR_UNIFORM: - for (int i = 0; i < noutput_items; i++) - out[i] = (short)(d_ampl * ((d_rng.ran1 () * 2.0) - 1.0)); - break; - - case GR_GAUSSIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = (short)(d_ampl * d_rng.gasdev ()); - break; - - case GR_LAPLACIAN: - for (int i = 0; i < noutput_items; i++) - out[i] = (short)(d_ampl * d_rng.laplacian ()); - break; - - case GR_IMPULSE: // FIXME changeable impulse settings - for (int i = 0; i < noutput_items; i++) - out[i] = (short)(d_ampl * d_rng.impulse (9)); - break; -#endif - - default: - throw std::runtime_error ("invalid type"); - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_s.h b/gnuradio-core/src/lib/gengen/gr_noise_source_s.h deleted file mode 100644 index 25bbe517..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_s.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_NOISE_SOURCE_S_H -#define INCLUDED_GR_NOISE_SOURCE_S_H - -#include -#include -#include - - -class gr_noise_source_s; -typedef boost::shared_ptr gr_noise_source_s_sptr; - -gr_noise_source_s_sptr -gr_make_noise_source_s (gr_noise_type_t type, float ampl, long seed = 3021); - -/*! - * \brief random number source - * \ingroup source_blk - */ -class gr_noise_source_s : public gr_sync_block { - friend gr_noise_source_s_sptr - gr_make_noise_source_s (gr_noise_type_t type, float ampl, long seed); - - gr_noise_type_t d_type; - float d_ampl; - gr_random d_rng; - - gr_noise_source_s (gr_noise_type_t type, float ampl, long seed = 3021); - - public: - void set_type (gr_noise_type_t type) { d_type = type; } - void set_amplitude (float ampl) { d_ampl = ampl; } - - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_noise_source_s.i b/gnuradio-core/src/lib/gengen/gr_noise_source_s.i deleted file mode 100644 index 32c10dee..00000000 --- a/gnuradio-core/src/lib/gengen/gr_noise_source_s.i +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,noise_source_s); - -gr_noise_source_s_sptr -gr_make_noise_source_s (gr_noise_type_t type, float ampl, long seed = 3021); - -class gr_noise_source_s : public gr_block { - private: - gr_noise_source_s (gr_noise_type_t type, float ampl, long seed = 3021); - - public: - void set_type (gr_noise_type_t type) { d_type = type; } - void set_amplitude (float ampl) { d_ampl = ampl; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_not_bb.cc b/gnuradio-core/src/lib/gengen/gr_not_bb.cc deleted file mode 100644 index 11252c19..00000000 --- a/gnuradio-core/src/lib/gengen/gr_not_bb.cc +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_not_bb_sptr -gr_make_not_bb () -{ - return gr_not_bb_sptr (new gr_not_bb ()); -} - -gr_not_bb::gr_not_bb () - : gr_sync_block ("not_bb", - gr_make_io_signature (1, 1, sizeof (unsigned char)), - gr_make_io_signature (1, 1, sizeof (unsigned char))) -{ -} - -int -gr_not_bb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned char *optr = (unsigned char *) output_items[0]; - const unsigned char *inptr = (const unsigned char *) input_items[0]; - - - for (int i = 0; i < noutput_items; i++) { - *optr++ = ~(inptr[i]); - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_not_bb.h b/gnuradio-core/src/lib/gengen/gr_not_bb.h deleted file mode 100644 index 8e51b977..00000000 --- a/gnuradio-core/src/lib/gengen/gr_not_bb.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_NOT_BB_H -#define INCLUDED_GR_NOT_BB_H - -#include - -class gr_not_bb; -typedef boost::shared_ptr gr_not_bb_sptr; - -gr_not_bb_sptr gr_make_not_bb (); - -/*! - * \brief output = ~input_0 - * \ingroup math_blk - * - * bitwise boolean not across input stream. - */ -class gr_not_bb : public gr_sync_block -{ - friend gr_not_bb_sptr gr_make_not_bb (); - - gr_not_bb (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_not_bb.i b/gnuradio-core/src/lib/gengen/gr_not_bb.i deleted file mode 100644 index b6ed3bc0..00000000 --- a/gnuradio-core/src/lib/gengen/gr_not_bb.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,not_bb) - -gr_not_bb_sptr gr_make_not_bb (); - -class gr_not_bb : public gr_sync_block -{ - private: - gr_not_bb (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_not_ii.cc b/gnuradio-core/src/lib/gengen/gr_not_ii.cc deleted file mode 100644 index abd06578..00000000 --- a/gnuradio-core/src/lib/gengen/gr_not_ii.cc +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_not_ii_sptr -gr_make_not_ii () -{ - return gr_not_ii_sptr (new gr_not_ii ()); -} - -gr_not_ii::gr_not_ii () - : gr_sync_block ("not_ii", - gr_make_io_signature (1, 1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int))) -{ -} - -int -gr_not_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - const int *inptr = (const int *) input_items[0]; - - - for (int i = 0; i < noutput_items; i++) { - *optr++ = ~(inptr[i]); - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_not_ii.h b/gnuradio-core/src/lib/gengen/gr_not_ii.h deleted file mode 100644 index 6d1781dc..00000000 --- a/gnuradio-core/src/lib/gengen/gr_not_ii.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_NOT_II_H -#define INCLUDED_GR_NOT_II_H - -#include - -class gr_not_ii; -typedef boost::shared_ptr gr_not_ii_sptr; - -gr_not_ii_sptr gr_make_not_ii (); - -/*! - * \brief output = ~input_0 - * \ingroup math_blk - * - * bitwise boolean not across input stream. - */ -class gr_not_ii : public gr_sync_block -{ - friend gr_not_ii_sptr gr_make_not_ii (); - - gr_not_ii (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_not_ii.i b/gnuradio-core/src/lib/gengen/gr_not_ii.i deleted file mode 100644 index 18ecd9a4..00000000 --- a/gnuradio-core/src/lib/gengen/gr_not_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,not_ii) - -gr_not_ii_sptr gr_make_not_ii (); - -class gr_not_ii : public gr_sync_block -{ - private: - gr_not_ii (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_not_ss.cc b/gnuradio-core/src/lib/gengen/gr_not_ss.cc deleted file mode 100644 index 77a7d6dd..00000000 --- a/gnuradio-core/src/lib/gengen/gr_not_ss.cc +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_not_ss_sptr -gr_make_not_ss () -{ - return gr_not_ss_sptr (new gr_not_ss ()); -} - -gr_not_ss::gr_not_ss () - : gr_sync_block ("not_ss", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short))) -{ -} - -int -gr_not_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - const short *inptr = (const short *) input_items[0]; - - - for (int i = 0; i < noutput_items; i++) { - *optr++ = ~(inptr[i]); - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_not_ss.h b/gnuradio-core/src/lib/gengen/gr_not_ss.h deleted file mode 100644 index 439ba85c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_not_ss.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_NOT_SS_H -#define INCLUDED_GR_NOT_SS_H - -#include - -class gr_not_ss; -typedef boost::shared_ptr gr_not_ss_sptr; - -gr_not_ss_sptr gr_make_not_ss (); - -/*! - * \brief output = ~input_0 - * \ingroup math_blk - * - * bitwise boolean not across input stream. - */ -class gr_not_ss : public gr_sync_block -{ - friend gr_not_ss_sptr gr_make_not_ss (); - - gr_not_ss (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_not_ss.i b/gnuradio-core/src/lib/gengen/gr_not_ss.i deleted file mode 100644 index 9407d4f6..00000000 --- a/gnuradio-core/src/lib/gengen/gr_not_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,not_ss) - -gr_not_ss_sptr gr_make_not_ss (); - -class gr_not_ss : public gr_sync_block -{ - private: - gr_not_ss (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_or_bb.cc b/gnuradio-core/src/lib/gengen/gr_or_bb.cc deleted file mode 100644 index a983e36e..00000000 --- a/gnuradio-core/src/lib/gengen/gr_or_bb.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_or_bb_sptr -gr_make_or_bb () -{ - return gr_or_bb_sptr (new gr_or_bb ()); -} - -gr_or_bb::gr_or_bb () - : gr_sync_block ("or_bb", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, 1, sizeof (unsigned char))) -{ -} - -int -gr_or_bb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned char *optr = (unsigned char *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items; i++) { - unsigned char acc = ((unsigned char *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc = acc | ((unsigned char *) input_items[j])[i]; - - *optr++ = (unsigned char) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_or_bb.h b/gnuradio-core/src/lib/gengen/gr_or_bb.h deleted file mode 100644 index 0f23f084..00000000 --- a/gnuradio-core/src/lib/gengen/gr_or_bb.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_OR_BB_H -#define INCLUDED_GR_OR_BB_H - -#include - -class gr_or_bb; -typedef boost::shared_ptr gr_or_bb_sptr; - -gr_or_bb_sptr gr_make_or_bb (); - -/*! - * \brief output = input_0 | input_1 | , ... | input_N) - * \ingroup math_blk - * - * bitwise boolean or across all input streams. - */ -class gr_or_bb : public gr_sync_block -{ - friend gr_or_bb_sptr gr_make_or_bb (); - - gr_or_bb (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_or_bb.i b/gnuradio-core/src/lib/gengen/gr_or_bb.i deleted file mode 100644 index 05a0526c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_or_bb.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,or_bb) - -gr_or_bb_sptr gr_make_or_bb (); - -class gr_or_bb : public gr_sync_block -{ - private: - gr_or_bb (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_or_ii.cc b/gnuradio-core/src/lib/gengen/gr_or_ii.cc deleted file mode 100644 index f1c66402..00000000 --- a/gnuradio-core/src/lib/gengen/gr_or_ii.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_or_ii_sptr -gr_make_or_ii () -{ - return gr_or_ii_sptr (new gr_or_ii ()); -} - -gr_or_ii::gr_or_ii () - : gr_sync_block ("or_ii", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int))) -{ -} - -int -gr_or_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items; i++) { - int acc = ((int *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc = acc | ((int *) input_items[j])[i]; - - *optr++ = (int) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_or_ii.h b/gnuradio-core/src/lib/gengen/gr_or_ii.h deleted file mode 100644 index 1977c902..00000000 --- a/gnuradio-core/src/lib/gengen/gr_or_ii.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_OR_II_H -#define INCLUDED_GR_OR_II_H - -#include - -class gr_or_ii; -typedef boost::shared_ptr gr_or_ii_sptr; - -gr_or_ii_sptr gr_make_or_ii (); - -/*! - * \brief output = input_0 | input_1 | , ... | input_N) - * \ingroup math_blk - * - * bitwise boolean or across all input streams. - */ -class gr_or_ii : public gr_sync_block -{ - friend gr_or_ii_sptr gr_make_or_ii (); - - gr_or_ii (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_or_ii.i b/gnuradio-core/src/lib/gengen/gr_or_ii.i deleted file mode 100644 index 8715bf9c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_or_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,or_ii) - -gr_or_ii_sptr gr_make_or_ii (); - -class gr_or_ii : public gr_sync_block -{ - private: - gr_or_ii (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_or_ss.cc b/gnuradio-core/src/lib/gengen/gr_or_ss.cc deleted file mode 100644 index 21b9821f..00000000 --- a/gnuradio-core/src/lib/gengen/gr_or_ss.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_or_ss_sptr -gr_make_or_ss () -{ - return gr_or_ss_sptr (new gr_or_ss ()); -} - -gr_or_ss::gr_or_ss () - : gr_sync_block ("or_ss", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short))) -{ -} - -int -gr_or_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items; i++) { - short acc = ((short *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc = acc | ((short *) input_items[j])[i]; - - *optr++ = (short) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_or_ss.h b/gnuradio-core/src/lib/gengen/gr_or_ss.h deleted file mode 100644 index 4d2f5e21..00000000 --- a/gnuradio-core/src/lib/gengen/gr_or_ss.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_OR_SS_H -#define INCLUDED_GR_OR_SS_H - -#include - -class gr_or_ss; -typedef boost::shared_ptr gr_or_ss_sptr; - -gr_or_ss_sptr gr_make_or_ss (); - -/*! - * \brief output = input_0 | input_1 | , ... | input_N) - * \ingroup math_blk - * - * bitwise boolean or across all input streams. - */ -class gr_or_ss : public gr_sync_block -{ - friend gr_or_ss_sptr gr_make_or_ss (); - - gr_or_ss (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_or_ss.i b/gnuradio-core/src/lib/gengen/gr_or_ss.i deleted file mode 100644 index 60aa183b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_or_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,or_ss) - -gr_or_ss_sptr gr_make_or_ss (); - -class gr_or_ss : public gr_sync_block -{ - private: - gr_or_ss (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_bb.cc b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_bb.cc deleted file mode 100644 index dced2978..00000000 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_bb.cc +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const unsigned int BITS_PER_TYPE = sizeof(unsigned char) * 8; -static const unsigned int LOG2_L_TYPE = gr_log2_const(); - - -gr_packed_to_unpacked_bb_sptr -gr_make_packed_to_unpacked_bb (unsigned int bits_per_chunk, gr_endianness_t endianness) -{ - return gr_packed_to_unpacked_bb_sptr - (new gr_packed_to_unpacked_bb (bits_per_chunk,endianness)); -} - -gr_packed_to_unpacked_bb::gr_packed_to_unpacked_bb (unsigned int bits_per_chunk, - gr_endianness_t endianness) - : gr_block ("packed_to_unpacked_bb", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_bits_per_chunk(bits_per_chunk),d_endianness(endianness),d_index(0) -{ - assert (bits_per_chunk <= BITS_PER_TYPE); - assert (bits_per_chunk > 0); - - set_relative_rate ((1.0 * BITS_PER_TYPE) / bits_per_chunk); -} - -void -gr_packed_to_unpacked_bb::forecast(int noutput_items, gr_vector_int &ninput_items_required) -{ - - int input_required = (int) ceil((d_index + noutput_items * d_bits_per_chunk) / (1.0 * BITS_PER_TYPE)); - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - //printf("Forecast wants %d needs %d\n",noutput_items,ninput_items_required[i]); - } -} - -unsigned int -get_bit_le (const unsigned char *in_vector,unsigned int bit_addr) -{ - unsigned char x = in_vector[bit_addr>>LOG2_L_TYPE]; - return (x>>(bit_addr&(BITS_PER_TYPE-1)))&1; -} - -unsigned int -get_bit_be (const unsigned char *in_vector,unsigned int bit_addr) -{ - unsigned char x = in_vector[bit_addr>>LOG2_L_TYPE]; - return (x>>((BITS_PER_TYPE-1)-(bit_addr&(BITS_PER_TYPE-1))))&1; -} - -int -gr_packed_to_unpacked_bb::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned int index_tmp = d_index; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0; m < nstreams; m++){ - const unsigned char *in = (unsigned char *) input_items[m]; - unsigned char *out = (unsigned char *) output_items[m]; - index_tmp = d_index; - - // per stream processing - - switch (d_endianness){ - - case GR_MSB_FIRST: - for (int i = 0; i < noutput_items; i++){ - //printf("here msb %d\n",i); - unsigned char x = 0; - for(unsigned int j=0; j= (int) ((d_index+(BITS_PER_TYPE-1))>>LOG2_L_TYPE)); - } - - d_index = index_tmp; - consume_each (d_index >> LOG2_L_TYPE); - d_index = d_index & (BITS_PER_TYPE-1); - //printf("got to end\n"); - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_bb.h b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_bb.h deleted file mode 100644 index 7a15761a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_bb.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_PACKED_TO_UNPACKED_BB_H -#define INCLUDED_GR_PACKED_TO_UNPACKED_BB_H - -#include -#include - -class gr_packed_to_unpacked_bb; -typedef boost::shared_ptr gr_packed_to_unpacked_bb_sptr; - -gr_packed_to_unpacked_bb_sptr -gr_make_packed_to_unpacked_bb (unsigned int bits_per_chunk, gr_endianness_t endianness); - -/*! - * \brief Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts. - * \ingroup converter_blk - * - * input: stream of unsigned char; output: stream of unsigned char - * - * This is the inverse of gr_unpacked_to_packed_XX. - * - * The bits in the bytes or shorts input stream are grouped into chunks of - * \p bits_per_chunk bits and each resulting chunk is written right- - * justified to the output stream of bytes or shorts. - * All b or 16 bits of the each input bytes or short are processed. - * The right thing is done if bits_per_chunk is not a power of two. - * - * The combination of gr_packed_to_unpacked_XX_ followed by - * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the - * general case of mapping from a stream of bytes or shorts into - * arbitrary float or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ - -class gr_packed_to_unpacked_bb : public gr_block -{ - friend gr_packed_to_unpacked_bb_sptr - gr_make_packed_to_unpacked_bb (unsigned int bits_per_chunk, gr_endianness_t endianness); - - gr_packed_to_unpacked_bb (unsigned int bits_per_chunk, gr_endianness_t endianness); - - unsigned int d_bits_per_chunk; - gr_endianness_t d_endianness; - unsigned int d_index; - - public: - void forecast(int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } - -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_bb.i b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_bb.i deleted file mode 100644 index c4eeb448..00000000 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_bb.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,packed_to_unpacked_bb); - -gr_packed_to_unpacked_bb_sptr -gr_make_packed_to_unpacked_bb (unsigned int bits_per_chunk, gr_endianness_t endianness); - -class gr_packed_to_unpacked_bb : public gr_block -{ - gr_packed_to_unpacked_bb (unsigned int bits_per_chunk, gr_endianness_t endianness); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ii.cc b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ii.cc deleted file mode 100644 index f3c6eceb..00000000 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ii.cc +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const unsigned int BITS_PER_TYPE = sizeof(int) * 8; -static const unsigned int LOG2_L_TYPE = gr_log2_const(); - - -gr_packed_to_unpacked_ii_sptr -gr_make_packed_to_unpacked_ii (unsigned int bits_per_chunk, gr_endianness_t endianness) -{ - return gr_packed_to_unpacked_ii_sptr - (new gr_packed_to_unpacked_ii (bits_per_chunk,endianness)); -} - -gr_packed_to_unpacked_ii::gr_packed_to_unpacked_ii (unsigned int bits_per_chunk, - gr_endianness_t endianness) - : gr_block ("packed_to_unpacked_ii", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (int))), - d_bits_per_chunk(bits_per_chunk),d_endianness(endianness),d_index(0) -{ - assert (bits_per_chunk <= BITS_PER_TYPE); - assert (bits_per_chunk > 0); - - set_relative_rate ((1.0 * BITS_PER_TYPE) / bits_per_chunk); -} - -void -gr_packed_to_unpacked_ii::forecast(int noutput_items, gr_vector_int &ninput_items_required) -{ - - int input_required = (int) ceil((d_index + noutput_items * d_bits_per_chunk) / (1.0 * BITS_PER_TYPE)); - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - //printf("Forecast wants %d needs %d\n",noutput_items,ninput_items_required[i]); - } -} - -unsigned int -get_bit_le (const int *in_vector,unsigned int bit_addr) -{ - int x = in_vector[bit_addr>>LOG2_L_TYPE]; - return (x>>(bit_addr&(BITS_PER_TYPE-1)))&1; -} - -unsigned int -get_bit_be (const int *in_vector,unsigned int bit_addr) -{ - int x = in_vector[bit_addr>>LOG2_L_TYPE]; - return (x>>((BITS_PER_TYPE-1)-(bit_addr&(BITS_PER_TYPE-1))))&1; -} - -int -gr_packed_to_unpacked_ii::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned int index_tmp = d_index; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0; m < nstreams; m++){ - const int *in = (int *) input_items[m]; - int *out = (int *) output_items[m]; - index_tmp = d_index; - - // per stream processing - - switch (d_endianness){ - - case GR_MSB_FIRST: - for (int i = 0; i < noutput_items; i++){ - //printf("here msb %d\n",i); - int x = 0; - for(unsigned int j=0; j= (int) ((d_index+(BITS_PER_TYPE-1))>>LOG2_L_TYPE)); - } - - d_index = index_tmp; - consume_each (d_index >> LOG2_L_TYPE); - d_index = d_index & (BITS_PER_TYPE-1); - //printf("got to end\n"); - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ii.h b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ii.h deleted file mode 100644 index cfbc6c84..00000000 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ii.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_PACKED_TO_UNPACKED_II_H -#define INCLUDED_GR_PACKED_TO_UNPACKED_II_H - -#include -#include - -class gr_packed_to_unpacked_ii; -typedef boost::shared_ptr gr_packed_to_unpacked_ii_sptr; - -gr_packed_to_unpacked_ii_sptr -gr_make_packed_to_unpacked_ii (unsigned int bits_per_chunk, gr_endianness_t endianness); - -/*! - * \brief Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts. - * \ingroup converter_blk - * - * input: stream of int; output: stream of int - * - * This is the inverse of gr_unpacked_to_packed_XX. - * - * The bits in the bytes or shorts input stream are grouped into chunks of - * \p bits_per_chunk bits and each resulting chunk is written right- - * justified to the output stream of bytes or shorts. - * All b or 16 bits of the each input bytes or short are processed. - * The right thing is done if bits_per_chunk is not a power of two. - * - * The combination of gr_packed_to_unpacked_XX_ followed by - * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the - * general case of mapping from a stream of bytes or shorts into - * arbitrary float or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ - -class gr_packed_to_unpacked_ii : public gr_block -{ - friend gr_packed_to_unpacked_ii_sptr - gr_make_packed_to_unpacked_ii (unsigned int bits_per_chunk, gr_endianness_t endianness); - - gr_packed_to_unpacked_ii (unsigned int bits_per_chunk, gr_endianness_t endianness); - - unsigned int d_bits_per_chunk; - gr_endianness_t d_endianness; - unsigned int d_index; - - public: - void forecast(int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } - -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ii.i b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ii.i deleted file mode 100644 index a3bd8e65..00000000 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,packed_to_unpacked_ii); - -gr_packed_to_unpacked_ii_sptr -gr_make_packed_to_unpacked_ii (unsigned int bits_per_chunk, gr_endianness_t endianness); - -class gr_packed_to_unpacked_ii : public gr_block -{ - gr_packed_to_unpacked_ii (unsigned int bits_per_chunk, gr_endianness_t endianness); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ss.cc b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ss.cc deleted file mode 100644 index 9d46b049..00000000 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ss.cc +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const unsigned int BITS_PER_TYPE = sizeof(short) * 8; -static const unsigned int LOG2_L_TYPE = gr_log2_const(); - - -gr_packed_to_unpacked_ss_sptr -gr_make_packed_to_unpacked_ss (unsigned int bits_per_chunk, gr_endianness_t endianness) -{ - return gr_packed_to_unpacked_ss_sptr - (new gr_packed_to_unpacked_ss (bits_per_chunk,endianness)); -} - -gr_packed_to_unpacked_ss::gr_packed_to_unpacked_ss (unsigned int bits_per_chunk, - gr_endianness_t endianness) - : gr_block ("packed_to_unpacked_ss", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (short))), - d_bits_per_chunk(bits_per_chunk),d_endianness(endianness),d_index(0) -{ - assert (bits_per_chunk <= BITS_PER_TYPE); - assert (bits_per_chunk > 0); - - set_relative_rate ((1.0 * BITS_PER_TYPE) / bits_per_chunk); -} - -void -gr_packed_to_unpacked_ss::forecast(int noutput_items, gr_vector_int &ninput_items_required) -{ - - int input_required = (int) ceil((d_index + noutput_items * d_bits_per_chunk) / (1.0 * BITS_PER_TYPE)); - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - //printf("Forecast wants %d needs %d\n",noutput_items,ninput_items_required[i]); - } -} - -unsigned int -get_bit_le (const short *in_vector,unsigned int bit_addr) -{ - short x = in_vector[bit_addr>>LOG2_L_TYPE]; - return (x>>(bit_addr&(BITS_PER_TYPE-1)))&1; -} - -unsigned int -get_bit_be (const short *in_vector,unsigned int bit_addr) -{ - short x = in_vector[bit_addr>>LOG2_L_TYPE]; - return (x>>((BITS_PER_TYPE-1)-(bit_addr&(BITS_PER_TYPE-1))))&1; -} - -int -gr_packed_to_unpacked_ss::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned int index_tmp = d_index; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0; m < nstreams; m++){ - const short *in = (short *) input_items[m]; - short *out = (short *) output_items[m]; - index_tmp = d_index; - - // per stream processing - - switch (d_endianness){ - - case GR_MSB_FIRST: - for (int i = 0; i < noutput_items; i++){ - //printf("here msb %d\n",i); - short x = 0; - for(unsigned int j=0; j= (int) ((d_index+(BITS_PER_TYPE-1))>>LOG2_L_TYPE)); - } - - d_index = index_tmp; - consume_each (d_index >> LOG2_L_TYPE); - d_index = d_index & (BITS_PER_TYPE-1); - //printf("got to end\n"); - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ss.h b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ss.h deleted file mode 100644 index aa4e71d7..00000000 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ss.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_PACKED_TO_UNPACKED_SS_H -#define INCLUDED_GR_PACKED_TO_UNPACKED_SS_H - -#include -#include - -class gr_packed_to_unpacked_ss; -typedef boost::shared_ptr gr_packed_to_unpacked_ss_sptr; - -gr_packed_to_unpacked_ss_sptr -gr_make_packed_to_unpacked_ss (unsigned int bits_per_chunk, gr_endianness_t endianness); - -/*! - * \brief Convert a stream of packed bytes or shorts to stream of unpacked bytes or shorts. - * \ingroup converter_blk - * - * input: stream of short; output: stream of short - * - * This is the inverse of gr_unpacked_to_packed_XX. - * - * The bits in the bytes or shorts input stream are grouped into chunks of - * \p bits_per_chunk bits and each resulting chunk is written right- - * justified to the output stream of bytes or shorts. - * All b or 16 bits of the each input bytes or short are processed. - * The right thing is done if bits_per_chunk is not a power of two. - * - * The combination of gr_packed_to_unpacked_XX_ followed by - * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the - * general case of mapping from a stream of bytes or shorts into - * arbitrary float or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ - -class gr_packed_to_unpacked_ss : public gr_block -{ - friend gr_packed_to_unpacked_ss_sptr - gr_make_packed_to_unpacked_ss (unsigned int bits_per_chunk, gr_endianness_t endianness); - - gr_packed_to_unpacked_ss (unsigned int bits_per_chunk, gr_endianness_t endianness); - - unsigned int d_bits_per_chunk; - gr_endianness_t d_endianness; - unsigned int d_index; - - public: - void forecast(int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } - -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ss.i b/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ss.i deleted file mode 100644 index e6018f0f..00000000 --- a/gnuradio-core/src/lib/gengen/gr_packed_to_unpacked_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,packed_to_unpacked_ss); - -gr_packed_to_unpacked_ss_sptr -gr_make_packed_to_unpacked_ss (unsigned int bits_per_chunk, gr_endianness_t endianness); - -class gr_packed_to_unpacked_ss : public gr_block -{ - gr_packed_to_unpacked_ss (unsigned int bits_per_chunk, gr_endianness_t endianness); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_fb.cc b/gnuradio-core/src/lib/gengen/gr_peak_detector_fb.cc deleted file mode 100644 index 2c7b0d48..00000000 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_fb.cc +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -gr_peak_detector_fb_sptr -gr_make_peak_detector_fb (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha) -{ - return gr_peak_detector_fb_sptr (new gr_peak_detector_fb (threshold_factor_rise, - threshold_factor_fall, - look_ahead, alpha)); -} - -gr_peak_detector_fb::gr_peak_detector_fb (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha) - : gr_sync_block ("peak_detector_fb", - gr_make_io_signature (1, 1, sizeof (float)), - gr_make_io_signature (1, 1, sizeof (char))), - d_threshold_factor_rise(threshold_factor_rise), - d_threshold_factor_fall(threshold_factor_fall), - d_look_ahead(look_ahead), d_avg_alpha(alpha), d_avg(0), d_found(0) -{ -} - -int -gr_peak_detector_fb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *iptr = (float *) input_items[0]; - char *optr = (char *) output_items[0]; - - memset(optr, 0, noutput_items*sizeof(char)); - - float peak_val = -(float)INFINITY; - int peak_ind = 0; - unsigned char state = 0; - int i = 0; - - //printf("noutput_items %d\n",noutput_items); - while(i < noutput_items) { - if(state == 0) { // below threshold - if(iptr[i] > d_avg*d_threshold_factor_rise) { - state = 1; - } - else { - d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg; - i++; - } - } - else if(state == 1) { // above threshold, have not found peak - //printf("Entered State 1: %f i: %d noutput_items: %d\n", iptr[i], i, noutput_items); - if(iptr[i] > peak_val) { - peak_val = iptr[i]; - peak_ind = i; - d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg; - i++; - } - else if (iptr[i] > d_avg*d_threshold_factor_fall) { - d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg; - i++; - } - else { - optr[peak_ind] = 1; - state = 0; - peak_val = -(float)INFINITY; - //printf("Leaving State 1: Peak: %f Peak Ind: %d i: %d noutput_items: %d\n", - //peak_val, peak_ind, i, noutput_items); - } - } - } - - if(state == 0) { - //printf("Leave in State 0, produced %d\n",noutput_items); - return noutput_items; - } - else { // only return up to passing the threshold - //printf("Leave in State 1, only produced %d of %d\n",peak_ind,noutput_items); - return peak_ind+1; - } -} diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_fb.h b/gnuradio-core/src/lib/gengen/gr_peak_detector_fb.h deleted file mode 100644 index 2b5ba46d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_fb.h +++ /dev/null @@ -1,125 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_PEAK_DETECTOR_FB_H -#define INCLUDED_GR_PEAK_DETECTOR_FB_H - -#include - -class gr_peak_detector_fb; -typedef boost::shared_ptr gr_peak_detector_fb_sptr; - -gr_peak_detector_fb_sptr gr_make_peak_detector_fb (float threshold_factor_rise = 0.25, - float threshold_factor_fall = 0.40, - int look_ahead = 10, - float alpha = 0.001); - -/*! - * \brief Detect the peak of a signal - * \ingroup level_blk - * - * If a peak is detected, this block outputs a 1, - * or it outputs 0's. - * - * \param threshold_factor_rise The threshold factor determins when a peak - * has started. An average of the signal is calculated and when the - * value of the signal goes over threshold_factor_rise*average, we - * start looking for a peak. - * \param threshold_factor_fall The threshold factor determins when a peak - * has ended. An average of the signal is calculated and when the - * value of the signal goes bellow threshold_factor_fall*average, we - * stop looking for a peak. - * \param look_ahead The look-ahead value is used when the threshold is - * found to look if there another peak within this step range. - * If there is a larger value, we set that as the peak and look ahead - * again. This is continued until the highest point is found with - * This look-ahead range. - * \param alpha The gain value of a moving average filter - */ -class gr_peak_detector_fb : public gr_sync_block -{ - friend gr_peak_detector_fb_sptr gr_make_peak_detector_fb (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha); - - gr_peak_detector_fb (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha); - - private: - float d_threshold_factor_rise; - float d_threshold_factor_fall; - int d_look_ahead; - float d_avg_alpha; - float d_avg; - unsigned char d_found; - - public: - - /*! \brief Set the threshold factor value for the rise time - * \param thr new threshold factor - */ - void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; } - - /*! \brief Set the threshold factor value for the fall time - * \param thr new threshold factor - */ - void set_threshold_factor_fall(float thr) { d_threshold_factor_fall = thr; } - - /*! \brief Set the look-ahead factor - * \param look new look-ahead factor - */ - void set_look_ahead(int look) { d_look_ahead = look; } - - /*! \brief Set the running average alpha - * \param alpha new alpha for running average - */ - void set_alpha(int alpha) { d_avg_alpha = alpha; } - - /*! \brief Get the threshold factor value for the rise time - * \return threshold factor - */ - float threshold_factor_rise() { return d_threshold_factor_rise; } - - /*! \brief Get the threshold factor value for the fall time - * \return threshold factor - */ - float threshold_factor_fall() { return d_threshold_factor_fall; } - - /*! \brief Get the look-ahead factor value - * \return look-ahead factor - */ - int look_ahead() { return d_look_ahead; } - - /*! \brief Get the alpha value of the running average - * \return alpha - */ - float alpha() { return d_avg_alpha; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_fb.i b/gnuradio-core/src/lib/gengen/gr_peak_detector_fb.i deleted file mode 100644 index 5bee4410..00000000 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_fb.i +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,peak_detector_fb) - -gr_peak_detector_fb_sptr gr_make_peak_detector_fb (float threshold_factor_rise = 0.25, - float threshold_factor_fall = 0.40, - int look_ahead = 10, - float alpha=0.001); - -class gr_peak_detector_fb : public gr_sync_block -{ - private: - gr_peak_detector_fb (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha); - - public: - void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; } - void set_threshold_factor_fall(float thr) { d_threshold_factor_fall = thr; } - void set_look_ahead(int look) { d_look_ahead = look; } - void set_alpha(int alpha) { d_avg_alpha = alpha; } - - float threshold_factor_rise() { return d_threshold_factor_rise; } - float threshold_factor_fall() { return d_threshold_factor_fall; } - int look_ahead() { return d_look_ahead; } - float alpha() { return d_avg_alpha; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_ib.cc b/gnuradio-core/src/lib/gengen/gr_peak_detector_ib.cc deleted file mode 100644 index 19c1def4..00000000 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_ib.cc +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -gr_peak_detector_ib_sptr -gr_make_peak_detector_ib (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha) -{ - return gr_peak_detector_ib_sptr (new gr_peak_detector_ib (threshold_factor_rise, - threshold_factor_fall, - look_ahead, alpha)); -} - -gr_peak_detector_ib::gr_peak_detector_ib (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha) - : gr_sync_block ("peak_detector_ib", - gr_make_io_signature (1, 1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (char))), - d_threshold_factor_rise(threshold_factor_rise), - d_threshold_factor_fall(threshold_factor_fall), - d_look_ahead(look_ahead), d_avg_alpha(alpha), d_avg(0), d_found(0) -{ -} - -int -gr_peak_detector_ib::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *iptr = (int *) input_items[0]; - char *optr = (char *) output_items[0]; - - memset(optr, 0, noutput_items*sizeof(char)); - - int peak_val = -(int)INFINITY; - int peak_ind = 0; - unsigned char state = 0; - int i = 0; - - //printf("noutput_items %d\n",noutput_items); - while(i < noutput_items) { - if(state == 0) { // below threshold - if(iptr[i] > d_avg*d_threshold_factor_rise) { - state = 1; - } - else { - d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg; - i++; - } - } - else if(state == 1) { // above threshold, have not found peak - //printf("Entered State 1: %f i: %d noutput_items: %d\n", iptr[i], i, noutput_items); - if(iptr[i] > peak_val) { - peak_val = iptr[i]; - peak_ind = i; - d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg; - i++; - } - else if (iptr[i] > d_avg*d_threshold_factor_fall) { - d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg; - i++; - } - else { - optr[peak_ind] = 1; - state = 0; - peak_val = -(int)INFINITY; - //printf("Leaving State 1: Peak: %f Peak Ind: %d i: %d noutput_items: %d\n", - //peak_val, peak_ind, i, noutput_items); - } - } - } - - if(state == 0) { - //printf("Leave in State 0, produced %d\n",noutput_items); - return noutput_items; - } - else { // only return up to passing the threshold - //printf("Leave in State 1, only produced %d of %d\n",peak_ind,noutput_items); - return peak_ind+1; - } -} diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_ib.h b/gnuradio-core/src/lib/gengen/gr_peak_detector_ib.h deleted file mode 100644 index 97fcc4f8..00000000 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_ib.h +++ /dev/null @@ -1,125 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_PEAK_DETECTOR_IB_H -#define INCLUDED_GR_PEAK_DETECTOR_IB_H - -#include - -class gr_peak_detector_ib; -typedef boost::shared_ptr gr_peak_detector_ib_sptr; - -gr_peak_detector_ib_sptr gr_make_peak_detector_ib (float threshold_factor_rise = 0.25, - float threshold_factor_fall = 0.40, - int look_ahead = 10, - float alpha = 0.001); - -/*! - * \brief Detect the peak of a signal - * \ingroup level_blk - * - * If a peak is detected, this block outputs a 1, - * or it outputs 0's. - * - * \param threshold_factor_rise The threshold factor determins when a peak - * has started. An average of the signal is calculated and when the - * value of the signal goes over threshold_factor_rise*average, we - * start looking for a peak. - * \param threshold_factor_fall The threshold factor determins when a peak - * has ended. An average of the signal is calculated and when the - * value of the signal goes bellow threshold_factor_fall*average, we - * stop looking for a peak. - * \param look_ahead The look-ahead value is used when the threshold is - * found to look if there another peak within this step range. - * If there is a larger value, we set that as the peak and look ahead - * again. This is continued until the highest point is found with - * This look-ahead range. - * \param alpha The gain value of a moving average filter - */ -class gr_peak_detector_ib : public gr_sync_block -{ - friend gr_peak_detector_ib_sptr gr_make_peak_detector_ib (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha); - - gr_peak_detector_ib (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha); - - private: - float d_threshold_factor_rise; - float d_threshold_factor_fall; - int d_look_ahead; - float d_avg_alpha; - float d_avg; - unsigned char d_found; - - public: - - /*! \brief Set the threshold factor value for the rise time - * \param thr new threshold factor - */ - void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; } - - /*! \brief Set the threshold factor value for the fall time - * \param thr new threshold factor - */ - void set_threshold_factor_fall(float thr) { d_threshold_factor_fall = thr; } - - /*! \brief Set the look-ahead factor - * \param look new look-ahead factor - */ - void set_look_ahead(int look) { d_look_ahead = look; } - - /*! \brief Set the running average alpha - * \param alpha new alpha for running average - */ - void set_alpha(int alpha) { d_avg_alpha = alpha; } - - /*! \brief Get the threshold factor value for the rise time - * \return threshold factor - */ - float threshold_factor_rise() { return d_threshold_factor_rise; } - - /*! \brief Get the threshold factor value for the fall time - * \return threshold factor - */ - float threshold_factor_fall() { return d_threshold_factor_fall; } - - /*! \brief Get the look-ahead factor value - * \return look-ahead factor - */ - int look_ahead() { return d_look_ahead; } - - /*! \brief Get the alpha value of the running average - * \return alpha - */ - float alpha() { return d_avg_alpha; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_ib.i b/gnuradio-core/src/lib/gengen/gr_peak_detector_ib.i deleted file mode 100644 index c21c43db..00000000 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_ib.i +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,peak_detector_ib) - -gr_peak_detector_ib_sptr gr_make_peak_detector_ib (float threshold_factor_rise = 0.25, - float threshold_factor_fall = 0.40, - int look_ahead = 10, - float alpha=0.001); - -class gr_peak_detector_ib : public gr_sync_block -{ - private: - gr_peak_detector_ib (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha); - - public: - void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; } - void set_threshold_factor_fall(float thr) { d_threshold_factor_fall = thr; } - void set_look_ahead(int look) { d_look_ahead = look; } - void set_alpha(int alpha) { d_avg_alpha = alpha; } - - float threshold_factor_rise() { return d_threshold_factor_rise; } - float threshold_factor_fall() { return d_threshold_factor_fall; } - int look_ahead() { return d_look_ahead; } - float alpha() { return d_avg_alpha; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_sb.cc b/gnuradio-core/src/lib/gengen/gr_peak_detector_sb.cc deleted file mode 100644 index 63abb84c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_sb.cc +++ /dev/null @@ -1,111 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -gr_peak_detector_sb_sptr -gr_make_peak_detector_sb (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha) -{ - return gr_peak_detector_sb_sptr (new gr_peak_detector_sb (threshold_factor_rise, - threshold_factor_fall, - look_ahead, alpha)); -} - -gr_peak_detector_sb::gr_peak_detector_sb (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha) - : gr_sync_block ("peak_detector_sb", - gr_make_io_signature (1, 1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (char))), - d_threshold_factor_rise(threshold_factor_rise), - d_threshold_factor_fall(threshold_factor_fall), - d_look_ahead(look_ahead), d_avg_alpha(alpha), d_avg(0), d_found(0) -{ -} - -int -gr_peak_detector_sb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *iptr = (short *) input_items[0]; - char *optr = (char *) output_items[0]; - - memset(optr, 0, noutput_items*sizeof(char)); - - short peak_val = -(short)INFINITY; - int peak_ind = 0; - unsigned char state = 0; - int i = 0; - - //printf("noutput_items %d\n",noutput_items); - while(i < noutput_items) { - if(state == 0) { // below threshold - if(iptr[i] > d_avg*d_threshold_factor_rise) { - state = 1; - } - else { - d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg; - i++; - } - } - else if(state == 1) { // above threshold, have not found peak - //printf("Entered State 1: %f i: %d noutput_items: %d\n", iptr[i], i, noutput_items); - if(iptr[i] > peak_val) { - peak_val = iptr[i]; - peak_ind = i; - d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg; - i++; - } - else if (iptr[i] > d_avg*d_threshold_factor_fall) { - d_avg = (d_avg_alpha)*iptr[i] + (1-d_avg_alpha)*d_avg; - i++; - } - else { - optr[peak_ind] = 1; - state = 0; - peak_val = -(short)INFINITY; - //printf("Leaving State 1: Peak: %f Peak Ind: %d i: %d noutput_items: %d\n", - //peak_val, peak_ind, i, noutput_items); - } - } - } - - if(state == 0) { - //printf("Leave in State 0, produced %d\n",noutput_items); - return noutput_items; - } - else { // only return up to passing the threshold - //printf("Leave in State 1, only produced %d of %d\n",peak_ind,noutput_items); - return peak_ind+1; - } -} diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_sb.h b/gnuradio-core/src/lib/gengen/gr_peak_detector_sb.h deleted file mode 100644 index 6ceabb90..00000000 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_sb.h +++ /dev/null @@ -1,125 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_PEAK_DETECTOR_SB_H -#define INCLUDED_GR_PEAK_DETECTOR_SB_H - -#include - -class gr_peak_detector_sb; -typedef boost::shared_ptr gr_peak_detector_sb_sptr; - -gr_peak_detector_sb_sptr gr_make_peak_detector_sb (float threshold_factor_rise = 0.25, - float threshold_factor_fall = 0.40, - int look_ahead = 10, - float alpha = 0.001); - -/*! - * \brief Detect the peak of a signal - * \ingroup level_blk - * - * If a peak is detected, this block outputs a 1, - * or it outputs 0's. - * - * \param threshold_factor_rise The threshold factor determins when a peak - * has started. An average of the signal is calculated and when the - * value of the signal goes over threshold_factor_rise*average, we - * start looking for a peak. - * \param threshold_factor_fall The threshold factor determins when a peak - * has ended. An average of the signal is calculated and when the - * value of the signal goes bellow threshold_factor_fall*average, we - * stop looking for a peak. - * \param look_ahead The look-ahead value is used when the threshold is - * found to look if there another peak within this step range. - * If there is a larger value, we set that as the peak and look ahead - * again. This is continued until the highest point is found with - * This look-ahead range. - * \param alpha The gain value of a moving average filter - */ -class gr_peak_detector_sb : public gr_sync_block -{ - friend gr_peak_detector_sb_sptr gr_make_peak_detector_sb (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha); - - gr_peak_detector_sb (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha); - - private: - float d_threshold_factor_rise; - float d_threshold_factor_fall; - int d_look_ahead; - float d_avg_alpha; - float d_avg; - unsigned char d_found; - - public: - - /*! \brief Set the threshold factor value for the rise time - * \param thr new threshold factor - */ - void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; } - - /*! \brief Set the threshold factor value for the fall time - * \param thr new threshold factor - */ - void set_threshold_factor_fall(float thr) { d_threshold_factor_fall = thr; } - - /*! \brief Set the look-ahead factor - * \param look new look-ahead factor - */ - void set_look_ahead(int look) { d_look_ahead = look; } - - /*! \brief Set the running average alpha - * \param alpha new alpha for running average - */ - void set_alpha(int alpha) { d_avg_alpha = alpha; } - - /*! \brief Get the threshold factor value for the rise time - * \return threshold factor - */ - float threshold_factor_rise() { return d_threshold_factor_rise; } - - /*! \brief Get the threshold factor value for the fall time - * \return threshold factor - */ - float threshold_factor_fall() { return d_threshold_factor_fall; } - - /*! \brief Get the look-ahead factor value - * \return look-ahead factor - */ - int look_ahead() { return d_look_ahead; } - - /*! \brief Get the alpha value of the running average - * \return alpha - */ - float alpha() { return d_avg_alpha; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_peak_detector_sb.i b/gnuradio-core/src/lib/gengen/gr_peak_detector_sb.i deleted file mode 100644 index 83dfc0cb..00000000 --- a/gnuradio-core/src/lib/gengen/gr_peak_detector_sb.i +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,peak_detector_sb) - -gr_peak_detector_sb_sptr gr_make_peak_detector_sb (float threshold_factor_rise = 0.25, - float threshold_factor_fall = 0.40, - int look_ahead = 10, - float alpha=0.001); - -class gr_peak_detector_sb : public gr_sync_block -{ - private: - gr_peak_detector_sb (float threshold_factor_rise, - float threshold_factor_fall, - int look_ahead, float alpha); - - public: - void set_threshold_factor_rise(float thr) { d_threshold_factor_rise = thr; } - void set_threshold_factor_fall(float thr) { d_threshold_factor_fall = thr; } - void set_look_ahead(int look) { d_look_ahead = look; } - void set_alpha(int alpha) { d_avg_alpha = alpha; } - - float threshold_factor_rise() { return d_threshold_factor_rise; } - float threshold_factor_fall() { return d_threshold_factor_fall; } - int look_ahead() { return d_look_ahead; } - float alpha() { return d_avg_alpha; } -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_bb.cc b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_bb.cc deleted file mode 100644 index 2d7d6e23..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_bb.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_sample_and_hold_bb_sptr -gr_make_sample_and_hold_bb () -{ - return gr_sample_and_hold_bb_sptr (new gr_sample_and_hold_bb ()); -} - -gr_sample_and_hold_bb::gr_sample_and_hold_bb () - : gr_sync_block ("sample_and_hold_bb", - gr_make_io_signature2 (2, 2, sizeof (unsigned char), sizeof(char)), - gr_make_io_signature (1, 1, sizeof (unsigned char))), - d_data(0) -{ -} - -int -gr_sample_and_hold_bb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned char *iptr = (unsigned char *) input_items[0]; - const char *ctrl = (const char *) input_items[1]; - unsigned char *optr = (unsigned char *) output_items[0]; - - for (int i = 0; i < noutput_items; i++){ - if(ctrl[i]) { - d_data = iptr[i]; - } - optr[i] = d_data; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_bb.h b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_bb.h deleted file mode 100644 index 278eef06..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_bb.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SAMPLE_AND_HOLD_BB_H -#define INCLUDED_GR_SAMPLE_AND_HOLD_BB_H - -#include - -class gr_sample_and_hold_bb; -typedef boost::shared_ptr gr_sample_and_hold_bb_sptr; - -gr_sample_and_hold_bb_sptr gr_make_sample_and_hold_bb (); - -/*! - * \brief sample and hold circuit - * \ingroup level_blk - * - * Samples the data stream (input stream 0) and holds the value - * if the control signal is 1 (intput stream 1). - */ -class gr_sample_and_hold_bb : public gr_sync_block -{ - friend gr_sample_and_hold_bb_sptr gr_make_sample_and_hold_bb (); - - gr_sample_and_hold_bb (); - - private: - unsigned char d_data; - - public: - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_bb.i b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_bb.i deleted file mode 100644 index 3f33e37a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_bb.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sample_and_hold_bb) - -gr_sample_and_hold_bb_sptr gr_make_sample_and_hold_bb (); - -class gr_sample_and_hold_bb : public gr_sync_block -{ - private: - gr_sample_and_hold_bb (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ff.cc b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ff.cc deleted file mode 100644 index a3042e7a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ff.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_sample_and_hold_ff_sptr -gr_make_sample_and_hold_ff () -{ - return gr_sample_and_hold_ff_sptr (new gr_sample_and_hold_ff ()); -} - -gr_sample_and_hold_ff::gr_sample_and_hold_ff () - : gr_sync_block ("sample_and_hold_ff", - gr_make_io_signature2 (2, 2, sizeof (float), sizeof(char)), - gr_make_io_signature (1, 1, sizeof (float))), - d_data(0) -{ -} - -int -gr_sample_and_hold_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *iptr = (float *) input_items[0]; - const char *ctrl = (const char *) input_items[1]; - float *optr = (float *) output_items[0]; - - for (int i = 0; i < noutput_items; i++){ - if(ctrl[i]) { - d_data = iptr[i]; - } - optr[i] = d_data; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ff.h b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ff.h deleted file mode 100644 index c91ed8c6..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ff.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SAMPLE_AND_HOLD_FF_H -#define INCLUDED_GR_SAMPLE_AND_HOLD_FF_H - -#include - -class gr_sample_and_hold_ff; -typedef boost::shared_ptr gr_sample_and_hold_ff_sptr; - -gr_sample_and_hold_ff_sptr gr_make_sample_and_hold_ff (); - -/*! - * \brief sample and hold circuit - * \ingroup level_blk - * - * Samples the data stream (input stream 0) and holds the value - * if the control signal is 1 (intput stream 1). - */ -class gr_sample_and_hold_ff : public gr_sync_block -{ - friend gr_sample_and_hold_ff_sptr gr_make_sample_and_hold_ff (); - - gr_sample_and_hold_ff (); - - private: - float d_data; - - public: - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ff.i b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ff.i deleted file mode 100644 index d54c314e..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ff.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sample_and_hold_ff) - -gr_sample_and_hold_ff_sptr gr_make_sample_and_hold_ff (); - -class gr_sample_and_hold_ff : public gr_sync_block -{ - private: - gr_sample_and_hold_ff (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ii.cc b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ii.cc deleted file mode 100644 index 149d98dd..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ii.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_sample_and_hold_ii_sptr -gr_make_sample_and_hold_ii () -{ - return gr_sample_and_hold_ii_sptr (new gr_sample_and_hold_ii ()); -} - -gr_sample_and_hold_ii::gr_sample_and_hold_ii () - : gr_sync_block ("sample_and_hold_ii", - gr_make_io_signature2 (2, 2, sizeof (int), sizeof(char)), - gr_make_io_signature (1, 1, sizeof (int))), - d_data(0) -{ -} - -int -gr_sample_and_hold_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *iptr = (int *) input_items[0]; - const char *ctrl = (const char *) input_items[1]; - int *optr = (int *) output_items[0]; - - for (int i = 0; i < noutput_items; i++){ - if(ctrl[i]) { - d_data = iptr[i]; - } - optr[i] = d_data; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ii.h b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ii.h deleted file mode 100644 index a3e79b72..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ii.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SAMPLE_AND_HOLD_II_H -#define INCLUDED_GR_SAMPLE_AND_HOLD_II_H - -#include - -class gr_sample_and_hold_ii; -typedef boost::shared_ptr gr_sample_and_hold_ii_sptr; - -gr_sample_and_hold_ii_sptr gr_make_sample_and_hold_ii (); - -/*! - * \brief sample and hold circuit - * \ingroup level_blk - * - * Samples the data stream (input stream 0) and holds the value - * if the control signal is 1 (intput stream 1). - */ -class gr_sample_and_hold_ii : public gr_sync_block -{ - friend gr_sample_and_hold_ii_sptr gr_make_sample_and_hold_ii (); - - gr_sample_and_hold_ii (); - - private: - int d_data; - - public: - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ii.i b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ii.i deleted file mode 100644 index bee2b931..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sample_and_hold_ii) - -gr_sample_and_hold_ii_sptr gr_make_sample_and_hold_ii (); - -class gr_sample_and_hold_ii : public gr_sync_block -{ - private: - gr_sample_and_hold_ii (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ss.cc b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ss.cc deleted file mode 100644 index 9f23d10c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ss.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_sample_and_hold_ss_sptr -gr_make_sample_and_hold_ss () -{ - return gr_sample_and_hold_ss_sptr (new gr_sample_and_hold_ss ()); -} - -gr_sample_and_hold_ss::gr_sample_and_hold_ss () - : gr_sync_block ("sample_and_hold_ss", - gr_make_io_signature2 (2, 2, sizeof (short), sizeof(char)), - gr_make_io_signature (1, 1, sizeof (short))), - d_data(0) -{ -} - -int -gr_sample_and_hold_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *iptr = (short *) input_items[0]; - const char *ctrl = (const char *) input_items[1]; - short *optr = (short *) output_items[0]; - - for (int i = 0; i < noutput_items; i++){ - if(ctrl[i]) { - d_data = iptr[i]; - } - optr[i] = d_data; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ss.h b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ss.h deleted file mode 100644 index 2053c620..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ss.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SAMPLE_AND_HOLD_SS_H -#define INCLUDED_GR_SAMPLE_AND_HOLD_SS_H - -#include - -class gr_sample_and_hold_ss; -typedef boost::shared_ptr gr_sample_and_hold_ss_sptr; - -gr_sample_and_hold_ss_sptr gr_make_sample_and_hold_ss (); - -/*! - * \brief sample and hold circuit - * \ingroup level_blk - * - * Samples the data stream (input stream 0) and holds the value - * if the control signal is 1 (intput stream 1). - */ -class gr_sample_and_hold_ss : public gr_sync_block -{ - friend gr_sample_and_hold_ss_sptr gr_make_sample_and_hold_ss (); - - gr_sample_and_hold_ss (); - - private: - short d_data; - - public: - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ss.i b/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ss.i deleted file mode 100644 index f3c04a43..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sample_and_hold_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2007 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sample_and_hold_ss) - -gr_sample_and_hold_ss_sptr gr_make_sample_and_hold_ss (); - -class gr_sample_and_hold_ss : public gr_sync_block -{ - private: - gr_sample_and_hold_ss (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_c.cc b/gnuradio-core/src/lib/gengen/gr_sig_source_c.cc deleted file mode 100644 index 154e1d4b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_c.cc +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - - -gr_sig_source_c::gr_sig_source_c (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, gr_complex offset) - : gr_sync_block ("sig_source_c", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (gr_complex))), - d_sampling_freq (sampling_freq), d_waveform (waveform), d_frequency (frequency), - d_ampl (ampl), d_offset (offset) -{ - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -gr_sig_source_c_sptr -gr_make_sig_source_c (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, gr_complex offset) -{ - return gr_sig_source_c_sptr (new gr_sig_source_c (sampling_freq, waveform, frequency, ampl, offset)); -} - -int -gr_sig_source_c::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *optr = (gr_complex *) output_items[0]; - gr_complex t; - - switch (d_waveform){ - -#if 1 // complex? - - case GR_CONST_WAVE: - t = (gr_complex) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++) // FIXME unroll - optr[i] = t; - break; - - case GR_SIN_WAVE: - case GR_COS_WAVE: - d_nco.sincos (optr, noutput_items, d_ampl); - if (d_offset == gr_complex(0,0)) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - /* Implements a real square wave high from -PI to 0. - * The imaginary square wave leads by 90 deg. - */ - case GR_SQR_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2) - optr[i] = gr_complex(d_ampl, 0)+d_offset; - else if (d_nco.get_phase() < 0) - optr[i] = gr_complex(d_ampl, d_ampl)+d_offset; - else if (d_nco.get_phase() < M_PI/2) - optr[i] = gr_complex(0, d_ampl)+d_offset; - else - optr[i] = d_offset; - d_nco.step(); - } - break; - - /* Implements a real triangle wave rising from -PI to 0 and - * falling from 0 to PI. The imaginary triangle wave leads by 90 deg. - */ - case GR_TRI_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl, - -1*d_ampl*d_nco.get_phase()/M_PI - d_ampl/2)+d_offset; - } - else if (d_nco.get_phase() < 0){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl, - d_ampl*d_nco.get_phase()/M_PI + d_ampl/2)+d_offset; - } - else if (d_nco.get_phase() < M_PI/2){ - optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, - d_ampl*d_nco.get_phase()/M_PI + d_ampl/2)+d_offset; - } - else{ - optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, - -1*d_ampl*d_nco.get_phase()/M_PI + 3*d_ampl/2)+d_offset; - } - d_nco.step(); - } - break; - - /* Implements a real saw tooth wave rising from -PI to PI. - * The imaginary saw tooth wave leads by 90 deg. - */ - case GR_SAW_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2, - d_ampl*d_nco.get_phase()/(2*M_PI) + 5*d_ampl/4)+d_offset; - } - else{ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2, - d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/4)+d_offset; - } - d_nco.step(); - } - break; - -#else // nope... - - case GR_CONST_WAVE: - t = (gr_complex) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++) // FIXME unroll - optr[i] = t; - break; - - case GR_SIN_WAVE: - d_nco.sin (optr, noutput_items, d_ampl); - if (d_offset == 0) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - case GR_COS_WAVE: - d_nco.cos (optr, noutput_items, d_ampl); - if (d_offset == 0) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - /* The square wave is high from -PI to 0. */ - case GR_SQR_WAVE: - t = (gr_complex) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < 0) - optr[i] = t; - else - optr[i] = d_offset; - d_nco.step(); - } - break; - - /* The triangle wave rises from -PI to 0 and falls from 0 to PI. */ - case GR_TRI_WAVE: - for (int i = 0; i < noutput_items; i++){ - double t = d_ampl*d_nco.get_phase()/M_PI; - if (d_nco.get_phase() < 0) - optr[i] = static_cast(t + d_ampl + d_offset); - else - optr[i] = static_cast(-1*t + d_ampl + d_offset); - d_nco.step(); - } - break; - - /* The saw tooth wave rises from -PI to PI. */ - case GR_SAW_WAVE: - for (int i = 0; i < noutput_items; i++){ - t = static_cast(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2 + d_offset); - optr[i] = t; - d_nco.step(); - } - break; - -#endif - - default: - throw std::runtime_error ("gr_sig_source: invalid waveform"); - } - - return noutput_items; -} - -void -gr_sig_source_c::set_sampling_freq (double sampling_freq) -{ - d_sampling_freq = sampling_freq; - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -void -gr_sig_source_c::set_waveform (gr_waveform_t waveform) -{ - d_waveform = waveform; -} - -void -gr_sig_source_c::set_frequency (double frequency) -{ - d_frequency = frequency; - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -void -gr_sig_source_c::set_amplitude (double ampl) -{ - d_ampl = ampl; -} - -void -gr_sig_source_c::set_offset (gr_complex offset) -{ - d_offset = offset; -} - diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_c.h b/gnuradio-core/src/lib/gengen/gr_sig_source_c.h deleted file mode 100644 index 49c43d76..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_c.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SIG_SOURCE_C_H -#define INCLUDED_GR_SIG_SOURCE_C_H - -#include -#include -#include - -class gr_sig_source_c; -typedef boost::shared_ptr gr_sig_source_c_sptr; - -/*! - * \brief signal generator with gr_complex output. - * \ingroup source_blk - */ - -class gr_sig_source_c : public gr_sync_block { - friend gr_sig_source_c_sptr - gr_make_sig_source_c (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, gr_complex offset); - - double d_sampling_freq; - gr_waveform_t d_waveform; - double d_frequency; - double d_ampl; - gr_complex d_offset; - gr_fxpt_nco d_nco; - - - gr_sig_source_c (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, gr_complex offset); - - public: - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - // ACCESSORS - double sampling_freq () const { return d_sampling_freq; } - gr_waveform_t waveform () const { return d_waveform; } - double frequency () const { return d_frequency; } - double amplitude () const { return d_ampl; } - gr_complex offset () const { return d_offset; } - - // MANIPULATORS - void set_sampling_freq (double sampling_freq); - void set_waveform (gr_waveform_t waveform); - void set_frequency (double frequency); - void set_amplitude (double ampl); - void set_offset (gr_complex offset); -}; - -gr_sig_source_c_sptr -gr_make_sig_source_c (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, gr_complex offset = 0); - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_c.i b/gnuradio-core/src/lib/gengen/gr_sig_source_c.i deleted file mode 100644 index e02b1c89..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_c.i +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sig_source_c); - -gr_sig_source_c_sptr -gr_make_sig_source_c (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, gr_complex offset = 0); - - -class gr_sig_source_c : public gr_sync_block { - private: - gr_sig_source_c (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, gr_complex offset); - - public: - - // ACCESSORS - double sampling_freq () const { return d_sampling_freq; } - gr_waveform_t waveform () const { return d_waveform; } - double frequency () const { return d_frequency; } - double amplitude () const { return d_ampl; } - gr_complex offset () const { return d_offset; } - - // MANIPULATORS - void set_sampling_freq (double sampling_freq); - void set_waveform (gr_waveform_t waveform); - void set_frequency (double frequency); - void set_amplitude (double ampl); - void set_offset (gr_complex offset); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_f.cc b/gnuradio-core/src/lib/gengen/gr_sig_source_f.cc deleted file mode 100644 index 33f7140a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_f.cc +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - - -gr_sig_source_f::gr_sig_source_f (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, float offset) - : gr_sync_block ("sig_source_f", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (float))), - d_sampling_freq (sampling_freq), d_waveform (waveform), d_frequency (frequency), - d_ampl (ampl), d_offset (offset) -{ - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -gr_sig_source_f_sptr -gr_make_sig_source_f (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, float offset) -{ - return gr_sig_source_f_sptr (new gr_sig_source_f (sampling_freq, waveform, frequency, ampl, offset)); -} - -int -gr_sig_source_f::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *optr = (float *) output_items[0]; - float t; - - switch (d_waveform){ - -#if 0 // complex? - - case GR_CONST_WAVE: - t = (gr_complex) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++) // FIXME unroll - optr[i] = t; - break; - - case GR_SIN_WAVE: - case GR_COS_WAVE: - d_nco.sincos (optr, noutput_items, d_ampl); - if (d_offset == gr_complex(0,0)) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - /* Implements a real square wave high from -PI to 0. - * The imaginary square wave leads by 90 deg. - */ - case GR_SQR_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2) - optr[i] = gr_complex(d_ampl, 0)+d_offset; - else if (d_nco.get_phase() < 0) - optr[i] = gr_complex(d_ampl, d_ampl)+d_offset; - else if (d_nco.get_phase() < M_PI/2) - optr[i] = gr_complex(0, d_ampl)+d_offset; - else - optr[i] = d_offset; - d_nco.step(); - } - break; - - /* Implements a real triangle wave rising from -PI to 0 and - * falling from 0 to PI. The imaginary triangle wave leads by 90 deg. - */ - case GR_TRI_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl, - -1*d_ampl*d_nco.get_phase()/M_PI - d_ampl/2)+d_offset; - } - else if (d_nco.get_phase() < 0){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl, - d_ampl*d_nco.get_phase()/M_PI + d_ampl/2)+d_offset; - } - else if (d_nco.get_phase() < M_PI/2){ - optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, - d_ampl*d_nco.get_phase()/M_PI + d_ampl/2)+d_offset; - } - else{ - optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, - -1*d_ampl*d_nco.get_phase()/M_PI + 3*d_ampl/2)+d_offset; - } - d_nco.step(); - } - break; - - /* Implements a real saw tooth wave rising from -PI to PI. - * The imaginary saw tooth wave leads by 90 deg. - */ - case GR_SAW_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2, - d_ampl*d_nco.get_phase()/(2*M_PI) + 5*d_ampl/4)+d_offset; - } - else{ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2, - d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/4)+d_offset; - } - d_nco.step(); - } - break; - -#else // nope... - - case GR_CONST_WAVE: - t = (float) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++) // FIXME unroll - optr[i] = t; - break; - - case GR_SIN_WAVE: - d_nco.sin (optr, noutput_items, d_ampl); - if (d_offset == 0) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - case GR_COS_WAVE: - d_nco.cos (optr, noutput_items, d_ampl); - if (d_offset == 0) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - /* The square wave is high from -PI to 0. */ - case GR_SQR_WAVE: - t = (float) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < 0) - optr[i] = t; - else - optr[i] = d_offset; - d_nco.step(); - } - break; - - /* The triangle wave rises from -PI to 0 and falls from 0 to PI. */ - case GR_TRI_WAVE: - for (int i = 0; i < noutput_items; i++){ - double t = d_ampl*d_nco.get_phase()/M_PI; - if (d_nco.get_phase() < 0) - optr[i] = static_cast(t + d_ampl + d_offset); - else - optr[i] = static_cast(-1*t + d_ampl + d_offset); - d_nco.step(); - } - break; - - /* The saw tooth wave rises from -PI to PI. */ - case GR_SAW_WAVE: - for (int i = 0; i < noutput_items; i++){ - t = static_cast(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2 + d_offset); - optr[i] = t; - d_nco.step(); - } - break; - -#endif - - default: - throw std::runtime_error ("gr_sig_source: invalid waveform"); - } - - return noutput_items; -} - -void -gr_sig_source_f::set_sampling_freq (double sampling_freq) -{ - d_sampling_freq = sampling_freq; - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -void -gr_sig_source_f::set_waveform (gr_waveform_t waveform) -{ - d_waveform = waveform; -} - -void -gr_sig_source_f::set_frequency (double frequency) -{ - d_frequency = frequency; - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -void -gr_sig_source_f::set_amplitude (double ampl) -{ - d_ampl = ampl; -} - -void -gr_sig_source_f::set_offset (float offset) -{ - d_offset = offset; -} - diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_f.h b/gnuradio-core/src/lib/gengen/gr_sig_source_f.h deleted file mode 100644 index d90ca6d3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_f.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SIG_SOURCE_F_H -#define INCLUDED_GR_SIG_SOURCE_F_H - -#include -#include -#include - -class gr_sig_source_f; -typedef boost::shared_ptr gr_sig_source_f_sptr; - -/*! - * \brief signal generator with float output. - * \ingroup source_blk - */ - -class gr_sig_source_f : public gr_sync_block { - friend gr_sig_source_f_sptr - gr_make_sig_source_f (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, float offset); - - double d_sampling_freq; - gr_waveform_t d_waveform; - double d_frequency; - double d_ampl; - float d_offset; - gr_fxpt_nco d_nco; - - - gr_sig_source_f (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, float offset); - - public: - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - // ACCESSORS - double sampling_freq () const { return d_sampling_freq; } - gr_waveform_t waveform () const { return d_waveform; } - double frequency () const { return d_frequency; } - double amplitude () const { return d_ampl; } - float offset () const { return d_offset; } - - // MANIPULATORS - void set_sampling_freq (double sampling_freq); - void set_waveform (gr_waveform_t waveform); - void set_frequency (double frequency); - void set_amplitude (double ampl); - void set_offset (float offset); -}; - -gr_sig_source_f_sptr -gr_make_sig_source_f (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, float offset = 0); - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_f.i b/gnuradio-core/src/lib/gengen/gr_sig_source_f.i deleted file mode 100644 index 612e7684..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_f.i +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sig_source_f); - -gr_sig_source_f_sptr -gr_make_sig_source_f (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, float offset = 0); - - -class gr_sig_source_f : public gr_sync_block { - private: - gr_sig_source_f (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, float offset); - - public: - - // ACCESSORS - double sampling_freq () const { return d_sampling_freq; } - gr_waveform_t waveform () const { return d_waveform; } - double frequency () const { return d_frequency; } - double amplitude () const { return d_ampl; } - float offset () const { return d_offset; } - - // MANIPULATORS - void set_sampling_freq (double sampling_freq); - void set_waveform (gr_waveform_t waveform); - void set_frequency (double frequency); - void set_amplitude (double ampl); - void set_offset (float offset); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_i.cc b/gnuradio-core/src/lib/gengen/gr_sig_source_i.cc deleted file mode 100644 index b4b04695..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_i.cc +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - - -gr_sig_source_i::gr_sig_source_i (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, int offset) - : gr_sync_block ("sig_source_i", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (int))), - d_sampling_freq (sampling_freq), d_waveform (waveform), d_frequency (frequency), - d_ampl (ampl), d_offset (offset) -{ - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -gr_sig_source_i_sptr -gr_make_sig_source_i (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, int offset) -{ - return gr_sig_source_i_sptr (new gr_sig_source_i (sampling_freq, waveform, frequency, ampl, offset)); -} - -int -gr_sig_source_i::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - int t; - - switch (d_waveform){ - -#if 0 // complex? - - case GR_CONST_WAVE: - t = (gr_complex) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++) // FIXME unroll - optr[i] = t; - break; - - case GR_SIN_WAVE: - case GR_COS_WAVE: - d_nco.sincos (optr, noutput_items, d_ampl); - if (d_offset == gr_complex(0,0)) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - /* Implements a real square wave high from -PI to 0. - * The imaginary square wave leads by 90 deg. - */ - case GR_SQR_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2) - optr[i] = gr_complex(d_ampl, 0)+d_offset; - else if (d_nco.get_phase() < 0) - optr[i] = gr_complex(d_ampl, d_ampl)+d_offset; - else if (d_nco.get_phase() < M_PI/2) - optr[i] = gr_complex(0, d_ampl)+d_offset; - else - optr[i] = d_offset; - d_nco.step(); - } - break; - - /* Implements a real triangle wave rising from -PI to 0 and - * falling from 0 to PI. The imaginary triangle wave leads by 90 deg. - */ - case GR_TRI_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl, - -1*d_ampl*d_nco.get_phase()/M_PI - d_ampl/2)+d_offset; - } - else if (d_nco.get_phase() < 0){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl, - d_ampl*d_nco.get_phase()/M_PI + d_ampl/2)+d_offset; - } - else if (d_nco.get_phase() < M_PI/2){ - optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, - d_ampl*d_nco.get_phase()/M_PI + d_ampl/2)+d_offset; - } - else{ - optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, - -1*d_ampl*d_nco.get_phase()/M_PI + 3*d_ampl/2)+d_offset; - } - d_nco.step(); - } - break; - - /* Implements a real saw tooth wave rising from -PI to PI. - * The imaginary saw tooth wave leads by 90 deg. - */ - case GR_SAW_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2, - d_ampl*d_nco.get_phase()/(2*M_PI) + 5*d_ampl/4)+d_offset; - } - else{ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2, - d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/4)+d_offset; - } - d_nco.step(); - } - break; - -#else // nope... - - case GR_CONST_WAVE: - t = (int) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++) // FIXME unroll - optr[i] = t; - break; - - case GR_SIN_WAVE: - d_nco.sin (optr, noutput_items, d_ampl); - if (d_offset == 0) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - case GR_COS_WAVE: - d_nco.cos (optr, noutput_items, d_ampl); - if (d_offset == 0) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - /* The square wave is high from -PI to 0. */ - case GR_SQR_WAVE: - t = (int) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < 0) - optr[i] = t; - else - optr[i] = d_offset; - d_nco.step(); - } - break; - - /* The triangle wave rises from -PI to 0 and falls from 0 to PI. */ - case GR_TRI_WAVE: - for (int i = 0; i < noutput_items; i++){ - double t = d_ampl*d_nco.get_phase()/M_PI; - if (d_nco.get_phase() < 0) - optr[i] = static_cast(t + d_ampl + d_offset); - else - optr[i] = static_cast(-1*t + d_ampl + d_offset); - d_nco.step(); - } - break; - - /* The saw tooth wave rises from -PI to PI. */ - case GR_SAW_WAVE: - for (int i = 0; i < noutput_items; i++){ - t = static_cast(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2 + d_offset); - optr[i] = t; - d_nco.step(); - } - break; - -#endif - - default: - throw std::runtime_error ("gr_sig_source: invalid waveform"); - } - - return noutput_items; -} - -void -gr_sig_source_i::set_sampling_freq (double sampling_freq) -{ - d_sampling_freq = sampling_freq; - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -void -gr_sig_source_i::set_waveform (gr_waveform_t waveform) -{ - d_waveform = waveform; -} - -void -gr_sig_source_i::set_frequency (double frequency) -{ - d_frequency = frequency; - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -void -gr_sig_source_i::set_amplitude (double ampl) -{ - d_ampl = ampl; -} - -void -gr_sig_source_i::set_offset (int offset) -{ - d_offset = offset; -} - diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_i.h b/gnuradio-core/src/lib/gengen/gr_sig_source_i.h deleted file mode 100644 index ca83c5a7..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_i.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SIG_SOURCE_I_H -#define INCLUDED_GR_SIG_SOURCE_I_H - -#include -#include -#include - -class gr_sig_source_i; -typedef boost::shared_ptr gr_sig_source_i_sptr; - -/*! - * \brief signal generator with int output. - * \ingroup source_blk - */ - -class gr_sig_source_i : public gr_sync_block { - friend gr_sig_source_i_sptr - gr_make_sig_source_i (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, int offset); - - double d_sampling_freq; - gr_waveform_t d_waveform; - double d_frequency; - double d_ampl; - int d_offset; - gr_fxpt_nco d_nco; - - - gr_sig_source_i (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, int offset); - - public: - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - // ACCESSORS - double sampling_freq () const { return d_sampling_freq; } - gr_waveform_t waveform () const { return d_waveform; } - double frequency () const { return d_frequency; } - double amplitude () const { return d_ampl; } - int offset () const { return d_offset; } - - // MANIPULATORS - void set_sampling_freq (double sampling_freq); - void set_waveform (gr_waveform_t waveform); - void set_frequency (double frequency); - void set_amplitude (double ampl); - void set_offset (int offset); -}; - -gr_sig_source_i_sptr -gr_make_sig_source_i (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, int offset = 0); - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_i.i b/gnuradio-core/src/lib/gengen/gr_sig_source_i.i deleted file mode 100644 index b4afdc36..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_i.i +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sig_source_i); - -gr_sig_source_i_sptr -gr_make_sig_source_i (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, int offset = 0); - - -class gr_sig_source_i : public gr_sync_block { - private: - gr_sig_source_i (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, int offset); - - public: - - // ACCESSORS - double sampling_freq () const { return d_sampling_freq; } - gr_waveform_t waveform () const { return d_waveform; } - double frequency () const { return d_frequency; } - double amplitude () const { return d_ampl; } - int offset () const { return d_offset; } - - // MANIPULATORS - void set_sampling_freq (double sampling_freq); - void set_waveform (gr_waveform_t waveform); - void set_frequency (double frequency); - void set_amplitude (double ampl); - void set_offset (int offset); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_s.cc b/gnuradio-core/src/lib/gengen/gr_sig_source_s.cc deleted file mode 100644 index 08a0dcf4..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_s.cc +++ /dev/null @@ -1,242 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include -#include - - -gr_sig_source_s::gr_sig_source_s (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, short offset) - : gr_sync_block ("sig_source_s", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (short))), - d_sampling_freq (sampling_freq), d_waveform (waveform), d_frequency (frequency), - d_ampl (ampl), d_offset (offset) -{ - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -gr_sig_source_s_sptr -gr_make_sig_source_s (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, short offset) -{ - return gr_sig_source_s_sptr (new gr_sig_source_s (sampling_freq, waveform, frequency, ampl, offset)); -} - -int -gr_sig_source_s::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - short t; - - switch (d_waveform){ - -#if 0 // complex? - - case GR_CONST_WAVE: - t = (gr_complex) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++) // FIXME unroll - optr[i] = t; - break; - - case GR_SIN_WAVE: - case GR_COS_WAVE: - d_nco.sincos (optr, noutput_items, d_ampl); - if (d_offset == gr_complex(0,0)) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - /* Implements a real square wave high from -PI to 0. - * The imaginary square wave leads by 90 deg. - */ - case GR_SQR_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2) - optr[i] = gr_complex(d_ampl, 0)+d_offset; - else if (d_nco.get_phase() < 0) - optr[i] = gr_complex(d_ampl, d_ampl)+d_offset; - else if (d_nco.get_phase() < M_PI/2) - optr[i] = gr_complex(0, d_ampl)+d_offset; - else - optr[i] = d_offset; - d_nco.step(); - } - break; - - /* Implements a real triangle wave rising from -PI to 0 and - * falling from 0 to PI. The imaginary triangle wave leads by 90 deg. - */ - case GR_TRI_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl, - -1*d_ampl*d_nco.get_phase()/M_PI - d_ampl/2)+d_offset; - } - else if (d_nco.get_phase() < 0){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/M_PI + d_ampl, - d_ampl*d_nco.get_phase()/M_PI + d_ampl/2)+d_offset; - } - else if (d_nco.get_phase() < M_PI/2){ - optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, - d_ampl*d_nco.get_phase()/M_PI + d_ampl/2)+d_offset; - } - else{ - optr[i] = gr_complex(-1*d_ampl*d_nco.get_phase()/M_PI + d_ampl, - -1*d_ampl*d_nco.get_phase()/M_PI + 3*d_ampl/2)+d_offset; - } - d_nco.step(); - } - break; - - /* Implements a real saw tooth wave rising from -PI to PI. - * The imaginary saw tooth wave leads by 90 deg. - */ - case GR_SAW_WAVE: - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < -1*M_PI/2){ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2, - d_ampl*d_nco.get_phase()/(2*M_PI) + 5*d_ampl/4)+d_offset; - } - else{ - optr[i] = gr_complex(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2, - d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/4)+d_offset; - } - d_nco.step(); - } - break; - -#else // nope... - - case GR_CONST_WAVE: - t = (short) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++) // FIXME unroll - optr[i] = t; - break; - - case GR_SIN_WAVE: - d_nco.sin (optr, noutput_items, d_ampl); - if (d_offset == 0) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - case GR_COS_WAVE: - d_nco.cos (optr, noutput_items, d_ampl); - if (d_offset == 0) - break; - - for (int i = 0; i < noutput_items; i++){ - optr[i] += d_offset; - } - break; - - /* The square wave is high from -PI to 0. */ - case GR_SQR_WAVE: - t = (short) d_ampl + d_offset; - for (int i = 0; i < noutput_items; i++){ - if (d_nco.get_phase() < 0) - optr[i] = t; - else - optr[i] = d_offset; - d_nco.step(); - } - break; - - /* The triangle wave rises from -PI to 0 and falls from 0 to PI. */ - case GR_TRI_WAVE: - for (int i = 0; i < noutput_items; i++){ - double t = d_ampl*d_nco.get_phase()/M_PI; - if (d_nco.get_phase() < 0) - optr[i] = static_cast(t + d_ampl + d_offset); - else - optr[i] = static_cast(-1*t + d_ampl + d_offset); - d_nco.step(); - } - break; - - /* The saw tooth wave rises from -PI to PI. */ - case GR_SAW_WAVE: - for (int i = 0; i < noutput_items; i++){ - t = static_cast(d_ampl*d_nco.get_phase()/(2*M_PI) + d_ampl/2 + d_offset); - optr[i] = t; - d_nco.step(); - } - break; - -#endif - - default: - throw std::runtime_error ("gr_sig_source: invalid waveform"); - } - - return noutput_items; -} - -void -gr_sig_source_s::set_sampling_freq (double sampling_freq) -{ - d_sampling_freq = sampling_freq; - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -void -gr_sig_source_s::set_waveform (gr_waveform_t waveform) -{ - d_waveform = waveform; -} - -void -gr_sig_source_s::set_frequency (double frequency) -{ - d_frequency = frequency; - d_nco.set_freq (2 * M_PI * d_frequency / d_sampling_freq); -} - -void -gr_sig_source_s::set_amplitude (double ampl) -{ - d_ampl = ampl; -} - -void -gr_sig_source_s::set_offset (short offset) -{ - d_offset = offset; -} - diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_s.h b/gnuradio-core/src/lib/gengen/gr_sig_source_s.h deleted file mode 100644 index 6a6cab1b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_s.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SIG_SOURCE_S_H -#define INCLUDED_GR_SIG_SOURCE_S_H - -#include -#include -#include - -class gr_sig_source_s; -typedef boost::shared_ptr gr_sig_source_s_sptr; - -/*! - * \brief signal generator with short output. - * \ingroup source_blk - */ - -class gr_sig_source_s : public gr_sync_block { - friend gr_sig_source_s_sptr - gr_make_sig_source_s (double sampling_freq, gr_waveform_t waveform, - double frequency, double ampl, short offset); - - double d_sampling_freq; - gr_waveform_t d_waveform; - double d_frequency; - double d_ampl; - short d_offset; - gr_fxpt_nco d_nco; - - - gr_sig_source_s (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, short offset); - - public: - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - // ACCESSORS - double sampling_freq () const { return d_sampling_freq; } - gr_waveform_t waveform () const { return d_waveform; } - double frequency () const { return d_frequency; } - double amplitude () const { return d_ampl; } - short offset () const { return d_offset; } - - // MANIPULATORS - void set_sampling_freq (double sampling_freq); - void set_waveform (gr_waveform_t waveform); - void set_frequency (double frequency); - void set_amplitude (double ampl); - void set_offset (short offset); -}; - -gr_sig_source_s_sptr -gr_make_sig_source_s (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, short offset = 0); - - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_s.i b/gnuradio-core/src/lib/gengen/gr_sig_source_s.i deleted file mode 100644 index 2fbdbe30..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sig_source_s.i +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sig_source_s); - -gr_sig_source_s_sptr -gr_make_sig_source_s (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, short offset = 0); - - -class gr_sig_source_s : public gr_sync_block { - private: - gr_sig_source_s (double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, short offset); - - public: - - // ACCESSORS - double sampling_freq () const { return d_sampling_freq; } - gr_waveform_t waveform () const { return d_waveform; } - double frequency () const { return d_frequency; } - double amplitude () const { return d_ampl; } - short offset () const { return d_offset; } - - // MANIPULATORS - void set_sampling_freq (double sampling_freq); - void set_waveform (gr_waveform_t waveform); - void set_frequency (double frequency); - void set_amplitude (double ampl); - void set_offset (short offset); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sub_cc.cc b/gnuradio-core/src/lib/gengen/gr_sub_cc.cc deleted file mode 100644 index 764ab38e..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_cc.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_sub_cc_sptr -gr_make_sub_cc (size_t vlen) -{ - return gr_sub_cc_sptr (new gr_sub_cc (vlen)); -} - -gr_sub_cc::gr_sub_cc (size_t vlen) - : gr_sync_block ("sub_cc", - gr_make_io_signature (1, -1, sizeof (gr_complex)*vlen), - gr_make_io_signature (1, 1, sizeof (gr_complex)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_sub_cc::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *optr = (gr_complex *) output_items[0]; - - int ninputs = input_items.size (); - - if (ninputs == 1){ // negate - for (int i = 0; i < noutput_items*d_vlen; i++) - *optr++ = (gr_complex) -((gr_complex *) input_items[0])[i]; - } - - else { - for (int i = 0; i < noutput_items*d_vlen; i++){ - gr_complex acc = ((gr_complex *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc -= ((gr_complex *) input_items[j])[i]; - - *optr++ = (gr_complex) acc; - } - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_sub_cc.h b/gnuradio-core/src/lib/gengen/gr_sub_cc.h deleted file mode 100644 index a1ac0a44..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_cc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SUB_CC_H -#define INCLUDED_GR_SUB_CC_H - -#include - -class gr_sub_cc; -typedef boost::shared_ptr gr_sub_cc_sptr; - -gr_sub_cc_sptr gr_make_sub_cc (size_t vlen = 1); - -/*! - * \brief output = input_0 - input_1 - ...) - * \ingroup math_blk - * - * Subtract across all input streams. - */ -class gr_sub_cc : public gr_sync_block -{ - friend gr_sub_cc_sptr gr_make_sub_cc (size_t vlen); - - gr_sub_cc (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sub_cc.i b/gnuradio-core/src/lib/gengen/gr_sub_cc.i deleted file mode 100644 index f5f1adb5..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_cc.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sub_cc) - -gr_sub_cc_sptr gr_make_sub_cc (size_t vlen = 1); - -class gr_sub_cc : public gr_sync_block -{ - private: - gr_sub_cc (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sub_ff.cc b/gnuradio-core/src/lib/gengen/gr_sub_ff.cc deleted file mode 100644 index cc275ec7..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_ff.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_sub_ff_sptr -gr_make_sub_ff (size_t vlen) -{ - return gr_sub_ff_sptr (new gr_sub_ff (vlen)); -} - -gr_sub_ff::gr_sub_ff (size_t vlen) - : gr_sync_block ("sub_ff", - gr_make_io_signature (1, -1, sizeof (float)*vlen), - gr_make_io_signature (1, 1, sizeof (float)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_sub_ff::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *optr = (float *) output_items[0]; - - int ninputs = input_items.size (); - - if (ninputs == 1){ // negate - for (int i = 0; i < noutput_items*d_vlen; i++) - *optr++ = (float) -((float *) input_items[0])[i]; - } - - else { - for (int i = 0; i < noutput_items*d_vlen; i++){ - float acc = ((float *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc -= ((float *) input_items[j])[i]; - - *optr++ = (float) acc; - } - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_sub_ff.h b/gnuradio-core/src/lib/gengen/gr_sub_ff.h deleted file mode 100644 index eb66a84f..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_ff.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SUB_FF_H -#define INCLUDED_GR_SUB_FF_H - -#include - -class gr_sub_ff; -typedef boost::shared_ptr gr_sub_ff_sptr; - -gr_sub_ff_sptr gr_make_sub_ff (size_t vlen = 1); - -/*! - * \brief output = input_0 - input_1 - ...) - * \ingroup math_blk - * - * Subtract across all input streams. - */ -class gr_sub_ff : public gr_sync_block -{ - friend gr_sub_ff_sptr gr_make_sub_ff (size_t vlen); - - gr_sub_ff (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sub_ff.i b/gnuradio-core/src/lib/gengen/gr_sub_ff.i deleted file mode 100644 index 354d1356..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_ff.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sub_ff) - -gr_sub_ff_sptr gr_make_sub_ff (size_t vlen = 1); - -class gr_sub_ff : public gr_sync_block -{ - private: - gr_sub_ff (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sub_ii.cc b/gnuradio-core/src/lib/gengen/gr_sub_ii.cc deleted file mode 100644 index c095d49a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_ii.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_sub_ii_sptr -gr_make_sub_ii (size_t vlen) -{ - return gr_sub_ii_sptr (new gr_sub_ii (vlen)); -} - -gr_sub_ii::gr_sub_ii (size_t vlen) - : gr_sync_block ("sub_ii", - gr_make_io_signature (1, -1, sizeof (int)*vlen), - gr_make_io_signature (1, 1, sizeof (int)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_sub_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - - int ninputs = input_items.size (); - - if (ninputs == 1){ // negate - for (int i = 0; i < noutput_items*d_vlen; i++) - *optr++ = (int) -((int *) input_items[0])[i]; - } - - else { - for (int i = 0; i < noutput_items*d_vlen; i++){ - int acc = ((int *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc -= ((int *) input_items[j])[i]; - - *optr++ = (int) acc; - } - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_sub_ii.h b/gnuradio-core/src/lib/gengen/gr_sub_ii.h deleted file mode 100644 index ef2032fe..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_ii.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SUB_II_H -#define INCLUDED_GR_SUB_II_H - -#include - -class gr_sub_ii; -typedef boost::shared_ptr gr_sub_ii_sptr; - -gr_sub_ii_sptr gr_make_sub_ii (size_t vlen = 1); - -/*! - * \brief output = input_0 - input_1 - ...) - * \ingroup math_blk - * - * Subtract across all input streams. - */ -class gr_sub_ii : public gr_sync_block -{ - friend gr_sub_ii_sptr gr_make_sub_ii (size_t vlen); - - gr_sub_ii (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sub_ii.i b/gnuradio-core/src/lib/gengen/gr_sub_ii.i deleted file mode 100644 index 82382c8b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sub_ii) - -gr_sub_ii_sptr gr_make_sub_ii (size_t vlen = 1); - -class gr_sub_ii : public gr_sync_block -{ - private: - gr_sub_ii (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_sub_ss.cc b/gnuradio-core/src/lib/gengen/gr_sub_ss.cc deleted file mode 100644 index d3837c25..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_ss.cc +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_sub_ss_sptr -gr_make_sub_ss (size_t vlen) -{ - return gr_sub_ss_sptr (new gr_sub_ss (vlen)); -} - -gr_sub_ss::gr_sub_ss (size_t vlen) - : gr_sync_block ("sub_ss", - gr_make_io_signature (1, -1, sizeof (short)*vlen), - gr_make_io_signature (1, 1, sizeof (short)*vlen)), - d_vlen (vlen) -{ -} - -int -gr_sub_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - - int ninputs = input_items.size (); - - if (ninputs == 1){ // negate - for (int i = 0; i < noutput_items*d_vlen; i++) - *optr++ = (short) -((short *) input_items[0])[i]; - } - - else { - for (int i = 0; i < noutput_items*d_vlen; i++){ - short acc = ((short *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc -= ((short *) input_items[j])[i]; - - *optr++ = (short) acc; - } - } - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_sub_ss.h b/gnuradio-core/src/lib/gengen/gr_sub_ss.h deleted file mode 100644 index e48ddc08..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_ss.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_SUB_SS_H -#define INCLUDED_GR_SUB_SS_H - -#include - -class gr_sub_ss; -typedef boost::shared_ptr gr_sub_ss_sptr; - -gr_sub_ss_sptr gr_make_sub_ss (size_t vlen = 1); - -/*! - * \brief output = input_0 - input_1 - ...) - * \ingroup math_blk - * - * Subtract across all input streams. - */ -class gr_sub_ss : public gr_sync_block -{ - friend gr_sub_ss_sptr gr_make_sub_ss (size_t vlen); - - gr_sub_ss (size_t vlen); - - size_t d_vlen; - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_sub_ss.i b/gnuradio-core/src/lib/gengen/gr_sub_ss.i deleted file mode 100644 index 45b1f32a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_sub_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004, 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,sub_ss) - -gr_sub_ss_sptr gr_make_sub_ss (size_t vlen = 1); - -class gr_sub_ss : public gr_sync_block -{ - private: - gr_sub_ss (size_t vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_bb.cc b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_bb.cc deleted file mode 100644 index bcf54968..00000000 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_bb.cc +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -static const unsigned int BITS_PER_TYPE = sizeof(unsigned char) * 8; - - -gr_unpacked_to_packed_bb_sptr -gr_make_unpacked_to_packed_bb (unsigned int bits_per_chunk, gr_endianness_t endianness) -{ - return gr_unpacked_to_packed_bb_sptr - (new gr_unpacked_to_packed_bb (bits_per_chunk,endianness)); -} - -gr_unpacked_to_packed_bb::gr_unpacked_to_packed_bb (unsigned int bits_per_chunk, - gr_endianness_t endianness) - : gr_block ("unpacked_to_packed_bb", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_bits_per_chunk(bits_per_chunk),d_endianness(endianness),d_index(0) -{ - assert (bits_per_chunk <= BITS_PER_TYPE); - assert (bits_per_chunk > 0); - - set_relative_rate (bits_per_chunk/(1.0 * BITS_PER_TYPE)); -} - -void -gr_unpacked_to_packed_bb::forecast(int noutput_items, gr_vector_int &ninput_items_required) -{ - int input_required = (int) ceil( (d_index+noutput_items * 1.0 * BITS_PER_TYPE)/d_bits_per_chunk); - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - -unsigned int -get_bit_be1 (const unsigned char *in_vector,unsigned int bit_addr, unsigned int bits_per_chunk) { - unsigned int byte_addr = (int)bit_addr/bits_per_chunk; - unsigned char x = in_vector[byte_addr]; - unsigned int residue = bit_addr - byte_addr * bits_per_chunk; - //printf("Bit addr %d byte addr %d residue %d val %d\n",bit_addr,byte_addr,residue,(x>>(bits_per_chunk-1-residue))&1); - return (x >> (bits_per_chunk-1-residue))&1; -} - -int -gr_unpacked_to_packed_bb::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned int index_tmp = d_index; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0; m< nstreams; m++) { - const unsigned char *in = (unsigned char *) input_items[m]; - unsigned char *out = (unsigned char *) output_items[m]; - index_tmp=d_index; - - // per stream processing - - //assert((ninput_items[m]-d_index)*d_bits_per_chunk >= noutput_items*BITS_PER_TYPE); - - switch(d_endianness){ - - case GR_MSB_FIRST: - for(int i=0;i>1)| (get_bit_be1(in,index_tmp,d_bits_per_chunk)<<(BITS_PER_TYPE-1)); - index_tmp++; - } - out[i] = tmp; - } - break; - - default: - assert(0); - } - } - - d_index = index_tmp; - consume_each ((int)(d_index/d_bits_per_chunk)); - d_index = d_index%d_bits_per_chunk; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_bb.h b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_bb.h deleted file mode 100644 index c628a55c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_bb.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_UNPACKED_TO_PACKED_BB_H -#define INCLUDED_GR_UNPACKED_TO_PACKED_BB_H - -#include -#include - -class gr_unpacked_to_packed_bb; -typedef boost::shared_ptr gr_unpacked_to_packed_bb_sptr; - -gr_unpacked_to_packed_bb_sptr -gr_make_unpacked_to_packed_bb (unsigned int bits_per_chunk, gr_endianness_t endianness); - -/*! - * \brief Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts. - * \ingroup converter_blk - * - * input: stream of unsigned char; output: stream of unsigned char - * - * This is the inverse of gr_packed_to_unpacked_XX. - * - * The low \p bits_per_chunk bits are extracted from each input byte or short. - * These bits are then packed densely into the output bytes or shorts, such that - * all 8 or 16 bits of the output bytes or shorts are filled with valid input bits. - * The right thing is done if bits_per_chunk is not a power of two. - * - * The combination of gr_packed_to_unpacked_XX followed by - * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the - * general case of mapping from a stream of bytes or shorts into arbitrary float - * or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ -class gr_unpacked_to_packed_bb : public gr_block -{ - friend gr_unpacked_to_packed_bb_sptr - gr_make_unpacked_to_packed_bb (unsigned int bits_per_chunk, gr_endianness_t endianness); - - gr_unpacked_to_packed_bb (unsigned int bits_per_chunk, gr_endianness_t endianness); - - unsigned int d_bits_per_chunk; - gr_endianness_t d_endianness; - unsigned int d_index; - - public: - void forecast(int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_bb.i b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_bb.i deleted file mode 100644 index 50b3a07a..00000000 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_bb.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,unpacked_to_packed_bb); - -gr_unpacked_to_packed_bb_sptr -gr_make_unpacked_to_packed_bb (unsigned int bits_per_chunk, gr_endianness_t endianness); - -class gr_unpacked_to_packed_bb : public gr_block -{ - gr_unpacked_to_packed_bb (unsigned int bits_per_chunk, gr_endianness_t endianness); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ii.cc b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ii.cc deleted file mode 100644 index f23dfc36..00000000 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ii.cc +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -static const unsigned int BITS_PER_TYPE = sizeof(int) * 8; - - -gr_unpacked_to_packed_ii_sptr -gr_make_unpacked_to_packed_ii (unsigned int bits_per_chunk, gr_endianness_t endianness) -{ - return gr_unpacked_to_packed_ii_sptr - (new gr_unpacked_to_packed_ii (bits_per_chunk,endianness)); -} - -gr_unpacked_to_packed_ii::gr_unpacked_to_packed_ii (unsigned int bits_per_chunk, - gr_endianness_t endianness) - : gr_block ("unpacked_to_packed_ii", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (int))), - d_bits_per_chunk(bits_per_chunk),d_endianness(endianness),d_index(0) -{ - assert (bits_per_chunk <= BITS_PER_TYPE); - assert (bits_per_chunk > 0); - - set_relative_rate (bits_per_chunk/(1.0 * BITS_PER_TYPE)); -} - -void -gr_unpacked_to_packed_ii::forecast(int noutput_items, gr_vector_int &ninput_items_required) -{ - int input_required = (int) ceil( (d_index+noutput_items * 1.0 * BITS_PER_TYPE)/d_bits_per_chunk); - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - -unsigned int -get_bit_be1 (const int *in_vector,unsigned int bit_addr, unsigned int bits_per_chunk) { - unsigned int byte_addr = (int)bit_addr/bits_per_chunk; - int x = in_vector[byte_addr]; - unsigned int residue = bit_addr - byte_addr * bits_per_chunk; - //printf("Bit addr %d byte addr %d residue %d val %d\n",bit_addr,byte_addr,residue,(x>>(bits_per_chunk-1-residue))&1); - return (x >> (bits_per_chunk-1-residue))&1; -} - -int -gr_unpacked_to_packed_ii::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned int index_tmp = d_index; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0; m< nstreams; m++) { - const int *in = (int *) input_items[m]; - int *out = (int *) output_items[m]; - index_tmp=d_index; - - // per stream processing - - //assert((ninput_items[m]-d_index)*d_bits_per_chunk >= noutput_items*BITS_PER_TYPE); - - switch(d_endianness){ - - case GR_MSB_FIRST: - for(int i=0;i>1)| (get_bit_be1(in,index_tmp,d_bits_per_chunk)<<(BITS_PER_TYPE-1)); - index_tmp++; - } - out[i] = tmp; - } - break; - - default: - assert(0); - } - } - - d_index = index_tmp; - consume_each ((int)(d_index/d_bits_per_chunk)); - d_index = d_index%d_bits_per_chunk; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ii.h b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ii.h deleted file mode 100644 index b299bf1c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ii.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_UNPACKED_TO_PACKED_II_H -#define INCLUDED_GR_UNPACKED_TO_PACKED_II_H - -#include -#include - -class gr_unpacked_to_packed_ii; -typedef boost::shared_ptr gr_unpacked_to_packed_ii_sptr; - -gr_unpacked_to_packed_ii_sptr -gr_make_unpacked_to_packed_ii (unsigned int bits_per_chunk, gr_endianness_t endianness); - -/*! - * \brief Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts. - * \ingroup converter_blk - * - * input: stream of int; output: stream of int - * - * This is the inverse of gr_packed_to_unpacked_XX. - * - * The low \p bits_per_chunk bits are extracted from each input byte or short. - * These bits are then packed densely into the output bytes or shorts, such that - * all 8 or 16 bits of the output bytes or shorts are filled with valid input bits. - * The right thing is done if bits_per_chunk is not a power of two. - * - * The combination of gr_packed_to_unpacked_XX followed by - * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the - * general case of mapping from a stream of bytes or shorts into arbitrary float - * or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ -class gr_unpacked_to_packed_ii : public gr_block -{ - friend gr_unpacked_to_packed_ii_sptr - gr_make_unpacked_to_packed_ii (unsigned int bits_per_chunk, gr_endianness_t endianness); - - gr_unpacked_to_packed_ii (unsigned int bits_per_chunk, gr_endianness_t endianness); - - unsigned int d_bits_per_chunk; - gr_endianness_t d_endianness; - unsigned int d_index; - - public: - void forecast(int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ii.i b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ii.i deleted file mode 100644 index c2f76d2d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,unpacked_to_packed_ii); - -gr_unpacked_to_packed_ii_sptr -gr_make_unpacked_to_packed_ii (unsigned int bits_per_chunk, gr_endianness_t endianness); - -class gr_unpacked_to_packed_ii : public gr_block -{ - gr_unpacked_to_packed_ii (unsigned int bits_per_chunk, gr_endianness_t endianness); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ss.cc b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ss.cc deleted file mode 100644 index 9527e825..00000000 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ss.cc +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,2006 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -static const unsigned int BITS_PER_TYPE = sizeof(short) * 8; - - -gr_unpacked_to_packed_ss_sptr -gr_make_unpacked_to_packed_ss (unsigned int bits_per_chunk, gr_endianness_t endianness) -{ - return gr_unpacked_to_packed_ss_sptr - (new gr_unpacked_to_packed_ss (bits_per_chunk,endianness)); -} - -gr_unpacked_to_packed_ss::gr_unpacked_to_packed_ss (unsigned int bits_per_chunk, - gr_endianness_t endianness) - : gr_block ("unpacked_to_packed_ss", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (short))), - d_bits_per_chunk(bits_per_chunk),d_endianness(endianness),d_index(0) -{ - assert (bits_per_chunk <= BITS_PER_TYPE); - assert (bits_per_chunk > 0); - - set_relative_rate (bits_per_chunk/(1.0 * BITS_PER_TYPE)); -} - -void -gr_unpacked_to_packed_ss::forecast(int noutput_items, gr_vector_int &ninput_items_required) -{ - int input_required = (int) ceil( (d_index+noutput_items * 1.0 * BITS_PER_TYPE)/d_bits_per_chunk); - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - -unsigned int -get_bit_be1 (const short *in_vector,unsigned int bit_addr, unsigned int bits_per_chunk) { - unsigned int byte_addr = (int)bit_addr/bits_per_chunk; - short x = in_vector[byte_addr]; - unsigned int residue = bit_addr - byte_addr * bits_per_chunk; - //printf("Bit addr %d byte addr %d residue %d val %d\n",bit_addr,byte_addr,residue,(x>>(bits_per_chunk-1-residue))&1); - return (x >> (bits_per_chunk-1-residue))&1; -} - -int -gr_unpacked_to_packed_ss::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned int index_tmp = d_index; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0; m< nstreams; m++) { - const short *in = (short *) input_items[m]; - short *out = (short *) output_items[m]; - index_tmp=d_index; - - // per stream processing - - //assert((ninput_items[m]-d_index)*d_bits_per_chunk >= noutput_items*BITS_PER_TYPE); - - switch(d_endianness){ - - case GR_MSB_FIRST: - for(int i=0;i>1)| (get_bit_be1(in,index_tmp,d_bits_per_chunk)<<(BITS_PER_TYPE-1)); - index_tmp++; - } - out[i] = tmp; - } - break; - - default: - assert(0); - } - } - - d_index = index_tmp; - consume_each ((int)(d_index/d_bits_per_chunk)); - d_index = d_index%d_bits_per_chunk; - - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ss.h b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ss.h deleted file mode 100644 index 797ef714..00000000 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ss.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 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: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_UNPACKED_TO_PACKED_SS_H -#define INCLUDED_GR_UNPACKED_TO_PACKED_SS_H - -#include -#include - -class gr_unpacked_to_packed_ss; -typedef boost::shared_ptr gr_unpacked_to_packed_ss_sptr; - -gr_unpacked_to_packed_ss_sptr -gr_make_unpacked_to_packed_ss (unsigned int bits_per_chunk, gr_endianness_t endianness); - -/*! - * \brief Convert a stream of unpacked bytes or shorts into a stream of packed bytes or shorts. - * \ingroup converter_blk - * - * input: stream of short; output: stream of short - * - * This is the inverse of gr_packed_to_unpacked_XX. - * - * The low \p bits_per_chunk bits are extracted from each input byte or short. - * These bits are then packed densely into the output bytes or shorts, such that - * all 8 or 16 bits of the output bytes or shorts are filled with valid input bits. - * The right thing is done if bits_per_chunk is not a power of two. - * - * The combination of gr_packed_to_unpacked_XX followed by - * gr_chunks_to_symbols_Xf or gr_chunks_to_symbols_Xc handles the - * general case of mapping from a stream of bytes or shorts into arbitrary float - * or complex symbols. - * - * \sa gr_packed_to_unpacked_bb, gr_unpacked_to_packed_bb, - * \sa gr_packed_to_unpacked_ss, gr_unpacked_to_packed_ss, - * \sa gr_chunks_to_symbols_bf, gr_chunks_to_symbols_bc. - * \sa gr_chunks_to_symbols_sf, gr_chunks_to_symbols_sc. - */ -class gr_unpacked_to_packed_ss : public gr_block -{ - friend gr_unpacked_to_packed_ss_sptr - gr_make_unpacked_to_packed_ss (unsigned int bits_per_chunk, gr_endianness_t endianness); - - gr_unpacked_to_packed_ss (unsigned int bits_per_chunk, gr_endianness_t endianness); - - unsigned int d_bits_per_chunk; - gr_endianness_t d_endianness; - unsigned int d_index; - - public: - void forecast(int noutput_items, gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - bool check_topology(int ninputs, int noutputs) { return ninputs == noutputs; } -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ss.i b/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ss.i deleted file mode 100644 index bf3b211b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_unpacked_to_packed_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,unpacked_to_packed_ss); - -gr_unpacked_to_packed_ss_sptr -gr_make_unpacked_to_packed_ss (unsigned int bits_per_chunk, gr_endianness_t endianness); - -class gr_unpacked_to_packed_ss : public gr_block -{ - gr_unpacked_to_packed_ss (unsigned int bits_per_chunk, gr_endianness_t endianness); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_b.cc b/gnuradio-core/src/lib/gengen/gr_vector_sink_b.cc deleted file mode 100644 index 8c53b57d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_b.cc +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - - -gr_vector_sink_b::gr_vector_sink_b (int vlen) - : gr_sync_block ("vector_sink_b", - gr_make_io_signature (1, 1, sizeof (unsigned char) * vlen), - gr_make_io_signature (0, 0, 0)), - d_vlen(vlen) -{ -} - -int -gr_vector_sink_b::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned char *iptr = (unsigned char *) input_items[0]; - for (int i = 0; i < noutput_items * d_vlen; i++) - d_data.push_back (iptr[i]); - - return noutput_items; -} - - -gr_vector_sink_b_sptr -gr_make_vector_sink_b (int vlen) -{ - return gr_vector_sink_b_sptr (new gr_vector_sink_b (vlen)); -} - -std::vector -gr_vector_sink_b::data () const -{ - return d_data; -} diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_b.h b/gnuradio-core/src/lib/gengen/gr_vector_sink_b.h deleted file mode 100644 index f989a5da..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_b.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_VECTOR_SINK_B_H -#define INCLUDED_GR_VECTOR_SINK_B_H - -#include - -class gr_vector_sink_b; -typedef boost::shared_ptr gr_vector_sink_b_sptr; - -gr_vector_sink_b_sptr -gr_make_vector_sink_b (int vlen = 1); - - -/*! - * \brief unsigned char sink that writes to a vector - * \ingroup sink_blk - */ - -class gr_vector_sink_b : public gr_sync_block { - friend gr_vector_sink_b_sptr gr_make_vector_sink_b (int vlen); - std::vector d_data; - int d_vlen; - gr_vector_sink_b (int vlen); - - public: - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - void clear() {d_data.clear();} - std::vector data () const; -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_b.i b/gnuradio-core/src/lib/gengen/gr_vector_sink_b.i deleted file mode 100644 index 56de8f61..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_b.i +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - - -GR_SWIG_BLOCK_MAGIC(gr,vector_sink_b); - -gr_vector_sink_b_sptr gr_make_vector_sink_b (int vlen = 1); - -class gr_vector_sink_b : public gr_sync_block { - private: - gr_vector_sink_b (int vlen); - - public: - void clear() {d_data.clear();} - std::vector data () const; -}; - diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_c.cc b/gnuradio-core/src/lib/gengen/gr_vector_sink_c.cc deleted file mode 100644 index 7c99c18b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_c.cc +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - - -gr_vector_sink_c::gr_vector_sink_c (int vlen) - : gr_sync_block ("vector_sink_c", - gr_make_io_signature (1, 1, sizeof (gr_complex) * vlen), - gr_make_io_signature (0, 0, 0)), - d_vlen(vlen) -{ -} - -int -gr_vector_sink_c::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *iptr = (gr_complex *) input_items[0]; - for (int i = 0; i < noutput_items * d_vlen; i++) - d_data.push_back (iptr[i]); - - return noutput_items; -} - - -gr_vector_sink_c_sptr -gr_make_vector_sink_c (int vlen) -{ - return gr_vector_sink_c_sptr (new gr_vector_sink_c (vlen)); -} - -std::vector -gr_vector_sink_c::data () const -{ - return d_data; -} diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_c.h b/gnuradio-core/src/lib/gengen/gr_vector_sink_c.h deleted file mode 100644 index e1aae569..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_c.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_VECTOR_SINK_C_H -#define INCLUDED_GR_VECTOR_SINK_C_H - -#include - -class gr_vector_sink_c; -typedef boost::shared_ptr gr_vector_sink_c_sptr; - -gr_vector_sink_c_sptr -gr_make_vector_sink_c (int vlen = 1); - - -/*! - * \brief gr_complex sink that writes to a vector - * \ingroup sink_blk - */ - -class gr_vector_sink_c : public gr_sync_block { - friend gr_vector_sink_c_sptr gr_make_vector_sink_c (int vlen); - std::vector d_data; - int d_vlen; - gr_vector_sink_c (int vlen); - - public: - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - void clear() {d_data.clear();} - std::vector data () const; -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_c.i b/gnuradio-core/src/lib/gengen/gr_vector_sink_c.i deleted file mode 100644 index c7bf5c29..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_c.i +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - - -GR_SWIG_BLOCK_MAGIC(gr,vector_sink_c); - -gr_vector_sink_c_sptr gr_make_vector_sink_c (int vlen = 1); - -class gr_vector_sink_c : public gr_sync_block { - private: - gr_vector_sink_c (int vlen); - - public: - void clear() {d_data.clear();} - std::vector data () const; -}; - diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_f.cc b/gnuradio-core/src/lib/gengen/gr_vector_sink_f.cc deleted file mode 100644 index c27bb992..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_f.cc +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - - -gr_vector_sink_f::gr_vector_sink_f (int vlen) - : gr_sync_block ("vector_sink_f", - gr_make_io_signature (1, 1, sizeof (float) * vlen), - gr_make_io_signature (0, 0, 0)), - d_vlen(vlen) -{ -} - -int -gr_vector_sink_f::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *iptr = (float *) input_items[0]; - for (int i = 0; i < noutput_items * d_vlen; i++) - d_data.push_back (iptr[i]); - - return noutput_items; -} - - -gr_vector_sink_f_sptr -gr_make_vector_sink_f (int vlen) -{ - return gr_vector_sink_f_sptr (new gr_vector_sink_f (vlen)); -} - -std::vector -gr_vector_sink_f::data () const -{ - return d_data; -} diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_f.h b/gnuradio-core/src/lib/gengen/gr_vector_sink_f.h deleted file mode 100644 index 66885ee0..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_f.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_VECTOR_SINK_F_H -#define INCLUDED_GR_VECTOR_SINK_F_H - -#include - -class gr_vector_sink_f; -typedef boost::shared_ptr gr_vector_sink_f_sptr; - -gr_vector_sink_f_sptr -gr_make_vector_sink_f (int vlen = 1); - - -/*! - * \brief float sink that writes to a vector - * \ingroup sink_blk - */ - -class gr_vector_sink_f : public gr_sync_block { - friend gr_vector_sink_f_sptr gr_make_vector_sink_f (int vlen); - std::vector d_data; - int d_vlen; - gr_vector_sink_f (int vlen); - - public: - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - void clear() {d_data.clear();} - std::vector data () const; -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_f.i b/gnuradio-core/src/lib/gengen/gr_vector_sink_f.i deleted file mode 100644 index dd868e4f..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_f.i +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - - -GR_SWIG_BLOCK_MAGIC(gr,vector_sink_f); - -gr_vector_sink_f_sptr gr_make_vector_sink_f (int vlen = 1); - -class gr_vector_sink_f : public gr_sync_block { - private: - gr_vector_sink_f (int vlen); - - public: - void clear() {d_data.clear();} - std::vector data () const; -}; - diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_i.cc b/gnuradio-core/src/lib/gengen/gr_vector_sink_i.cc deleted file mode 100644 index 731bc2f4..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_i.cc +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - - -gr_vector_sink_i::gr_vector_sink_i (int vlen) - : gr_sync_block ("vector_sink_i", - gr_make_io_signature (1, 1, sizeof (int) * vlen), - gr_make_io_signature (0, 0, 0)), - d_vlen(vlen) -{ -} - -int -gr_vector_sink_i::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *iptr = (int *) input_items[0]; - for (int i = 0; i < noutput_items * d_vlen; i++) - d_data.push_back (iptr[i]); - - return noutput_items; -} - - -gr_vector_sink_i_sptr -gr_make_vector_sink_i (int vlen) -{ - return gr_vector_sink_i_sptr (new gr_vector_sink_i (vlen)); -} - -std::vector -gr_vector_sink_i::data () const -{ - return d_data; -} diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_i.h b/gnuradio-core/src/lib/gengen/gr_vector_sink_i.h deleted file mode 100644 index ec6156cb..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_i.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_VECTOR_SINK_I_H -#define INCLUDED_GR_VECTOR_SINK_I_H - -#include - -class gr_vector_sink_i; -typedef boost::shared_ptr gr_vector_sink_i_sptr; - -gr_vector_sink_i_sptr -gr_make_vector_sink_i (int vlen = 1); - - -/*! - * \brief int sink that writes to a vector - * \ingroup sink_blk - */ - -class gr_vector_sink_i : public gr_sync_block { - friend gr_vector_sink_i_sptr gr_make_vector_sink_i (int vlen); - std::vector d_data; - int d_vlen; - gr_vector_sink_i (int vlen); - - public: - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - void clear() {d_data.clear();} - std::vector data () const; -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_i.i b/gnuradio-core/src/lib/gengen/gr_vector_sink_i.i deleted file mode 100644 index 24de561c..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_i.i +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - - -GR_SWIG_BLOCK_MAGIC(gr,vector_sink_i); - -gr_vector_sink_i_sptr gr_make_vector_sink_i (int vlen = 1); - -class gr_vector_sink_i : public gr_sync_block { - private: - gr_vector_sink_i (int vlen); - - public: - void clear() {d_data.clear();} - std::vector data () const; -}; - diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_s.cc b/gnuradio-core/src/lib/gengen/gr_vector_sink_s.cc deleted file mode 100644 index b5c6a5cf..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_s.cc +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include - - -gr_vector_sink_s::gr_vector_sink_s (int vlen) - : gr_sync_block ("vector_sink_s", - gr_make_io_signature (1, 1, sizeof (short) * vlen), - gr_make_io_signature (0, 0, 0)), - d_vlen(vlen) -{ -} - -int -gr_vector_sink_s::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *iptr = (short *) input_items[0]; - for (int i = 0; i < noutput_items * d_vlen; i++) - d_data.push_back (iptr[i]); - - return noutput_items; -} - - -gr_vector_sink_s_sptr -gr_make_vector_sink_s (int vlen) -{ - return gr_vector_sink_s_sptr (new gr_vector_sink_s (vlen)); -} - -std::vector -gr_vector_sink_s::data () const -{ - return d_data; -} diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_s.h b/gnuradio-core/src/lib/gengen/gr_vector_sink_s.h deleted file mode 100644 index 5b2168c8..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_s.h +++ /dev/null @@ -1,57 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_VECTOR_SINK_S_H -#define INCLUDED_GR_VECTOR_SINK_S_H - -#include - -class gr_vector_sink_s; -typedef boost::shared_ptr gr_vector_sink_s_sptr; - -gr_vector_sink_s_sptr -gr_make_vector_sink_s (int vlen = 1); - - -/*! - * \brief short sink that writes to a vector - * \ingroup sink_blk - */ - -class gr_vector_sink_s : public gr_sync_block { - friend gr_vector_sink_s_sptr gr_make_vector_sink_s (int vlen); - std::vector d_data; - int d_vlen; - gr_vector_sink_s (int vlen); - - public: - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - void clear() {d_data.clear();} - std::vector data () const; -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_s.i b/gnuradio-core/src/lib/gengen/gr_vector_sink_s.i deleted file mode 100644 index c301245b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_s.i +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - - -GR_SWIG_BLOCK_MAGIC(gr,vector_sink_s); - -gr_vector_sink_s_sptr gr_make_vector_sink_s (int vlen = 1); - -class gr_vector_sink_s : public gr_sync_block { - private: - gr_vector_sink_s (int vlen); - - public: - void clear() {d_data.clear();} - std::vector data () const; -}; - diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_b.cc b/gnuradio-core/src/lib/gengen/gr_vector_source_b.cc deleted file mode 100644 index 3cff2fd5..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_b.cc +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - - -gr_vector_source_b::gr_vector_source_b (const std::vector &data, bool repeat, int vlen) - : gr_sync_block ("vector_source_b", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (unsigned char) * vlen)), - d_data (data), - d_repeat (repeat), - d_offset (0), - d_vlen (vlen) -{ - if ((data.size() % vlen) != 0) - throw std::invalid_argument("data length must be a multiple of vlen"); -} - -int -gr_vector_source_b::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned char *optr = (unsigned char *) output_items[0]; - - if (d_repeat){ - unsigned int size = d_data.size (); - unsigned int offset = d_offset; - - if (size == 0) - return -1; - - for (int i = 0; i < noutput_items*d_vlen; i++){ - optr[i] = d_data[offset++]; - if (offset >= size) - offset = 0; - } - d_offset = offset; - return noutput_items; - } - - else { - if (d_offset >= d_data.size ()) - return -1; // Done! - - unsigned n = std::min ((unsigned) d_data.size () - d_offset, - (unsigned) noutput_items*d_vlen); - for (unsigned i = 0; i < n; i++) - optr[i] = d_data[d_offset + i]; - - d_offset += n; - return n/d_vlen; - } -} - -gr_vector_source_b_sptr -gr_make_vector_source_b (const std::vector &data, bool repeat, int vlen) -{ - return gr_vector_source_b_sptr (new gr_vector_source_b (data, repeat, vlen)); -} - diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_b.h b/gnuradio-core/src/lib/gengen/gr_vector_source_b.h deleted file mode 100644 index d1544b77..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_b.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_VECTOR_SOURCE_B_H -#define INCLUDED_GR_VECTOR_SOURCE_B_H - -#include - -class gr_vector_source_b; -typedef boost::shared_ptr gr_vector_source_b_sptr; - -/*! - * \brief source of unsigned char's that gets its data from a vector - * \ingroup source_blk - */ - -class gr_vector_source_b : public gr_sync_block { - friend gr_vector_source_b_sptr - gr_make_vector_source_b (const std::vector &data, bool repeat, int vlen); - - std::vector d_data; - bool d_repeat; - unsigned int d_offset; - int d_vlen; - - gr_vector_source_b (const std::vector &data, bool repeat, int vlen); - - public: - void rewind() {d_offset=0;} - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -gr_vector_source_b_sptr -gr_make_vector_source_b (const std::vector &data, bool repeat = false, int vlen = 1); - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_b.i b/gnuradio-core/src/lib/gengen/gr_vector_source_b.i deleted file mode 100644 index f794917b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_b.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,vector_source_b); - -gr_vector_source_b_sptr -gr_make_vector_source_b (const std::vector &data, bool repeat = false, int vlen = 1) - throw(std::invalid_argument); - -class gr_vector_source_b : public gr_sync_block { - public: - void rewind() {d_offset=0;} - private: - gr_vector_source_b (const std::vector &data, int vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_c.cc b/gnuradio-core/src/lib/gengen/gr_vector_source_c.cc deleted file mode 100644 index 5eb12d7d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_c.cc +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - - -gr_vector_source_c::gr_vector_source_c (const std::vector &data, bool repeat, int vlen) - : gr_sync_block ("vector_source_c", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (gr_complex) * vlen)), - d_data (data), - d_repeat (repeat), - d_offset (0), - d_vlen (vlen) -{ - if ((data.size() % vlen) != 0) - throw std::invalid_argument("data length must be a multiple of vlen"); -} - -int -gr_vector_source_c::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - gr_complex *optr = (gr_complex *) output_items[0]; - - if (d_repeat){ - unsigned int size = d_data.size (); - unsigned int offset = d_offset; - - if (size == 0) - return -1; - - for (int i = 0; i < noutput_items*d_vlen; i++){ - optr[i] = d_data[offset++]; - if (offset >= size) - offset = 0; - } - d_offset = offset; - return noutput_items; - } - - else { - if (d_offset >= d_data.size ()) - return -1; // Done! - - unsigned n = std::min ((unsigned) d_data.size () - d_offset, - (unsigned) noutput_items*d_vlen); - for (unsigned i = 0; i < n; i++) - optr[i] = d_data[d_offset + i]; - - d_offset += n; - return n/d_vlen; - } -} - -gr_vector_source_c_sptr -gr_make_vector_source_c (const std::vector &data, bool repeat, int vlen) -{ - return gr_vector_source_c_sptr (new gr_vector_source_c (data, repeat, vlen)); -} - diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_c.h b/gnuradio-core/src/lib/gengen/gr_vector_source_c.h deleted file mode 100644 index 6911433e..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_c.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_VECTOR_SOURCE_C_H -#define INCLUDED_GR_VECTOR_SOURCE_C_H - -#include - -class gr_vector_source_c; -typedef boost::shared_ptr gr_vector_source_c_sptr; - -/*! - * \brief source of gr_complex's that gets its data from a vector - * \ingroup source_blk - */ - -class gr_vector_source_c : public gr_sync_block { - friend gr_vector_source_c_sptr - gr_make_vector_source_c (const std::vector &data, bool repeat, int vlen); - - std::vector d_data; - bool d_repeat; - unsigned int d_offset; - int d_vlen; - - gr_vector_source_c (const std::vector &data, bool repeat, int vlen); - - public: - void rewind() {d_offset=0;} - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -gr_vector_source_c_sptr -gr_make_vector_source_c (const std::vector &data, bool repeat = false, int vlen = 1); - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_c.i b/gnuradio-core/src/lib/gengen/gr_vector_source_c.i deleted file mode 100644 index 7fa5f192..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_c.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,vector_source_c); - -gr_vector_source_c_sptr -gr_make_vector_source_c (const std::vector &data, bool repeat = false, int vlen = 1) - throw(std::invalid_argument); - -class gr_vector_source_c : public gr_sync_block { - public: - void rewind() {d_offset=0;} - private: - gr_vector_source_c (const std::vector &data, int vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_f.cc b/gnuradio-core/src/lib/gengen/gr_vector_source_f.cc deleted file mode 100644 index c5d5e257..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_f.cc +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - - -gr_vector_source_f::gr_vector_source_f (const std::vector &data, bool repeat, int vlen) - : gr_sync_block ("vector_source_f", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (float) * vlen)), - d_data (data), - d_repeat (repeat), - d_offset (0), - d_vlen (vlen) -{ - if ((data.size() % vlen) != 0) - throw std::invalid_argument("data length must be a multiple of vlen"); -} - -int -gr_vector_source_f::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - float *optr = (float *) output_items[0]; - - if (d_repeat){ - unsigned int size = d_data.size (); - unsigned int offset = d_offset; - - if (size == 0) - return -1; - - for (int i = 0; i < noutput_items*d_vlen; i++){ - optr[i] = d_data[offset++]; - if (offset >= size) - offset = 0; - } - d_offset = offset; - return noutput_items; - } - - else { - if (d_offset >= d_data.size ()) - return -1; // Done! - - unsigned n = std::min ((unsigned) d_data.size () - d_offset, - (unsigned) noutput_items*d_vlen); - for (unsigned i = 0; i < n; i++) - optr[i] = d_data[d_offset + i]; - - d_offset += n; - return n/d_vlen; - } -} - -gr_vector_source_f_sptr -gr_make_vector_source_f (const std::vector &data, bool repeat, int vlen) -{ - return gr_vector_source_f_sptr (new gr_vector_source_f (data, repeat, vlen)); -} - diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_f.h b/gnuradio-core/src/lib/gengen/gr_vector_source_f.h deleted file mode 100644 index 206ff4f3..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_f.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_VECTOR_SOURCE_F_H -#define INCLUDED_GR_VECTOR_SOURCE_F_H - -#include - -class gr_vector_source_f; -typedef boost::shared_ptr gr_vector_source_f_sptr; - -/*! - * \brief source of float's that gets its data from a vector - * \ingroup source_blk - */ - -class gr_vector_source_f : public gr_sync_block { - friend gr_vector_source_f_sptr - gr_make_vector_source_f (const std::vector &data, bool repeat, int vlen); - - std::vector d_data; - bool d_repeat; - unsigned int d_offset; - int d_vlen; - - gr_vector_source_f (const std::vector &data, bool repeat, int vlen); - - public: - void rewind() {d_offset=0;} - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -gr_vector_source_f_sptr -gr_make_vector_source_f (const std::vector &data, bool repeat = false, int vlen = 1); - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_f.i b/gnuradio-core/src/lib/gengen/gr_vector_source_f.i deleted file mode 100644 index b0ec77a5..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_f.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,vector_source_f); - -gr_vector_source_f_sptr -gr_make_vector_source_f (const std::vector &data, bool repeat = false, int vlen = 1) - throw(std::invalid_argument); - -class gr_vector_source_f : public gr_sync_block { - public: - void rewind() {d_offset=0;} - private: - gr_vector_source_f (const std::vector &data, int vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_i.cc b/gnuradio-core/src/lib/gengen/gr_vector_source_i.cc deleted file mode 100644 index 3b889522..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_i.cc +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - - -gr_vector_source_i::gr_vector_source_i (const std::vector &data, bool repeat, int vlen) - : gr_sync_block ("vector_source_i", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (int) * vlen)), - d_data (data), - d_repeat (repeat), - d_offset (0), - d_vlen (vlen) -{ - if ((data.size() % vlen) != 0) - throw std::invalid_argument("data length must be a multiple of vlen"); -} - -int -gr_vector_source_i::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - - if (d_repeat){ - unsigned int size = d_data.size (); - unsigned int offset = d_offset; - - if (size == 0) - return -1; - - for (int i = 0; i < noutput_items*d_vlen; i++){ - optr[i] = d_data[offset++]; - if (offset >= size) - offset = 0; - } - d_offset = offset; - return noutput_items; - } - - else { - if (d_offset >= d_data.size ()) - return -1; // Done! - - unsigned n = std::min ((unsigned) d_data.size () - d_offset, - (unsigned) noutput_items*d_vlen); - for (unsigned i = 0; i < n; i++) - optr[i] = d_data[d_offset + i]; - - d_offset += n; - return n/d_vlen; - } -} - -gr_vector_source_i_sptr -gr_make_vector_source_i (const std::vector &data, bool repeat, int vlen) -{ - return gr_vector_source_i_sptr (new gr_vector_source_i (data, repeat, vlen)); -} - diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_i.h b/gnuradio-core/src/lib/gengen/gr_vector_source_i.h deleted file mode 100644 index bde52321..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_i.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_VECTOR_SOURCE_I_H -#define INCLUDED_GR_VECTOR_SOURCE_I_H - -#include - -class gr_vector_source_i; -typedef boost::shared_ptr gr_vector_source_i_sptr; - -/*! - * \brief source of int's that gets its data from a vector - * \ingroup source_blk - */ - -class gr_vector_source_i : public gr_sync_block { - friend gr_vector_source_i_sptr - gr_make_vector_source_i (const std::vector &data, bool repeat, int vlen); - - std::vector d_data; - bool d_repeat; - unsigned int d_offset; - int d_vlen; - - gr_vector_source_i (const std::vector &data, bool repeat, int vlen); - - public: - void rewind() {d_offset=0;} - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -gr_vector_source_i_sptr -gr_make_vector_source_i (const std::vector &data, bool repeat = false, int vlen = 1); - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_i.i b/gnuradio-core/src/lib/gengen/gr_vector_source_i.i deleted file mode 100644 index bcd06741..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_i.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,vector_source_i); - -gr_vector_source_i_sptr -gr_make_vector_source_i (const std::vector &data, bool repeat = false, int vlen = 1) - throw(std::invalid_argument); - -class gr_vector_source_i : public gr_sync_block { - public: - void rewind() {d_offset=0;} - private: - gr_vector_source_i (const std::vector &data, int vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_s.cc b/gnuradio-core/src/lib/gengen/gr_vector_source_s.cc deleted file mode 100644 index f38189c1..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_s.cc +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include -#endif -#include -#include -#include -#include - - -gr_vector_source_s::gr_vector_source_s (const std::vector &data, bool repeat, int vlen) - : gr_sync_block ("vector_source_s", - gr_make_io_signature (0, 0, 0), - gr_make_io_signature (1, 1, sizeof (short) * vlen)), - d_data (data), - d_repeat (repeat), - d_offset (0), - d_vlen (vlen) -{ - if ((data.size() % vlen) != 0) - throw std::invalid_argument("data length must be a multiple of vlen"); -} - -int -gr_vector_source_s::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - - if (d_repeat){ - unsigned int size = d_data.size (); - unsigned int offset = d_offset; - - if (size == 0) - return -1; - - for (int i = 0; i < noutput_items*d_vlen; i++){ - optr[i] = d_data[offset++]; - if (offset >= size) - offset = 0; - } - d_offset = offset; - return noutput_items; - } - - else { - if (d_offset >= d_data.size ()) - return -1; // Done! - - unsigned n = std::min ((unsigned) d_data.size () - d_offset, - (unsigned) noutput_items*d_vlen); - for (unsigned i = 0; i < n; i++) - optr[i] = d_data[d_offset + i]; - - d_offset += n; - return n/d_vlen; - } -} - -gr_vector_source_s_sptr -gr_make_vector_source_s (const std::vector &data, bool repeat, int vlen) -{ - return gr_vector_source_s_sptr (new gr_vector_source_s (data, repeat, vlen)); -} - diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_s.h b/gnuradio-core/src/lib/gengen/gr_vector_source_s.h deleted file mode 100644 index 5db181f7..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_s.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_VECTOR_SOURCE_S_H -#define INCLUDED_GR_VECTOR_SOURCE_S_H - -#include - -class gr_vector_source_s; -typedef boost::shared_ptr gr_vector_source_s_sptr; - -/*! - * \brief source of short's that gets its data from a vector - * \ingroup source_blk - */ - -class gr_vector_source_s : public gr_sync_block { - friend gr_vector_source_s_sptr - gr_make_vector_source_s (const std::vector &data, bool repeat, int vlen); - - std::vector d_data; - bool d_repeat; - unsigned int d_offset; - int d_vlen; - - gr_vector_source_s (const std::vector &data, bool repeat, int vlen); - - public: - void rewind() {d_offset=0;} - virtual int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -gr_vector_source_s_sptr -gr_make_vector_source_s (const std::vector &data, bool repeat = false, int vlen = 1); - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_s.i b/gnuradio-core/src/lib/gengen/gr_vector_source_s.i deleted file mode 100644 index 415825e4..00000000 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_s.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,vector_source_s); - -gr_vector_source_s_sptr -gr_make_vector_source_s (const std::vector &data, bool repeat = false, int vlen = 1) - throw(std::invalid_argument); - -class gr_vector_source_s : public gr_sync_block { - public: - void rewind() {d_offset=0;} - private: - gr_vector_source_s (const std::vector &data, int vlen); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_xor_bb.cc b/gnuradio-core/src/lib/gengen/gr_xor_bb.cc deleted file mode 100644 index 8d2e1c1d..00000000 --- a/gnuradio-core/src/lib/gengen/gr_xor_bb.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_xor_bb_sptr -gr_make_xor_bb () -{ - return gr_xor_bb_sptr (new gr_xor_bb ()); -} - -gr_xor_bb::gr_xor_bb () - : gr_sync_block ("xor_bb", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, 1, sizeof (unsigned char))) -{ -} - -int -gr_xor_bb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - unsigned char *optr = (unsigned char *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items; i++) { - unsigned char acc = ((unsigned char *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc = acc ^ ((unsigned char *) input_items[j])[i]; - - *optr++ = (unsigned char) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_xor_bb.h b/gnuradio-core/src/lib/gengen/gr_xor_bb.h deleted file mode 100644 index b4600a29..00000000 --- a/gnuradio-core/src/lib/gengen/gr_xor_bb.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_XOR_BB_H -#define INCLUDED_GR_XOR_BB_H - -#include - -class gr_xor_bb; -typedef boost::shared_ptr gr_xor_bb_sptr; - -gr_xor_bb_sptr gr_make_xor_bb (); - -/*! - * \brief output = input_0 ^ input_1 ^ , ... ^ input_N) - * \ingroup math_blk - * - * bitwise boolean xor across all input streams. - */ -class gr_xor_bb : public gr_sync_block -{ - friend gr_xor_bb_sptr gr_make_xor_bb (); - - gr_xor_bb (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_xor_bb.i b/gnuradio-core/src/lib/gengen/gr_xor_bb.i deleted file mode 100644 index 23942070..00000000 --- a/gnuradio-core/src/lib/gengen/gr_xor_bb.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,xor_bb) - -gr_xor_bb_sptr gr_make_xor_bb (); - -class gr_xor_bb : public gr_sync_block -{ - private: - gr_xor_bb (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_xor_ii.cc b/gnuradio-core/src/lib/gengen/gr_xor_ii.cc deleted file mode 100644 index 8cc8000b..00000000 --- a/gnuradio-core/src/lib/gengen/gr_xor_ii.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_xor_ii_sptr -gr_make_xor_ii () -{ - return gr_xor_ii_sptr (new gr_xor_ii ()); -} - -gr_xor_ii::gr_xor_ii () - : gr_sync_block ("xor_ii", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, 1, sizeof (int))) -{ -} - -int -gr_xor_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int *optr = (int *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items; i++) { - int acc = ((int *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc = acc ^ ((int *) input_items[j])[i]; - - *optr++ = (int) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_xor_ii.h b/gnuradio-core/src/lib/gengen/gr_xor_ii.h deleted file mode 100644 index 2444d940..00000000 --- a/gnuradio-core/src/lib/gengen/gr_xor_ii.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_XOR_II_H -#define INCLUDED_GR_XOR_II_H - -#include - -class gr_xor_ii; -typedef boost::shared_ptr gr_xor_ii_sptr; - -gr_xor_ii_sptr gr_make_xor_ii (); - -/*! - * \brief output = input_0 ^ input_1 ^ , ... ^ input_N) - * \ingroup math_blk - * - * bitwise boolean xor across all input streams. - */ -class gr_xor_ii : public gr_sync_block -{ - friend gr_xor_ii_sptr gr_make_xor_ii (); - - gr_xor_ii (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_xor_ii.i b/gnuradio-core/src/lib/gengen/gr_xor_ii.i deleted file mode 100644 index 22f234f9..00000000 --- a/gnuradio-core/src/lib/gengen/gr_xor_ii.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,xor_ii) - -gr_xor_ii_sptr gr_make_xor_ii (); - -class gr_xor_ii : public gr_sync_block -{ - private: - gr_xor_ii (); -}; diff --git a/gnuradio-core/src/lib/gengen/gr_xor_ss.cc b/gnuradio-core/src/lib/gengen/gr_xor_ss.cc deleted file mode 100644 index dc366f55..00000000 --- a/gnuradio-core/src/lib/gengen/gr_xor_ss.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -gr_xor_ss_sptr -gr_make_xor_ss () -{ - return gr_xor_ss_sptr (new gr_xor_ss ()); -} - -gr_xor_ss::gr_xor_ss () - : gr_sync_block ("xor_ss", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, 1, sizeof (short))) -{ -} - -int -gr_xor_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - short *optr = (short *) output_items[0]; - - int ninputs = input_items.size (); - - for (int i = 0; i < noutput_items; i++) { - short acc = ((short *) input_items[0])[i]; - for (int j = 1; j < ninputs; j++) - acc = acc ^ ((short *) input_items[j])[i]; - - *optr++ = (short) acc; - } - return noutput_items; -} diff --git a/gnuradio-core/src/lib/gengen/gr_xor_ss.h b/gnuradio-core/src/lib/gengen/gr_xor_ss.h deleted file mode 100644 index e7bb4403..00000000 --- a/gnuradio-core/src/lib/gengen/gr_xor_ss.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef INCLUDED_GR_XOR_SS_H -#define INCLUDED_GR_XOR_SS_H - -#include - -class gr_xor_ss; -typedef boost::shared_ptr gr_xor_ss_sptr; - -gr_xor_ss_sptr gr_make_xor_ss (); - -/*! - * \brief output = input_0 ^ input_1 ^ , ... ^ input_N) - * \ingroup math_blk - * - * bitwise boolean xor across all input streams. - */ -class gr_xor_ss : public gr_sync_block -{ - friend gr_xor_ss_sptr gr_make_xor_ss (); - - gr_xor_ss (); - - public: - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gnuradio-core/src/lib/gengen/gr_xor_ss.i b/gnuradio-core/src/lib/gengen/gr_xor_ss.i deleted file mode 100644 index 95d6b7d1..00000000 --- a/gnuradio-core/src/lib/gengen/gr_xor_ss.i +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(gr,xor_ss) - -gr_xor_ss_sptr gr_make_xor_ss (); - -class gr_xor_ss : public gr_sync_block -{ - private: - gr_xor_ss (); -}; diff --git a/gnuradio-core/src/lib/gengen/stamp-sources-generate b/gnuradio-core/src/lib/gengen/stamp-sources-generate deleted file mode 100644 index e69de29b..00000000 diff --git a/gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h b/gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h deleted file mode 100644 index 8f7eea0b..00000000 --- a/gnuradio-core/src/lib/swig/gnuradio_swig_bug_workaround.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- 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 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_GNURADIO_SWIG_BUG_WORKAROUND_H -#define INCLUDED_GNURADIO_SWIG_BUG_WORKAROUND_H - -/* - * This include files works around a bug in SWIG 1.3.21 and 22 - * where it fails to emit these declarations when doing - * %import "gnuradio.i" - */ - -class gr_base_error_handler; -class gr_basic_block; -class gr_block; -class gr_error_handler; -class gr_file_error_handler; -class gr_hier_block2; -class gr_msg_handler; -class gr_msg_queue; -class gr_sync_block; -class gr_sync_decimator; -class gr_sync_interpolator; -class gr_top_block; - -#endif /* INCLUDED_GNURADIO_SWIG_BUG_WORKAROUND_H */ diff --git a/gr-qtgui/src/lib/ConstellationDisplayPlot_moc.cc b/gr-qtgui/src/lib/ConstellationDisplayPlot_moc.cc deleted file mode 100644 index ce1be097..00000000 --- a/gr-qtgui/src/lib/ConstellationDisplayPlot_moc.cc +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'ConstellationDisplayPlot.h' -** -** Created: Tue Jul 14 15:57:22 2009 -** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "ConstellationDisplayPlot.h" -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'ConstellationDisplayPlot.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 61 -#error "This file was generated using the moc from 4.5.0. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -static const uint qt_meta_data_ConstellationDisplayPlot[] = { - - // content: - 2, // revision - 0, // classname - 0, 0, // classinfo - 1, 12, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - - // slots: signature, parameters, type, tag, flags - 38, 26, 25, 25, 0x09, - - 0 // eod -}; - -static const char qt_meta_stringdata_ConstellationDisplayPlot[] = { - "ConstellationDisplayPlot\0\0plotItem,on\0" - "LegendEntryChecked(QwtPlotItem*,bool)\0" -}; - -const QMetaObject ConstellationDisplayPlot::staticMetaObject = { - { &QwtPlot::staticMetaObject, qt_meta_stringdata_ConstellationDisplayPlot, - qt_meta_data_ConstellationDisplayPlot, 0 } -}; - -const QMetaObject *ConstellationDisplayPlot::metaObject() const -{ - return &staticMetaObject; -} - -void *ConstellationDisplayPlot::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_ConstellationDisplayPlot)) - return static_cast(const_cast< ConstellationDisplayPlot*>(this)); - return QwtPlot::qt_metacast(_clname); -} - -int ConstellationDisplayPlot::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QwtPlot::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - if (_c == QMetaObject::InvokeMetaMethod) { - switch (_id) { - case 0: LegendEntryChecked((*reinterpret_cast< QwtPlotItem*(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break; - default: ; - } - _id -= 1; - } - return _id; -} -QT_END_MOC_NAMESPACE diff --git a/gr-qtgui/src/lib/FrequencyDisplayPlot_moc.cc b/gr-qtgui/src/lib/FrequencyDisplayPlot_moc.cc deleted file mode 100644 index 2e269846..00000000 --- a/gr-qtgui/src/lib/FrequencyDisplayPlot_moc.cc +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'FrequencyDisplayPlot.h' -** -** Created: Tue Jul 14 15:57:22 2009 -** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "FrequencyDisplayPlot.h" -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'FrequencyDisplayPlot.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 61 -#error "This file was generated using the moc from 4.5.0. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -static const uint qt_meta_data_FrequencyDisplayPlot[] = { - - // content: - 2, // revision - 0, // classname - 0, 0, // classinfo - 2, 12, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - - // slots: signature, parameters, type, tag, flags - 22, 21, 21, 21, 0x0a, - 53, 21, 21, 21, 0x0a, - - 0 // eod -}; - -static const char qt_meta_stringdata_FrequencyDisplayPlot[] = { - "FrequencyDisplayPlot\0\0" - "SetLowerIntensityLevel(double)\0" - "SetUpperIntensityLevel(double)\0" -}; - -const QMetaObject FrequencyDisplayPlot::staticMetaObject = { - { &QwtPlot::staticMetaObject, qt_meta_stringdata_FrequencyDisplayPlot, - qt_meta_data_FrequencyDisplayPlot, 0 } -}; - -const QMetaObject *FrequencyDisplayPlot::metaObject() const -{ - return &staticMetaObject; -} - -void *FrequencyDisplayPlot::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_FrequencyDisplayPlot)) - return static_cast(const_cast< FrequencyDisplayPlot*>(this)); - return QwtPlot::qt_metacast(_clname); -} - -int FrequencyDisplayPlot::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QwtPlot::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - if (_c == QMetaObject::InvokeMetaMethod) { - switch (_id) { - case 0: SetLowerIntensityLevel((*reinterpret_cast< const double(*)>(_a[1]))); break; - case 1: SetUpperIntensityLevel((*reinterpret_cast< const double(*)>(_a[1]))); break; - default: ; - } - _id -= 2; - } - return _id; -} -QT_END_MOC_NAMESPACE diff --git a/gr-qtgui/src/lib/TimeDomainDisplayPlot_moc.cc b/gr-qtgui/src/lib/TimeDomainDisplayPlot_moc.cc deleted file mode 100644 index 1ad5825c..00000000 --- a/gr-qtgui/src/lib/TimeDomainDisplayPlot_moc.cc +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'TimeDomainDisplayPlot.h' -** -** Created: Tue Jul 14 15:57:22 2009 -** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "TimeDomainDisplayPlot.h" -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'TimeDomainDisplayPlot.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 61 -#error "This file was generated using the moc from 4.5.0. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -static const uint qt_meta_data_TimeDomainDisplayPlot[] = { - - // content: - 2, // revision - 0, // classname - 0, 0, // classinfo - 1, 12, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - - // slots: signature, parameters, type, tag, flags - 35, 23, 22, 22, 0x09, - - 0 // eod -}; - -static const char qt_meta_stringdata_TimeDomainDisplayPlot[] = { - "TimeDomainDisplayPlot\0\0plotItem,on\0" - "LegendEntryChecked(QwtPlotItem*,bool)\0" -}; - -const QMetaObject TimeDomainDisplayPlot::staticMetaObject = { - { &QwtPlot::staticMetaObject, qt_meta_stringdata_TimeDomainDisplayPlot, - qt_meta_data_TimeDomainDisplayPlot, 0 } -}; - -const QMetaObject *TimeDomainDisplayPlot::metaObject() const -{ - return &staticMetaObject; -} - -void *TimeDomainDisplayPlot::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_TimeDomainDisplayPlot)) - return static_cast(const_cast< TimeDomainDisplayPlot*>(this)); - return QwtPlot::qt_metacast(_clname); -} - -int TimeDomainDisplayPlot::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QwtPlot::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - if (_c == QMetaObject::InvokeMetaMethod) { - switch (_id) { - case 0: LegendEntryChecked((*reinterpret_cast< QwtPlotItem*(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break; - default: ; - } - _id -= 1; - } - return _id; -} -QT_END_MOC_NAMESPACE diff --git a/gr-qtgui/src/lib/Waterfall3DDisplayPlot_moc.cc b/gr-qtgui/src/lib/Waterfall3DDisplayPlot_moc.cc deleted file mode 100644 index ef2c2d36..00000000 --- a/gr-qtgui/src/lib/Waterfall3DDisplayPlot_moc.cc +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'Waterfall3DDisplayPlot.h' -** -** Created: Tue Jul 14 15:57:22 2009 -** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "Waterfall3DDisplayPlot.h" -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'Waterfall3DDisplayPlot.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 61 -#error "This file was generated using the moc from 4.5.0. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -static const uint qt_meta_data_Waterfall3DDisplayPlot[] = { - - // content: - 2, // revision - 0, // classname - 0, 0, // classinfo - 2, 12, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - - // signals: signature, parameters, type, tag, flags - 24, 23, 23, 23, 0x05, - 59, 23, 23, 23, 0x05, - - 0 // eod -}; - -static const char qt_meta_stringdata_Waterfall3DDisplayPlot[] = { - "Waterfall3DDisplayPlot\0\0" - "UpdatedLowerIntensityLevel(double)\0" - "UpdatedUpperIntensityLevel(double)\0" -}; - -const QMetaObject Waterfall3DDisplayPlot::staticMetaObject = { - { &Qwt3D::SurfacePlot::staticMetaObject, qt_meta_stringdata_Waterfall3DDisplayPlot, - qt_meta_data_Waterfall3DDisplayPlot, 0 } -}; - -const QMetaObject *Waterfall3DDisplayPlot::metaObject() const -{ - return &staticMetaObject; -} - -void *Waterfall3DDisplayPlot::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_Waterfall3DDisplayPlot)) - return static_cast(const_cast< Waterfall3DDisplayPlot*>(this)); - typedef Qwt3D::SurfacePlot QMocSuperClass; - return QMocSuperClass::qt_metacast(_clname); -} - -int Waterfall3DDisplayPlot::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - typedef Qwt3D::SurfacePlot QMocSuperClass; - _id = QMocSuperClass::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - if (_c == QMetaObject::InvokeMetaMethod) { - switch (_id) { - case 0: UpdatedLowerIntensityLevel((*reinterpret_cast< const double(*)>(_a[1]))); break; - case 1: UpdatedUpperIntensityLevel((*reinterpret_cast< const double(*)>(_a[1]))); break; - default: ; - } - _id -= 2; - } - return _id; -} - -// SIGNAL 0 -void Waterfall3DDisplayPlot::UpdatedLowerIntensityLevel(const double _t1) -{ - void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; - QMetaObject::activate(this, &staticMetaObject, 0, _a); -} - -// SIGNAL 1 -void Waterfall3DDisplayPlot::UpdatedUpperIntensityLevel(const double _t1) -{ - void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; - QMetaObject::activate(this, &staticMetaObject, 1, _a); -} -QT_END_MOC_NAMESPACE diff --git a/gr-qtgui/src/lib/WaterfallDisplayPlot_moc.cc b/gr-qtgui/src/lib/WaterfallDisplayPlot_moc.cc deleted file mode 100644 index 105223e3..00000000 --- a/gr-qtgui/src/lib/WaterfallDisplayPlot_moc.cc +++ /dev/null @@ -1,91 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'WaterfallDisplayPlot.h' -** -** Created: Tue Jul 14 15:57:22 2009 -** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "WaterfallDisplayPlot.h" -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'WaterfallDisplayPlot.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 61 -#error "This file was generated using the moc from 4.5.0. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -static const uint qt_meta_data_WaterfallDisplayPlot[] = { - - // content: - 2, // revision - 0, // classname - 0, 0, // classinfo - 2, 12, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - - // signals: signature, parameters, type, tag, flags - 22, 21, 21, 21, 0x05, - 57, 21, 21, 21, 0x05, - - 0 // eod -}; - -static const char qt_meta_stringdata_WaterfallDisplayPlot[] = { - "WaterfallDisplayPlot\0\0" - "UpdatedLowerIntensityLevel(double)\0" - "UpdatedUpperIntensityLevel(double)\0" -}; - -const QMetaObject WaterfallDisplayPlot::staticMetaObject = { - { &QwtPlot::staticMetaObject, qt_meta_stringdata_WaterfallDisplayPlot, - qt_meta_data_WaterfallDisplayPlot, 0 } -}; - -const QMetaObject *WaterfallDisplayPlot::metaObject() const -{ - return &staticMetaObject; -} - -void *WaterfallDisplayPlot::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_WaterfallDisplayPlot)) - return static_cast(const_cast< WaterfallDisplayPlot*>(this)); - return QwtPlot::qt_metacast(_clname); -} - -int WaterfallDisplayPlot::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QwtPlot::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - if (_c == QMetaObject::InvokeMetaMethod) { - switch (_id) { - case 0: UpdatedLowerIntensityLevel((*reinterpret_cast< const double(*)>(_a[1]))); break; - case 1: UpdatedUpperIntensityLevel((*reinterpret_cast< const double(*)>(_a[1]))); break; - default: ; - } - _id -= 2; - } - return _id; -} - -// SIGNAL 0 -void WaterfallDisplayPlot::UpdatedLowerIntensityLevel(const double _t1) -{ - void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; - QMetaObject::activate(this, &staticMetaObject, 0, _a); -} - -// SIGNAL 1 -void WaterfallDisplayPlot::UpdatedUpperIntensityLevel(const double _t1) -{ - void *_a[] = { 0, const_cast(reinterpret_cast(&_t1)) }; - QMetaObject::activate(this, &staticMetaObject, 1, _a); -} -QT_END_MOC_NAMESPACE diff --git a/gr-qtgui/src/lib/spectrumdisplayform_moc.cc b/gr-qtgui/src/lib/spectrumdisplayform_moc.cc deleted file mode 100644 index 43e0be97..00000000 --- a/gr-qtgui/src/lib/spectrumdisplayform_moc.cc +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** -** Meta object code from reading C++ file 'spectrumdisplayform.h' -** -** Created: Tue Jul 14 15:57:22 2009 -** by: The Qt Meta Object Compiler version 61 (Qt 4.5.0) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#include "spectrumdisplayform.h" -#if !defined(Q_MOC_OUTPUT_REVISION) -#error "The header file 'spectrumdisplayform.h' doesn't include ." -#elif Q_MOC_OUTPUT_REVISION != 61 -#error "This file was generated using the moc from 4.5.0. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" -#endif - -QT_BEGIN_MOC_NAMESPACE -static const uint qt_meta_data_SpectrumDisplayForm[] = { - - // content: - 2, // revision - 0, // classname - 0, 0, // classinfo - 30, 12, // methods - 0, 0, // properties - 0, 0, // enums/sets - 0, 0, // constructors - - // slots: signature, parameters, type, tag, flags - 23, 21, 20, 20, 0x0a, - 50, 21, 20, 20, 0x0a, - 83, 71, 20, 20, 0x0a, - 125, 116, 20, 20, 0x0a, - 155, 116, 20, 20, 0x0a, - 185, 20, 20, 20, 0x0a, - 211, 20, 20, 20, 0x0a, - 237, 71, 20, 20, 0x0a, - 326, 272, 20, 20, 0x0a, - 366, 21, 20, 20, 0x0a, - 399, 391, 20, 20, 0x0a, - 432, 422, 20, 20, 0x0a, - 457, 20, 20, 20, 0x0a, - 500, 20, 20, 20, 0x0a, - 543, 20, 20, 20, 0x0a, - 583, 20, 20, 20, 0x0a, - 609, 20, 20, 20, 0x0a, - 654, 20, 20, 20, 0x0a, - 699, 20, 20, 20, 0x0a, - 741, 20, 20, 20, 0x0a, - 769, 20, 20, 20, 0x0a, - 806, 800, 20, 20, 0x0a, - 831, 800, 20, 20, 0x0a, - 856, 800, 20, 20, 0x0a, - 883, 800, 20, 20, 0x0a, - 903, 800, 20, 20, 0x0a, - 940, 932, 20, 20, 0x0a, - 993, 973, 20, 20, 0x0a, - 1043, 932, 20, 20, 0x0a, - 1075, 20, 20, 20, 0x08, - - 0 // eod -}; - -static const char qt_meta_stringdata_SpectrumDisplayForm[] = { - "SpectrumDisplayForm\0\0e\0" - "resizeEvent(QResizeEvent*)\0" - "customEvent(QEvent*)\0valueString\0" - "AvgLineEdit_textChanged(QString)\0" - "newState\0MaxHoldCheckBox_toggled(bool)\0" - "MinHoldCheckBox_toggled(bool)\0" - "MinHoldResetBtn_clicked()\0" - "MaxHoldResetBtn_clicked()\0" - "PowerLineEdit_textChanged(QString)\0" - "newCenterFrequency,newStartFrequency,newStopFrequency\0" - "SetFrequencyRange(double,double,double)\0" - "closeEvent(QCloseEvent*)\0newItem\0" - "WindowTypeChanged(int)\0useRFFlag\0" - "UseRFFrequenciesCB(bool)\0" - "waterfallMaximumIntensityChangedCB(double)\0" - "waterfallMinimumIntensityChangedCB(double)\0" - "WaterfallIntensityColorTypeChanged(int)\0" - "WaterfallAutoScaleBtnCB()\0" - "waterfall3DMaximumIntensityChangedCB(double)\0" - "waterfall3DMinimumIntensityChangedCB(double)\0" - "Waterfall3DIntensityColorTypeChanged(int)\0" - "Waterfall3DAutoScaleBtnCB()\0" - "FFTComboBoxSelectedCB(QString)\0state\0" - "ToggleTabFrequency(bool)\0" - "ToggleTabWaterfall(bool)\0" - "ToggleTabWaterfall3D(bool)\0" - "ToggleTabTime(bool)\0ToggleTabConstellation(bool)\0" - "min,max\0SetTimeDomainAxis(double,double)\0" - "xmin,xmax,ymin,ymax\0" - "SetConstellationAxis(double,double,double,double)\0" - "SetFrequencyAxis(double,double)\0" - "newFrequencyData(const SpectrumUpdateEvent*)\0" -}; - -const QMetaObject SpectrumDisplayForm::staticMetaObject = { - { &QWidget::staticMetaObject, qt_meta_stringdata_SpectrumDisplayForm, - qt_meta_data_SpectrumDisplayForm, 0 } -}; - -const QMetaObject *SpectrumDisplayForm::metaObject() const -{ - return &staticMetaObject; -} - -void *SpectrumDisplayForm::qt_metacast(const char *_clname) -{ - if (!_clname) return 0; - if (!strcmp(_clname, qt_meta_stringdata_SpectrumDisplayForm)) - return static_cast(const_cast< SpectrumDisplayForm*>(this)); - if (!strcmp(_clname, "Ui::SpectrumDisplayForm")) - return static_cast< Ui::SpectrumDisplayForm*>(const_cast< SpectrumDisplayForm*>(this)); - return QWidget::qt_metacast(_clname); -} - -int SpectrumDisplayForm::qt_metacall(QMetaObject::Call _c, int _id, void **_a) -{ - _id = QWidget::qt_metacall(_c, _id, _a); - if (_id < 0) - return _id; - if (_c == QMetaObject::InvokeMetaMethod) { - switch (_id) { - case 0: resizeEvent((*reinterpret_cast< QResizeEvent*(*)>(_a[1]))); break; - case 1: customEvent((*reinterpret_cast< QEvent*(*)>(_a[1]))); break; - case 2: AvgLineEdit_textChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; - case 3: MaxHoldCheckBox_toggled((*reinterpret_cast< bool(*)>(_a[1]))); break; - case 4: MinHoldCheckBox_toggled((*reinterpret_cast< bool(*)>(_a[1]))); break; - case 5: MinHoldResetBtn_clicked(); break; - case 6: MaxHoldResetBtn_clicked(); break; - case 7: PowerLineEdit_textChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; - case 8: SetFrequencyRange((*reinterpret_cast< const double(*)>(_a[1])),(*reinterpret_cast< const double(*)>(_a[2])),(*reinterpret_cast< const double(*)>(_a[3]))); break; - case 9: closeEvent((*reinterpret_cast< QCloseEvent*(*)>(_a[1]))); break; - case 10: WindowTypeChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 11: UseRFFrequenciesCB((*reinterpret_cast< bool(*)>(_a[1]))); break; - case 12: waterfallMaximumIntensityChangedCB((*reinterpret_cast< double(*)>(_a[1]))); break; - case 13: waterfallMinimumIntensityChangedCB((*reinterpret_cast< double(*)>(_a[1]))); break; - case 14: WaterfallIntensityColorTypeChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 15: WaterfallAutoScaleBtnCB(); break; - case 16: waterfall3DMaximumIntensityChangedCB((*reinterpret_cast< double(*)>(_a[1]))); break; - case 17: waterfall3DMinimumIntensityChangedCB((*reinterpret_cast< double(*)>(_a[1]))); break; - case 18: Waterfall3DIntensityColorTypeChanged((*reinterpret_cast< int(*)>(_a[1]))); break; - case 19: Waterfall3DAutoScaleBtnCB(); break; - case 20: FFTComboBoxSelectedCB((*reinterpret_cast< const QString(*)>(_a[1]))); break; - case 21: ToggleTabFrequency((*reinterpret_cast< const bool(*)>(_a[1]))); break; - case 22: ToggleTabWaterfall((*reinterpret_cast< const bool(*)>(_a[1]))); break; - case 23: ToggleTabWaterfall3D((*reinterpret_cast< const bool(*)>(_a[1]))); break; - case 24: ToggleTabTime((*reinterpret_cast< const bool(*)>(_a[1]))); break; - case 25: ToggleTabConstellation((*reinterpret_cast< const bool(*)>(_a[1]))); break; - case 26: SetTimeDomainAxis((*reinterpret_cast< double(*)>(_a[1])),(*reinterpret_cast< double(*)>(_a[2]))); break; - case 27: SetConstellationAxis((*reinterpret_cast< double(*)>(_a[1])),(*reinterpret_cast< double(*)>(_a[2])),(*reinterpret_cast< double(*)>(_a[3])),(*reinterpret_cast< double(*)>(_a[4]))); break; - case 28: SetFrequencyAxis((*reinterpret_cast< double(*)>(_a[1])),(*reinterpret_cast< double(*)>(_a[2]))); break; - case 29: newFrequencyData((*reinterpret_cast< const SpectrumUpdateEvent*(*)>(_a[1]))); break; - default: ; - } - _id -= 30; - } - return _id; -} -QT_END_MOC_NAMESPACE diff --git a/gr-qtgui/src/lib/spectrumdisplayform_ui.h b/gr-qtgui/src/lib/spectrumdisplayform_ui.h deleted file mode 100644 index 0d5b112e..00000000 --- a/gr-qtgui/src/lib/spectrumdisplayform_ui.h +++ /dev/null @@ -1,363 +0,0 @@ -/******************************************************************************** -** Form generated from reading ui file 'spectrumdisplayform.ui' -** -** Created: Tue Jul 14 15:57:22 2009 -** by: Qt User Interface Compiler version 4.5.0 -** -** WARNING! All changes made in this file will be lost when recompiling ui file! -********************************************************************************/ - -#ifndef SPECTRUMDISPLAYFORM_UI_H -#define SPECTRUMDISPLAYFORM_UI_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "qwt_wheel.h" - -QT_BEGIN_NAMESPACE - -class Ui_SpectrumDisplayForm -{ -public: - QCheckBox *UseRFFrequenciesCheckBox; - QComboBox *WindowComboBox; - QLabel *WindowLbl; - QLabel *FFTSizeLabel; - QComboBox *FFTSizeComboBox; - QTabWidget *SpectrumTypeTab; - QWidget *FrequencyPage; - QLineEdit *PowerLineEdit; - QCheckBox *MinHoldCheckBox; - QLabel *AvgLabel; - QPushButton *MinHoldResetBtn; - QLineEdit *AvgLineEdit; - QLabel *PowerLabel; - QPushButton *MaxHoldResetBtn; - QCheckBox *MaxHoldCheckBox; - QFrame *FrequencyPlotDisplayFrame; - QWidget *WaterfallPage; - QLabel *textLabel1; - QComboBox *WaterfallIntensityComboBox; - QwtWheel *WaterfallMaximumIntensityWheel; - QLabel *WaterfallMaximumIntensityLabel; - QFrame *WaterfallPlotDisplayFrame; - QwtWheel *WaterfallMinimumIntensityWheel; - QLabel *WaterfallMinimumIntensityLabel; - QPushButton *WaterfallAutoScaleBtn; - QWidget *Waterfall3DPage; - QLabel *textLabel1_2; - QLabel *Waterfall3DMaximumIntensityLabel; - QPushButton *Waterfall3DAutoScaleBtn; - QwtWheel *Waterfall3DMinimumIntensityWheel; - QLabel *Waterfall3DMinimumIntensityLabel; - QFrame *Waterfall3DPlotDisplayFrame; - QComboBox *Waterfall3DIntensityComboBox; - QwtWheel *Waterfall3DMaximumIntensityWheel; - QWidget *TimeDomainPage; - QFrame *TimeDomainDisplayFrame; - QWidget *ConstellationPage; - QFrame *ConstellationDisplayFrame; - - void setupUi(QWidget *SpectrumDisplayForm) - { - if (SpectrumDisplayForm->objectName().isEmpty()) - SpectrumDisplayForm->setObjectName(QString::fromUtf8("SpectrumDisplayForm")); - SpectrumDisplayForm->resize(633, 436); - UseRFFrequenciesCheckBox = new QCheckBox(SpectrumDisplayForm); - UseRFFrequenciesCheckBox->setObjectName(QString::fromUtf8("UseRFFrequenciesCheckBox")); - UseRFFrequenciesCheckBox->setGeometry(QRect(10, 385, 180, 20)); - WindowComboBox = new QComboBox(SpectrumDisplayForm); - WindowComboBox->setObjectName(QString::fromUtf8("WindowComboBox")); - WindowComboBox->setGeometry(QRect(105, 410, 170, 20)); - QFont font; - font.setPointSize(9); - WindowComboBox->setFont(font); - WindowLbl = new QLabel(SpectrumDisplayForm); - WindowLbl->setObjectName(QString::fromUtf8("WindowLbl")); - WindowLbl->setGeometry(QRect(10, 410, 90, 17)); - WindowLbl->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - WindowLbl->setWordWrap(false); - FFTSizeLabel = new QLabel(SpectrumDisplayForm); - FFTSizeLabel->setObjectName(QString::fromUtf8("FFTSizeLabel")); - FFTSizeLabel->setGeometry(QRect(405, 385, 116, 20)); - FFTSizeLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - FFTSizeLabel->setWordWrap(false); - FFTSizeComboBox = new QComboBox(SpectrumDisplayForm); - FFTSizeComboBox->setObjectName(QString::fromUtf8("FFTSizeComboBox")); - FFTSizeComboBox->setGeometry(QRect(525, 385, 100, 20)); - SpectrumTypeTab = new QTabWidget(SpectrumDisplayForm); - SpectrumTypeTab->setObjectName(QString::fromUtf8("SpectrumTypeTab")); - SpectrumTypeTab->setGeometry(QRect(0, 0, 630, 380)); - FrequencyPage = new QWidget(); - FrequencyPage->setObjectName(QString::fromUtf8("FrequencyPage")); - PowerLineEdit = new QLineEdit(FrequencyPage); - PowerLineEdit->setObjectName(QString::fromUtf8("PowerLineEdit")); - PowerLineEdit->setGeometry(QRect(480, 320, 60, 20)); - MinHoldCheckBox = new QCheckBox(FrequencyPage); - MinHoldCheckBox->setObjectName(QString::fromUtf8("MinHoldCheckBox")); - MinHoldCheckBox->setGeometry(QRect(10, 325, 95, 20)); - MinHoldCheckBox->setChecked(false); - AvgLabel = new QLabel(FrequencyPage); - AvgLabel->setObjectName(QString::fromUtf8("AvgLabel")); - AvgLabel->setGeometry(QRect(545, 300, 72, 20)); - AvgLabel->setAlignment(Qt::AlignCenter); - AvgLabel->setWordWrap(false); - MinHoldResetBtn = new QPushButton(FrequencyPage); - MinHoldResetBtn->setObjectName(QString::fromUtf8("MinHoldResetBtn")); - MinHoldResetBtn->setGeometry(QRect(105, 325, 61, 20)); - AvgLineEdit = new QLineEdit(FrequencyPage); - AvgLineEdit->setObjectName(QString::fromUtf8("AvgLineEdit")); - AvgLineEdit->setGeometry(QRect(550, 320, 60, 20)); - PowerLabel = new QLabel(FrequencyPage); - PowerLabel->setObjectName(QString::fromUtf8("PowerLabel")); - PowerLabel->setGeometry(QRect(475, 300, 72, 20)); - PowerLabel->setAlignment(Qt::AlignCenter); - PowerLabel->setWordWrap(false); - MaxHoldResetBtn = new QPushButton(FrequencyPage); - MaxHoldResetBtn->setObjectName(QString::fromUtf8("MaxHoldResetBtn")); - MaxHoldResetBtn->setGeometry(QRect(105, 300, 61, 20)); - MaxHoldCheckBox = new QCheckBox(FrequencyPage); - MaxHoldCheckBox->setObjectName(QString::fromUtf8("MaxHoldCheckBox")); - MaxHoldCheckBox->setGeometry(QRect(10, 300, 95, 20)); - MaxHoldCheckBox->setChecked(false); - FrequencyPlotDisplayFrame = new QFrame(FrequencyPage); - FrequencyPlotDisplayFrame->setObjectName(QString::fromUtf8("FrequencyPlotDisplayFrame")); - FrequencyPlotDisplayFrame->setGeometry(QRect(5, 5, 620, 290)); - FrequencyPlotDisplayFrame->setFrameShape(QFrame::NoFrame); - FrequencyPlotDisplayFrame->setFrameShadow(QFrame::Plain); - SpectrumTypeTab->addTab(FrequencyPage, QString()); - WaterfallPage = new QWidget(); - WaterfallPage->setObjectName(QString::fromUtf8("WaterfallPage")); - textLabel1 = new QLabel(WaterfallPage); - textLabel1->setObjectName(QString::fromUtf8("textLabel1")); - textLabel1->setGeometry(QRect(5, 0, 85, 21)); - textLabel1->setWordWrap(false); - WaterfallIntensityComboBox = new QComboBox(WaterfallPage); - WaterfallIntensityComboBox->setObjectName(QString::fromUtf8("WaterfallIntensityComboBox")); - WaterfallIntensityComboBox->setGeometry(QRect(90, 0, 121, 25)); - WaterfallMaximumIntensityWheel = new QwtWheel(WaterfallPage); - WaterfallMaximumIntensityWheel->setObjectName(QString::fromUtf8("WaterfallMaximumIntensityWheel")); - WaterfallMaximumIntensityWheel->setGeometry(QRect(215, 0, 335, 24)); - WaterfallMaximumIntensityWheel->setMouseTracking(true); - WaterfallMaximumIntensityWheel->setFocusPolicy(Qt::WheelFocus); - WaterfallMaximumIntensityWheel->setValid(true); - WaterfallMaximumIntensityWheel->setTotalAngle(200); - WaterfallMaximumIntensityWheel->setViewAngle(20); - WaterfallMaximumIntensityWheel->setMass(0); - WaterfallMaximumIntensityLabel = new QLabel(WaterfallPage); - WaterfallMaximumIntensityLabel->setObjectName(QString::fromUtf8("WaterfallMaximumIntensityLabel")); - WaterfallMaximumIntensityLabel->setGeometry(QRect(563, 3, 55, 21)); - WaterfallMaximumIntensityLabel->setWordWrap(false); - WaterfallPlotDisplayFrame = new QFrame(WaterfallPage); - WaterfallPlotDisplayFrame->setObjectName(QString::fromUtf8("WaterfallPlotDisplayFrame")); - WaterfallPlotDisplayFrame->setGeometry(QRect(5, 30, 615, 295)); - WaterfallPlotDisplayFrame->setFrameShape(QFrame::NoFrame); - WaterfallPlotDisplayFrame->setFrameShadow(QFrame::Plain); - WaterfallMinimumIntensityWheel = new QwtWheel(WaterfallPage); - WaterfallMinimumIntensityWheel->setObjectName(QString::fromUtf8("WaterfallMinimumIntensityWheel")); - WaterfallMinimumIntensityWheel->setGeometry(QRect(215, 325, 335, 24)); - WaterfallMinimumIntensityWheel->setValid(true); - WaterfallMinimumIntensityWheel->setTotalAngle(200); - WaterfallMinimumIntensityWheel->setViewAngle(20); - WaterfallMinimumIntensityWheel->setMass(0); - WaterfallMinimumIntensityLabel = new QLabel(WaterfallPage); - WaterfallMinimumIntensityLabel->setObjectName(QString::fromUtf8("WaterfallMinimumIntensityLabel")); - WaterfallMinimumIntensityLabel->setGeometry(QRect(565, 325, 55, 20)); - WaterfallMinimumIntensityLabel->setWordWrap(false); - WaterfallAutoScaleBtn = new QPushButton(WaterfallPage); - WaterfallAutoScaleBtn->setObjectName(QString::fromUtf8("WaterfallAutoScaleBtn")); - WaterfallAutoScaleBtn->setGeometry(QRect(0, 325, 135, 21)); - SpectrumTypeTab->addTab(WaterfallPage, QString()); - Waterfall3DPage = new QWidget(); - Waterfall3DPage->setObjectName(QString::fromUtf8("Waterfall3DPage")); - textLabel1_2 = new QLabel(Waterfall3DPage); - textLabel1_2->setObjectName(QString::fromUtf8("textLabel1_2")); - textLabel1_2->setGeometry(QRect(5, 0, 85, 21)); - textLabel1_2->setWordWrap(false); - Waterfall3DMaximumIntensityLabel = new QLabel(Waterfall3DPage); - Waterfall3DMaximumIntensityLabel->setObjectName(QString::fromUtf8("Waterfall3DMaximumIntensityLabel")); - Waterfall3DMaximumIntensityLabel->setGeometry(QRect(563, 3, 55, 21)); - Waterfall3DMaximumIntensityLabel->setWordWrap(false); - Waterfall3DAutoScaleBtn = new QPushButton(Waterfall3DPage); - Waterfall3DAutoScaleBtn->setObjectName(QString::fromUtf8("Waterfall3DAutoScaleBtn")); - Waterfall3DAutoScaleBtn->setGeometry(QRect(0, 325, 135, 21)); - Waterfall3DMinimumIntensityWheel = new QwtWheel(Waterfall3DPage); - Waterfall3DMinimumIntensityWheel->setObjectName(QString::fromUtf8("Waterfall3DMinimumIntensityWheel")); - Waterfall3DMinimumIntensityWheel->setGeometry(QRect(215, 325, 335, 24)); - Waterfall3DMinimumIntensityWheel->setValid(true); - Waterfall3DMinimumIntensityWheel->setTotalAngle(200); - Waterfall3DMinimumIntensityWheel->setViewAngle(20); - Waterfall3DMinimumIntensityWheel->setMass(0); - Waterfall3DMinimumIntensityLabel = new QLabel(Waterfall3DPage); - Waterfall3DMinimumIntensityLabel->setObjectName(QString::fromUtf8("Waterfall3DMinimumIntensityLabel")); - Waterfall3DMinimumIntensityLabel->setGeometry(QRect(565, 325, 55, 20)); - Waterfall3DMinimumIntensityLabel->setWordWrap(false); - Waterfall3DPlotDisplayFrame = new QFrame(Waterfall3DPage); - Waterfall3DPlotDisplayFrame->setObjectName(QString::fromUtf8("Waterfall3DPlotDisplayFrame")); - Waterfall3DPlotDisplayFrame->setGeometry(QRect(5, 30, 615, 295)); - Waterfall3DPlotDisplayFrame->setFrameShape(QFrame::NoFrame); - Waterfall3DPlotDisplayFrame->setFrameShadow(QFrame::Plain); - Waterfall3DIntensityComboBox = new QComboBox(Waterfall3DPage); - Waterfall3DIntensityComboBox->setObjectName(QString::fromUtf8("Waterfall3DIntensityComboBox")); - Waterfall3DIntensityComboBox->setGeometry(QRect(90, 0, 121, 25)); - Waterfall3DMaximumIntensityWheel = new QwtWheel(Waterfall3DPage); - Waterfall3DMaximumIntensityWheel->setObjectName(QString::fromUtf8("Waterfall3DMaximumIntensityWheel")); - Waterfall3DMaximumIntensityWheel->setGeometry(QRect(215, 0, 335, 24)); - Waterfall3DMaximumIntensityWheel->setMouseTracking(true); - Waterfall3DMaximumIntensityWheel->setFocusPolicy(Qt::WheelFocus); - Waterfall3DMaximumIntensityWheel->setValid(true); - Waterfall3DMaximumIntensityWheel->setTotalAngle(200); - Waterfall3DMaximumIntensityWheel->setViewAngle(20); - Waterfall3DMaximumIntensityWheel->setMass(0); - SpectrumTypeTab->addTab(Waterfall3DPage, QString()); - TimeDomainPage = new QWidget(); - TimeDomainPage->setObjectName(QString::fromUtf8("TimeDomainPage")); - TimeDomainDisplayFrame = new QFrame(TimeDomainPage); - TimeDomainDisplayFrame->setObjectName(QString::fromUtf8("TimeDomainDisplayFrame")); - TimeDomainDisplayFrame->setGeometry(QRect(5, 5, 620, 340)); - TimeDomainDisplayFrame->setFrameShape(QFrame::NoFrame); - TimeDomainDisplayFrame->setFrameShadow(QFrame::Plain); - SpectrumTypeTab->addTab(TimeDomainPage, QString()); - ConstellationPage = new QWidget(); - ConstellationPage->setObjectName(QString::fromUtf8("ConstellationPage")); - ConstellationDisplayFrame = new QFrame(ConstellationPage); - ConstellationDisplayFrame->setObjectName(QString::fromUtf8("ConstellationDisplayFrame")); - ConstellationDisplayFrame->setGeometry(QRect(5, 5, 620, 340)); - ConstellationDisplayFrame->setFrameShape(QFrame::StyledPanel); - ConstellationDisplayFrame->setFrameShadow(QFrame::Raised); - SpectrumTypeTab->addTab(ConstellationPage, QString()); - QWidget::setTabOrder(SpectrumTypeTab, MaxHoldCheckBox); - QWidget::setTabOrder(MaxHoldCheckBox, MaxHoldResetBtn); - QWidget::setTabOrder(MaxHoldResetBtn, MinHoldCheckBox); - QWidget::setTabOrder(MinHoldCheckBox, MinHoldResetBtn); - QWidget::setTabOrder(MinHoldResetBtn, PowerLineEdit); - QWidget::setTabOrder(PowerLineEdit, AvgLineEdit); - QWidget::setTabOrder(AvgLineEdit, UseRFFrequenciesCheckBox); - QWidget::setTabOrder(UseRFFrequenciesCheckBox, WindowComboBox); - QWidget::setTabOrder(WindowComboBox, FFTSizeComboBox); - QWidget::setTabOrder(FFTSizeComboBox, WaterfallMaximumIntensityWheel); - QWidget::setTabOrder(WaterfallMaximumIntensityWheel, WaterfallMinimumIntensityWheel); - - retranslateUi(SpectrumDisplayForm); - QObject::connect(MaxHoldCheckBox, SIGNAL(toggled(bool)), SpectrumDisplayForm, SLOT(MaxHoldCheckBox_toggled(bool))); - QObject::connect(MaxHoldResetBtn, SIGNAL(clicked()), SpectrumDisplayForm, SLOT(MaxHoldResetBtn_clicked())); - QObject::connect(MinHoldCheckBox, SIGNAL(toggled(bool)), SpectrumDisplayForm, SLOT(MinHoldCheckBox_toggled(bool))); - QObject::connect(MinHoldResetBtn, SIGNAL(clicked()), SpectrumDisplayForm, SLOT(MinHoldResetBtn_clicked())); - QObject::connect(AvgLineEdit, SIGNAL(textChanged(QString)), SpectrumDisplayForm, SLOT(AvgLineEdit_textChanged(QString))); - QObject::connect(PowerLineEdit, SIGNAL(textChanged(QString)), SpectrumDisplayForm, SLOT(PowerLineEdit_textChanged(QString))); - QObject::connect(WindowComboBox, SIGNAL(activated(int)), SpectrumDisplayForm, SLOT(WindowTypeChanged(int))); - QObject::connect(UseRFFrequenciesCheckBox, SIGNAL(toggled(bool)), SpectrumDisplayForm, SLOT(UseRFFrequenciesCB(bool))); - QObject::connect(WaterfallMaximumIntensityWheel, SIGNAL(valueChanged(double)), SpectrumDisplayForm, SLOT(waterfallMaximumIntensityChangedCB(double))); - QObject::connect(WaterfallMinimumIntensityWheel, SIGNAL(valueChanged(double)), SpectrumDisplayForm, SLOT(waterfallMinimumIntensityChangedCB(double))); - QObject::connect(Waterfall3DMaximumIntensityWheel, SIGNAL(valueChanged(double)), SpectrumDisplayForm, SLOT(waterfall3DMaximumIntensityChangedCB(double))); - QObject::connect(Waterfall3DMinimumIntensityWheel, SIGNAL(valueChanged(double)), SpectrumDisplayForm, SLOT(waterfall3DMinimumIntensityChangedCB(double))); - QObject::connect(FFTSizeComboBox, SIGNAL(activated(QString)), SpectrumDisplayForm, SLOT(FFTComboBoxSelectedCB(QString))); - QObject::connect(WaterfallAutoScaleBtn, SIGNAL(clicked()), SpectrumDisplayForm, SLOT(WaterfallAutoScaleBtnCB())); - QObject::connect(Waterfall3DAutoScaleBtn, SIGNAL(clicked()), SpectrumDisplayForm, SLOT(Waterfall3DAutoScaleBtnCB())); - QObject::connect(WaterfallIntensityComboBox, SIGNAL(activated(int)), SpectrumDisplayForm, SLOT(WaterfallIntensityColorTypeChanged(int))); - QObject::connect(Waterfall3DIntensityComboBox, SIGNAL(activated(int)), SpectrumDisplayForm, SLOT(Waterfall3DIntensityColorTypeChanged(int))); - - SpectrumTypeTab->setCurrentIndex(0); - - - QMetaObject::connectSlotsByName(SpectrumDisplayForm); - } // setupUi - - void retranslateUi(QWidget *SpectrumDisplayForm) - { - SpectrumDisplayForm->setWindowTitle(QApplication::translate("SpectrumDisplayForm", "Spectrum Display", 0, QApplication::UnicodeUTF8)); - UseRFFrequenciesCheckBox->setText(QApplication::translate("SpectrumDisplayForm", "Display RF Frequencies", 0, QApplication::UnicodeUTF8)); - WindowComboBox->clear(); - WindowComboBox->insertItems(0, QStringList() - << QApplication::translate("SpectrumDisplayForm", "Hamming", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "Hann", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "Blackman", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "Rectangular", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "Kaiser", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "Blackman-harris", 0, QApplication::UnicodeUTF8) - ); - WindowLbl->setText(QApplication::translate("SpectrumDisplayForm", "Window:", 0, QApplication::UnicodeUTF8)); - FFTSizeLabel->setText(QApplication::translate("SpectrumDisplayForm", "FFT Size:", 0, QApplication::UnicodeUTF8)); - FFTSizeComboBox->clear(); - FFTSizeComboBox->insertItems(0, QStringList() - << QApplication::translate("SpectrumDisplayForm", "1024", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "2048", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "4096", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "8192", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "16384", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "32768", 0, QApplication::UnicodeUTF8) - ); - PowerLineEdit->setText(QApplication::translate("SpectrumDisplayForm", "1", 0, QApplication::UnicodeUTF8)); - MinHoldCheckBox->setText(QApplication::translate("SpectrumDisplayForm", "Min Hold", 0, QApplication::UnicodeUTF8)); - AvgLabel->setText(QApplication::translate("SpectrumDisplayForm", "Average", 0, QApplication::UnicodeUTF8)); - MinHoldResetBtn->setText(QApplication::translate("SpectrumDisplayForm", "Reset", 0, QApplication::UnicodeUTF8)); - AvgLineEdit->setText(QApplication::translate("SpectrumDisplayForm", "0", 0, QApplication::UnicodeUTF8)); - PowerLabel->setText(QApplication::translate("SpectrumDisplayForm", "Power", 0, QApplication::UnicodeUTF8)); - MaxHoldResetBtn->setText(QApplication::translate("SpectrumDisplayForm", "Reset", 0, QApplication::UnicodeUTF8)); - MaxHoldCheckBox->setText(QApplication::translate("SpectrumDisplayForm", "Max Hold", 0, QApplication::UnicodeUTF8)); - SpectrumTypeTab->setTabText(SpectrumTypeTab->indexOf(FrequencyPage), QApplication::translate("SpectrumDisplayForm", "Frequency Display", 0, QApplication::UnicodeUTF8)); - textLabel1->setText(QApplication::translate("SpectrumDisplayForm", "Intensity Display:", 0, QApplication::UnicodeUTF8)); - WaterfallIntensityComboBox->clear(); - WaterfallIntensityComboBox->insertItems(0, QStringList() - << QApplication::translate("SpectrumDisplayForm", "Color", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "White Hot", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "Black Hot", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "Incandescent", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "User Defined", 0, QApplication::UnicodeUTF8) - ); - WaterfallMaximumIntensityLabel->setText(QApplication::translate("SpectrumDisplayForm", "100 dB", 0, QApplication::UnicodeUTF8)); - WaterfallMinimumIntensityLabel->setText(QApplication::translate("SpectrumDisplayForm", "-100 dB", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - WaterfallAutoScaleBtn->setToolTip(QApplication::translate("SpectrumDisplayForm", "Scales the Intensity to the current data extremes.", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - WaterfallAutoScaleBtn->setText(QApplication::translate("SpectrumDisplayForm", "Auto Scale", 0, QApplication::UnicodeUTF8)); - SpectrumTypeTab->setTabText(SpectrumTypeTab->indexOf(WaterfallPage), QApplication::translate("SpectrumDisplayForm", "Waterfall Display", 0, QApplication::UnicodeUTF8)); - textLabel1_2->setText(QApplication::translate("SpectrumDisplayForm", "Intensity Display:", 0, QApplication::UnicodeUTF8)); - Waterfall3DMaximumIntensityLabel->setText(QApplication::translate("SpectrumDisplayForm", "100 dB", 0, QApplication::UnicodeUTF8)); -#ifndef QT_NO_TOOLTIP - Waterfall3DAutoScaleBtn->setToolTip(QApplication::translate("SpectrumDisplayForm", "Scales the Intensity to the current data extremes.", 0, QApplication::UnicodeUTF8)); -#endif // QT_NO_TOOLTIP - Waterfall3DAutoScaleBtn->setText(QApplication::translate("SpectrumDisplayForm", "Auto Scale", 0, QApplication::UnicodeUTF8)); - Waterfall3DMinimumIntensityLabel->setText(QApplication::translate("SpectrumDisplayForm", "-100 dB", 0, QApplication::UnicodeUTF8)); - Waterfall3DIntensityComboBox->clear(); - Waterfall3DIntensityComboBox->insertItems(0, QStringList() - << QApplication::translate("SpectrumDisplayForm", "Color", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "White Hot", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "Black Hot", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "Incandescent", 0, QApplication::UnicodeUTF8) - << QApplication::translate("SpectrumDisplayForm", "User Defined", 0, QApplication::UnicodeUTF8) - ); - SpectrumTypeTab->setTabText(SpectrumTypeTab->indexOf(Waterfall3DPage), QApplication::translate("SpectrumDisplayForm", "3D Waterfall Display", 0, QApplication::UnicodeUTF8)); - SpectrumTypeTab->setTabText(SpectrumTypeTab->indexOf(TimeDomainPage), QApplication::translate("SpectrumDisplayForm", "Time Domain Display", 0, QApplication::UnicodeUTF8)); - SpectrumTypeTab->setTabText(SpectrumTypeTab->indexOf(ConstellationPage), QApplication::translate("SpectrumDisplayForm", "Constellation Display", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(SpectrumDisplayForm); - } // retranslateUi - -}; - -namespace Ui { - class SpectrumDisplayForm: public Ui_SpectrumDisplayForm {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // SPECTRUMDISPLAYFORM_UI_H diff --git a/gr-trellis/src/lib/stamp-sources-generate b/gr-trellis/src/lib/stamp-sources-generate deleted file mode 100644 index e69de29b..00000000 diff --git a/gr-trellis/src/lib/trellis_encoder_bb.cc b/gr-trellis/src/lib/trellis_encoder_bb.cc deleted file mode 100644 index 36e45b9f..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bb.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_bb_sptr -trellis_make_encoder_bb (const fsm &FSM, int ST) -{ - return trellis_encoder_bb_sptr (new trellis_encoder_bb (FSM,ST)); -} - -trellis_encoder_bb::trellis_encoder_bb (const fsm &FSM, int ST) - : gr_sync_block ("encoder_bb", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_bb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_bb; -typedef boost::shared_ptr trellis_encoder_bb_sptr; - -trellis_encoder_bb_sptr trellis_make_encoder_bb (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup coding_blk - */ -class trellis_encoder_bb : public gr_sync_block -{ -private: - friend trellis_encoder_bb_sptr trellis_make_encoder_bb (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_bb (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_bb.i b/gr-trellis/src/lib/trellis_encoder_bb.i deleted file mode 100644 index 84aee74c..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bb.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_bb); - -trellis_encoder_bb_sptr trellis_make_encoder_bb (const fsm &FSM, int ST); - -class trellis_encoder_bb : public gr_sync_block -{ -private: - trellis_encoder_bb (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_encoder_bi.cc b/gr-trellis/src/lib/trellis_encoder_bi.cc deleted file mode 100644 index 6152d62d..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bi.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_bi_sptr -trellis_make_encoder_bi (const fsm &FSM, int ST) -{ - return trellis_encoder_bi_sptr (new trellis_encoder_bi (FSM,ST)); -} - -trellis_encoder_bi::trellis_encoder_bi (const fsm &FSM, int ST) - : gr_sync_block ("encoder_bi", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_bi::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_bi; -typedef boost::shared_ptr trellis_encoder_bi_sptr; - -trellis_encoder_bi_sptr trellis_make_encoder_bi (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup coding_blk - */ -class trellis_encoder_bi : public gr_sync_block -{ -private: - friend trellis_encoder_bi_sptr trellis_make_encoder_bi (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_bi (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_bi.i b/gr-trellis/src/lib/trellis_encoder_bi.i deleted file mode 100644 index a4dcba80..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bi.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_bi); - -trellis_encoder_bi_sptr trellis_make_encoder_bi (const fsm &FSM, int ST); - -class trellis_encoder_bi : public gr_sync_block -{ -private: - trellis_encoder_bi (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_encoder_bs.cc b/gr-trellis/src/lib/trellis_encoder_bs.cc deleted file mode 100644 index 1c6fcef2..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bs.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_bs_sptr -trellis_make_encoder_bs (const fsm &FSM, int ST) -{ - return trellis_encoder_bs_sptr (new trellis_encoder_bs (FSM,ST)); -} - -trellis_encoder_bs::trellis_encoder_bs (const fsm &FSM, int ST) - : gr_sync_block ("encoder_bs", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_bs::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_bs; -typedef boost::shared_ptr trellis_encoder_bs_sptr; - -trellis_encoder_bs_sptr trellis_make_encoder_bs (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup coding_blk - */ -class trellis_encoder_bs : public gr_sync_block -{ -private: - friend trellis_encoder_bs_sptr trellis_make_encoder_bs (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_bs (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_bs.i b/gr-trellis/src/lib/trellis_encoder_bs.i deleted file mode 100644 index e4bf573c..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bs.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_bs); - -trellis_encoder_bs_sptr trellis_make_encoder_bs (const fsm &FSM, int ST); - -class trellis_encoder_bs : public gr_sync_block -{ -private: - trellis_encoder_bs (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_encoder_ii.cc b/gr-trellis/src/lib/trellis_encoder_ii.cc deleted file mode 100644 index 6b725868..00000000 --- a/gr-trellis/src/lib/trellis_encoder_ii.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_ii_sptr -trellis_make_encoder_ii (const fsm &FSM, int ST) -{ - return trellis_encoder_ii_sptr (new trellis_encoder_ii (FSM,ST)); -} - -trellis_encoder_ii::trellis_encoder_ii (const fsm &FSM, int ST) - : gr_sync_block ("encoder_ii", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_ii; -typedef boost::shared_ptr trellis_encoder_ii_sptr; - -trellis_encoder_ii_sptr trellis_make_encoder_ii (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup coding_blk - */ -class trellis_encoder_ii : public gr_sync_block -{ -private: - friend trellis_encoder_ii_sptr trellis_make_encoder_ii (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_ii (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_ii.i b/gr-trellis/src/lib/trellis_encoder_ii.i deleted file mode 100644 index bac3498b..00000000 --- a/gr-trellis/src/lib/trellis_encoder_ii.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_ii); - -trellis_encoder_ii_sptr trellis_make_encoder_ii (const fsm &FSM, int ST); - -class trellis_encoder_ii : public gr_sync_block -{ -private: - trellis_encoder_ii (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_encoder_si.cc b/gr-trellis/src/lib/trellis_encoder_si.cc deleted file mode 100644 index 6ee93066..00000000 --- a/gr-trellis/src/lib/trellis_encoder_si.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_si_sptr -trellis_make_encoder_si (const fsm &FSM, int ST) -{ - return trellis_encoder_si_sptr (new trellis_encoder_si (FSM,ST)); -} - -trellis_encoder_si::trellis_encoder_si (const fsm &FSM, int ST) - : gr_sync_block ("encoder_si", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_si::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_si; -typedef boost::shared_ptr trellis_encoder_si_sptr; - -trellis_encoder_si_sptr trellis_make_encoder_si (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup coding_blk - */ -class trellis_encoder_si : public gr_sync_block -{ -private: - friend trellis_encoder_si_sptr trellis_make_encoder_si (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_si (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_si.i b/gr-trellis/src/lib/trellis_encoder_si.i deleted file mode 100644 index 0355681c..00000000 --- a/gr-trellis/src/lib/trellis_encoder_si.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_si); - -trellis_encoder_si_sptr trellis_make_encoder_si (const fsm &FSM, int ST); - -class trellis_encoder_si : public gr_sync_block -{ -private: - trellis_encoder_si (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_encoder_ss.cc b/gr-trellis/src/lib/trellis_encoder_ss.cc deleted file mode 100644 index cc6b0da1..00000000 --- a/gr-trellis/src/lib/trellis_encoder_ss.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_ss_sptr -trellis_make_encoder_ss (const fsm &FSM, int ST) -{ - return trellis_encoder_ss_sptr (new trellis_encoder_ss (FSM,ST)); -} - -trellis_encoder_ss::trellis_encoder_ss (const fsm &FSM, int ST) - : gr_sync_block ("encoder_ss", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_ss; -typedef boost::shared_ptr trellis_encoder_ss_sptr; - -trellis_encoder_ss_sptr trellis_make_encoder_ss (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup coding_blk - */ -class trellis_encoder_ss : public gr_sync_block -{ -private: - friend trellis_encoder_ss_sptr trellis_make_encoder_ss (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_ss (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_ss.i b/gr-trellis/src/lib/trellis_encoder_ss.i deleted file mode 100644 index eda92b1a..00000000 --- a/gr-trellis/src/lib/trellis_encoder_ss.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_ss); - -trellis_encoder_ss_sptr trellis_make_encoder_ss (const fsm &FSM, int ST); - -class trellis_encoder_ss : public gr_sync_block -{ -private: - trellis_encoder_ss (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_generated.i b/gr-trellis/src/lib/trellis_generated.i deleted file mode 100644 index 7a379bdc..00000000 --- a/gr-trellis/src/lib/trellis_generated.i +++ /dev/null @@ -1,56 +0,0 @@ -// -// This file is machine generated. All edits will be overwritten -// -%{ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -%} - -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include -%include diff --git a/gr-trellis/src/lib/trellis_metrics_c.cc b/gr-trellis/src/lib/trellis_metrics_c.cc deleted file mode 100644 index 4fac9f6d..00000000 --- a/gr-trellis/src/lib/trellis_metrics_c.cc +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - - -trellis_metrics_c_sptr -trellis_make_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) -{ - return trellis_metrics_c_sptr (new trellis_metrics_c (O,D,TABLE,TYPE)); -} - - - -trellis_metrics_c::trellis_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) - : gr_block ("metrics_c", - gr_make_io_signature (1, -1, sizeof (gr_complex)), - gr_make_io_signature (1, -1, sizeof (float))), - d_O (O), - d_D (D), - d_TYPE (TYPE), - d_TABLE (TABLE) -{ - set_relative_rate (1.0 * d_O / ((double) d_D)); - set_output_multiple ((int)d_O); -} - -void trellis_metrics_c::set_TABLE (const std::vector &table) -{ - d_TABLE = table; -} - - -void -trellis_metrics_c::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_O == 0); - int input_required = d_D * noutput_items / d_O; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) - ninput_items_required[i] = input_required; -} - - - -int -trellis_metrics_c::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - assert (noutput_items % d_O == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - -for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_metrics_c; -typedef boost::shared_ptr trellis_metrics_c_sptr; - -trellis_metrics_c_sptr trellis_make_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -/*! - * \brief Evaluate metrics for use by the Viterbi algorithm. - * \ingroup coding_blk - */ -class trellis_metrics_c : public gr_block -{ - int d_O; - int d_D; - trellis_metric_type_t d_TYPE; - std::vector d_TABLE; - - friend trellis_metrics_c_sptr trellis_make_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - trellis_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gr-trellis/src/lib/trellis_metrics_c.i b/gr-trellis/src/lib/trellis_metrics_c.i deleted file mode 100644 index 37b6ba98..00000000 --- a/gr-trellis/src/lib/trellis_metrics_c.i +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,metrics_c); - -trellis_metrics_c_sptr trellis_make_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -class trellis_metrics_c : public gr_block -{ -private: - trellis_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - void set_TABLE (const std::vector &table); - std::vector TABLE () const { return d_TABLE; } -}; diff --git a/gr-trellis/src/lib/trellis_metrics_f.cc b/gr-trellis/src/lib/trellis_metrics_f.cc deleted file mode 100644 index 1fb06408..00000000 --- a/gr-trellis/src/lib/trellis_metrics_f.cc +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - - -trellis_metrics_f_sptr -trellis_make_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) -{ - return trellis_metrics_f_sptr (new trellis_metrics_f (O,D,TABLE,TYPE)); -} - - - -trellis_metrics_f::trellis_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) - : gr_block ("metrics_f", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (float))), - d_O (O), - d_D (D), - d_TYPE (TYPE), - d_TABLE (TABLE) -{ - set_relative_rate (1.0 * d_O / ((double) d_D)); - set_output_multiple ((int)d_O); -} - -void trellis_metrics_f::set_TABLE (const std::vector &table) -{ - d_TABLE = table; -} - - -void -trellis_metrics_f::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_O == 0); - int input_required = d_D * noutput_items / d_O; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) - ninput_items_required[i] = input_required; -} - - - -int -trellis_metrics_f::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - assert (noutput_items % d_O == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - -for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_metrics_f; -typedef boost::shared_ptr trellis_metrics_f_sptr; - -trellis_metrics_f_sptr trellis_make_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -/*! - * \brief Evaluate metrics for use by the Viterbi algorithm. - * \ingroup coding_blk - */ -class trellis_metrics_f : public gr_block -{ - int d_O; - int d_D; - trellis_metric_type_t d_TYPE; - std::vector d_TABLE; - - friend trellis_metrics_f_sptr trellis_make_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - trellis_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gr-trellis/src/lib/trellis_metrics_f.i b/gr-trellis/src/lib/trellis_metrics_f.i deleted file mode 100644 index 34136299..00000000 --- a/gr-trellis/src/lib/trellis_metrics_f.i +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,metrics_f); - -trellis_metrics_f_sptr trellis_make_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -class trellis_metrics_f : public gr_block -{ -private: - trellis_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - void set_TABLE (const std::vector &table); - std::vector TABLE () const { return d_TABLE; } -}; diff --git a/gr-trellis/src/lib/trellis_metrics_i.cc b/gr-trellis/src/lib/trellis_metrics_i.cc deleted file mode 100644 index 251f4594..00000000 --- a/gr-trellis/src/lib/trellis_metrics_i.cc +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - - -trellis_metrics_i_sptr -trellis_make_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) -{ - return trellis_metrics_i_sptr (new trellis_metrics_i (O,D,TABLE,TYPE)); -} - - - -trellis_metrics_i::trellis_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) - : gr_block ("metrics_i", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (float))), - d_O (O), - d_D (D), - d_TYPE (TYPE), - d_TABLE (TABLE) -{ - set_relative_rate (1.0 * d_O / ((double) d_D)); - set_output_multiple ((int)d_O); -} - -void trellis_metrics_i::set_TABLE (const std::vector &table) -{ - d_TABLE = table; -} - - -void -trellis_metrics_i::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_O == 0); - int input_required = d_D * noutput_items / d_O; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) - ninput_items_required[i] = input_required; -} - - - -int -trellis_metrics_i::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - assert (noutput_items % d_O == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - -for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_metrics_i; -typedef boost::shared_ptr trellis_metrics_i_sptr; - -trellis_metrics_i_sptr trellis_make_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -/*! - * \brief Evaluate metrics for use by the Viterbi algorithm. - * \ingroup coding_blk - */ -class trellis_metrics_i : public gr_block -{ - int d_O; - int d_D; - trellis_metric_type_t d_TYPE; - std::vector d_TABLE; - - friend trellis_metrics_i_sptr trellis_make_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - trellis_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gr-trellis/src/lib/trellis_metrics_i.i b/gr-trellis/src/lib/trellis_metrics_i.i deleted file mode 100644 index 67ed867f..00000000 --- a/gr-trellis/src/lib/trellis_metrics_i.i +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,metrics_i); - -trellis_metrics_i_sptr trellis_make_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -class trellis_metrics_i : public gr_block -{ -private: - trellis_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - void set_TABLE (const std::vector &table); - std::vector TABLE () const { return d_TABLE; } -}; diff --git a/gr-trellis/src/lib/trellis_metrics_s.cc b/gr-trellis/src/lib/trellis_metrics_s.cc deleted file mode 100644 index db21fdbc..00000000 --- a/gr-trellis/src/lib/trellis_metrics_s.cc +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifndef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - - -trellis_metrics_s_sptr -trellis_make_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) -{ - return trellis_metrics_s_sptr (new trellis_metrics_s (O,D,TABLE,TYPE)); -} - - - -trellis_metrics_s::trellis_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) - : gr_block ("metrics_s", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (float))), - d_O (O), - d_D (D), - d_TYPE (TYPE), - d_TABLE (TABLE) -{ - set_relative_rate (1.0 * d_O / ((double) d_D)); - set_output_multiple ((int)d_O); -} - -void trellis_metrics_s::set_TABLE (const std::vector &table) -{ - d_TABLE = table; -} - - -void -trellis_metrics_s::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_O == 0); - int input_required = d_D * noutput_items / d_O; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) - ninput_items_required[i] = input_required; -} - - - -int -trellis_metrics_s::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - assert (noutput_items % d_O == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - -for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_metrics_s; -typedef boost::shared_ptr trellis_metrics_s_sptr; - -trellis_metrics_s_sptr trellis_make_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -/*! - * \brief Evaluate metrics for use by the Viterbi algorithm. - * \ingroup coding_blk - */ -class trellis_metrics_s : public gr_block -{ - int d_O; - int d_D; - trellis_metric_type_t d_TYPE; - std::vector d_TABLE; - - friend trellis_metrics_s_sptr trellis_make_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - trellis_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gr-trellis/src/lib/trellis_metrics_s.i b/gr-trellis/src/lib/trellis_metrics_s.i deleted file mode 100644 index 207c0a7e..00000000 --- a/gr-trellis/src/lib/trellis_metrics_s.i +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,metrics_s); - -trellis_metrics_s_sptr trellis_make_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -class trellis_metrics_s : public gr_block -{ -private: - trellis_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - void set_TABLE (const std::vector &table); - std::vector TABLE () const { return d_TABLE; } -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_b.cc b/gr-trellis/src/lib/trellis_viterbi_b.cc deleted file mode 100644 index ead61b19..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_b.cc +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_b_sptr -trellis_make_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK) -{ - return trellis_viterbi_b_sptr (new trellis_viterbi_b (FSM,K,S0,SK)); -} - -trellis_viterbi_b::trellis_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK) - : gr_block ("viterbi_b", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_FSM.O())); - set_output_multiple (d_K); -} - - -void -trellis_viterbi_b::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_FSM.O() * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - const float *in, unsigned char *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - int alphai; - float norm,mm,minm; - int minmi; - int st; - - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (unsigned char) PI[st][i0]; - st=PS[st][i0]; - } - -} - - - - - - -int -trellis_viterbi_b::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m - -class trellis_viterbi_b; -typedef boost::shared_ptr trellis_viterbi_b_sptr; - -trellis_viterbi_b_sptr trellis_make_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK); - - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_b : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - //std::vector d_trace; - - friend trellis_viterbi_b_sptr trellis_make_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK); - - - trellis_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_b.i b/gr-trellis/src/lib/trellis_viterbi_b.i deleted file mode 100644 index a9da3fcb..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_b.i +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_b); - -trellis_viterbi_b_sptr trellis_make_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK); - - -class trellis_viterbi_b : public gr_block -{ -private: - trellis_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_cb.cc b/gr-trellis/src/lib/trellis_viterbi_combined_cb.cc deleted file mode 100644 index 91341aa4..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_cb.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_cb_sptr -trellis_make_viterbi_combined_cb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_cb_sptr (new trellis_viterbi_combined_cb (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_cb::trellis_viterbi_combined_cb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_cb", - gr_make_io_signature (1, -1, sizeof (gr_complex)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_cb::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_cb::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const gr_complex *in, unsigned char *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (unsigned char) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_cb::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_cb; -typedef boost::shared_ptr trellis_viterbi_combined_cb_sptr; - -trellis_viterbi_combined_cb_sptr trellis_make_viterbi_combined_cb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_cb : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_cb_sptr trellis_make_viterbi_combined_cb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_cb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_cb.i b/gr-trellis/src/lib/trellis_viterbi_combined_cb.i deleted file mode 100644 index 34319585..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_cb.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_cb); - -trellis_viterbi_combined_cb_sptr trellis_make_viterbi_combined_cb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_cb : public gr_block -{ -private: - trellis_viterbi_combined_cb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_ci.cc b/gr-trellis/src/lib/trellis_viterbi_combined_ci.cc deleted file mode 100644 index 81583721..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_ci.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_ci_sptr -trellis_make_viterbi_combined_ci ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_ci_sptr (new trellis_viterbi_combined_ci (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_ci::trellis_viterbi_combined_ci ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_ci", - gr_make_io_signature (1, -1, sizeof (gr_complex)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_ci::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_ci::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const gr_complex *in, int *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (int) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_ci::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_ci; -typedef boost::shared_ptr trellis_viterbi_combined_ci_sptr; - -trellis_viterbi_combined_ci_sptr trellis_make_viterbi_combined_ci ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_ci : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_ci_sptr trellis_make_viterbi_combined_ci ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_ci ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_ci.i b/gr-trellis/src/lib/trellis_viterbi_combined_ci.i deleted file mode 100644 index cc91268b..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_ci.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_ci); - -trellis_viterbi_combined_ci_sptr trellis_make_viterbi_combined_ci ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_ci : public gr_block -{ -private: - trellis_viterbi_combined_ci ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_cs.cc b/gr-trellis/src/lib/trellis_viterbi_combined_cs.cc deleted file mode 100644 index f876bcc0..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_cs.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_cs_sptr -trellis_make_viterbi_combined_cs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_cs_sptr (new trellis_viterbi_combined_cs (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_cs::trellis_viterbi_combined_cs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_cs", - gr_make_io_signature (1, -1, sizeof (gr_complex)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_cs::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_cs::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const gr_complex *in, short *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (short) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_cs::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_cs; -typedef boost::shared_ptr trellis_viterbi_combined_cs_sptr; - -trellis_viterbi_combined_cs_sptr trellis_make_viterbi_combined_cs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_cs : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_cs_sptr trellis_make_viterbi_combined_cs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_cs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_cs.i b/gr-trellis/src/lib/trellis_viterbi_combined_cs.i deleted file mode 100644 index 15c8c56a..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_cs.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_cs); - -trellis_viterbi_combined_cs_sptr trellis_make_viterbi_combined_cs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_cs : public gr_block -{ -private: - trellis_viterbi_combined_cs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_fb.cc b/gr-trellis/src/lib/trellis_viterbi_combined_fb.cc deleted file mode 100644 index 97827c3b..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_fb.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_fb_sptr -trellis_make_viterbi_combined_fb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_fb_sptr (new trellis_viterbi_combined_fb (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_fb::trellis_viterbi_combined_fb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_fb", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_fb::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_fb::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const float *in, unsigned char *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (unsigned char) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_fb::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_fb; -typedef boost::shared_ptr trellis_viterbi_combined_fb_sptr; - -trellis_viterbi_combined_fb_sptr trellis_make_viterbi_combined_fb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_fb : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_fb_sptr trellis_make_viterbi_combined_fb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_fb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_fb.i b/gr-trellis/src/lib/trellis_viterbi_combined_fb.i deleted file mode 100644 index 2a05761c..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_fb.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_fb); - -trellis_viterbi_combined_fb_sptr trellis_make_viterbi_combined_fb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_fb : public gr_block -{ -private: - trellis_viterbi_combined_fb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_fi.cc b/gr-trellis/src/lib/trellis_viterbi_combined_fi.cc deleted file mode 100644 index 0653fc2b..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_fi.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_fi_sptr -trellis_make_viterbi_combined_fi ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_fi_sptr (new trellis_viterbi_combined_fi (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_fi::trellis_viterbi_combined_fi ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_fi", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_fi::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_fi::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const float *in, int *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (int) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_fi::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_fi; -typedef boost::shared_ptr trellis_viterbi_combined_fi_sptr; - -trellis_viterbi_combined_fi_sptr trellis_make_viterbi_combined_fi ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_fi : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_fi_sptr trellis_make_viterbi_combined_fi ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_fi ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_fi.i b/gr-trellis/src/lib/trellis_viterbi_combined_fi.i deleted file mode 100644 index f0576e75..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_fi.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_fi); - -trellis_viterbi_combined_fi_sptr trellis_make_viterbi_combined_fi ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_fi : public gr_block -{ -private: - trellis_viterbi_combined_fi ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_fs.cc b/gr-trellis/src/lib/trellis_viterbi_combined_fs.cc deleted file mode 100644 index 7f17bb97..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_fs.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_fs_sptr -trellis_make_viterbi_combined_fs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_fs_sptr (new trellis_viterbi_combined_fs (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_fs::trellis_viterbi_combined_fs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_fs", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_fs::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_fs::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const float *in, short *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (short) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_fs::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_fs; -typedef boost::shared_ptr trellis_viterbi_combined_fs_sptr; - -trellis_viterbi_combined_fs_sptr trellis_make_viterbi_combined_fs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_fs : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_fs_sptr trellis_make_viterbi_combined_fs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_fs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_fs.i b/gr-trellis/src/lib/trellis_viterbi_combined_fs.i deleted file mode 100644 index 37452780..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_fs.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_fs); - -trellis_viterbi_combined_fs_sptr trellis_make_viterbi_combined_fs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_fs : public gr_block -{ -private: - trellis_viterbi_combined_fs ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_ib.cc b/gr-trellis/src/lib/trellis_viterbi_combined_ib.cc deleted file mode 100644 index 2e9e3475..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_ib.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_ib_sptr -trellis_make_viterbi_combined_ib ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_ib_sptr (new trellis_viterbi_combined_ib (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_ib::trellis_viterbi_combined_ib ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_ib", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_ib::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_ib::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const int *in, unsigned char *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (unsigned char) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_ib::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_ib; -typedef boost::shared_ptr trellis_viterbi_combined_ib_sptr; - -trellis_viterbi_combined_ib_sptr trellis_make_viterbi_combined_ib ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_ib : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_ib_sptr trellis_make_viterbi_combined_ib ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_ib ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_ib.i b/gr-trellis/src/lib/trellis_viterbi_combined_ib.i deleted file mode 100644 index 2e26f2fa..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_ib.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_ib); - -trellis_viterbi_combined_ib_sptr trellis_make_viterbi_combined_ib ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_ib : public gr_block -{ -private: - trellis_viterbi_combined_ib ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_ii.cc b/gr-trellis/src/lib/trellis_viterbi_combined_ii.cc deleted file mode 100644 index 0a18245e..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_ii.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_ii_sptr -trellis_make_viterbi_combined_ii ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_ii_sptr (new trellis_viterbi_combined_ii (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_ii::trellis_viterbi_combined_ii ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_ii", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_ii::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_ii::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const int *in, int *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (int) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_ii::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_ii; -typedef boost::shared_ptr trellis_viterbi_combined_ii_sptr; - -trellis_viterbi_combined_ii_sptr trellis_make_viterbi_combined_ii ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_ii : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_ii_sptr trellis_make_viterbi_combined_ii ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_ii ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_ii.i b/gr-trellis/src/lib/trellis_viterbi_combined_ii.i deleted file mode 100644 index 3a0f42b2..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_ii.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_ii); - -trellis_viterbi_combined_ii_sptr trellis_make_viterbi_combined_ii ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_ii : public gr_block -{ -private: - trellis_viterbi_combined_ii ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_is.cc b/gr-trellis/src/lib/trellis_viterbi_combined_is.cc deleted file mode 100644 index dd9775b5..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_is.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_is_sptr -trellis_make_viterbi_combined_is ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_is_sptr (new trellis_viterbi_combined_is (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_is::trellis_viterbi_combined_is ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_is", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_is::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_is::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const int *in, short *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (short) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_is::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_is; -typedef boost::shared_ptr trellis_viterbi_combined_is_sptr; - -trellis_viterbi_combined_is_sptr trellis_make_viterbi_combined_is ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_is : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_is_sptr trellis_make_viterbi_combined_is ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_is ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_is.i b/gr-trellis/src/lib/trellis_viterbi_combined_is.i deleted file mode 100644 index 65dc7136..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_is.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_is); - -trellis_viterbi_combined_is_sptr trellis_make_viterbi_combined_is ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_is : public gr_block -{ -private: - trellis_viterbi_combined_is ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_sb.cc b/gr-trellis/src/lib/trellis_viterbi_combined_sb.cc deleted file mode 100644 index 103df314..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_sb.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_sb_sptr -trellis_make_viterbi_combined_sb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_sb_sptr (new trellis_viterbi_combined_sb (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_sb::trellis_viterbi_combined_sb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_sb", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_sb::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_sb::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const short *in, unsigned char *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (unsigned char) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_sb::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_sb; -typedef boost::shared_ptr trellis_viterbi_combined_sb_sptr; - -trellis_viterbi_combined_sb_sptr trellis_make_viterbi_combined_sb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_sb : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_sb_sptr trellis_make_viterbi_combined_sb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_sb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_sb.i b/gr-trellis/src/lib/trellis_viterbi_combined_sb.i deleted file mode 100644 index 55d3a86f..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_sb.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_sb); - -trellis_viterbi_combined_sb_sptr trellis_make_viterbi_combined_sb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_sb : public gr_block -{ -private: - trellis_viterbi_combined_sb ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_si.cc b/gr-trellis/src/lib/trellis_viterbi_combined_si.cc deleted file mode 100644 index 48b20836..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_si.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_si_sptr -trellis_make_viterbi_combined_si ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_si_sptr (new trellis_viterbi_combined_si (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_si::trellis_viterbi_combined_si ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_si", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_si::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_si::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const short *in, int *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (int) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_si::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_si; -typedef boost::shared_ptr trellis_viterbi_combined_si_sptr; - -trellis_viterbi_combined_si_sptr trellis_make_viterbi_combined_si ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_si : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_si_sptr trellis_make_viterbi_combined_si ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_si ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_si.i b/gr-trellis/src/lib/trellis_viterbi_combined_si.i deleted file mode 100644 index 94362d6f..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_si.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_si); - -trellis_viterbi_combined_si_sptr trellis_make_viterbi_combined_si ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_si : public gr_block -{ -private: - trellis_viterbi_combined_si ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_ss.cc b/gr-trellis/src/lib/trellis_viterbi_combined_ss.cc deleted file mode 100644 index 7e64c4fd..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_ss.cc +++ /dev/null @@ -1,190 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_ss_sptr -trellis_make_viterbi_combined_ss ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_ss_sptr (new trellis_viterbi_combined_ss (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_ss::trellis_viterbi_combined_ss ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_ss", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void trellis_viterbi_combined_ss::set_TABLE(const std::vector &table) -{ - d_TABLE = table; -} - -void -trellis_viterbi_combined_ss::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const short *in, short *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (short) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_ss::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_ss; -typedef boost::shared_ptr trellis_viterbi_combined_ss_sptr; - -trellis_viterbi_combined_ss_sptr trellis_make_viterbi_combined_ss ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_combined_ss : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_ss_sptr trellis_make_viterbi_combined_ss ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_ss ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_ss.i b/gr-trellis/src/lib/trellis_viterbi_combined_ss.i deleted file mode 100644 index 035e7b32..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_ss.i +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_ss); - -trellis_viterbi_combined_ss_sptr trellis_make_viterbi_combined_ss ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_ss : public gr_block -{ -private: - trellis_viterbi_combined_ss ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void set_TABLE (const std::vector &table); -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_i.cc b/gr-trellis/src/lib/trellis_viterbi_i.cc deleted file mode 100644 index 487b6d54..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_i.cc +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_i_sptr -trellis_make_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK) -{ - return trellis_viterbi_i_sptr (new trellis_viterbi_i (FSM,K,S0,SK)); -} - -trellis_viterbi_i::trellis_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK) - : gr_block ("viterbi_i", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_FSM.O())); - set_output_multiple (d_K); -} - - -void -trellis_viterbi_i::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_FSM.O() * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - const float *in, int *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - int alphai; - float norm,mm,minm; - int minmi; - int st; - - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (int) PI[st][i0]; - st=PS[st][i0]; - } - -} - - - - - - -int -trellis_viterbi_i::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m - -class trellis_viterbi_i; -typedef boost::shared_ptr trellis_viterbi_i_sptr; - -trellis_viterbi_i_sptr trellis_make_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK); - - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_i : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - //std::vector d_trace; - - friend trellis_viterbi_i_sptr trellis_make_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK); - - - trellis_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_i.i b/gr-trellis/src/lib/trellis_viterbi_i.i deleted file mode 100644 index 2968884f..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_i.i +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_i); - -trellis_viterbi_i_sptr trellis_make_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK); - - -class trellis_viterbi_i : public gr_block -{ -private: - trellis_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_s.cc b/gr-trellis/src/lib/trellis_viterbi_s.cc deleted file mode 100644 index 94a9c0be..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_s.cc +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_s_sptr -trellis_make_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK) -{ - return trellis_viterbi_s_sptr (new trellis_viterbi_s (FSM,K,S0,SK)); -} - -trellis_viterbi_s::trellis_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK) - : gr_block ("viterbi_s", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_FSM.O())); - set_output_multiple (d_K); -} - - -void -trellis_viterbi_s::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_FSM.O() * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - const float *in, short *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - int alphai; - float norm,mm,minm; - int minmi; - int st; - - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (short) PI[st][i0]; - st=PS[st][i0]; - } - -} - - - - - - -int -trellis_viterbi_s::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m - -class trellis_viterbi_s; -typedef boost::shared_ptr trellis_viterbi_s_sptr; - -trellis_viterbi_s_sptr trellis_make_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK); - - - -/*! - * \ingroup coding_blk - */ -class trellis_viterbi_s : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - //std::vector d_trace; - - friend trellis_viterbi_s_sptr trellis_make_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK); - - - trellis_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_s.i b/gr-trellis/src/lib/trellis_viterbi_s.i deleted file mode 100644 index e417044a..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_s.i +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- 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 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: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_s); - -trellis_viterbi_s_sptr trellis_make_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK); - - -class trellis_viterbi_s : public gr_block -{ -private: - trellis_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } -}; diff --git a/grc/freedesktop/gnuradio-grc.desktop b/grc/freedesktop/gnuradio-grc.desktop deleted file mode 100644 index d9c70ca9..00000000 --- a/grc/freedesktop/gnuradio-grc.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=GRC -Exec=grc %F -Categories=Development; -MimeType=application/gnuradio-grc; -Icon=gnuradio-grc diff --git a/grc/freedesktop/grc_setup_freedesktop b/grc/freedesktop/grc_setup_freedesktop deleted file mode 100644 index b3539cf8..00000000 --- a/grc/freedesktop/grc_setup_freedesktop +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -################################################## -# setup grc on a freedesktop platform -# $1 should be install or uninstall -# $2 is the optional path to the files -# when $2 is unspecified, the path is: -# /home/jcorgan/.local/share/gnuradio/grc/freedesktop -################################################## - -ICON_SIZES="32 48 64 128 256" -MENU_ITEMS="grc usrp2_probe usrp_probe" -if [ -n "$2" ]; then - SRCDIR="$2" -else - SRCDIR="/home/jcorgan/.local/share/gnuradio/grc/freedesktop" -fi - -case "$1" in -'install') - echo "Begin freedesktop install..." - for size in ${ICON_SIZES}; do \ - echo "Install icon: ${size}x${size}" - xdg-icon-resource install --context mimetypes --theme gnome --size ${size} ${SRCDIR}/grc-icon-${size}.png application-gnuradio-grc; \ - xdg-icon-resource install --context mimetypes --size ${size} ${SRCDIR}/grc-icon-${size}.png application-gnuradio-grc; \ - xdg-icon-resource install --context apps --theme gnome --size ${size} ${SRCDIR}/grc-icon-${size}.png gnuradio-grc; \ - xdg-icon-resource install --context apps --size ${size} ${SRCDIR}/grc-icon-${size}.png gnuradio-grc; \ - done - echo "Install mime type" - xdg-mime install ${SRCDIR}/gnuradio-grc.xml - echo "Install menu items" - for menu_item in ${MENU_ITEMS}; do \ - xdg-desktop-menu install ${SRCDIR}/gnuradio-${menu_item}.desktop; \ - done - echo "Done!" - echo "" - ;; -'uninstall') - echo "Begin freedesktop uninstall..." - for size in ${ICON_SIZES}; do \ - echo "Uninstall icon: ${size}x${size}" - xdg-icon-resource uninstall --context mimetypes --theme gnome --size ${size} application-gnuradio-grc; \ - xdg-icon-resource uninstall --context mimetypes --size ${size} application-gnuradio-grc; \ - xdg-icon-resource uninstall --context apps --theme gnome --size ${size} gnuradio-grc; \ - xdg-icon-resource uninstall --context apps --size ${size} gnuradio-grc; \ - done - echo "Uninstall mime type" - xdg-mime uninstall ${SRCDIR}/gnuradio-grc.xml - echo "Uninstall menu items" - for menu_item in ${MENU_ITEMS}; do \ - xdg-desktop-menu uninstall gnuradio-${menu_item}.desktop; \ - done - echo "Done!" - echo "" - ;; -*) - echo "Usage: $0 [install|uninstall]" - ;; -esac diff --git a/grc/grc.conf b/grc/grc.conf deleted file mode 100644 index 348e18e3..00000000 --- a/grc/grc.conf +++ /dev/null @@ -1,9 +0,0 @@ -# This file contains system wide configuration data for GNU Radio. -# You may override any setting on a per-user basis by editing -# ~/.gnuradio/config.conf - -[grc] -pythonw = python -doc_dir = /home/jcorgan/.local/share/doc/gnuradio-3.2.2 -global_blocks_path = /home/jcorgan/.local/share/gnuradio/grc/blocks -local_blocks_path = diff --git a/grc/scripts/grc b/grc/scripts/grc deleted file mode 100755 index 8a6cc0af..00000000 --- a/grc/scripts/grc +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python -""" -Copyright 2009 Free Software Foundation, Inc. -This file is part of GNU Radio - -GNU Radio Companion 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 -of the License, or (at your option) any later version. - -GNU Radio Companion 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, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -""" - -import pygtk -pygtk.require('2.0') -import gtk - -try: from gnuradio import gr -except ImportError, e: - d = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_CLOSE, message_format=""" -Cannot import gnuradio. Are your PYTHONPATH and LD_LIBRARY_PATH set correctly?""") - d.set_title(str(e)) - d.run() - exit(-1) - -from gnuradio.grc import VERSION -from optparse import OptionParser - -if __name__ == "__main__": - usage = 'usage: %prog [options] [saved flow graphs]' - version = """ -GNU Radio Companion %s - -This program is part of GNU Radio -GRC comes with ABSOLUTELY NO WARRANTY. -This is free software, -and you are welcome to redistribute it. -"""%VERSION - parser = OptionParser(usage=usage, version=version) - (options, args) = parser.parse_args() - from gnuradio.grc.python.Platform import Platform - from gnuradio.grc.gui.ActionHandler import ActionHandler - #setup icon using icon theme - try: gtk.window_set_default_icon(gtk.IconTheme().load_icon('gnuradio-grc', 256, 0)) - except: pass - ActionHandler(args, Platform()) - diff --git a/gruel/src/include/gruel/inet.h b/gruel/src/include/gruel/inet.h deleted file mode 100644 index 61a14683..00000000 --- a/gruel/src/include/gruel/inet.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 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 . - */ - -#ifndef INCLUDED_INET_H -#define INCLUDED_INET_H - -#if 1 /* GR_HAVE_ARPA_INET */ -#include -#elif 1 /* GR_HAVE_NETINET_IN */ -#include -#else -#include - -#if 0 /* GR_ARCH_BIGENDIAN */ -// Nothing to do... -static inline uint32_t htonl(uint32_t x){ return x; } -static inline uint16_t htons(uint16_t x){ return x; } -static inline uint32_t ntohl(uint32_t x){ return x; } -static inline uint16_t ntohs(uint16_t x){ return x; } -#else -#if 1 /* GR_HAVE_BYTESWAP */ -#include -#else -static inline uint16_t -bswap_16 (uint16_t x) -{ - return ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)); -} - -static inline uint32_t -bswap_32 (uint32_t x) -{ - return ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) \ - | (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)); -} -#endif /* GR_HAVE_BYTESWAP */ - -static inline uint32_t htonl(uint32_t x){ return bswap_32(x); } -static inline uint16_t htons(uint16_t x){ return bswap_16(x); } -static inline uint32_t ntohl(uint32_t x){ return bswap_32(x); } -static inline uint16_t ntohs(uint16_t x){ return bswap_16(x); } -#endif /* GR_ARCH_BIGENDIAN */ - -#endif /* !(GR_HAVE_NETINET_IN || GR_HAVE_ARPA_INET) */ - -static inline uint8_t ntohx(uint8_t x){ return x; } -static inline uint16_t ntohx(uint16_t x){ return ntohs(x); } -static inline uint32_t ntohx(uint32_t x){ return ntohl(x); } -static inline uint8_t htonx(uint8_t x){ return x; } -static inline uint16_t htonx(uint16_t x){ return htons(x); } -static inline uint32_t htonx(uint32_t x){ return htonl(x); } - -#endif /* INCLUDED_INET_H */ diff --git a/usrp/firmware/src/usrp2/usrp_gpif.c b/usrp/firmware/src/usrp2/usrp_gpif.c deleted file mode 100644 index 1191c8b2..00000000 --- a/usrp/firmware/src/usrp2/usrp_gpif.c +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Machine generated by "edit-gpif". Do not edit by hand. - */ - -// This program configures the General Programmable Interface (GPIF) for FX2. -// Please do not modify sections of text which are marked as "DO NOT EDIT ...". -// -// DO NOT EDIT ... -// GPIF Initialization -// Interface Timing Async -// Internal Ready Init IntRdy=1 -// CTL Out Tristate-able Binary -// SingleWrite WF Select 1 -// SingleRead WF Select 0 -// FifoWrite WF Select 3 -// FifoRead WF Select 2 -// Data Bus Idle Drive Tristate -// END DO NOT EDIT - -// DO NOT EDIT ... -// GPIF Wave Names -// Wave 0 = singlerd -// Wave 1 = singlewr -// Wave 2 = FIFORd -// Wave 3 = FIFOWr - -// GPIF Ctrl Outputs Level -// CTL 0 = WEN# CMOS -// CTL 1 = REN# CMOS -// CTL 2 = OE# CMOS -// CTL 3 = CLRST CMOS -// CTL 4 = unused CMOS -// CTL 5 = BOGUS CMOS - -// GPIF Rdy Inputs -// RDY0 = EF# -// RDY1 = FF# -// RDY2 = unused -// RDY3 = unused -// RDY4 = unused -// RDY5 = TCXpire -// FIFOFlag = FIFOFlag -// IntReady = IntReady -// END DO NOT EDIT -// DO NOT EDIT ... -// -// GPIF Waveform 0: singlerd -// -// Interval 0 1 2 3 4 5 6 Idle (7) -// _________ _________ _________ _________ _________ _________ _________ _________ -// -// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val -// DataMode NO Data NO Data NO Data NO Data NO Data NO Data NO Data -// NextData SameData SameData SameData SameData SameData SameData SameData -// Int Trig No Int No Int No Int No Int No Int No Int No Int -// IF/Wait Wait 1 Wait 1 Wait 1 Wait 1 Wait 1 Wait 1 Wait 1 -// Term A -// LFunc -// Term B -// Branch1 -// Branch0 -// Re-Exec -// Sngl/CRC Default Default Default Default Default Default Default -// WEN# 0 0 0 0 0 0 0 0 -// REN# 0 0 0 0 0 0 0 0 -// OE# 0 0 0 0 0 0 0 0 -// CLRST 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// BOGUS 0 0 0 0 0 0 0 0 -// -// END DO NOT EDIT -// DO NOT EDIT ... -// -// GPIF Waveform 1: singlewr -// -// Interval 0 1 2 3 4 5 6 Idle (7) -// _________ _________ _________ _________ _________ _________ _________ _________ -// -// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val -// DataMode Activate Activate Activate Activate Activate Activate Activate -// NextData SameData SameData SameData SameData SameData SameData SameData -// Int Trig No Int No Int No Int No Int No Int No Int No Int -// IF/Wait Wait 1 IF Wait 1 Wait 1 Wait 1 Wait 1 Wait 1 -// Term A EF# -// LFunc AND -// Term B EF# -// Branch1 ThenIdle -// Branch0 ElseIdle -// Re-Exec No -// Sngl/CRC Default Default Default Default Default Default Default -// WEN# 0 1 1 1 1 1 1 0 -// REN# 0 0 0 0 0 0 0 0 -// OE# 0 0 0 0 0 0 0 0 -// CLRST 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// BOGUS 0 0 0 0 0 0 0 0 -// -// END DO NOT EDIT -// DO NOT EDIT ... -// -// GPIF Waveform 2: FIFORd -// -// Interval 0 1 2 3 4 5 6 Idle (7) -// _________ _________ _________ _________ _________ _________ _________ _________ -// -// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val -// DataMode NO Data Activate NO Data NO Data NO Data NO Data NO Data -// NextData SameData SameData SameData SameData SameData SameData SameData -// Int Trig No Int No Int No Int No Int No Int No Int No Int -// IF/Wait Wait 1 IF Wait 1 IF Wait 1 Wait 1 Wait 1 -// Term A TCXpire TCXpire -// LFunc AND AND -// Term B TCXpire TCXpire -// Branch1 Then 2 ThenIdle -// Branch0 Else 1 ElseIdle -// Re-Exec No No -// Sngl/CRC Default Default Default Default Default Default Default -// WEN# 0 0 0 0 0 0 0 0 -// REN# 1 0 0 0 0 0 0 0 -// OE# 1 1 1 0 0 0 0 0 -// CLRST 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// BOGUS 0 0 0 0 0 0 0 0 -// -// END DO NOT EDIT -// DO NOT EDIT ... -// -// GPIF Waveform 3: FIFOWr -// -// Interval 0 1 2 3 4 5 6 Idle (7) -// _________ _________ _________ _________ _________ _________ _________ _________ -// -// AddrMode Same Val Same Val Same Val Same Val Same Val Same Val Same Val -// DataMode NO Data Activate Activate Activate Activate Activate Activate -// NextData SameData SameData SameData SameData SameData SameData SameData -// Int Trig No Int No Int No Int No Int No Int No Int No Int -// IF/Wait Wait 1 IF Wait 1 Wait 1 Wait 1 Wait 1 Wait 1 -// Term A TCXpire -// LFunc AND -// Term B TCXpire -// Branch1 ThenIdle -// Branch0 Else 1 -// Re-Exec No -// Sngl/CRC Default Default Default Default Default Default Default -// WEN# 0 0 0 0 0 0 0 0 -// REN# 0 0 0 0 0 0 0 0 -// OE# 0 0 0 0 0 0 0 0 -// CLRST 0 0 0 0 0 0 0 0 -// unused 0 0 0 0 0 0 0 0 -// BOGUS 0 0 0 0 0 0 0 0 -// -// END DO NOT EDIT - -// GPIF Program Code - -// DO NOT EDIT ... -// #include "fx2.h" -// #include "fx2regs.h" -// #include "fx2sdly.h" // SYNCDELAY macro -// END DO NOT EDIT - -// DO NOT EDIT ... -const char WaveData[128] = -{ -// Wave 0 -/* LenBr */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07, -/* Opcode*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -/* Output*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, -// Wave 1 -/* LenBr */ 0x01, 0x3F, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07, -/* Opcode*/ 0x22, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, -/* Output*/ 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, -/* LFun */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, -// Wave 2 -/* LenBr */ 0x01, 0x11, 0x01, 0x3F, 0x01, 0x01, 0x01, 0x07, -/* Opcode*/ 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, -/* Output*/ 0x06, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, -/* LFun */ 0x00, 0x2D, 0x00, 0x2D, 0x00, 0x00, 0x00, 0x3F, -// Wave 3 -/* LenBr */ 0x01, 0x39, 0x01, 0x01, 0x01, 0x01, 0x01, 0x07, -/* Opcode*/ 0x00, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, -/* Output*/ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -/* LFun */ 0x00, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, -}; -// END DO NOT EDIT - -// DO NOT EDIT ... -const char FlowStates[36] = -{ -/* Wave 0 FlowStates */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -/* Wave 1 FlowStates */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -/* Wave 2 FlowStates */ 0x81,0x2D,0x26,0x00,0x04,0x04,0x03,0x02,0x00, -/* Wave 3 FlowStates */ 0x81,0x2D,0x21,0x00,0x04,0x04,0x03,0x02,0x00, -}; -// END DO NOT EDIT - -// DO NOT EDIT ... -const char InitData[7] = -{ -/* Regs */ 0xA0,0x00,0x00,0x00,0xEE,0x4E,0x00 -}; -// END DO NOT EDIT - -// TO DO: You may add additional code below. -