+++ /dev/null
-//
-// This file is machine generated. All edits will be overwritten
-//
-%{
-#include <gr_fir_filter_ccc.h>
-#include <gr_fir_filter_ccf.h>
-#include <gr_fir_filter_fcc.h>
-#include <gr_fir_filter_fff.h>
-#include <gr_fir_filter_fsf.h>
-#include <gr_fir_filter_scc.h>
-#include <gr_freq_xlating_fir_filter_ccc.h>
-#include <gr_freq_xlating_fir_filter_ccf.h>
-#include <gr_freq_xlating_fir_filter_fcc.h>
-#include <gr_freq_xlating_fir_filter_fcf.h>
-#include <gr_freq_xlating_fir_filter_scc.h>
-#include <gr_freq_xlating_fir_filter_scf.h>
-#include <gr_interp_fir_filter_ccc.h>
-#include <gr_interp_fir_filter_ccf.h>
-#include <gr_interp_fir_filter_fcc.h>
-#include <gr_interp_fir_filter_fff.h>
-#include <gr_interp_fir_filter_fsf.h>
-#include <gr_interp_fir_filter_scc.h>
-#include <gr_rational_resampler_base_ccc.h>
-#include <gr_rational_resampler_base_ccf.h>
-#include <gr_rational_resampler_base_fcc.h>
-#include <gr_rational_resampler_base_fff.h>
-#include <gr_rational_resampler_base_fsf.h>
-#include <gr_rational_resampler_base_scc.h>
-%}
-
-%include <gr_fir_filter_ccc.i>
-%include <gr_fir_filter_ccf.i>
-%include <gr_fir_filter_fcc.i>
-%include <gr_fir_filter_fff.i>
-%include <gr_fir_filter_fsf.i>
-%include <gr_fir_filter_scc.i>
-%include <gr_freq_xlating_fir_filter_ccc.i>
-%include <gr_freq_xlating_fir_filter_ccf.i>
-%include <gr_freq_xlating_fir_filter_fcc.i>
-%include <gr_freq_xlating_fir_filter_fcf.i>
-%include <gr_freq_xlating_fir_filter_scc.i>
-%include <gr_freq_xlating_fir_filter_scf.i>
-%include <gr_interp_fir_filter_ccc.i>
-%include <gr_interp_fir_filter_ccf.i>
-%include <gr_interp_fir_filter_fcc.i>
-%include <gr_interp_fir_filter_fff.i>
-%include <gr_interp_fir_filter_fsf.i>
-%include <gr_interp_fir_filter_scc.i>
-%include <gr_rational_resampler_base_ccc.i>
-%include <gr_rational_resampler_base_ccf.i>
-%include <gr_rational_resampler_base_fcc.i>
-%include <gr_rational_resampler_base_fff.i>
-%include <gr_rational_resampler_base_fsf.i>
-%include <gr_rational_resampler_base_scc.i>
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_ccc.h>
-
-gr_fir_ccc::~gr_fir_ccc ()
-{
-}
+++ /dev/null
-/* -*- 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 <vector>
-#include <gr_types.h>
-#include <gr_reverse.h>
-
-/*!
- * \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<gr_complex> 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<gr_complex> &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<gr_complex> &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<gr_complex> get_taps () const
- {
- return gr_reverse(d_taps);
- }
-};
-
-#endif /* INCLUDED_GR_FIR_CCC_H */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_ccc_generic.h>
-
-#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;
- }
-}
+++ /dev/null
-/* -*- 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 <gr_fir_ccc.h>
-
-/*!
- * \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<gr_complex> &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 */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_ccf.h>
-
-gr_fir_ccf::~gr_fir_ccf ()
-{
-}
+++ /dev/null
-/* -*- 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 <vector>
-#include <gr_types.h>
-#include <gr_reverse.h>
-
-/*!
- * \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<float> 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<float> &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<float> &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<float> get_taps () const
- {
- return gr_reverse(d_taps);
- }
-};
-
-#endif /* INCLUDED_GR_FIR_CCF_H */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_ccf_generic.h>
-
-#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;
- }
-}
+++ /dev/null
-/* -*- 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 <gr_fir_ccf.h>
-
-/*!
- * \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<float> &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 */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_fcc.h>
-
-gr_fir_fcc::~gr_fir_fcc ()
-{
-}
+++ /dev/null
-/* -*- 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 <vector>
-#include <gr_types.h>
-#include <gr_reverse.h>
-
-/*!
- * \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<gr_complex> 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<gr_complex> &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<gr_complex> &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<gr_complex> get_taps () const
- {
- return gr_reverse(d_taps);
- }
-};
-
-#endif /* INCLUDED_GR_FIR_FCC_H */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_fcc_generic.h>
-
-#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;
- }
-}
+++ /dev/null
-/* -*- 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 <gr_fir_fcc.h>
-
-/*!
- * \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<gr_complex> &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 */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_fff.h>
-
-gr_fir_fff::~gr_fir_fff ()
-{
-}
+++ /dev/null
-/* -*- 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 <vector>
-
-#include <gr_reverse.h>
-
-/*!
- * \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<float> 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<float> &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<float> &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<float> get_taps () const
- {
- return gr_reverse(d_taps);
- }
-};
-
-#endif /* INCLUDED_GR_FIR_FFF_H */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_fff_generic.h>
-
-#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;
- }
-}
+++ /dev/null
-/* -*- 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 <gr_fir_fff.h>
-
-/*!
- * \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<float> &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 */
+++ /dev/null
-/* -*- 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 <gr_fir_filter_ccc.h>
-#include <gr_fir_ccc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_fir_filter_ccc_sptr gr_make_fir_filter_ccc (int decimation, const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-
-class gr_fir_filter_ccc;
-typedef boost::shared_ptr<gr_fir_filter_ccc> gr_fir_filter_ccc_sptr;
-gr_fir_filter_ccc_sptr gr_make_fir_filter_ccc (int decimation, const std::vector<gr_complex> &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<gr_complex> &taps);
-
- gr_fir_ccc *d_fir;
- std::vector<gr_complex> d_new_taps;
- bool d_updated;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_fir_filter_ccc (int decimation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_fir_filter_ccc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<gr_complex> &taps);
-
-class gr_fir_filter_ccc : public gr_sync_decimator
-{
- private:
- gr_fir_filter_ccc (int decimation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_fir_filter_ccc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_fir_filter_ccf.h>
-#include <gr_fir_ccf.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_fir_filter_ccf_sptr gr_make_fir_filter_ccf (int decimation, const std::vector<float> &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<float> &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<float> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-
-class gr_fir_filter_ccf;
-typedef boost::shared_ptr<gr_fir_filter_ccf> gr_fir_filter_ccf_sptr;
-gr_fir_filter_ccf_sptr gr_make_fir_filter_ccf (int decimation, const std::vector<float> &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<float> &taps);
-
- gr_fir_ccf *d_fir;
- std::vector<float> d_new_taps;
- bool d_updated;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_fir_filter_ccf (int decimation, const std::vector<float> &taps);
-
- public:
- ~gr_fir_filter_ccf ();
-
- void set_taps (const std::vector<float> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<float> &taps);
-
-class gr_fir_filter_ccf : public gr_sync_decimator
-{
- private:
- gr_fir_filter_ccf (int decimation, const std::vector<float> &taps);
-
- public:
- ~gr_fir_filter_ccf ();
-
- void set_taps (const std::vector<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_fir_filter_fcc.h>
-#include <gr_fir_fcc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_fir_filter_fcc_sptr gr_make_fir_filter_fcc (int decimation, const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-
-class gr_fir_filter_fcc;
-typedef boost::shared_ptr<gr_fir_filter_fcc> gr_fir_filter_fcc_sptr;
-gr_fir_filter_fcc_sptr gr_make_fir_filter_fcc (int decimation, const std::vector<gr_complex> &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<gr_complex> &taps);
-
- gr_fir_fcc *d_fir;
- std::vector<gr_complex> d_new_taps;
- bool d_updated;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_fir_filter_fcc (int decimation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_fir_filter_fcc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<gr_complex> &taps);
-
-class gr_fir_filter_fcc : public gr_sync_decimator
-{
- private:
- gr_fir_filter_fcc (int decimation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_fir_filter_fcc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_fir_filter_fff.h>
-#include <gr_fir_fff.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_fir_filter_fff_sptr gr_make_fir_filter_fff (int decimation, const std::vector<float> &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<float> &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<float> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-
-class gr_fir_filter_fff;
-typedef boost::shared_ptr<gr_fir_filter_fff> gr_fir_filter_fff_sptr;
-gr_fir_filter_fff_sptr gr_make_fir_filter_fff (int decimation, const std::vector<float> &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<float> &taps);
-
- gr_fir_fff *d_fir;
- std::vector<float> d_new_taps;
- bool d_updated;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_fir_filter_fff (int decimation, const std::vector<float> &taps);
-
- public:
- ~gr_fir_filter_fff ();
-
- void set_taps (const std::vector<float> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<float> &taps);
-
-class gr_fir_filter_fff : public gr_sync_decimator
-{
- private:
- gr_fir_filter_fff (int decimation, const std::vector<float> &taps);
-
- public:
- ~gr_fir_filter_fff ();
-
- void set_taps (const std::vector<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_fir_filter_fsf.h>
-#include <gr_fir_fsf.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_fir_filter_fsf_sptr gr_make_fir_filter_fsf (int decimation, const std::vector<float> &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<float> &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<float> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-
-class gr_fir_filter_fsf;
-typedef boost::shared_ptr<gr_fir_filter_fsf> gr_fir_filter_fsf_sptr;
-gr_fir_filter_fsf_sptr gr_make_fir_filter_fsf (int decimation, const std::vector<float> &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<float> &taps);
-
- gr_fir_fsf *d_fir;
- std::vector<float> d_new_taps;
- bool d_updated;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_fir_filter_fsf (int decimation, const std::vector<float> &taps);
-
- public:
- ~gr_fir_filter_fsf ();
-
- void set_taps (const std::vector<float> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<float> &taps);
-
-class gr_fir_filter_fsf : public gr_sync_decimator
-{
- private:
- gr_fir_filter_fsf (int decimation, const std::vector<float> &taps);
-
- public:
- ~gr_fir_filter_fsf ();
-
- void set_taps (const std::vector<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_fir_filter_scc.h>
-#include <gr_fir_scc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_fir_filter_scc_sptr gr_make_fir_filter_scc (int decimation, const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-
-class gr_fir_filter_scc;
-typedef boost::shared_ptr<gr_fir_filter_scc> gr_fir_filter_scc_sptr;
-gr_fir_filter_scc_sptr gr_make_fir_filter_scc (int decimation, const std::vector<gr_complex> &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<gr_complex> &taps);
-
- gr_fir_scc *d_fir;
- std::vector<gr_complex> d_new_taps;
- bool d_updated;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_fir_filter_scc (int decimation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_fir_filter_scc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<gr_complex> &taps);
-
-class gr_fir_filter_scc : public gr_sync_decimator
-{
- private:
- gr_fir_filter_scc (int decimation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_fir_filter_scc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_fsf.h>
-
-gr_fir_fsf::~gr_fir_fsf ()
-{
-}
+++ /dev/null
-/* -*- 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 <vector>
-
-#include <gr_reverse.h>
-
-/*!
- * \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<float> 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<float> &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<float> &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<float> get_taps () const
- {
- return gr_reverse(d_taps);
- }
-};
-
-#endif /* INCLUDED_GR_FIR_FSF_H */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_fsf_generic.h>
-
-#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;
- }
-}
+++ /dev/null
-/* -*- 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 <gr_fir_fsf.h>
-
-/*!
- * \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<float> &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 */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_scc.h>
-
-gr_fir_scc::~gr_fir_scc ()
-{
-}
+++ /dev/null
-/* -*- 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 <vector>
-#include <gr_types.h>
-#include <gr_reverse.h>
-
-/*!
- * \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<gr_complex> 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<gr_complex> &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<gr_complex> &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<gr_complex> get_taps () const
- {
- return gr_reverse(d_taps);
- }
-};
-
-#endif /* INCLUDED_GR_FIR_SCC_H */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_scc_generic.h>
-
-#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;
- }
-}
+++ /dev/null
-/* -*- 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 <gr_fir_scc.h>
-
-/*!
- * \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<gr_complex> &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 */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_sysconfig.h>
-
-gr_fir_sysconfig::~gr_fir_sysconfig ()
-{
-}
+++ /dev/null
-/* -*- 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 <gr_types.h>
-
-#include <gr_fir_util.h>
-
-/*!
- * \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<float> &taps) = 0;
- virtual gr_fir_fcc *create_gr_fir_fcc (const std::vector<gr_complex> &taps) = 0;
- virtual gr_fir_ccc *create_gr_fir_ccc (const std::vector<gr_complex> &taps) = 0;
- virtual gr_fir_fff *create_gr_fir_fff (const std::vector<float> &taps) = 0;
- virtual gr_fir_scc *create_gr_fir_scc (const std::vector<gr_complex> &taps) = 0;
- virtual gr_fir_fsf *create_gr_fir_fsf (const std::vector<float> &taps) = 0;
-
- virtual void get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info) = 0;
- virtual void get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info) = 0;
- virtual void get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info) = 0;
- virtual void get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info) = 0;
- virtual void get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info) = 0;
- virtual void get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *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 */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_sysconfig_generic.h>
-
-#include <gr_fir_ccf_generic.h>
-#include <gr_fir_fcc_generic.h>
-#include <gr_fir_ccc_generic.h>
-#include <gr_fir_fff_generic.h>
-#include <gr_fir_scc_generic.h>
-#include <gr_fir_fsf_generic.h>
-
-/*
- * ----------------------------------------------------------------
- * static functions that serve as constructors returned by info
- * ----------------------------------------------------------------
- */
-
-static gr_fir_ccf *
-make_gr_fir_ccf (const std::vector<float> &taps)
-{
- return new gr_fir_ccf_generic (taps);
-}
-
-static gr_fir_fcc *
-make_gr_fir_fcc (const std::vector<gr_complex> &taps)
-{
- return new gr_fir_fcc_generic (taps);
-}
-
-static gr_fir_ccc *
-make_gr_fir_ccc (const std::vector<gr_complex> &taps)
-{
- return new gr_fir_ccc_generic (taps);
-}
-
-static gr_fir_fff *
-make_gr_fir_fff (const std::vector<float> &taps)
-{
- return new gr_fir_fff_generic (taps);
-}
-
-static gr_fir_scc *
-make_gr_fir_scc (const std::vector<gr_complex> &taps)
-{
- return new gr_fir_scc_generic (taps);
-}
-
-static gr_fir_fsf *
-make_gr_fir_fsf (const std::vector<float> &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<float> &taps)
-{
- return make_gr_fir_ccf (taps);
-}
-
-gr_fir_fcc *
-gr_fir_sysconfig_generic::create_gr_fir_fcc (const std::vector<gr_complex> &taps)
-{
- return make_gr_fir_fcc (taps);
-}
-
-gr_fir_ccc *
-gr_fir_sysconfig_generic::create_gr_fir_ccc (const std::vector<gr_complex> &taps)
-{
- return make_gr_fir_ccc (taps);
-}
-
-gr_fir_fff *
-gr_fir_sysconfig_generic::create_gr_fir_fff (const std::vector<float> &taps)
-{
- return make_gr_fir_fff (taps);
-}
-
-gr_fir_scc *
-gr_fir_sysconfig_generic::create_gr_fir_scc (const std::vector<gr_complex> &taps)
-{
- return make_gr_fir_scc (taps);
-}
-
-gr_fir_fsf *
-gr_fir_sysconfig_generic::create_gr_fir_fsf (const std::vector<float> &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<gr_fir_ccf_info> *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<gr_fir_fcc_info> *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<gr_fir_ccc_info> *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<gr_fir_fff_info> *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<gr_fir_scc_info> *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<gr_fir_fsf_info> *info)
-{
- info->resize (1);
- (*info)[0].name = "generic";
- (*info)[0].create = make_gr_fir_fsf;
-}
+++ /dev/null
-/* -*- 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 <gr_fir_sysconfig.h>
-
-
-class gr_fir_sysconfig_generic : public gr_fir_sysconfig {
-public:
- virtual gr_fir_ccf *create_gr_fir_ccf (const std::vector<float> &taps);
- virtual gr_fir_fcc *create_gr_fir_fcc (const std::vector<gr_complex> &taps);
- virtual gr_fir_ccc *create_gr_fir_ccc (const std::vector<gr_complex> &taps);
- virtual gr_fir_fff *create_gr_fir_fff (const std::vector<float> &taps);
- virtual gr_fir_scc *create_gr_fir_scc (const std::vector<gr_complex> &taps);
- virtual gr_fir_fsf *create_gr_fir_fsf (const std::vector<float> &taps);
-
- virtual void get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info);
- virtual void get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info);
- virtual void get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info);
- virtual void get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info);
- virtual void get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info);
- virtual void get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info);
-
-};
-
-
-#endif /* _GR_FIR_SYSCONFIG_GENERIC_H_ */
+++ /dev/null
-/* -*- 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 <config.h>
-#endif
-#include <gr_fir_util.h>
-#include <gr_fir_sysconfig.h>
-
-//
-// 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<float> &taps)
-{
- return gr_fir_sysconfig_singleton()->create_gr_fir_ccf (taps);
-}
-
-gr_fir_fcc *
-gr_fir_util::create_gr_fir_fcc (const std::vector<gr_complex> &taps)
-{
- return gr_fir_sysconfig_singleton()->create_gr_fir_fcc (taps);
-}
-
-gr_fir_ccc *
-gr_fir_util::create_gr_fir_ccc (const std::vector<gr_complex> &taps)
-{
- return gr_fir_sysconfig_singleton()->create_gr_fir_ccc (taps);
-}
-
-gr_fir_fff *
-gr_fir_util::create_gr_fir_fff (const std::vector<float> &taps)
-{
- return gr_fir_sysconfig_singleton()->create_gr_fir_fff (taps);
-}
-
-gr_fir_scc *
-gr_fir_util::create_gr_fir_scc (const std::vector<gr_complex> &taps)
-{
- return gr_fir_sysconfig_singleton()->create_gr_fir_scc (taps);
-}
-
-gr_fir_fsf *
-gr_fir_util::create_gr_fir_fsf (const std::vector<float> &taps)
-{
- return gr_fir_sysconfig_singleton()->create_gr_fir_fsf (taps);
-}
-
-// --- info gatherers ---
-
-
-void
-gr_fir_util::get_gr_fir_ccf_info (std::vector<gr_fir_ccf_info> *info)
-{
- gr_fir_sysconfig_singleton()->get_gr_fir_ccf_info (info);
-}
-
-void
-gr_fir_util::get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info)
-{
- gr_fir_sysconfig_singleton()->get_gr_fir_fcc_info (info);
-}
-
-void
-gr_fir_util::get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info)
-{
- gr_fir_sysconfig_singleton()->get_gr_fir_ccc_info (info);
-}
-
-void
-gr_fir_util::get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info)
-{
- gr_fir_sysconfig_singleton()->get_gr_fir_fff_info (info);
-}
-
-void
-gr_fir_util::get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info)
-{
- gr_fir_sysconfig_singleton()->get_gr_fir_scc_info (info);
-}
-
-void
-gr_fir_util::get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info)
-{
- gr_fir_sysconfig_singleton()->get_gr_fir_fsf_info (info);
-}
+++ /dev/null
-/* -*- 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 <gr_types.h>
-
-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<float> &taps);
-};
-
-struct gr_fir_fcc_info {
- const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
- gr_fir_fcc *(*create)(const std::vector<gr_complex> &taps);
-};
-
-struct gr_fir_ccc_info {
- const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
- gr_fir_ccc *(*create)(const std::vector<gr_complex> &taps);
-};
-
-struct gr_fir_fff_info {
- const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
- gr_fir_fff *(*create)(const std::vector<float> &taps);
-};
-
-struct gr_fir_scc_info {
- const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
- gr_fir_scc *(*create)(const std::vector<gr_complex> &taps);
-};
-
-struct gr_fir_fsf_info {
- const char *name; // implementation name, e.g., "generic", "SSE", "3DNow!"
- gr_fir_fsf *(*create)(const std::vector<float> &taps);
-};
-
-struct gr_fir_util {
-
- // create a fast version of gr_fir_XXX.
-
- static gr_fir_ccf *create_gr_fir_ccf (const std::vector<float> &taps);
- static gr_fir_fcc *create_gr_fir_fcc (const std::vector<gr_complex> &taps);
- static gr_fir_ccc *create_gr_fir_ccc (const std::vector<gr_complex> &taps);
- static gr_fir_fff *create_gr_fir_fff (const std::vector<float> &taps);
- static gr_fir_scc *create_gr_fir_scc (const std::vector<gr_complex> &taps);
- static gr_fir_fsf *create_gr_fir_fsf (const std::vector<float> &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<gr_fir_ccf_info> *info);
- static void get_gr_fir_fcc_info (std::vector<gr_fir_fcc_info> *info);
- static void get_gr_fir_ccc_info (std::vector<gr_fir_ccc_info> *info);
- static void get_gr_fir_fff_info (std::vector<gr_fir_fff_info> *info);
- static void get_gr_fir_scc_info (std::vector<gr_fir_scc_info> *info);
- static void get_gr_fir_fsf_info (std::vector<gr_fir_fsf_info> *info);
-
-};
-
-#endif /* INCLUDED_GR_FIR_UTIL_H */
+++ /dev/null
-/* -*- 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 <gr_freq_xlating_fir_filter_ccc.h>
-#include <gr_fir_ccc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_freq_xlating_fir_filter_ccc_sptr
-gr_make_freq_xlating_fir_filter_ccc (int decimation, const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> 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<gr_complex> 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<gr_complex> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-#include <gr_rotator.h>
-
-class gr_freq_xlating_fir_filter_ccc;
-typedef boost::shared_ptr<gr_freq_xlating_fir_filter_ccc> 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<gr_complex> &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<gr_complex> &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<gr_complex> &taps,
- double center_freq, double sampling_freq);
-
- protected:
- std::vector<gr_complex> 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<gr_complex> &taps,
- double center_freq, double sampling_freq);
-};
-
-#endif /* _gr_freq_xlating_fir_filter_ccc_H_ */
+++ /dev/null
-/* -*- 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<gr_complex> &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<gr_complex> &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<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_freq_xlating_fir_filter_ccf.h>
-#include <gr_fir_ccc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_freq_xlating_fir_filter_ccf_sptr
-gr_make_freq_xlating_fir_filter_ccf (int decimation, const std::vector<float> &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<float> &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<gr_complex> 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<gr_complex> 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<float> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-#include <gr_rotator.h>
-
-class gr_freq_xlating_fir_filter_ccf;
-typedef boost::shared_ptr<gr_freq_xlating_fir_filter_ccf> 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<float> &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<float> &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<float> &taps,
- double center_freq, double sampling_freq);
-
- protected:
- std::vector<float> 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<float> &taps,
- double center_freq, double sampling_freq);
-};
-
-#endif /* _gr_freq_xlating_fir_filter_ccf_H_ */
+++ /dev/null
-/* -*- 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<float> &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<float> &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<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_freq_xlating_fir_filter_fcc.h>
-#include <gr_fir_fcc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_freq_xlating_fir_filter_fcc_sptr
-gr_make_freq_xlating_fir_filter_fcc (int decimation, const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> 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<gr_complex> 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<gr_complex> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-#include <gr_rotator.h>
-
-class gr_freq_xlating_fir_filter_fcc;
-typedef boost::shared_ptr<gr_freq_xlating_fir_filter_fcc> 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<gr_complex> &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<gr_complex> &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<gr_complex> &taps,
- double center_freq, double sampling_freq);
-
- protected:
- std::vector<gr_complex> 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<gr_complex> &taps,
- double center_freq, double sampling_freq);
-};
-
-#endif /* _gr_freq_xlating_fir_filter_fcc_H_ */
+++ /dev/null
-/* -*- 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<gr_complex> &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<gr_complex> &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<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_freq_xlating_fir_filter_fcf.h>
-#include <gr_fir_fcc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_freq_xlating_fir_filter_fcf_sptr
-gr_make_freq_xlating_fir_filter_fcf (int decimation, const std::vector<float> &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<float> &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<gr_complex> 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<gr_complex> 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<float> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-#include <gr_rotator.h>
-
-class gr_freq_xlating_fir_filter_fcf;
-typedef boost::shared_ptr<gr_freq_xlating_fir_filter_fcf> 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<float> &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<float> &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<float> &taps,
- double center_freq, double sampling_freq);
-
- protected:
- std::vector<float> 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<float> &taps,
- double center_freq, double sampling_freq);
-};
-
-#endif /* _gr_freq_xlating_fir_filter_fcf_H_ */
+++ /dev/null
-/* -*- 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<float> &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<float> &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<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_freq_xlating_fir_filter_scc.h>
-#include <gr_fir_scc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_freq_xlating_fir_filter_scc_sptr
-gr_make_freq_xlating_fir_filter_scc (int decimation, const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> 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<gr_complex> 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<gr_complex> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-#include <gr_rotator.h>
-
-class gr_freq_xlating_fir_filter_scc;
-typedef boost::shared_ptr<gr_freq_xlating_fir_filter_scc> 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<gr_complex> &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<gr_complex> &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<gr_complex> &taps,
- double center_freq, double sampling_freq);
-
- protected:
- std::vector<gr_complex> 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<gr_complex> &taps,
- double center_freq, double sampling_freq);
-};
-
-#endif /* _gr_freq_xlating_fir_filter_scc_H_ */
+++ /dev/null
-/* -*- 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<gr_complex> &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<gr_complex> &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<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_freq_xlating_fir_filter_scf.h>
-#include <gr_fir_scc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-
-gr_freq_xlating_fir_filter_scf_sptr
-gr_make_freq_xlating_fir_filter_scf (int decimation, const std::vector<float> &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<float> &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<gr_complex> 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<gr_complex> 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<float> &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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-#include <gr_rotator.h>
-
-class gr_freq_xlating_fir_filter_scf;
-typedef boost::shared_ptr<gr_freq_xlating_fir_filter_scf> 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<float> &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<float> &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<float> &taps,
- double center_freq, double sampling_freq);
-
- protected:
- std::vector<float> 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<float> &taps,
- double center_freq, double sampling_freq);
-};
-
-#endif /* _gr_freq_xlating_fir_filter_scf_H_ */
+++ /dev/null
-/* -*- 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<float> &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<float> &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<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_interp_fir_filter_ccc.h>
-#include <gr_fir_ccc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_interp_fir_filter_ccc_sptr gr_make_interp_fir_filter_ccc (unsigned interpolation, const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> 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<gr_complex> &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<gr_complex> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <gr_complex> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_interpolator.h>
-
-class gr_interp_fir_filter_ccc;
-typedef boost::shared_ptr<gr_interp_fir_filter_ccc> gr_interp_fir_filter_ccc_sptr;
-gr_interp_fir_filter_ccc_sptr gr_make_interp_fir_filter_ccc (unsigned interpolation, const std::vector<gr_complex> &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<gr_complex> &taps);
-
- std::vector<gr_complex> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_ccc *> d_firs;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_interp_fir_filter_ccc (unsigned interpolation, const std::vector<gr_complex> &taps);
-
- void install_taps (const std::vector<gr_complex> &taps);
-
- public:
- ~gr_interp_fir_filter_ccc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<gr_complex> &taps);
-
-class gr_interp_fir_filter_ccc : public gr_sync_interpolator
-{
- private:
- gr_interp_fir_filter_ccc (int interpolation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_interp_fir_filter_ccc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_interp_fir_filter_ccf.h>
-#include <gr_fir_ccf.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_interp_fir_filter_ccf_sptr gr_make_interp_fir_filter_ccf (unsigned interpolation, const std::vector<float> &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<float> &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<float> 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<float> &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<float> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <float> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_interpolator.h>
-
-class gr_interp_fir_filter_ccf;
-typedef boost::shared_ptr<gr_interp_fir_filter_ccf> gr_interp_fir_filter_ccf_sptr;
-gr_interp_fir_filter_ccf_sptr gr_make_interp_fir_filter_ccf (unsigned interpolation, const std::vector<float> &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<float> &taps);
-
- std::vector<float> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_ccf *> d_firs;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_interp_fir_filter_ccf (unsigned interpolation, const std::vector<float> &taps);
-
- void install_taps (const std::vector<float> &taps);
-
- public:
- ~gr_interp_fir_filter_ccf ();
-
- void set_taps (const std::vector<float> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<float> &taps);
-
-class gr_interp_fir_filter_ccf : public gr_sync_interpolator
-{
- private:
- gr_interp_fir_filter_ccf (int interpolation, const std::vector<float> &taps);
-
- public:
- ~gr_interp_fir_filter_ccf ();
-
- void set_taps (const std::vector<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_interp_fir_filter_fcc.h>
-#include <gr_fir_fcc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_interp_fir_filter_fcc_sptr gr_make_interp_fir_filter_fcc (unsigned interpolation, const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> 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<gr_complex> &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<gr_complex> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <gr_complex> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_interpolator.h>
-
-class gr_interp_fir_filter_fcc;
-typedef boost::shared_ptr<gr_interp_fir_filter_fcc> gr_interp_fir_filter_fcc_sptr;
-gr_interp_fir_filter_fcc_sptr gr_make_interp_fir_filter_fcc (unsigned interpolation, const std::vector<gr_complex> &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<gr_complex> &taps);
-
- std::vector<gr_complex> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_fcc *> d_firs;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_interp_fir_filter_fcc (unsigned interpolation, const std::vector<gr_complex> &taps);
-
- void install_taps (const std::vector<gr_complex> &taps);
-
- public:
- ~gr_interp_fir_filter_fcc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<gr_complex> &taps);
-
-class gr_interp_fir_filter_fcc : public gr_sync_interpolator
-{
- private:
- gr_interp_fir_filter_fcc (int interpolation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_interp_fir_filter_fcc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_interp_fir_filter_fff.h>
-#include <gr_fir_fff.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_interp_fir_filter_fff_sptr gr_make_interp_fir_filter_fff (unsigned interpolation, const std::vector<float> &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<float> &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<float> 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<float> &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<float> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <float> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_interpolator.h>
-
-class gr_interp_fir_filter_fff;
-typedef boost::shared_ptr<gr_interp_fir_filter_fff> gr_interp_fir_filter_fff_sptr;
-gr_interp_fir_filter_fff_sptr gr_make_interp_fir_filter_fff (unsigned interpolation, const std::vector<float> &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<float> &taps);
-
- std::vector<float> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_fff *> d_firs;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_interp_fir_filter_fff (unsigned interpolation, const std::vector<float> &taps);
-
- void install_taps (const std::vector<float> &taps);
-
- public:
- ~gr_interp_fir_filter_fff ();
-
- void set_taps (const std::vector<float> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<float> &taps);
-
-class gr_interp_fir_filter_fff : public gr_sync_interpolator
-{
- private:
- gr_interp_fir_filter_fff (int interpolation, const std::vector<float> &taps);
-
- public:
- ~gr_interp_fir_filter_fff ();
-
- void set_taps (const std::vector<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_interp_fir_filter_fsf.h>
-#include <gr_fir_fsf.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_interp_fir_filter_fsf_sptr gr_make_interp_fir_filter_fsf (unsigned interpolation, const std::vector<float> &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<float> &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<float> 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<float> &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<float> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <float> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_interpolator.h>
-
-class gr_interp_fir_filter_fsf;
-typedef boost::shared_ptr<gr_interp_fir_filter_fsf> gr_interp_fir_filter_fsf_sptr;
-gr_interp_fir_filter_fsf_sptr gr_make_interp_fir_filter_fsf (unsigned interpolation, const std::vector<float> &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<float> &taps);
-
- std::vector<float> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_fsf *> d_firs;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_interp_fir_filter_fsf (unsigned interpolation, const std::vector<float> &taps);
-
- void install_taps (const std::vector<float> &taps);
-
- public:
- ~gr_interp_fir_filter_fsf ();
-
- void set_taps (const std::vector<float> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<float> &taps);
-
-class gr_interp_fir_filter_fsf : public gr_sync_interpolator
-{
- private:
- gr_interp_fir_filter_fsf (int interpolation, const std::vector<float> &taps);
-
- public:
- ~gr_interp_fir_filter_fsf ();
-
- void set_taps (const std::vector<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_interp_fir_filter_scc.h>
-#include <gr_fir_scc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_interp_fir_filter_scc_sptr gr_make_interp_fir_filter_scc (unsigned interpolation, const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> 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<gr_complex> &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<gr_complex> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <gr_complex> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_interpolator.h>
-
-class gr_interp_fir_filter_scc;
-typedef boost::shared_ptr<gr_interp_fir_filter_scc> gr_interp_fir_filter_scc_sptr;
-gr_interp_fir_filter_scc_sptr gr_make_interp_fir_filter_scc (unsigned interpolation, const std::vector<gr_complex> &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<gr_complex> &taps);
-
- std::vector<gr_complex> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_scc *> d_firs;
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_interp_fir_filter_scc (unsigned interpolation, const std::vector<gr_complex> &taps);
-
- void install_taps (const std::vector<gr_complex> &taps);
-
- public:
- ~gr_interp_fir_filter_scc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<gr_complex> &taps);
-
-class gr_interp_fir_filter_scc : public gr_sync_interpolator
-{
- private:
- gr_interp_fir_filter_scc (int interpolation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_interp_fir_filter_scc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_rational_resampler_base_ccc.h>
-#include <gr_fir_ccc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_rational_resampler_base_ccc_sptr
-gr_make_rational_resampler_base_ccc (unsigned interpolation,
- unsigned decimation,
- const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> 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<gr_complex> &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<gr_complex> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <gr_complex> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-
-class gr_rational_resampler_base_ccc;
-typedef boost::shared_ptr<gr_rational_resampler_base_ccc> 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<gr_complex> &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<gr_complex> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_ccc *> d_firs;
-
- friend gr_rational_resampler_base_ccc_sptr
- gr_make_rational_resampler_base_ccc (unsigned interpolation, unsigned decimation, const std::vector<gr_complex> &taps);
-
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_rational_resampler_base_ccc (unsigned interpolation, unsigned decimation,
- const std::vector<gr_complex> &taps);
-
- void install_taps (const std::vector<gr_complex> &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<gr_complex> &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
+++ /dev/null
-/* -*- 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<gr_complex> &taps);
-
-class gr_rational_resampler_base_ccc : public gr_block
-{
- private:
- gr_rational_resampler_base_ccc (int interpolation, int decimation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_rational_resampler_base_ccc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_rational_resampler_base_ccf.h>
-#include <gr_fir_ccf.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_rational_resampler_base_ccf_sptr
-gr_make_rational_resampler_base_ccf (unsigned interpolation,
- unsigned decimation,
- const std::vector<float> &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<float> &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<float> 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<float> &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<float> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <float> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-
-class gr_rational_resampler_base_ccf;
-typedef boost::shared_ptr<gr_rational_resampler_base_ccf> 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<float> &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<float> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_ccf *> d_firs;
-
- friend gr_rational_resampler_base_ccf_sptr
- gr_make_rational_resampler_base_ccf (unsigned interpolation, unsigned decimation, const std::vector<float> &taps);
-
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_rational_resampler_base_ccf (unsigned interpolation, unsigned decimation,
- const std::vector<float> &taps);
-
- void install_taps (const std::vector<float> &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<float> &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
+++ /dev/null
-/* -*- 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<float> &taps);
-
-class gr_rational_resampler_base_ccf : public gr_block
-{
- private:
- gr_rational_resampler_base_ccf (int interpolation, int decimation, const std::vector<float> &taps);
-
- public:
- ~gr_rational_resampler_base_ccf ();
-
- void set_taps (const std::vector<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_rational_resampler_base_fcc.h>
-#include <gr_fir_fcc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_rational_resampler_base_fcc_sptr
-gr_make_rational_resampler_base_fcc (unsigned interpolation,
- unsigned decimation,
- const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> 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<gr_complex> &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<gr_complex> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <gr_complex> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-
-class gr_rational_resampler_base_fcc;
-typedef boost::shared_ptr<gr_rational_resampler_base_fcc> 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<gr_complex> &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<gr_complex> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_fcc *> d_firs;
-
- friend gr_rational_resampler_base_fcc_sptr
- gr_make_rational_resampler_base_fcc (unsigned interpolation, unsigned decimation, const std::vector<gr_complex> &taps);
-
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_rational_resampler_base_fcc (unsigned interpolation, unsigned decimation,
- const std::vector<gr_complex> &taps);
-
- void install_taps (const std::vector<gr_complex> &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<gr_complex> &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
+++ /dev/null
-/* -*- 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<gr_complex> &taps);
-
-class gr_rational_resampler_base_fcc : public gr_block
-{
- private:
- gr_rational_resampler_base_fcc (int interpolation, int decimation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_rational_resampler_base_fcc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_rational_resampler_base_fff.h>
-#include <gr_fir_fff.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_rational_resampler_base_fff_sptr
-gr_make_rational_resampler_base_fff (unsigned interpolation,
- unsigned decimation,
- const std::vector<float> &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<float> &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<float> 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<float> &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<float> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <float> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-
-class gr_rational_resampler_base_fff;
-typedef boost::shared_ptr<gr_rational_resampler_base_fff> 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<float> &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<float> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_fff *> d_firs;
-
- friend gr_rational_resampler_base_fff_sptr
- gr_make_rational_resampler_base_fff (unsigned interpolation, unsigned decimation, const std::vector<float> &taps);
-
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_rational_resampler_base_fff (unsigned interpolation, unsigned decimation,
- const std::vector<float> &taps);
-
- void install_taps (const std::vector<float> &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<float> &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
+++ /dev/null
-/* -*- 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<float> &taps);
-
-class gr_rational_resampler_base_fff : public gr_block
-{
- private:
- gr_rational_resampler_base_fff (int interpolation, int decimation, const std::vector<float> &taps);
-
- public:
- ~gr_rational_resampler_base_fff ();
-
- void set_taps (const std::vector<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_rational_resampler_base_fsf.h>
-#include <gr_fir_fsf.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_rational_resampler_base_fsf_sptr
-gr_make_rational_resampler_base_fsf (unsigned interpolation,
- unsigned decimation,
- const std::vector<float> &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<float> &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<float> 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<float> &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<float> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <float> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-
-class gr_rational_resampler_base_fsf;
-typedef boost::shared_ptr<gr_rational_resampler_base_fsf> 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<float> &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<float> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_fsf *> d_firs;
-
- friend gr_rational_resampler_base_fsf_sptr
- gr_make_rational_resampler_base_fsf (unsigned interpolation, unsigned decimation, const std::vector<float> &taps);
-
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_rational_resampler_base_fsf (unsigned interpolation, unsigned decimation,
- const std::vector<float> &taps);
-
- void install_taps (const std::vector<float> &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<float> &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
+++ /dev/null
-/* -*- 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<float> &taps);
-
-class gr_rational_resampler_base_fsf : public gr_block
-{
- private:
- gr_rational_resampler_base_fsf (int interpolation, int decimation, const std::vector<float> &taps);
-
- public:
- ~gr_rational_resampler_base_fsf ();
-
- void set_taps (const std::vector<float> &taps);
-};
+++ /dev/null
-/* -*- 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 <gr_rational_resampler_base_scc.h>
-#include <gr_fir_scc.h>
-#include <gr_fir_util.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <iostream>
-
-gr_rational_resampler_base_scc_sptr
-gr_make_rational_resampler_base_scc (unsigned interpolation,
- unsigned decimation,
- const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> 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<gr_complex> &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<gr_complex> &taps)
-{
- int nfilters = interpolation ();
- int nt = taps.size () / nfilters;
-
- assert (nt * nfilters == (int) taps.size ());
-
- std::vector< std::vector <gr_complex> > 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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-
-class gr_rational_resampler_base_scc;
-typedef boost::shared_ptr<gr_rational_resampler_base_scc> 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<gr_complex> &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<gr_complex> d_new_taps;
- bool d_updated;
- std::vector<gr_fir_scc *> d_firs;
-
- friend gr_rational_resampler_base_scc_sptr
- gr_make_rational_resampler_base_scc (unsigned interpolation, unsigned decimation, const std::vector<gr_complex> &taps);
-
-
- /*!
- * Construct a FIR filter with the given taps
- */
- gr_rational_resampler_base_scc (unsigned interpolation, unsigned decimation,
- const std::vector<gr_complex> &taps);
-
- void install_taps (const std::vector<gr_complex> &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<gr_complex> &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
+++ /dev/null
-/* -*- 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<gr_complex> &taps);
-
-class gr_rational_resampler_base_scc : public gr_block
-{
- private:
- gr_rational_resampler_base_scc (int interpolation, int decimation, const std::vector<gr_complex> &taps);
-
- public:
- ~gr_rational_resampler_base_scc ();
-
- void set_taps (const std::vector<gr_complex> &taps);
-};
+++ /dev/null
-//
-// This file is machine generated. All edits will be overwritten
-//
-%{
-#include <gr_add_cc.h>
-#include <gr_add_const_cc.h>
-#include <gr_add_const_ff.h>
-#include <gr_add_const_ii.h>
-#include <gr_add_const_sf.h>
-#include <gr_add_const_ss.h>
-#include <gr_add_const_vcc.h>
-#include <gr_add_const_vff.h>
-#include <gr_add_const_vii.h>
-#include <gr_add_const_vss.h>
-#include <gr_add_ff.h>
-#include <gr_add_ii.h>
-#include <gr_add_ss.h>
-#include <gr_and_bb.h>
-#include <gr_and_const_bb.h>
-#include <gr_and_const_ii.h>
-#include <gr_and_const_ss.h>
-#include <gr_and_ii.h>
-#include <gr_and_ss.h>
-#include <gr_argmax_fs.h>
-#include <gr_argmax_is.h>
-#include <gr_argmax_ss.h>
-#include <gr_chunks_to_symbols_bc.h>
-#include <gr_chunks_to_symbols_bf.h>
-#include <gr_chunks_to_symbols_ic.h>
-#include <gr_chunks_to_symbols_if.h>
-#include <gr_chunks_to_symbols_sc.h>
-#include <gr_chunks_to_symbols_sf.h>
-#include <gr_divide_cc.h>
-#include <gr_divide_ff.h>
-#include <gr_divide_ii.h>
-#include <gr_divide_ss.h>
-#include <gr_integrate_cc.h>
-#include <gr_integrate_ff.h>
-#include <gr_integrate_ii.h>
-#include <gr_integrate_ss.h>
-#include <gr_max_ff.h>
-#include <gr_max_ii.h>
-#include <gr_max_ss.h>
-#include <gr_moving_average_cc.h>
-#include <gr_moving_average_ff.h>
-#include <gr_moving_average_ii.h>
-#include <gr_moving_average_ss.h>
-#include <gr_multiply_cc.h>
-#include <gr_multiply_const_cc.h>
-#include <gr_multiply_const_ff.h>
-#include <gr_multiply_const_ii.h>
-#include <gr_multiply_const_ss.h>
-#include <gr_multiply_const_vcc.h>
-#include <gr_multiply_const_vff.h>
-#include <gr_multiply_const_vii.h>
-#include <gr_multiply_const_vss.h>
-#include <gr_multiply_ff.h>
-#include <gr_multiply_ii.h>
-#include <gr_multiply_ss.h>
-#include <gr_mute_cc.h>
-#include <gr_mute_ff.h>
-#include <gr_mute_ii.h>
-#include <gr_mute_ss.h>
-#include <gr_noise_source_c.h>
-#include <gr_noise_source_f.h>
-#include <gr_noise_source_i.h>
-#include <gr_noise_source_s.h>
-#include <gr_not_bb.h>
-#include <gr_not_ii.h>
-#include <gr_not_ss.h>
-#include <gr_or_bb.h>
-#include <gr_or_ii.h>
-#include <gr_or_ss.h>
-#include <gr_packed_to_unpacked_bb.h>
-#include <gr_packed_to_unpacked_ii.h>
-#include <gr_packed_to_unpacked_ss.h>
-#include <gr_peak_detector_fb.h>
-#include <gr_peak_detector_ib.h>
-#include <gr_peak_detector_sb.h>
-#include <gr_sample_and_hold_bb.h>
-#include <gr_sample_and_hold_ff.h>
-#include <gr_sample_and_hold_ii.h>
-#include <gr_sample_and_hold_ss.h>
-#include <gr_sig_source_c.h>
-#include <gr_sig_source_f.h>
-#include <gr_sig_source_i.h>
-#include <gr_sig_source_s.h>
-#include <gr_sub_cc.h>
-#include <gr_sub_ff.h>
-#include <gr_sub_ii.h>
-#include <gr_sub_ss.h>
-#include <gr_unpacked_to_packed_bb.h>
-#include <gr_unpacked_to_packed_ii.h>
-#include <gr_unpacked_to_packed_ss.h>
-#include <gr_vector_sink_b.h>
-#include <gr_vector_sink_c.h>
-#include <gr_vector_sink_f.h>
-#include <gr_vector_sink_i.h>
-#include <gr_vector_sink_s.h>
-#include <gr_vector_source_b.h>
-#include <gr_vector_source_c.h>
-#include <gr_vector_source_f.h>
-#include <gr_vector_source_i.h>
-#include <gr_vector_source_s.h>
-#include <gr_xor_bb.h>
-#include <gr_xor_ii.h>
-#include <gr_xor_ss.h>
-%}
-
-%include <gr_add_cc.i>
-%include <gr_add_const_cc.i>
-%include <gr_add_const_ff.i>
-%include <gr_add_const_ii.i>
-%include <gr_add_const_sf.i>
-%include <gr_add_const_ss.i>
-%include <gr_add_const_vcc.i>
-%include <gr_add_const_vff.i>
-%include <gr_add_const_vii.i>
-%include <gr_add_const_vss.i>
-%include <gr_add_ff.i>
-%include <gr_add_ii.i>
-%include <gr_add_ss.i>
-%include <gr_and_bb.i>
-%include <gr_and_const_bb.i>
-%include <gr_and_const_ii.i>
-%include <gr_and_const_ss.i>
-%include <gr_and_ii.i>
-%include <gr_and_ss.i>
-%include <gr_argmax_fs.i>
-%include <gr_argmax_is.i>
-%include <gr_argmax_ss.i>
-%include <gr_chunks_to_symbols_bc.i>
-%include <gr_chunks_to_symbols_bf.i>
-%include <gr_chunks_to_symbols_ic.i>
-%include <gr_chunks_to_symbols_if.i>
-%include <gr_chunks_to_symbols_sc.i>
-%include <gr_chunks_to_symbols_sf.i>
-%include <gr_divide_cc.i>
-%include <gr_divide_ff.i>
-%include <gr_divide_ii.i>
-%include <gr_divide_ss.i>
-%include <gr_integrate_cc.i>
-%include <gr_integrate_ff.i>
-%include <gr_integrate_ii.i>
-%include <gr_integrate_ss.i>
-%include <gr_max_ff.i>
-%include <gr_max_ii.i>
-%include <gr_max_ss.i>
-%include <gr_moving_average_cc.i>
-%include <gr_moving_average_ff.i>
-%include <gr_moving_average_ii.i>
-%include <gr_moving_average_ss.i>
-%include <gr_multiply_cc.i>
-%include <gr_multiply_const_cc.i>
-%include <gr_multiply_const_ff.i>
-%include <gr_multiply_const_ii.i>
-%include <gr_multiply_const_ss.i>
-%include <gr_multiply_const_vcc.i>
-%include <gr_multiply_const_vff.i>
-%include <gr_multiply_const_vii.i>
-%include <gr_multiply_const_vss.i>
-%include <gr_multiply_ff.i>
-%include <gr_multiply_ii.i>
-%include <gr_multiply_ss.i>
-%include <gr_mute_cc.i>
-%include <gr_mute_ff.i>
-%include <gr_mute_ii.i>
-%include <gr_mute_ss.i>
-%include <gr_noise_source_c.i>
-%include <gr_noise_source_f.i>
-%include <gr_noise_source_i.i>
-%include <gr_noise_source_s.i>
-%include <gr_not_bb.i>
-%include <gr_not_ii.i>
-%include <gr_not_ss.i>
-%include <gr_or_bb.i>
-%include <gr_or_ii.i>
-%include <gr_or_ss.i>
-%include <gr_packed_to_unpacked_bb.i>
-%include <gr_packed_to_unpacked_ii.i>
-%include <gr_packed_to_unpacked_ss.i>
-%include <gr_peak_detector_fb.i>
-%include <gr_peak_detector_ib.i>
-%include <gr_peak_detector_sb.i>
-%include <gr_sample_and_hold_bb.i>
-%include <gr_sample_and_hold_ff.i>
-%include <gr_sample_and_hold_ii.i>
-%include <gr_sample_and_hold_ss.i>
-%include <gr_sig_source_c.i>
-%include <gr_sig_source_f.i>
-%include <gr_sig_source_i.i>
-%include <gr_sig_source_s.i>
-%include <gr_sub_cc.i>
-%include <gr_sub_ff.i>
-%include <gr_sub_ii.i>
-%include <gr_sub_ss.i>
-%include <gr_unpacked_to_packed_bb.i>
-%include <gr_unpacked_to_packed_ii.i>
-%include <gr_unpacked_to_packed_ss.i>
-%include <gr_vector_sink_b.i>
-%include <gr_vector_sink_c.i>
-%include <gr_vector_sink_f.i>
-%include <gr_vector_sink_i.i>
-%include <gr_vector_sink_s.i>
-%include <gr_vector_source_b.i>
-%include <gr_vector_source_c.i>
-%include <gr_vector_source_f.i>
-%include <gr_vector_source_i.i>
-%include <gr_vector_source_s.i>
-%include <gr_xor_bb.i>
-%include <gr_xor_ii.i>
-%include <gr_xor_ss.i>
+++ /dev/null
-/* -*- 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 <gr_add_cc.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_cc;
-typedef boost::shared_ptr<gr_add_cc> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_add_const_cc.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_const_cc;
-typedef boost::shared_ptr<gr_add_const_cc> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_add_const_ff.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_const_ff;
-typedef boost::shared_ptr<gr_add_const_ff> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_add_const_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_const_ii;
-typedef boost::shared_ptr<gr_add_const_ii> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_add_const_sf.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_const_sf;
-typedef boost::shared_ptr<gr_add_const_sf> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_add_const_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_const_ss;
-typedef boost::shared_ptr<gr_add_const_ss> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_add_const_vcc.h>
-#include <gr_io_signature.h>
-
-gr_add_const_vcc_sptr
-gr_make_add_const_vcc (const std::vector<gr_complex> k)
-{
- return gr_add_const_vcc_sptr (new gr_add_const_vcc (k));
-}
-
-gr_add_const_vcc::gr_add_const_vcc (const std::vector<gr_complex> 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_const_vcc;
-typedef boost::shared_ptr<gr_add_const_vcc> gr_add_const_vcc_sptr;
-
-gr_add_const_vcc_sptr gr_make_add_const_vcc (const std::vector<gr_complex> 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<gr_complex> k);
-
- std::vector<gr_complex> d_k; // the constant
- gr_add_const_vcc (const std::vector<gr_complex> k);
-
- public:
- const std::vector<gr_complex> k () const { return d_k; }
- void set_k (const std::vector<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
+++ /dev/null
-/* -*- 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<gr_complex> k);
-
-class gr_add_const_vcc : public gr_sync_block
-{
- private:
- gr_add_const_vcc (const std::vector<gr_complex> k);
-
- public:
- std::vector<gr_complex> k () const { return d_k; }
- void set_k (const std::vector<gr_complex> k) { d_k = k; }
-};
+++ /dev/null
-/* -*- 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 <gr_add_const_vff.h>
-#include <gr_io_signature.h>
-
-gr_add_const_vff_sptr
-gr_make_add_const_vff (const std::vector<float> k)
-{
- return gr_add_const_vff_sptr (new gr_add_const_vff (k));
-}
-
-gr_add_const_vff::gr_add_const_vff (const std::vector<float> 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_const_vff;
-typedef boost::shared_ptr<gr_add_const_vff> gr_add_const_vff_sptr;
-
-gr_add_const_vff_sptr gr_make_add_const_vff (const std::vector<float> 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<float> k);
-
- std::vector<float> d_k; // the constant
- gr_add_const_vff (const std::vector<float> k);
-
- public:
- const std::vector<float> k () const { return d_k; }
- void set_k (const std::vector<float> k) { d_k = k; }
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<float> k);
-
-class gr_add_const_vff : public gr_sync_block
-{
- private:
- gr_add_const_vff (const std::vector<float> k);
-
- public:
- std::vector<float> k () const { return d_k; }
- void set_k (const std::vector<float> k) { d_k = k; }
-};
+++ /dev/null
-/* -*- 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 <gr_add_const_vii.h>
-#include <gr_io_signature.h>
-
-gr_add_const_vii_sptr
-gr_make_add_const_vii (const std::vector<int> k)
-{
- return gr_add_const_vii_sptr (new gr_add_const_vii (k));
-}
-
-gr_add_const_vii::gr_add_const_vii (const std::vector<int> 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_const_vii;
-typedef boost::shared_ptr<gr_add_const_vii> gr_add_const_vii_sptr;
-
-gr_add_const_vii_sptr gr_make_add_const_vii (const std::vector<int> 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<int> k);
-
- std::vector<int> d_k; // the constant
- gr_add_const_vii (const std::vector<int> k);
-
- public:
- const std::vector<int> k () const { return d_k; }
- void set_k (const std::vector<int> k) { d_k = k; }
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<int> k);
-
-class gr_add_const_vii : public gr_sync_block
-{
- private:
- gr_add_const_vii (const std::vector<int> k);
-
- public:
- std::vector<int> k () const { return d_k; }
- void set_k (const std::vector<int> k) { d_k = k; }
-};
+++ /dev/null
-/* -*- 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 <gr_add_const_vss.h>
-#include <gr_io_signature.h>
-
-gr_add_const_vss_sptr
-gr_make_add_const_vss (const std::vector<short> k)
-{
- return gr_add_const_vss_sptr (new gr_add_const_vss (k));
-}
-
-gr_add_const_vss::gr_add_const_vss (const std::vector<short> 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_const_vss;
-typedef boost::shared_ptr<gr_add_const_vss> gr_add_const_vss_sptr;
-
-gr_add_const_vss_sptr gr_make_add_const_vss (const std::vector<short> 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<short> k);
-
- std::vector<short> d_k; // the constant
- gr_add_const_vss (const std::vector<short> k);
-
- public:
- const std::vector<short> k () const { return d_k; }
- void set_k (const std::vector<short> k) { d_k = k; }
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<short> k);
-
-class gr_add_const_vss : public gr_sync_block
-{
- private:
- gr_add_const_vss (const std::vector<short> k);
-
- public:
- std::vector<short> k () const { return d_k; }
- void set_k (const std::vector<short> k) { d_k = k; }
-};
+++ /dev/null
-/* -*- 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 <gr_add_ff.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_ff;
-typedef boost::shared_ptr<gr_add_ff> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_add_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_ii;
-typedef boost::shared_ptr<gr_add_ii> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_add_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_add_ss;
-typedef boost::shared_ptr<gr_add_ss> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_and_bb.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_and_bb;
-typedef boost::shared_ptr<gr_and_bb> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_and_const_bb.h>
-#include <gr_io_signature.h>
-
-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);
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_and_const_bb;
-typedef boost::shared_ptr<gr_and_const_bb> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_and_const_ii.h>
-#include <gr_io_signature.h>
-
-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);
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_and_const_ii;
-typedef boost::shared_ptr<gr_and_const_ii> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_and_const_ss.h>
-#include <gr_io_signature.h>
-
-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);
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_and_const_ss;
-typedef boost::shared_ptr<gr_and_const_ss> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_and_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_and_ii;
-typedef boost::shared_ptr<gr_and_ii> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_and_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_and_ss;
-typedef boost::shared_ptr<gr_and_ss> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_argmax_fs.h>
-#include <gr_io_signature.h>
-
-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<noutput_items; i++) {
-
- float max = ((float *) input_items[0])[i*d_vlen];
- int x = 0;
- int y = 0;
-
- for (int j=0; j < (int) d_vlen; j++ ) {
- for (int k=0; k<ninputs; k++) {
- if ( ((float *) input_items[k])[i*d_vlen + j] > 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;
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_argmax_fs;
-typedef boost::shared_ptr<gr_argmax_fs> 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
+++ /dev/null
-/* -*- 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;
-};
+++ /dev/null
-/* -*- 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 <gr_argmax_is.h>
-#include <gr_io_signature.h>
-
-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<noutput_items; i++) {
-
- int max = ((int *) input_items[0])[i*d_vlen];
- int x = 0;
- int y = 0;
-
- for (int j=0; j < (int) d_vlen; j++ ) {
- for (int k=0; k<ninputs; k++) {
- if ( ((int *) input_items[k])[i*d_vlen + j] > 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;
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_argmax_is;
-typedef boost::shared_ptr<gr_argmax_is> 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
+++ /dev/null
-/* -*- 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;
-};
+++ /dev/null
-/* -*- 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 <gr_argmax_ss.h>
-#include <gr_io_signature.h>
-
-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<noutput_items; i++) {
-
- short max = ((short *) input_items[0])[i*d_vlen];
- int x = 0;
- int y = 0;
-
- for (int j=0; j < (int) d_vlen; j++ ) {
- for (int k=0; k<ninputs; k++) {
- if ( ((short *) input_items[k])[i*d_vlen + j] > 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;
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_argmax_ss;
-typedef boost::shared_ptr<gr_argmax_ss> 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
+++ /dev/null
-/* -*- 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;
-};
+++ /dev/null
-/* -*- 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 <gr_chunks_to_symbols_bc.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-#include <string.h>
-
-gr_chunks_to_symbols_bc_sptr
-gr_make_chunks_to_symbols_bc (const std::vector<gr_complex> &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<gr_complex> &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<nstreams;m++) {
- const unsigned char *in = (unsigned char *) input_items[m];
- gr_complex *out = (gr_complex *) output_items[m];
-
- // per stream processing
- for (int i = 0; i < noutput_items / d_D; i++){
- assert (((unsigned int)in[i]*d_D+d_D) <= d_symbol_table.size());
- memcpy(out, &d_symbol_table[(unsigned int)in[i]*d_D], d_D*sizeof(gr_complex));
- out+=d_D;
- }
- // end of per stream processing
-
- }
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_CHUNKS_TO_SYMBOLS_BC_H
-#define INCLUDED_GR_CHUNKS_TO_SYMBOLS_BC_H
-
-#include <gr_sync_interpolator.h>
-
-class gr_chunks_to_symbols_bc;
-typedef boost::shared_ptr<gr_chunks_to_symbols_bc> gr_chunks_to_symbols_bc_sptr;
-
-gr_chunks_to_symbols_bc_sptr gr_make_chunks_to_symbols_bc (const std::vector<gr_complex> &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<gr_complex> &symbol_table, const int D);
-
- int d_D;
- std::vector<gr_complex> d_symbol_table;
- gr_chunks_to_symbols_bc (const std::vector<gr_complex> &symbol_table, const int D = 1);
-
- public:
- int D () const { return d_D; }
- std::vector<gr_complex> 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
+++ /dev/null
-/* -*- 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<gr_complex> &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<gr_complex> &symbol_table, const int D = 1);
-
-public:
- int D () const { return d_D; }
- std::vector<gr_complex> symbol_table () const { return d_symbol_table; }
-};
+++ /dev/null
-/* -*- 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 <gr_chunks_to_symbols_bf.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-#include <string.h>
-
-gr_chunks_to_symbols_bf_sptr
-gr_make_chunks_to_symbols_bf (const std::vector<float> &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<float> &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<nstreams;m++) {
- const unsigned char *in = (unsigned char *) input_items[m];
- float *out = (float *) output_items[m];
-
- // per stream processing
- for (int i = 0; i < noutput_items / d_D; i++){
- assert (((unsigned int)in[i]*d_D+d_D) <= d_symbol_table.size());
- memcpy(out, &d_symbol_table[(unsigned int)in[i]*d_D], d_D*sizeof(float));
- out+=d_D;
- }
- // end of per stream processing
-
- }
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_CHUNKS_TO_SYMBOLS_BF_H
-#define INCLUDED_GR_CHUNKS_TO_SYMBOLS_BF_H
-
-#include <gr_sync_interpolator.h>
-
-class gr_chunks_to_symbols_bf;
-typedef boost::shared_ptr<gr_chunks_to_symbols_bf> gr_chunks_to_symbols_bf_sptr;
-
-gr_chunks_to_symbols_bf_sptr gr_make_chunks_to_symbols_bf (const std::vector<float> &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<float> &symbol_table, const int D);
-
- int d_D;
- std::vector<float> d_symbol_table;
- gr_chunks_to_symbols_bf (const std::vector<float> &symbol_table, const int D = 1);
-
- public:
- int D () const { return d_D; }
- std::vector<float> 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
+++ /dev/null
-/* -*- 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<float> &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<float> &symbol_table, const int D = 1);
-
-public:
- int D () const { return d_D; }
- std::vector<float> symbol_table () const { return d_symbol_table; }
-};
+++ /dev/null
-/* -*- 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 <gr_chunks_to_symbols_ic.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-#include <string.h>
-
-gr_chunks_to_symbols_ic_sptr
-gr_make_chunks_to_symbols_ic (const std::vector<gr_complex> &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<gr_complex> &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<nstreams;m++) {
- const int *in = (int *) input_items[m];
- gr_complex *out = (gr_complex *) output_items[m];
-
- // per stream processing
- for (int i = 0; i < noutput_items / d_D; i++){
- assert (((unsigned int)in[i]*d_D+d_D) <= d_symbol_table.size());
- memcpy(out, &d_symbol_table[(unsigned int)in[i]*d_D], d_D*sizeof(gr_complex));
- out+=d_D;
- }
- // end of per stream processing
-
- }
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_CHUNKS_TO_SYMBOLS_IC_H
-#define INCLUDED_GR_CHUNKS_TO_SYMBOLS_IC_H
-
-#include <gr_sync_interpolator.h>
-
-class gr_chunks_to_symbols_ic;
-typedef boost::shared_ptr<gr_chunks_to_symbols_ic> gr_chunks_to_symbols_ic_sptr;
-
-gr_chunks_to_symbols_ic_sptr gr_make_chunks_to_symbols_ic (const std::vector<gr_complex> &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<gr_complex> &symbol_table, const int D);
-
- int d_D;
- std::vector<gr_complex> d_symbol_table;
- gr_chunks_to_symbols_ic (const std::vector<gr_complex> &symbol_table, const int D = 1);
-
- public:
- int D () const { return d_D; }
- std::vector<gr_complex> 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
+++ /dev/null
-/* -*- 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<gr_complex> &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<gr_complex> &symbol_table, const int D = 1);
-
-public:
- int D () const { return d_D; }
- std::vector<gr_complex> symbol_table () const { return d_symbol_table; }
-};
+++ /dev/null
-/* -*- 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 <gr_chunks_to_symbols_if.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-#include <string.h>
-
-gr_chunks_to_symbols_if_sptr
-gr_make_chunks_to_symbols_if (const std::vector<float> &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<float> &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<nstreams;m++) {
- const int *in = (int *) input_items[m];
- float *out = (float *) output_items[m];
-
- // per stream processing
- for (int i = 0; i < noutput_items / d_D; i++){
- assert (((unsigned int)in[i]*d_D+d_D) <= d_symbol_table.size());
- memcpy(out, &d_symbol_table[(unsigned int)in[i]*d_D], d_D*sizeof(float));
- out+=d_D;
- }
- // end of per stream processing
-
- }
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_CHUNKS_TO_SYMBOLS_IF_H
-#define INCLUDED_GR_CHUNKS_TO_SYMBOLS_IF_H
-
-#include <gr_sync_interpolator.h>
-
-class gr_chunks_to_symbols_if;
-typedef boost::shared_ptr<gr_chunks_to_symbols_if> gr_chunks_to_symbols_if_sptr;
-
-gr_chunks_to_symbols_if_sptr gr_make_chunks_to_symbols_if (const std::vector<float> &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<float> &symbol_table, const int D);
-
- int d_D;
- std::vector<float> d_symbol_table;
- gr_chunks_to_symbols_if (const std::vector<float> &symbol_table, const int D = 1);
-
- public:
- int D () const { return d_D; }
- std::vector<float> 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
+++ /dev/null
-/* -*- 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<float> &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<float> &symbol_table, const int D = 1);
-
-public:
- int D () const { return d_D; }
- std::vector<float> symbol_table () const { return d_symbol_table; }
-};
+++ /dev/null
-/* -*- 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 <gr_chunks_to_symbols_sc.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-#include <string.h>
-
-gr_chunks_to_symbols_sc_sptr
-gr_make_chunks_to_symbols_sc (const std::vector<gr_complex> &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<gr_complex> &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<nstreams;m++) {
- const short *in = (short *) input_items[m];
- gr_complex *out = (gr_complex *) output_items[m];
-
- // per stream processing
- for (int i = 0; i < noutput_items / d_D; i++){
- assert (((unsigned int)in[i]*d_D+d_D) <= d_symbol_table.size());
- memcpy(out, &d_symbol_table[(unsigned int)in[i]*d_D], d_D*sizeof(gr_complex));
- out+=d_D;
- }
- // end of per stream processing
-
- }
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_CHUNKS_TO_SYMBOLS_SC_H
-#define INCLUDED_GR_CHUNKS_TO_SYMBOLS_SC_H
-
-#include <gr_sync_interpolator.h>
-
-class gr_chunks_to_symbols_sc;
-typedef boost::shared_ptr<gr_chunks_to_symbols_sc> gr_chunks_to_symbols_sc_sptr;
-
-gr_chunks_to_symbols_sc_sptr gr_make_chunks_to_symbols_sc (const std::vector<gr_complex> &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<gr_complex> &symbol_table, const int D);
-
- int d_D;
- std::vector<gr_complex> d_symbol_table;
- gr_chunks_to_symbols_sc (const std::vector<gr_complex> &symbol_table, const int D = 1);
-
- public:
- int D () const { return d_D; }
- std::vector<gr_complex> 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
+++ /dev/null
-/* -*- 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<gr_complex> &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<gr_complex> &symbol_table, const int D = 1);
-
-public:
- int D () const { return d_D; }
- std::vector<gr_complex> symbol_table () const { return d_symbol_table; }
-};
+++ /dev/null
-/* -*- 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 <gr_chunks_to_symbols_sf.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-#include <string.h>
-
-gr_chunks_to_symbols_sf_sptr
-gr_make_chunks_to_symbols_sf (const std::vector<float> &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<float> &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<nstreams;m++) {
- const short *in = (short *) input_items[m];
- float *out = (float *) output_items[m];
-
- // per stream processing
- for (int i = 0; i < noutput_items / d_D; i++){
- assert (((unsigned int)in[i]*d_D+d_D) <= d_symbol_table.size());
- memcpy(out, &d_symbol_table[(unsigned int)in[i]*d_D], d_D*sizeof(float));
- out+=d_D;
- }
- // end of per stream processing
-
- }
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_CHUNKS_TO_SYMBOLS_SF_H
-#define INCLUDED_GR_CHUNKS_TO_SYMBOLS_SF_H
-
-#include <gr_sync_interpolator.h>
-
-class gr_chunks_to_symbols_sf;
-typedef boost::shared_ptr<gr_chunks_to_symbols_sf> gr_chunks_to_symbols_sf_sptr;
-
-gr_chunks_to_symbols_sf_sptr gr_make_chunks_to_symbols_sf (const std::vector<float> &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<float> &symbol_table, const int D);
-
- int d_D;
- std::vector<float> d_symbol_table;
- gr_chunks_to_symbols_sf (const std::vector<float> &symbol_table, const int D = 1);
-
- public:
- int D () const { return d_D; }
- std::vector<float> 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
+++ /dev/null
-/* -*- 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<float> &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<float> &symbol_table, const int D = 1);
-
-public:
- int D () const { return d_D; }
- std::vector<float> symbol_table () const { return d_symbol_table; }
-};
+++ /dev/null
-/* -*- 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 <gr_divide_cc.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_divide_cc;
-typedef boost::shared_ptr<gr_divide_cc> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_divide_ff.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_divide_ff;
-typedef boost::shared_ptr<gr_divide_ff> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_divide_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_divide_ii;
-typedef boost::shared_ptr<gr_divide_ii> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_divide_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_divide_ss;
-typedef boost::shared_ptr<gr_divide_ss> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_integrate_cc.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-
-class gr_integrate_cc;
-
-typedef boost::shared_ptr<gr_integrate_cc> 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 */
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_integrate_ff.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-
-class gr_integrate_ff;
-
-typedef boost::shared_ptr<gr_integrate_ff> 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 */
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_integrate_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-
-class gr_integrate_ii;
-
-typedef boost::shared_ptr<gr_integrate_ii> 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 */
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_integrate_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_decimator.h>
-
-class gr_integrate_ss;
-
-typedef boost::shared_ptr<gr_integrate_ss> 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 */
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_max_ff.h>
-#include <gr_io_signature.h>
-
-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<noutput_items; i++) {
-
- float max = ((float *) input_items[0])[i*d_vlen];
-
- for (int j=0; j < (int) d_vlen; j++ ) {
- for (int k=0; k<ninputs; k++) {
- if ( ((float *) input_items[k])[i*d_vlen + j] > max) {
- max = ((float*) input_items[k])[i*d_vlen + j];
- }
- }
- }
-
- *optr++ = (float) max;
- }
- return noutput_items;
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_max_ff;
-typedef boost::shared_ptr<gr_max_ff> 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
+++ /dev/null
-/* -*- 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;
-};
+++ /dev/null
-/* -*- 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 <gr_max_ii.h>
-#include <gr_io_signature.h>
-
-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<noutput_items; i++) {
-
- int max = ((int *) input_items[0])[i*d_vlen];
-
- for (int j=0; j < (int) d_vlen; j++ ) {
- for (int k=0; k<ninputs; k++) {
- if ( ((int *) input_items[k])[i*d_vlen + j] > max) {
- max = ((int*) input_items[k])[i*d_vlen + j];
- }
- }
- }
-
- *optr++ = (int) max;
- }
- return noutput_items;
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_max_ii;
-typedef boost::shared_ptr<gr_max_ii> 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
+++ /dev/null
-/* -*- 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;
-};
+++ /dev/null
-/* -*- 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 <gr_max_ss.h>
-#include <gr_io_signature.h>
-
-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<noutput_items; i++) {
-
- short max = ((short *) input_items[0])[i*d_vlen];
-
- for (int j=0; j < (int) d_vlen; j++ ) {
- for (int k=0; k<ninputs; k++) {
- if ( ((short *) input_items[k])[i*d_vlen + j] > max) {
- max = ((short*) input_items[k])[i*d_vlen + j];
- }
- }
- }
-
- *optr++ = (short) max;
- }
- return noutput_items;
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_max_ss;
-typedef boost::shared_ptr<gr_max_ss> 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
+++ /dev/null
-/* -*- 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;
-};
+++ /dev/null
-/* -*- 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 <gr_moving_average_cc.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_moving_average_cc;
-
-typedef boost::shared_ptr<gr_moving_average_cc> 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 */
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_moving_average_ff.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_moving_average_ff;
-
-typedef boost::shared_ptr<gr_moving_average_ff> 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 */
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_moving_average_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_moving_average_ii;
-
-typedef boost::shared_ptr<gr_moving_average_ii> 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 */
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_moving_average_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_moving_average_ss;
-
-typedef boost::shared_ptr<gr_moving_average_ss> 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 */
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_cc.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_cc;
-typedef boost::shared_ptr<gr_multiply_cc> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_const_cc.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_const_cc;
-typedef boost::shared_ptr<gr_multiply_const_cc> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_const_ff.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_const_ff;
-typedef boost::shared_ptr<gr_multiply_const_ff> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_const_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_const_ii;
-typedef boost::shared_ptr<gr_multiply_const_ii> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_const_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_const_ss;
-typedef boost::shared_ptr<gr_multiply_const_ss> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_const_vcc.h>
-#include <gr_io_signature.h>
-
-gr_multiply_const_vcc_sptr
-gr_make_multiply_const_vcc (const std::vector<gr_complex> k)
-{
- return gr_multiply_const_vcc_sptr (new gr_multiply_const_vcc (k));
-}
-
-gr_multiply_const_vcc::gr_multiply_const_vcc (const std::vector<gr_complex> 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_const_vcc;
-typedef boost::shared_ptr<gr_multiply_const_vcc> gr_multiply_const_vcc_sptr;
-
-gr_multiply_const_vcc_sptr gr_make_multiply_const_vcc (const std::vector<gr_complex> 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<gr_complex> k);
-
- std::vector<gr_complex> d_k; // the constant
- gr_multiply_const_vcc (const std::vector<gr_complex> k);
-
- public:
- const std::vector<gr_complex> k () const { return d_k; }
- void set_k (const std::vector<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
+++ /dev/null
-/* -*- 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<gr_complex> k);
-
-class gr_multiply_const_vcc : public gr_sync_block
-{
- private:
- gr_multiply_const_vcc (const std::vector<gr_complex> k);
-
- public:
- std::vector<gr_complex> k () const { return d_k; }
- void set_k (const std::vector<gr_complex> k) { d_k = k; }
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_const_vff.h>
-#include <gr_io_signature.h>
-
-gr_multiply_const_vff_sptr
-gr_make_multiply_const_vff (const std::vector<float> k)
-{
- return gr_multiply_const_vff_sptr (new gr_multiply_const_vff (k));
-}
-
-gr_multiply_const_vff::gr_multiply_const_vff (const std::vector<float> 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_const_vff;
-typedef boost::shared_ptr<gr_multiply_const_vff> gr_multiply_const_vff_sptr;
-
-gr_multiply_const_vff_sptr gr_make_multiply_const_vff (const std::vector<float> 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<float> k);
-
- std::vector<float> d_k; // the constant
- gr_multiply_const_vff (const std::vector<float> k);
-
- public:
- const std::vector<float> k () const { return d_k; }
- void set_k (const std::vector<float> k) { d_k = k; }
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<float> k);
-
-class gr_multiply_const_vff : public gr_sync_block
-{
- private:
- gr_multiply_const_vff (const std::vector<float> k);
-
- public:
- std::vector<float> k () const { return d_k; }
- void set_k (const std::vector<float> k) { d_k = k; }
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_const_vii.h>
-#include <gr_io_signature.h>
-
-gr_multiply_const_vii_sptr
-gr_make_multiply_const_vii (const std::vector<int> k)
-{
- return gr_multiply_const_vii_sptr (new gr_multiply_const_vii (k));
-}
-
-gr_multiply_const_vii::gr_multiply_const_vii (const std::vector<int> 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_const_vii;
-typedef boost::shared_ptr<gr_multiply_const_vii> gr_multiply_const_vii_sptr;
-
-gr_multiply_const_vii_sptr gr_make_multiply_const_vii (const std::vector<int> 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<int> k);
-
- std::vector<int> d_k; // the constant
- gr_multiply_const_vii (const std::vector<int> k);
-
- public:
- const std::vector<int> k () const { return d_k; }
- void set_k (const std::vector<int> k) { d_k = k; }
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<int> k);
-
-class gr_multiply_const_vii : public gr_sync_block
-{
- private:
- gr_multiply_const_vii (const std::vector<int> k);
-
- public:
- std::vector<int> k () const { return d_k; }
- void set_k (const std::vector<int> k) { d_k = k; }
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_const_vss.h>
-#include <gr_io_signature.h>
-
-gr_multiply_const_vss_sptr
-gr_make_multiply_const_vss (const std::vector<short> k)
-{
- return gr_multiply_const_vss_sptr (new gr_multiply_const_vss (k));
-}
-
-gr_multiply_const_vss::gr_multiply_const_vss (const std::vector<short> 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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_const_vss;
-typedef boost::shared_ptr<gr_multiply_const_vss> gr_multiply_const_vss_sptr;
-
-gr_multiply_const_vss_sptr gr_make_multiply_const_vss (const std::vector<short> 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<short> k);
-
- std::vector<short> d_k; // the constant
- gr_multiply_const_vss (const std::vector<short> k);
-
- public:
- const std::vector<short> k () const { return d_k; }
- void set_k (const std::vector<short> k) { d_k = k; }
-
- int work (int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-#endif
+++ /dev/null
-/* -*- 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<short> k);
-
-class gr_multiply_const_vss : public gr_sync_block
-{
- private:
- gr_multiply_const_vss (const std::vector<short> k);
-
- public:
- std::vector<short> k () const { return d_k; }
- void set_k (const std::vector<short> k) { d_k = k; }
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_ff.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_ff;
-typedef boost::shared_ptr<gr_multiply_ff> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_ii;
-typedef boost::shared_ptr<gr_multiply_ii> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_multiply_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_multiply_ss;
-typedef boost::shared_ptr<gr_multiply_ss> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_mute_cc.h>
-#include <gr_io_signature.h>
-#include <string.h>
-
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_mute_cc;
-typedef boost::shared_ptr<gr_mute_cc> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_mute_ff.h>
-#include <gr_io_signature.h>
-#include <string.h>
-
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_mute_ff;
-typedef boost::shared_ptr<gr_mute_ff> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_mute_ii.h>
-#include <gr_io_signature.h>
-#include <string.h>
-
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_mute_ii;
-typedef boost::shared_ptr<gr_mute_ii> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_mute_ss.h>
-#include <gr_io_signature.h>
-#include <string.h>
-
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_mute_ss;
-typedef boost::shared_ptr<gr_mute_ss> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_noise_source_c.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-#include <gr_noise_type.h>
-#include <gr_random.h>
-
-
-class gr_noise_source_c;
-typedef boost::shared_ptr<gr_noise_source_c> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_noise_source_f.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-#include <gr_noise_type.h>
-#include <gr_random.h>
-
-
-class gr_noise_source_f;
-typedef boost::shared_ptr<gr_noise_source_f> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_noise_source_i.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-#include <gr_noise_type.h>
-#include <gr_random.h>
-
-
-class gr_noise_source_i;
-typedef boost::shared_ptr<gr_noise_source_i> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_noise_source_s.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-#include <gr_noise_type.h>
-#include <gr_random.h>
-
-
-class gr_noise_source_s;
-typedef boost::shared_ptr<gr_noise_source_s> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_not_bb.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_not_bb;
-typedef boost::shared_ptr<gr_not_bb> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_not_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_not_ii;
-typedef boost::shared_ptr<gr_not_ii> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_not_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_not_ss;
-typedef boost::shared_ptr<gr_not_ss> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_or_bb.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_or_bb;
-typedef boost::shared_ptr<gr_or_bb> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_or_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_or_ii;
-typedef boost::shared_ptr<gr_or_ii> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_or_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_or_ss;
-typedef boost::shared_ptr<gr_or_ss> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_packed_to_unpacked_bb.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <gr_log2_const.h>
-
-static const unsigned int BITS_PER_TYPE = sizeof(unsigned char) * 8;
-static const unsigned int LOG2_L_TYPE = gr_log2_const<sizeof(unsigned char) * 8>();
-
-
-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<d_bits_per_chunk; j++, index_tmp++)
- x = (x<<1) | get_bit_be(in, index_tmp);
- out[i] = x;
- }
- break;
-
- case GR_LSB_FIRST:
- for (int i = 0; i < noutput_items; i++){
- //printf("here lsb %d\n",i);
- unsigned char x = 0;
- for(unsigned int j=0; j<d_bits_per_chunk; j++, index_tmp++)
- x = (x<<1) | get_bit_le(in, index_tmp);
- out[i] = x;
- }
- break;
-
- default:
- assert(0);
- }
-
- //printf("almost got to end\n");
- assert(ninput_items[m] >= (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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-#include <gr_endianness.h>
-
-class gr_packed_to_unpacked_bb;
-typedef boost::shared_ptr<gr_packed_to_unpacked_bb> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_packed_to_unpacked_ii.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <gr_log2_const.h>
-
-static const unsigned int BITS_PER_TYPE = sizeof(int) * 8;
-static const unsigned int LOG2_L_TYPE = gr_log2_const<sizeof(int) * 8>();
-
-
-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<d_bits_per_chunk; j++, index_tmp++)
- x = (x<<1) | get_bit_be(in, index_tmp);
- out[i] = x;
- }
- break;
-
- case GR_LSB_FIRST:
- for (int i = 0; i < noutput_items; i++){
- //printf("here lsb %d\n",i);
- int x = 0;
- for(unsigned int j=0; j<d_bits_per_chunk; j++, index_tmp++)
- x = (x<<1) | get_bit_le(in, index_tmp);
- out[i] = x;
- }
- break;
-
- default:
- assert(0);
- }
-
- //printf("almost got to end\n");
- assert(ninput_items[m] >= (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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-#include <gr_endianness.h>
-
-class gr_packed_to_unpacked_ii;
-typedef boost::shared_ptr<gr_packed_to_unpacked_ii> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_packed_to_unpacked_ss.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <gr_log2_const.h>
-
-static const unsigned int BITS_PER_TYPE = sizeof(short) * 8;
-static const unsigned int LOG2_L_TYPE = gr_log2_const<sizeof(short) * 8>();
-
-
-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<d_bits_per_chunk; j++, index_tmp++)
- x = (x<<1) | get_bit_be(in, index_tmp);
- out[i] = x;
- }
- break;
-
- case GR_LSB_FIRST:
- for (int i = 0; i < noutput_items; i++){
- //printf("here lsb %d\n",i);
- short x = 0;
- for(unsigned int j=0; j<d_bits_per_chunk; j++, index_tmp++)
- x = (x<<1) | get_bit_le(in, index_tmp);
- out[i] = x;
- }
- break;
-
- default:
- assert(0);
- }
-
- //printf("almost got to end\n");
- assert(ninput_items[m] >= (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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-#include <gr_endianness.h>
-
-class gr_packed_to_unpacked_ss;
-typedef boost::shared_ptr<gr_packed_to_unpacked_ss> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_peak_detector_fb.h>
-#include <gr_io_signature.h>
-#include <string.h>
-
-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;
- }
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_peak_detector_fb;
-typedef boost::shared_ptr<gr_peak_detector_fb> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_peak_detector_ib.h>
-#include <gr_io_signature.h>
-#include <string.h>
-
-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;
- }
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_peak_detector_ib;
-typedef boost::shared_ptr<gr_peak_detector_ib> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_peak_detector_sb.h>
-#include <gr_io_signature.h>
-#include <string.h>
-
-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;
- }
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_peak_detector_sb;
-typedef boost::shared_ptr<gr_peak_detector_sb> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <gr_sample_and_hold_bb.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_sample_and_hold_bb;
-typedef boost::shared_ptr<gr_sample_and_hold_bb> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_sample_and_hold_ff.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_sample_and_hold_ff;
-typedef boost::shared_ptr<gr_sample_and_hold_ff> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_sample_and_hold_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_sample_and_hold_ii;
-typedef boost::shared_ptr<gr_sample_and_hold_ii> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_sample_and_hold_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_sample_and_hold_ss;
-typedef boost::shared_ptr<gr_sample_and_hold_ss> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_sig_source_c.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <gr_complex.h>
-
-
-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<gr_complex>(t + d_ampl + d_offset);
- else
- optr[i] = static_cast<gr_complex>(-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<gr_complex>(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;
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-#include <gr_sig_source_waveform.h>
-#include <gr_fxpt_nco.h>
-
-class gr_sig_source_c;
-typedef boost::shared_ptr<gr_sig_source_c> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_sig_source_f.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <gr_complex.h>
-
-
-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<float>(t + d_ampl + d_offset);
- else
- optr[i] = static_cast<float>(-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<float>(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;
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-#include <gr_sig_source_waveform.h>
-#include <gr_fxpt_nco.h>
-
-class gr_sig_source_f;
-typedef boost::shared_ptr<gr_sig_source_f> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_sig_source_i.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <gr_complex.h>
-
-
-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<int>(t + d_ampl + d_offset);
- else
- optr[i] = static_cast<int>(-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<int>(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;
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-#include <gr_sig_source_waveform.h>
-#include <gr_fxpt_nco.h>
-
-class gr_sig_source_i;
-typedef boost::shared_ptr<gr_sig_source_i> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_sig_source_s.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <gr_complex.h>
-
-
-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<short>(t + d_ampl + d_offset);
- else
- optr[i] = static_cast<short>(-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<short>(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;
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-#include <gr_sig_source_waveform.h>
-#include <gr_fxpt_nco.h>
-
-class gr_sig_source_s;
-typedef boost::shared_ptr<gr_sig_source_s> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_sub_cc.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_sub_cc;
-typedef boost::shared_ptr<gr_sub_cc> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_sub_ff.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_sub_ff;
-typedef boost::shared_ptr<gr_sub_ff> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_sub_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_sub_ii;
-typedef boost::shared_ptr<gr_sub_ii> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_sub_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_sub_ss;
-typedef boost::shared_ptr<gr_sub_ss> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_unpacked_to_packed_bb.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-
-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<noutput_items;i++) {
- unsigned char tmp=0;
- for(unsigned int j=0; j<BITS_PER_TYPE; j++) {
- tmp = (tmp<<1) | get_bit_be1(in,index_tmp,d_bits_per_chunk);
- index_tmp++;
- }
- out[i] = tmp;
- }
- break;
-
- case GR_LSB_FIRST:
- for(int i=0;i<noutput_items;i++) {
- unsigned long tmp=0;
- for(unsigned int j=0; j<BITS_PER_TYPE; j++) {
- tmp = (tmp>>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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-#include <gr_endianness.h>
-
-class gr_unpacked_to_packed_bb;
-typedef boost::shared_ptr<gr_unpacked_to_packed_bb> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_unpacked_to_packed_ii.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-
-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<noutput_items;i++) {
- int tmp=0;
- for(unsigned int j=0; j<BITS_PER_TYPE; j++) {
- tmp = (tmp<<1) | get_bit_be1(in,index_tmp,d_bits_per_chunk);
- index_tmp++;
- }
- out[i] = tmp;
- }
- break;
-
- case GR_LSB_FIRST:
- for(int i=0;i<noutput_items;i++) {
- unsigned long tmp=0;
- for(unsigned int j=0; j<BITS_PER_TYPE; j++) {
- tmp = (tmp>>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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-#include <gr_endianness.h>
-
-class gr_unpacked_to_packed_ii;
-typedef boost::shared_ptr<gr_unpacked_to_packed_ii> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_unpacked_to_packed_ss.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-
-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<noutput_items;i++) {
- short tmp=0;
- for(unsigned int j=0; j<BITS_PER_TYPE; j++) {
- tmp = (tmp<<1) | get_bit_be1(in,index_tmp,d_bits_per_chunk);
- index_tmp++;
- }
- out[i] = tmp;
- }
- break;
-
- case GR_LSB_FIRST:
- for(int i=0;i<noutput_items;i++) {
- unsigned long tmp=0;
- for(unsigned int j=0; j<BITS_PER_TYPE; j++) {
- tmp = (tmp>>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;
-}
+++ /dev/null
-/* -*- 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 <gr_block.h>
-#include <gr_endianness.h>
-
-class gr_unpacked_to_packed_ss;
-typedef boost::shared_ptr<gr_unpacked_to_packed_ss> 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
+++ /dev/null
-/* -*- 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);
-};
+++ /dev/null
-/* -*- 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 <gr_vector_sink_b.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-
-
-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<unsigned char>
-gr_vector_sink_b::data () const
-{
- return d_data;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_vector_sink_b;
-typedef boost::shared_ptr<gr_vector_sink_b> 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<unsigned char> 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<unsigned char> data () const;
-};
-
-#endif
+++ /dev/null
-/* -*- 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<unsigned char> data () const;
-};
-
+++ /dev/null
-/* -*- 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 <gr_vector_sink_c.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-
-
-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_complex>
-gr_vector_sink_c::data () const
-{
- return d_data;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_vector_sink_c;
-typedef boost::shared_ptr<gr_vector_sink_c> 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<gr_complex> 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<gr_complex> data () const;
-};
-
-#endif
+++ /dev/null
-/* -*- 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<gr_complex> data () const;
-};
-
+++ /dev/null
-/* -*- 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 <gr_vector_sink_f.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-
-
-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<float>
-gr_vector_sink_f::data () const
-{
- return d_data;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_vector_sink_f;
-typedef boost::shared_ptr<gr_vector_sink_f> 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<float> 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<float> data () const;
-};
-
-#endif
+++ /dev/null
-/* -*- 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<float> data () const;
-};
-
+++ /dev/null
-/* -*- 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 <gr_vector_sink_i.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-
-
-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<int>
-gr_vector_sink_i::data () const
-{
- return d_data;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_vector_sink_i;
-typedef boost::shared_ptr<gr_vector_sink_i> 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<int> 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<int> data () const;
-};
-
-#endif
+++ /dev/null
-/* -*- 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<int> data () const;
-};
-
+++ /dev/null
-/* -*- 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 <gr_vector_sink_s.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-
-
-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<short>
-gr_vector_sink_s::data () const
-{
- return d_data;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_vector_sink_s;
-typedef boost::shared_ptr<gr_vector_sink_s> 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<short> 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<short> data () const;
-};
-
-#endif
+++ /dev/null
-/* -*- 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<short> data () const;
-};
-
+++ /dev/null
-/* -*- 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 <gr_vector_source_b.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-
-gr_vector_source_b::gr_vector_source_b (const std::vector<unsigned char> &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<unsigned char> &data, bool repeat, int vlen)
-{
- return gr_vector_source_b_sptr (new gr_vector_source_b (data, repeat, vlen));
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_vector_source_b;
-typedef boost::shared_ptr<gr_vector_source_b> 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<unsigned char> &data, bool repeat, int vlen);
-
- std::vector<unsigned char> d_data;
- bool d_repeat;
- unsigned int d_offset;
- int d_vlen;
-
- gr_vector_source_b (const std::vector<unsigned char> &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<unsigned char> &data, bool repeat = false, int vlen = 1);
-
-#endif
+++ /dev/null
-/* -*- 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<unsigned char> &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<unsigned char> &data, int vlen);
-};
+++ /dev/null
-/* -*- 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 <gr_vector_source_c.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-
-gr_vector_source_c::gr_vector_source_c (const std::vector<gr_complex> &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<gr_complex> &data, bool repeat, int vlen)
-{
- return gr_vector_source_c_sptr (new gr_vector_source_c (data, repeat, vlen));
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_vector_source_c;
-typedef boost::shared_ptr<gr_vector_source_c> 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<gr_complex> &data, bool repeat, int vlen);
-
- std::vector<gr_complex> d_data;
- bool d_repeat;
- unsigned int d_offset;
- int d_vlen;
-
- gr_vector_source_c (const std::vector<gr_complex> &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<gr_complex> &data, bool repeat = false, int vlen = 1);
-
-#endif
+++ /dev/null
-/* -*- 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<gr_complex> &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<gr_complex> &data, int vlen);
-};
+++ /dev/null
-/* -*- 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 <gr_vector_source_f.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-
-gr_vector_source_f::gr_vector_source_f (const std::vector<float> &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<float> &data, bool repeat, int vlen)
-{
- return gr_vector_source_f_sptr (new gr_vector_source_f (data, repeat, vlen));
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_vector_source_f;
-typedef boost::shared_ptr<gr_vector_source_f> 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<float> &data, bool repeat, int vlen);
-
- std::vector<float> d_data;
- bool d_repeat;
- unsigned int d_offset;
- int d_vlen;
-
- gr_vector_source_f (const std::vector<float> &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<float> &data, bool repeat = false, int vlen = 1);
-
-#endif
+++ /dev/null
-/* -*- 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<float> &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<float> &data, int vlen);
-};
+++ /dev/null
-/* -*- 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 <gr_vector_source_i.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-
-gr_vector_source_i::gr_vector_source_i (const std::vector<int> &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<int> &data, bool repeat, int vlen)
-{
- return gr_vector_source_i_sptr (new gr_vector_source_i (data, repeat, vlen));
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_vector_source_i;
-typedef boost::shared_ptr<gr_vector_source_i> 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<int> &data, bool repeat, int vlen);
-
- std::vector<int> d_data;
- bool d_repeat;
- unsigned int d_offset;
- int d_vlen;
-
- gr_vector_source_i (const std::vector<int> &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<int> &data, bool repeat = false, int vlen = 1);
-
-#endif
+++ /dev/null
-/* -*- 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<int> &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<int> &data, int vlen);
-};
+++ /dev/null
-/* -*- 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 <gr_vector_source_s.h>
-#include <algorithm>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-
-gr_vector_source_s::gr_vector_source_s (const std::vector<short> &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<short> &data, bool repeat, int vlen)
-{
- return gr_vector_source_s_sptr (new gr_vector_source_s (data, repeat, vlen));
-}
-
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_vector_source_s;
-typedef boost::shared_ptr<gr_vector_source_s> 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<short> &data, bool repeat, int vlen);
-
- std::vector<short> d_data;
- bool d_repeat;
- unsigned int d_offset;
- int d_vlen;
-
- gr_vector_source_s (const std::vector<short> &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<short> &data, bool repeat = false, int vlen = 1);
-
-#endif
+++ /dev/null
-/* -*- 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<short> &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<short> &data, int vlen);
-};
+++ /dev/null
-/* -*- 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 <gr_xor_bb.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_xor_bb;
-typedef boost::shared_ptr<gr_xor_bb> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_xor_ii.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_xor_ii;
-typedef boost::shared_ptr<gr_xor_ii> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 <gr_xor_ss.h>
-#include <gr_io_signature.h>
-
-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;
-}
+++ /dev/null
-/* -*- 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 <gr_sync_block.h>
-
-class gr_xor_ss;
-typedef boost::shared_ptr<gr_xor_ss> 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
+++ /dev/null
-/* -*- 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 ();
-};
+++ /dev/null
-/* -*- 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 */
+++ /dev/null
-/****************************************************************************
-** 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 <QObject>."
-#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<void*>(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
+++ /dev/null
-/****************************************************************************
-** 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 <QObject>."
-#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<void*>(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
+++ /dev/null
-/****************************************************************************
-** 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 <QObject>."
-#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<void*>(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
+++ /dev/null
-/****************************************************************************
-** 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 <QObject>."
-#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<void*>(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<void*>(reinterpret_cast<const void*>(&_t1)) };
- QMetaObject::activate(this, &staticMetaObject, 0, _a);
-}
-
-// SIGNAL 1
-void Waterfall3DDisplayPlot::UpdatedUpperIntensityLevel(const double _t1)
-{
- void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
- QMetaObject::activate(this, &staticMetaObject, 1, _a);
-}
-QT_END_MOC_NAMESPACE
+++ /dev/null
-/****************************************************************************
-** 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 <QObject>."
-#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<void*>(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<void*>(reinterpret_cast<const void*>(&_t1)) };
- QMetaObject::activate(this, &staticMetaObject, 0, _a);
-}
-
-// SIGNAL 1
-void WaterfallDisplayPlot::UpdatedUpperIntensityLevel(const double _t1)
-{
- void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
- QMetaObject::activate(this, &staticMetaObject, 1, _a);
-}
-QT_END_MOC_NAMESPACE
+++ /dev/null
-/****************************************************************************
-** 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 <QObject>."
-#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<void*>(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
+++ /dev/null
-/********************************************************************************
-** 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 <FrequencyDisplayPlot.h>
-#include <Qt3Support/Q3MimeSourceFactory>
-#include <QtCore/QVariant>
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QCheckBox>
-#include <QtGui/QComboBox>
-#include <QtGui/QFrame>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLabel>
-#include <QtGui/QLineEdit>
-#include <QtGui/QPushButton>
-#include <QtGui/QTabWidget>
-#include <QtGui/QWidget>
-#include <SpectrumGUIClass.h>
-#include <TimeDomainDisplayPlot.h>
-#include <Waterfall3DDisplayPlot.h>
-#include <WaterfallDisplayPlot.h>
-#include <QtGui/QRegExpValidator>
-#include <vector>
-#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", "<font size=\"-2\">Intensity Display:</font>", 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", "<font size=\"-2\">Intensity Display:</font>", 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
+++ /dev/null
-/* -*- 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 <trellis_encoder_bb.h>
-#include <gr_io_signature.h>
-#include <iostream>
-
-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<nstreams;m++) {
- const unsigned char *in = (const unsigned char *) input_items[m];
- unsigned char *out = (unsigned char *) output_items[m];
- ST_tmp = d_ST;
-
- // per stream processing
- for (int i = 0; i < noutput_items; i++){
- out[i] = (unsigned char) d_FSM.OS()[ST_tmp*d_FSM.I()+in[i]]; // direction of time?
- ST_tmp = (int) d_FSM.NS()[ST_tmp*d_FSM.I()+in[i]];
- }
- // end per stream processing
- }
- d_ST = ST_tmp;
-
- return noutput_items;
-}
-
+++ /dev/null
-/* -*- 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_TRELLIS_ENCODER_BB_H
-#define INCLUDED_TRELLIS_ENCODER_BB_H
-
-#include "fsm.h"
-#include <gr_sync_block.h>
-
-class trellis_encoder_bb;
-typedef boost::shared_ptr<trellis_encoder_bb> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <trellis_encoder_bi.h>
-#include <gr_io_signature.h>
-#include <iostream>
-
-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<nstreams;m++) {
- const unsigned char *in = (const unsigned char *) input_items[m];
- int *out = (int *) output_items[m];
- ST_tmp = d_ST;
-
- // per stream processing
- for (int i = 0; i < noutput_items; i++){
- out[i] = (int) d_FSM.OS()[ST_tmp*d_FSM.I()+in[i]]; // direction of time?
- ST_tmp = (int) d_FSM.NS()[ST_tmp*d_FSM.I()+in[i]];
- }
- // end per stream processing
- }
- d_ST = ST_tmp;
-
- return noutput_items;
-}
-
+++ /dev/null
-/* -*- 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_TRELLIS_ENCODER_BI_H
-#define INCLUDED_TRELLIS_ENCODER_BI_H
-
-#include "fsm.h"
-#include <gr_sync_block.h>
-
-class trellis_encoder_bi;
-typedef boost::shared_ptr<trellis_encoder_bi> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <trellis_encoder_bs.h>
-#include <gr_io_signature.h>
-#include <iostream>
-
-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<nstreams;m++) {
- const unsigned char *in = (const unsigned char *) input_items[m];
- short *out = (short *) output_items[m];
- ST_tmp = d_ST;
-
- // per stream processing
- for (int i = 0; i < noutput_items; i++){
- out[i] = (short) d_FSM.OS()[ST_tmp*d_FSM.I()+in[i]]; // direction of time?
- ST_tmp = (int) d_FSM.NS()[ST_tmp*d_FSM.I()+in[i]];
- }
- // end per stream processing
- }
- d_ST = ST_tmp;
-
- return noutput_items;
-}
-
+++ /dev/null
-/* -*- 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_TRELLIS_ENCODER_BS_H
-#define INCLUDED_TRELLIS_ENCODER_BS_H
-
-#include "fsm.h"
-#include <gr_sync_block.h>
-
-class trellis_encoder_bs;
-typedef boost::shared_ptr<trellis_encoder_bs> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <trellis_encoder_ii.h>
-#include <gr_io_signature.h>
-#include <iostream>
-
-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<nstreams;m++) {
- const int *in = (const int *) input_items[m];
- int *out = (int *) output_items[m];
- ST_tmp = d_ST;
-
- // per stream processing
- for (int i = 0; i < noutput_items; i++){
- out[i] = (int) d_FSM.OS()[ST_tmp*d_FSM.I()+in[i]]; // direction of time?
- ST_tmp = (int) d_FSM.NS()[ST_tmp*d_FSM.I()+in[i]];
- }
- // end per stream processing
- }
- d_ST = ST_tmp;
-
- return noutput_items;
-}
-
+++ /dev/null
-/* -*- 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_TRELLIS_ENCODER_II_H
-#define INCLUDED_TRELLIS_ENCODER_II_H
-
-#include "fsm.h"
-#include <gr_sync_block.h>
-
-class trellis_encoder_ii;
-typedef boost::shared_ptr<trellis_encoder_ii> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <trellis_encoder_si.h>
-#include <gr_io_signature.h>
-#include <iostream>
-
-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<nstreams;m++) {
- const short *in = (const short *) input_items[m];
- int *out = (int *) output_items[m];
- ST_tmp = d_ST;
-
- // per stream processing
- for (int i = 0; i < noutput_items; i++){
- out[i] = (int) d_FSM.OS()[ST_tmp*d_FSM.I()+in[i]]; // direction of time?
- ST_tmp = (int) d_FSM.NS()[ST_tmp*d_FSM.I()+in[i]];
- }
- // end per stream processing
- }
- d_ST = ST_tmp;
-
- return noutput_items;
-}
-
+++ /dev/null
-/* -*- 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_TRELLIS_ENCODER_SI_H
-#define INCLUDED_TRELLIS_ENCODER_SI_H
-
-#include "fsm.h"
-#include <gr_sync_block.h>
-
-class trellis_encoder_si;
-typedef boost::shared_ptr<trellis_encoder_si> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-/* -*- 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 <trellis_encoder_ss.h>
-#include <gr_io_signature.h>
-#include <iostream>
-
-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<nstreams;m++) {
- const short *in = (const short *) input_items[m];
- short *out = (short *) output_items[m];
- ST_tmp = d_ST;
-
- // per stream processing
- for (int i = 0; i < noutput_items; i++){
- out[i] = (short) d_FSM.OS()[ST_tmp*d_FSM.I()+in[i]]; // direction of time?
- ST_tmp = (int) d_FSM.NS()[ST_tmp*d_FSM.I()+in[i]];
- }
- // end per stream processing
- }
- d_ST = ST_tmp;
-
- return noutput_items;
-}
-
+++ /dev/null
-/* -*- 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_TRELLIS_ENCODER_SS_H
-#define INCLUDED_TRELLIS_ENCODER_SS_H
-
-#include "fsm.h"
-#include <gr_sync_block.h>
-
-class trellis_encoder_ss;
-typedef boost::shared_ptr<trellis_encoder_ss> 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
+++ /dev/null
-/* -*- 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; }
-};
+++ /dev/null
-//
-// This file is machine generated. All edits will be overwritten
-//
-%{
-#include <trellis_encoder_bb.h>
-#include <trellis_encoder_bi.h>
-#include <trellis_encoder_bs.h>
-#include <trellis_encoder_ii.h>
-#include <trellis_encoder_si.h>
-#include <trellis_encoder_ss.h>
-#include <trellis_metrics_c.h>
-#include <trellis_metrics_f.h>
-#include <trellis_metrics_i.h>
-#include <trellis_metrics_s.h>
-#include <trellis_viterbi_b.h>
-#include <trellis_viterbi_combined_cb.h>
-#include <trellis_viterbi_combined_ci.h>
-#include <trellis_viterbi_combined_cs.h>
-#include <trellis_viterbi_combined_fb.h>
-#include <trellis_viterbi_combined_fi.h>
-#include <trellis_viterbi_combined_fs.h>
-#include <trellis_viterbi_combined_ib.h>
-#include <trellis_viterbi_combined_ii.h>
-#include <trellis_viterbi_combined_is.h>
-#include <trellis_viterbi_combined_sb.h>
-#include <trellis_viterbi_combined_si.h>
-#include <trellis_viterbi_combined_ss.h>
-#include <trellis_viterbi_i.h>
-#include <trellis_viterbi_s.h>
-%}
-
-%include <trellis_encoder_bb.i>
-%include <trellis_encoder_bi.i>
-%include <trellis_encoder_bs.i>
-%include <trellis_encoder_ii.i>
-%include <trellis_encoder_si.i>
-%include <trellis_encoder_ss.i>
-%include <trellis_metrics_c.i>
-%include <trellis_metrics_f.i>
-%include <trellis_metrics_i.i>
-%include <trellis_metrics_s.i>
-%include <trellis_viterbi_b.i>
-%include <trellis_viterbi_combined_cb.i>
-%include <trellis_viterbi_combined_ci.i>
-%include <trellis_viterbi_combined_cs.i>
-%include <trellis_viterbi_combined_fb.i>
-%include <trellis_viterbi_combined_fi.i>
-%include <trellis_viterbi_combined_fs.i>
-%include <trellis_viterbi_combined_ib.i>
-%include <trellis_viterbi_combined_ii.i>
-%include <trellis_viterbi_combined_is.i>
-%include <trellis_viterbi_combined_sb.i>
-%include <trellis_viterbi_combined_si.i>
-%include <trellis_viterbi_combined_ss.i>
-%include <trellis_viterbi_i.i>
-%include <trellis_viterbi_s.i>
+++ /dev/null
-/* -*- 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 <trellis_metrics_c.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <stdexcept>
-#include <iostream>
-
-
-trellis_metrics_c_sptr
-trellis_make_metrics_c (int O, int D, const std::vector<gr_complex> &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<gr_complex> &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<gr_complex> &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<nstreams;m++) {
- const gr_complex *in = (gr_complex *) input_items[m];
- float *out = (float *) output_items[m];
-
- for (int i = 0; i < noutput_items / d_O ; i++){
- calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE);
- }
-}
-
- consume_each (d_D * noutput_items / d_O);
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_METRICS_C_H
-#define INCLUDED_TRELLIS_METRICS_C_H
-
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_metrics_c;
-typedef boost::shared_ptr<trellis_metrics_c> trellis_metrics_c_sptr;
-
-trellis_metrics_c_sptr trellis_make_metrics_c (int O, int D, const std::vector<gr_complex> &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<gr_complex> d_TABLE;
-
- friend trellis_metrics_c_sptr trellis_make_metrics_c (int O, int D, const std::vector<gr_complex> &TABLE, trellis_metric_type_t TYPE);
- trellis_metrics_c (int O, int D, const std::vector<gr_complex> &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<gr_complex> TABLE () const { return d_TABLE; }
- void set_TABLE (const std::vector<gr_complex> &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
+++ /dev/null
-/* -*- 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<gr_complex> &TABLE, trellis_metric_type_t TYPE);
-
-class trellis_metrics_c : public gr_block
-{
-private:
- trellis_metrics_c (int O, int D, const std::vector<gr_complex> &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<gr_complex> &table);
- std::vector<gr_complex> TABLE () const { return d_TABLE; }
-};
+++ /dev/null
-/* -*- 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 <trellis_metrics_f.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <stdexcept>
-#include <iostream>
-
-
-trellis_metrics_f_sptr
-trellis_make_metrics_f (int O, int D, const std::vector<float> &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<float> &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<float> &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<nstreams;m++) {
- const float *in = (float *) input_items[m];
- float *out = (float *) output_items[m];
-
- for (int i = 0; i < noutput_items / d_O ; i++){
- calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE);
- }
-}
-
- consume_each (d_D * noutput_items / d_O);
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_METRICS_F_H
-#define INCLUDED_TRELLIS_METRICS_F_H
-
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_metrics_f;
-typedef boost::shared_ptr<trellis_metrics_f> trellis_metrics_f_sptr;
-
-trellis_metrics_f_sptr trellis_make_metrics_f (int O, int D, const std::vector<float> &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<float> d_TABLE;
-
- friend trellis_metrics_f_sptr trellis_make_metrics_f (int O, int D, const std::vector<float> &TABLE, trellis_metric_type_t TYPE);
- trellis_metrics_f (int O, int D, const std::vector<float> &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<float> TABLE () const { return d_TABLE; }
- void set_TABLE (const std::vector<float> &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
+++ /dev/null
-/* -*- 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<float> &TABLE, trellis_metric_type_t TYPE);
-
-class trellis_metrics_f : public gr_block
-{
-private:
- trellis_metrics_f (int O, int D, const std::vector<float> &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<float> &table);
- std::vector<float> TABLE () const { return d_TABLE; }
-};
+++ /dev/null
-/* -*- 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 <trellis_metrics_i.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <stdexcept>
-#include <iostream>
-
-
-trellis_metrics_i_sptr
-trellis_make_metrics_i (int O, int D, const std::vector<int> &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<int> &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<int> &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<nstreams;m++) {
- const int *in = (int *) input_items[m];
- float *out = (float *) output_items[m];
-
- for (int i = 0; i < noutput_items / d_O ; i++){
- calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE);
- }
-}
-
- consume_each (d_D * noutput_items / d_O);
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_METRICS_I_H
-#define INCLUDED_TRELLIS_METRICS_I_H
-
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_metrics_i;
-typedef boost::shared_ptr<trellis_metrics_i> trellis_metrics_i_sptr;
-
-trellis_metrics_i_sptr trellis_make_metrics_i (int O, int D, const std::vector<int> &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<int> d_TABLE;
-
- friend trellis_metrics_i_sptr trellis_make_metrics_i (int O, int D, const std::vector<int> &TABLE, trellis_metric_type_t TYPE);
- trellis_metrics_i (int O, int D, const std::vector<int> &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<int> TABLE () const { return d_TABLE; }
- void set_TABLE (const std::vector<int> &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
+++ /dev/null
-/* -*- 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<int> &TABLE, trellis_metric_type_t TYPE);
-
-class trellis_metrics_i : public gr_block
-{
-private:
- trellis_metrics_i (int O, int D, const std::vector<int> &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<int> &table);
- std::vector<int> TABLE () const { return d_TABLE; }
-};
+++ /dev/null
-/* -*- 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 <trellis_metrics_s.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <stdexcept>
-#include <iostream>
-
-
-trellis_metrics_s_sptr
-trellis_make_metrics_s (int O, int D, const std::vector<short> &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<short> &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<short> &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<nstreams;m++) {
- const short *in = (short *) input_items[m];
- float *out = (float *) output_items[m];
-
- for (int i = 0; i < noutput_items / d_O ; i++){
- calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE);
- }
-}
-
- consume_each (d_D * noutput_items / d_O);
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_METRICS_S_H
-#define INCLUDED_TRELLIS_METRICS_S_H
-
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_metrics_s;
-typedef boost::shared_ptr<trellis_metrics_s> trellis_metrics_s_sptr;
-
-trellis_metrics_s_sptr trellis_make_metrics_s (int O, int D, const std::vector<short> &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<short> d_TABLE;
-
- friend trellis_metrics_s_sptr trellis_make_metrics_s (int O, int D, const std::vector<short> &TABLE, trellis_metric_type_t TYPE);
- trellis_metrics_s (int O, int D, const std::vector<short> &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<short> TABLE () const { return d_TABLE; }
- void set_TABLE (const std::vector<short> &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
+++ /dev/null
-/* -*- 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<short> &TABLE, trellis_metric_type_t TYPE);
-
-class trellis_metrics_s : public gr_block
-{
-private:
- trellis_metrics_s (int O, int D, const std::vector<short> &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<short> &table);
- std::vector<short> TABLE () const { return d_TABLE; }
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_b.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- const float *in, unsigned char *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+in[k*O+OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const float *in = (const float *) input_items[m];
- unsigned char *out = (unsigned char *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_FSM.O() * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_B_H
-#define INCLUDED_TRELLIS_VITERBI_B_H
-
-#include "fsm.h"
-#include <gr_block.h>
-
-class trellis_viterbi_b;
-typedef boost::shared_ptr<trellis_viterbi_b> 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<int> 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<int> 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
+++ /dev/null
-/* -*- 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<short> trace () const { return d_trace; }
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_cb.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<gr_complex> &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<gr_complex> &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<gr_complex> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t TYPE,
- const gr_complex *in, unsigned char *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const gr_complex *in = (const gr_complex *) input_items[m];
- unsigned char *out = (unsigned char *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_CB_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_CB_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_cb;
-typedef boost::shared_ptr<trellis_viterbi_combined_cb> 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<gr_complex> &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<gr_complex> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<gr_complex> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_cb (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<gr_complex> &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<gr_complex> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<gr_complex> &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
+++ /dev/null
-/* -*- 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<gr_complex> &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<gr_complex> &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<gr_complex> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<gr_complex> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_ci.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<gr_complex> &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<gr_complex> &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<gr_complex> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t TYPE,
- const gr_complex *in, int *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const gr_complex *in = (const gr_complex *) input_items[m];
- int *out = (int *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_CI_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_CI_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_ci;
-typedef boost::shared_ptr<trellis_viterbi_combined_ci> 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<gr_complex> &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<gr_complex> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<gr_complex> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_ci (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<gr_complex> &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<gr_complex> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<gr_complex> &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
+++ /dev/null
-/* -*- 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<gr_complex> &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<gr_complex> &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<gr_complex> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<gr_complex> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_cs.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<gr_complex> &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<gr_complex> &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<gr_complex> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t TYPE,
- const gr_complex *in, short *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const gr_complex *in = (const gr_complex *) input_items[m];
- short *out = (short *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_CS_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_CS_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_cs;
-typedef boost::shared_ptr<trellis_viterbi_combined_cs> 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<gr_complex> &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<gr_complex> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<gr_complex> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_cs (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<gr_complex> &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<gr_complex> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<gr_complex> &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
+++ /dev/null
-/* -*- 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<gr_complex> &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<gr_complex> &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<gr_complex> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<gr_complex> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_fb.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<float> &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<float> &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<float> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE,
- const float *in, unsigned char *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const float *in = (const float *) input_items[m];
- unsigned char *out = (unsigned char *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_FB_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_FB_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_fb;
-typedef boost::shared_ptr<trellis_viterbi_combined_fb> 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<float> &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<float> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<float> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_fb (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<float> &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<float> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<float> &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
+++ /dev/null
-/* -*- 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<float> &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<float> &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<float> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<float> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_fi.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<float> &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<float> &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<float> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE,
- const float *in, int *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const float *in = (const float *) input_items[m];
- int *out = (int *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_FI_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_FI_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_fi;
-typedef boost::shared_ptr<trellis_viterbi_combined_fi> 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<float> &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<float> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<float> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_fi (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<float> &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<float> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<float> &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
+++ /dev/null
-/* -*- 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<float> &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<float> &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<float> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<float> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_fs.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<float> &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<float> &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<float> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE,
- const float *in, short *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const float *in = (const float *) input_items[m];
- short *out = (short *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_FS_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_FS_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_fs;
-typedef boost::shared_ptr<trellis_viterbi_combined_fs> 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<float> &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<float> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<float> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_fs (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<float> &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<float> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<float> &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
+++ /dev/null
-/* -*- 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<float> &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<float> &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<float> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<float> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_ib.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<int> &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<int> &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<int> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<int> &TABLE,
- trellis_metric_type_t TYPE,
- const int *in, unsigned char *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const int *in = (const int *) input_items[m];
- unsigned char *out = (unsigned char *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_IB_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_IB_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_ib;
-typedef boost::shared_ptr<trellis_viterbi_combined_ib> 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<int> &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<int> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<int> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_ib (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<int> &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<int> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<int> &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
+++ /dev/null
-/* -*- 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<int> &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<int> &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<int> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<int> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_ii.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<int> &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<int> &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<int> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<int> &TABLE,
- trellis_metric_type_t TYPE,
- const int *in, int *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const int *in = (const int *) input_items[m];
- int *out = (int *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_II_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_II_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_ii;
-typedef boost::shared_ptr<trellis_viterbi_combined_ii> 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<int> &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<int> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<int> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_ii (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<int> &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<int> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<int> &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
+++ /dev/null
-/* -*- 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<int> &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<int> &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<int> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<int> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_is.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<int> &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<int> &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<int> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<int> &TABLE,
- trellis_metric_type_t TYPE,
- const int *in, short *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const int *in = (const int *) input_items[m];
- short *out = (short *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_IS_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_IS_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_is;
-typedef boost::shared_ptr<trellis_viterbi_combined_is> 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<int> &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<int> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<int> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_is (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<int> &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<int> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<int> &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
+++ /dev/null
-/* -*- 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<int> &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<int> &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<int> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<int> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_sb.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<short> &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<short> &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<short> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<short> &TABLE,
- trellis_metric_type_t TYPE,
- const short *in, unsigned char *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const short *in = (const short *) input_items[m];
- unsigned char *out = (unsigned char *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_SB_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_SB_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_sb;
-typedef boost::shared_ptr<trellis_viterbi_combined_sb> 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<short> &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<short> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<short> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_sb (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<short> &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<short> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<short> &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
+++ /dev/null
-/* -*- 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<short> &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<short> &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<short> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<short> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_si.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<short> &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<short> &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<short> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<short> &TABLE,
- trellis_metric_type_t TYPE,
- const short *in, int *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const short *in = (const short *) input_items[m];
- int *out = (int *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_SI_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_SI_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_si;
-typedef boost::shared_ptr<trellis_viterbi_combined_si> 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<short> &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<short> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<short> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_si (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<short> &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<short> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<short> &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
+++ /dev/null
-/* -*- 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<short> &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<short> &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<short> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<short> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_combined_ss.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<short> &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<short> &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<short> &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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- int D,
- const std::vector<short> &TABLE,
- trellis_metric_type_t TYPE,
- const short *in, short *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const short *in = (const short *) input_items[m];
- short *out = (short *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm_combined(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,d_D,d_TABLE,d_TYPE,&(in[n*d_K*d_D]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_D * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_COMBINED_SS_H
-#define INCLUDED_TRELLIS_VITERBI_COMBINED_SS_H
-
-#include "fsm.h"
-#include <gr_block.h>
-#include "trellis_calc_metric.h"
-
-class trellis_viterbi_combined_ss;
-typedef boost::shared_ptr<trellis_viterbi_combined_ss> 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<short> &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<short> d_TABLE;
- trellis_metric_type_t d_TYPE;
- //std::vector<int> 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<short> &TABLE,
- trellis_metric_type_t TYPE);
-
-
- trellis_viterbi_combined_ss (
- const fsm &FSM,
- int K,
- int S0,
- int SK,
- int D,
- const std::vector<short> &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<short> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<int> trace () const { return d_trace; }
- void set_TABLE (const std::vector<short> &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
+++ /dev/null
-/* -*- 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<short> &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<short> &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<short> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- //std::vector<short> trace () const { return d_trace; }
- void set_TABLE (const std::vector<short> &table);
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_i.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- const float *in, int *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+in[k*O+OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const float *in = (const float *) input_items[m];
- int *out = (int *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_FSM.O() * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_I_H
-#define INCLUDED_TRELLIS_VITERBI_I_H
-
-#include "fsm.h"
-#include <gr_block.h>
-
-class trellis_viterbi_i;
-typedef boost::shared_ptr<trellis_viterbi_i> 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<int> 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<int> 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
+++ /dev/null
-/* -*- 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<short> trace () const { return d_trace; }
-};
+++ /dev/null
-/* -*- 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 <trellis_viterbi_s.h>
-#include <gr_io_signature.h>
-#include <assert.h>
-#include <iostream>
-
-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<int> &NS,
- const std::vector<int> &OS,
- const std::vector< std::vector<int> > &PS,
- const std::vector< std::vector<int> > &PI,
- int K,
- int S0,int SK,
- const float *in, short *out)//,
- //std::vector<int> &trace)
-{
- std::vector<int> trace(S*K);
- std::vector<float> 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<S;i++) alpha[0*S+i]=0;
- }
- else {
- for(int i=0;i<S;i++) alpha[0*S+i]=INF;
- alpha[0*S+S0]=0.0;
- }
-
- alphai=0;
- for(int k=0;k<K;k++) {
- norm=INF;
- for(int j=0;j<S;j++) { // for each next state do ACS
- minm=INF;
- minmi=0;
- for(unsigned int i=0;i<PS[j].size();i++) {
- //int i0 = j*I+i;
- if((mm=alpha[alphai*S+PS[j][i]]+in[k*O+OS[PS[j][i]*I+PI[j][i]]])<minm)
- minm=mm,minmi=i;
- }
- trace[k*S+j]=minmi;
- alpha[((alphai+1)%2)*S+j]=minm;
- if(minm<norm) norm=minm;
- }
- for(int j=0;j<S;j++)
- alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
- alphai=(alphai+1)%2;
- }
-
- if(SK<0) { // final state not specified
- minm=INF;
- minmi=0;
- for(int i=0;i<S;i++)
- if((mm=alpha[alphai*S+i])<minm) minm=mm,minmi=i;
- st=minmi;
- }
- else {
- st=SK;
- }
-
- for(int k=K-1;k>=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<nstreams;m++) {
- const float *in = (const float *) input_items[m];
- short *out = (short *) output_items[m];
- for (int n=0;n<nblocks;n++) {
- viterbi_algorithm(d_FSM.I(),d_FSM.S(),d_FSM.O(),d_FSM.NS(),d_FSM.OS(),d_FSM.PS(),d_FSM.PI(),d_K,d_S0,d_SK,&(in[n*d_K*d_FSM.O()]),&(out[n*d_K]));//,d_trace);
- }
- }
-
- consume_each (d_FSM.O() * noutput_items );
- return noutput_items;
-}
+++ /dev/null
-/* -*- 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_TRELLIS_VITERBI_S_H
-#define INCLUDED_TRELLIS_VITERBI_S_H
-
-#include "fsm.h"
-#include <gr_block.h>
-
-class trellis_viterbi_s;
-typedef boost::shared_ptr<trellis_viterbi_s> 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<int> 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<int> 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
+++ /dev/null
-/* -*- 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<short> trace () const { return d_trace; }
-};
+++ /dev/null
-[Desktop Entry]
-Version=1.0
-Type=Application
-Name=GRC
-Exec=grc %F
-Categories=Development;
-MimeType=application/gnuradio-grc;
-Icon=gnuradio-grc
+++ /dev/null
-#!/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
+++ /dev/null
-# 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 =
+++ /dev/null
-#!/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())
-
+++ /dev/null
-/* -*- 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 <http://www.gnu.org/licenses/>.
- */
-
-#ifndef INCLUDED_INET_H
-#define INCLUDED_INET_H
-
-#if 1 /* GR_HAVE_ARPA_INET */
-#include <arpa/inet.h>
-#elif 1 /* GR_HAVE_NETINET_IN */
-#include <netinet/in.h>
-#else
-#include <stdint.h>
-
-#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 <byteswap.h>
-#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 */
+++ /dev/null
-/*
- * 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.
-