diff options
author | Tom Rondeau <trondeau@vt.edu> | 2011-10-12 19:02:47 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2011-10-12 19:03:05 -0400 |
commit | 60b3bd32aa145522a1eaf9978e594ed13b9a6bc5 (patch) | |
tree | 8e9c02913a91678bb61eb5a6572544a959d49842 | |
parent | 0e16a28047d07afc6e4d31839d804dca0d0de31e (diff) |
digital: moved over all c++ blocks to gr-digital. Benchmark tx/rx still working.
-rw-r--r-- | gnuradio-core/src/lib/general/Makefile.am | 21 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/general.i | 14 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_ofdm_cyclic_prefixer.i | 34 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.cc | 41 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.h | 56 | ||||
-rw-r--r-- | gr-digital/include/Makefile.am | 5 | ||||
-rw-r--r-- | gr-digital/include/digital_ofdm_cyclic_prefixer.h (renamed from gnuradio-core/src/lib/general/gr_ofdm_cyclic_prefixer.h) | 24 | ||||
-rw-r--r-- | gr-digital/include/digital_ofdm_frame_acquisition.h (renamed from gnuradio-core/src/lib/general/gr_ofdm_frame_acquisition.h) | 24 | ||||
-rw-r--r-- | gr-digital/include/digital_ofdm_frame_sink.h (renamed from gnuradio-core/src/lib/general/gr_ofdm_frame_sink.h) | 42 | ||||
-rw-r--r-- | gr-digital/include/digital_ofdm_insert_preamble.h (renamed from gnuradio-core/src/lib/general/gr_ofdm_insert_preamble.h) | 32 | ||||
-rw-r--r-- | gr-digital/include/digital_ofdm_mapper_bcv.h (renamed from gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.h) | 30 | ||||
-rw-r--r-- | gr-digital/include/digital_ofdm_sampler.h (renamed from gnuradio-core/src/lib/general/gr_ofdm_sampler.h) | 30 | ||||
-rw-r--r-- | gr-digital/lib/Makefile.am | 6 | ||||
-rw-r--r-- | gr-digital/lib/digital_ofdm_cyclic_prefixer.cc (renamed from gnuradio-core/src/lib/general/gr_ofdm_cyclic_prefixer.cc) | 20 | ||||
-rw-r--r-- | gr-digital/lib/digital_ofdm_frame_acquisition.cc (renamed from gnuradio-core/src/lib/general/gr_ofdm_frame_acquisition.cc) | 44 | ||||
-rw-r--r-- | gr-digital/lib/digital_ofdm_frame_sink.cc (renamed from gnuradio-core/src/lib/general/gr_ofdm_frame_sink.cc) | 54 | ||||
-rw-r--r-- | gr-digital/lib/digital_ofdm_insert_preamble.cc (renamed from gnuradio-core/src/lib/general/gr_ofdm_insert_preamble.cc) | 38 | ||||
-rw-r--r-- | gr-digital/lib/digital_ofdm_mapper_bcv.cc (renamed from gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.cc) | 32 | ||||
-rw-r--r-- | gr-digital/lib/digital_ofdm_sampler.cc (renamed from gnuradio-core/src/lib/general/gr_ofdm_sampler.cc) | 30 | ||||
-rw-r--r-- | gr-digital/python/ofdm.py | 20 | ||||
-rw-r--r-- | gr-digital/python/ofdm_receiver.py | 10 | ||||
-rw-r--r-- | gr-digital/swig/Makefile.am | 6 | ||||
-rw-r--r-- | gr-digital/swig/digital_ofdm_cyclic_prefixer.i (renamed from gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.i) | 14 | ||||
-rw-r--r-- | gr-digital/swig/digital_ofdm_frame_acquisition.i (renamed from gnuradio-core/src/lib/general/gr_ofdm_frame_acquisition.i) | 28 | ||||
-rw-r--r-- | gr-digital/swig/digital_ofdm_frame_sink.i (renamed from gnuradio-core/src/lib/general/gr_ofdm_frame_sink.i) | 26 | ||||
-rw-r--r-- | gr-digital/swig/digital_ofdm_insert_preamble.i (renamed from gnuradio-core/src/lib/general/gr_ofdm_insert_preamble.i) | 16 | ||||
-rw-r--r-- | gr-digital/swig/digital_ofdm_mapper_bcv.i (renamed from gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.i) | 24 | ||||
-rw-r--r-- | gr-digital/swig/digital_ofdm_sampler.i (renamed from gnuradio-core/src/lib/general/gr_ofdm_sampler.i) | 18 | ||||
-rw-r--r-- | gr-digital/swig/digital_swig.i | 12 |
29 files changed, 311 insertions, 440 deletions
diff --git a/gnuradio-core/src/lib/general/Makefile.am b/gnuradio-core/src/lib/general/Makefile.am index e389e05e1e..5915ff45b7 100644 --- a/gnuradio-core/src/lib/general/Makefile.am +++ b/gnuradio-core/src/lib/general/Makefile.am @@ -96,13 +96,6 @@ libgeneral_la_SOURCES = \ gr_nop.cc \ gr_null_sink.cc \ gr_null_source.cc \ - gr_ofdm_frame_acquisition.cc \ - gr_ofdm_cyclic_prefixer.cc \ - gr_ofdm_demapper_vcb.cc \ - gr_ofdm_mapper_bcv.cc \ - gr_ofdm_frame_sink.cc \ - gr_ofdm_insert_preamble.cc \ - gr_ofdm_sampler.cc \ gr_pa_2x2_phase_combiner.cc \ gr_packet_sink.cc \ gr_peak_detector2_fb.cc \ @@ -252,13 +245,6 @@ grinclude_HEADERS = \ gr_nop.h \ gr_null_sink.h \ gr_null_source.h \ - gr_ofdm_frame_acquisition.h \ - gr_ofdm_cyclic_prefixer.h \ - gr_ofdm_demapper_vcb.h \ - gr_ofdm_mapper_bcv.h \ - gr_ofdm_frame_sink.h \ - gr_ofdm_insert_preamble.h \ - gr_ofdm_sampler.h \ gr_pa_2x2_phase_combiner.h \ gr_packet_sink.h \ gr_peak_detector2_fb.h \ @@ -411,13 +397,6 @@ swiginclude_HEADERS = \ gr_nop.i \ gr_null_sink.i \ gr_null_source.i \ - gr_ofdm_frame_acquisition.i \ - gr_ofdm_cyclic_prefixer.i \ - gr_ofdm_demapper_vcb.i \ - gr_ofdm_mapper_bcv.i \ - gr_ofdm_frame_sink.i \ - gr_ofdm_insert_preamble.i \ - gr_ofdm_sampler.i \ gr_pa_2x2_phase_combiner.i \ gr_packet_sink.i \ gr_peak_detector2_fb.i \ diff --git a/gnuradio-core/src/lib/general/general.i b/gnuradio-core/src/lib/general/general.i index 107f5c9ea9..3e9a01a66c 100644 --- a/gnuradio-core/src/lib/general/general.i +++ b/gnuradio-core/src/lib/general/general.i @@ -89,13 +89,6 @@ #include <gr_probe_avg_mag_sqrd_cf.h> #include <gr_probe_avg_mag_sqrd_f.h> #include <gr_probe_signal_f.h> -#include <gr_ofdm_frame_acquisition.h> -#include <gr_ofdm_cyclic_prefixer.h> -#include <gr_ofdm_mapper_bcv.h> -#include <gr_ofdm_frame_sink.h> - //#include <gr_ofdm_frame_sink2.h> -#include <gr_ofdm_insert_preamble.h> -#include <gr_ofdm_sampler.h> #include <gr_regenerate_bb.h> #include <gr_pa_2x2_phase_combiner.h> #include <gr_kludge_copy.h> @@ -208,13 +201,6 @@ %include "gr_probe_avg_mag_sqrd_cf.i" %include "gr_probe_avg_mag_sqrd_f.i" %include "gr_probe_signal_f.i" -%include "gr_ofdm_frame_acquisition.i" -%include "gr_ofdm_cyclic_prefixer.i" -%include "gr_ofdm_mapper_bcv.i" -%include "gr_ofdm_frame_sink.i" - //%include "gr_ofdm_frame_sink2.i" -%include "gr_ofdm_insert_preamble.i" -%include "gr_ofdm_sampler.i" %include "gr_regenerate_bb.i" %include "gr_pa_2x2_phase_combiner.i" %include "gr_kludge_copy.i" diff --git a/gnuradio-core/src/lib/general/gr_ofdm_cyclic_prefixer.i b/gnuradio-core/src/lib/general/gr_ofdm_cyclic_prefixer.i deleted file mode 100644 index 9fd8521a20..0000000000 --- a/gnuradio-core/src/lib/general/gr_ofdm_cyclic_prefixer.i +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006,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. - */ - -GR_SWIG_BLOCK_MAGIC(gr,ofdm_cyclic_prefixer) - -gr_ofdm_cyclic_prefixer_sptr -gr_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); - -class gr_ofdm_cyclic_prefixer : public gr_sync_interpolator -{ - protected: - gr_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); - - public: -}; diff --git a/gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.cc b/gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.cc deleted file mode 100644 index 4da7690b1e..0000000000 --- a/gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.cc +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2004,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. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <gr_ofdm_demapper_vcb.h> -#include <gr_io_signature.h> - -gr_ofdm_demapper_vcb::~gr_ofdm_demapper_vcb(void) -{ -} - -gr_ofdm_demapper_vcb::gr_ofdm_demapper_vcb (unsigned bits_per_symbol,unsigned int vlen) - : gr_sync_decimator ("ofdm_demapper_vcb", - gr_make_io_signature (1, 1, sizeof(gr_complex)*vlen), - gr_make_io_signature (1, 1, sizeof(unsigned char)), - bits_per_symbol) -{ -} - diff --git a/gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.h b/gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.h deleted file mode 100644 index 979e1996b9..0000000000 --- a/gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2006 Free Software Foundation, Inc. - * - * This file is part of GNU Radio - * - * GNU Radio is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3, or (at your option) - * any later version. - * - * GNU Radio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Radio; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_GR_OFDM_DEMAPPER_VCB_H -#define INCLUDED_GR_OFDM_DEMAPPER_VCB_H - -#include <gr_sync_decimator.h> - -class gr_ofdm_demapper_vcb; -typedef boost::shared_ptr<gr_ofdm_demapper_vcb> gr_ofdm_demapper_vcb_sptr; - -gr_ofdm_demapper_vcb_sptr -gr_make_ofdm_demapper_vcb (unsigned int bits_per_symbol, unsigned int vlen); - - -/*! - * \brief take a stream of vectors in from an FFT and demodulate to a stream of - * bits. Abstract class must be subclassed with specific mapping. - * - * \ingroup demodulation_blk - * \ingroup ofdm_blk - */ -class gr_ofdm_demapper_vcb : public gr_sync_decimator -{ - friend gr_ofdm_demapper_vcb_sptr - gr_make_ofdm_demapper_vcb (unsigned int bits_per_symbol, unsigned int vlen); - -protected: - gr_ofdm_demapper_vcb (unsigned int bits_per_symbol, unsigned int vlen); - -public: - ~gr_ofdm_demapper_vcb(void); -}; - - - -#endif diff --git a/gr-digital/include/Makefile.am b/gr-digital/include/Makefile.am index ffbc0f793a..c881e244fb 100644 --- a/gr-digital/include/Makefile.am +++ b/gr-digital/include/Makefile.am @@ -38,6 +38,11 @@ grinclude_HEADERS = \ digital_kurtotic_equalizer_cc.h \ digital_metric_type.h \ digital_mpsk_receiver_cc.h \ + digital_ofdm_cyclic_prefixer.h \ + digital_ofdm_frame_acquisition.h \ + digital_ofdm_frame_sink.h \ + digital_ofdm_insert_preamble.h \ + digital_ofdm_sampler.h \ digital_gmskmod_bc.h \ digital_cpmmod_bc.h diff --git a/gnuradio-core/src/lib/general/gr_ofdm_cyclic_prefixer.h b/gr-digital/include/digital_ofdm_cyclic_prefixer.h index eab91cd11c..a3c32125bc 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_cyclic_prefixer.h +++ b/gr-digital/include/digital_ofdm_cyclic_prefixer.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004,2005,2006 Free Software Foundation, Inc. + * Copyright 2004-2006,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,17 +20,17 @@ * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_GR_OFDM_CYCLIC_PREFIXER_H -#define INCLUDED_GR_OFDM_CYCLIC_PREFIXER_H +#ifndef INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_H +#define INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_H #include <gr_sync_interpolator.h> #include <stdio.h> -class gr_ofdm_cyclic_prefixer; -typedef boost::shared_ptr<gr_ofdm_cyclic_prefixer> gr_ofdm_cyclic_prefixer_sptr; +class digital_ofdm_cyclic_prefixer; +typedef boost::shared_ptr<digital_ofdm_cyclic_prefixer> digital_ofdm_cyclic_prefixer_sptr; -gr_ofdm_cyclic_prefixer_sptr -gr_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); +digital_ofdm_cyclic_prefixer_sptr +digital_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); /*! @@ -38,13 +38,13 @@ gr_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); * symbol(vector) and converts vector to a stream output_size long. * \ingroup ofdm_blk */ -class gr_ofdm_cyclic_prefixer : public gr_sync_interpolator +class digital_ofdm_cyclic_prefixer : public gr_sync_interpolator { - friend gr_ofdm_cyclic_prefixer_sptr - gr_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); + friend digital_ofdm_cyclic_prefixer_sptr + digital_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); protected: - gr_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); + digital_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); public: int work (int noutput_items, @@ -55,4 +55,4 @@ class gr_ofdm_cyclic_prefixer : public gr_sync_interpolator size_t d_output_size; }; -#endif /* INCLUDED_GR_OFDM_CYCLIC_PREFIXER_H */ +#endif /* INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_H */ diff --git a/gnuradio-core/src/lib/general/gr_ofdm_frame_acquisition.h b/gr-digital/include/digital_ofdm_frame_acquisition.h index 5db8dbb7f5..9712020991 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_frame_acquisition.h +++ b/gr-digital/include/digital_ofdm_frame_acquisition.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006, 2007 Free Software Foundation, Inc. + * Copyright 2006,2007,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,18 +20,18 @@ * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_GR_OFDM_FRAME_ACQUISITION_H -#define INCLUDED_GR_OFDM_FRAME_ACQUISITION_H +#ifndef INCLUDED_DIGITAL_OFDM_FRAME_ACQUISITION_H +#define INCLUDED_DIGITAL_OFDM_FRAME_ACQUISITION_H #include <gr_block.h> #include <vector> -class gr_ofdm_frame_acquisition; -typedef boost::shared_ptr<gr_ofdm_frame_acquisition> gr_ofdm_frame_acquisition_sptr; +class digital_ofdm_frame_acquisition; +typedef boost::shared_ptr<digital_ofdm_frame_acquisition> digital_ofdm_frame_acquisition_sptr; -gr_ofdm_frame_acquisition_sptr -gr_make_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft_length, +digital_ofdm_frame_acquisition_sptr +digital_make_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft_length, unsigned int cplen, const std::vector<gr_complex> &known_symbol, unsigned int max_fft_shift_len=10); @@ -54,7 +54,7 @@ gr_make_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft * distortion caused by the channel. */ -class gr_ofdm_frame_acquisition : public gr_block +class digital_ofdm_frame_acquisition : public gr_block { /*! * \brief Build an OFDM correlator and equalizer. @@ -65,14 +65,14 @@ class gr_ofdm_frame_acquisition : public gr_block * start of a frame (usually a BPSK PN sequence) * \param max_fft_shift_len Set's the maximum distance you can look between bins for correlation */ - friend gr_ofdm_frame_acquisition_sptr - gr_make_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft_length, + friend digital_ofdm_frame_acquisition_sptr + digital_make_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft_length, unsigned int cplen, const std::vector<gr_complex> &known_symbol, unsigned int max_fft_shift_len); protected: - gr_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft_length, + digital_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft_length, unsigned int cplen, const std::vector<gr_complex> &known_symbol, unsigned int max_fft_shift_len); @@ -105,7 +105,7 @@ protected: */ float snr() { return d_snr_est; } - ~gr_ofdm_frame_acquisition(void); + ~digital_ofdm_frame_acquisition(void); int general_work(int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink.h b/gr-digital/include/digital_ofdm_frame_sink.h index c419b86735..3575ee35bc 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink.h +++ b/gr-digital/include/digital_ofdm_frame_sink.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007 Free Software Foundation, Inc. + * Copyright 2007,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,20 +20,20 @@ * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_GR_OFDM_FRAME_SINK_H -#define INCLUDED_GR_OFDM_FRAME_SINK_H +#ifndef INCLUDED_DIGITAL_OFDM_FRAME_SINK_H +#define INCLUDED_DIGITAL_OFDM_FRAME_SINK_H #include <gr_sync_block.h> #include <gr_msg_queue.h> -class gr_ofdm_frame_sink; -typedef boost::shared_ptr<gr_ofdm_frame_sink> gr_ofdm_frame_sink_sptr; +class digital_ofdm_frame_sink; +typedef boost::shared_ptr<digital_ofdm_frame_sink> digital_ofdm_frame_sink_sptr; -gr_ofdm_frame_sink_sptr -gr_make_ofdm_frame_sink (const std::vector<gr_complex> &sym_position, - const std::vector<unsigned char> &sym_value_out, - gr_msg_queue_sptr target_queue, unsigned int occupied_tones, - float phase_gain=0.25, float freq_gain=0.25*0.25/4.0); +digital_ofdm_frame_sink_sptr +digital_make_ofdm_frame_sink (const std::vector<gr_complex> &sym_position, + const std::vector<unsigned char> &sym_value_out, + gr_msg_queue_sptr target_queue, unsigned int occupied_tones, + float phase_gain=0.25, float freq_gain=0.25*0.25/4.0); /*! * \brief Takes an OFDM symbol in, demaps it into bits of 0's and 1's, packs @@ -45,13 +45,13 @@ gr_make_ofdm_frame_sink (const std::vector<gr_complex> &sym_position, * we want to be able to pass in a reference to an object to do the demapping and slicing * for a given modulation type. */ -class gr_ofdm_frame_sink : public gr_sync_block +class digital_ofdm_frame_sink : public gr_sync_block { - friend gr_ofdm_frame_sink_sptr - gr_make_ofdm_frame_sink (const std::vector<gr_complex> &sym_position, - const std::vector<unsigned char> &sym_value_out, - gr_msg_queue_sptr target_queue, unsigned int occupied_tones, - float phase_gain, float freq_gain); + friend digital_ofdm_frame_sink_sptr + digital_make_ofdm_frame_sink (const std::vector<gr_complex> &sym_position, + const std::vector<unsigned char> &sym_value_out, + gr_msg_queue_sptr target_queue, unsigned int occupied_tones, + float phase_gain, float freq_gain); private: enum state_t {STATE_SYNC_SEARCH, STATE_HAVE_SYNC, STATE_HAVE_HEADER}; @@ -93,10 +93,10 @@ class gr_ofdm_frame_sink : public gr_sync_block std::vector<int> d_subcarrier_map; protected: - gr_ofdm_frame_sink(const std::vector<gr_complex> &sym_position, - const std::vector<unsigned char> &sym_value_out, - gr_msg_queue_sptr target_queue, unsigned int occupied_tones, - float phase_gain, float freq_gain); + digital_ofdm_frame_sink(const std::vector<gr_complex> &sym_position, + const std::vector<unsigned char> &sym_value_out, + gr_msg_queue_sptr target_queue, unsigned int occupied_tones, + float phase_gain, float freq_gain); void enter_search(); void enter_have_sync(); @@ -116,7 +116,7 @@ class gr_ofdm_frame_sink : public gr_sync_block const std::vector<unsigned char> &sym_value_out); public: - ~gr_ofdm_frame_sink(); + ~digital_ofdm_frame_sink(); int work(int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/general/gr_ofdm_insert_preamble.h b/gr-digital/include/digital_ofdm_insert_preamble.h index 57c1af013c..a7d87d42f0 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_insert_preamble.h +++ b/gr-digital/include/digital_ofdm_insert_preamble.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007 Free Software Foundation, Inc. + * Copyright 2007,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -19,18 +19,18 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef INCLUDED_GR_OFDM_INSERT_PREAMBLE_H -#define INCLUDED_GR_OFDM_INSERT_PREAMBLE_H +#ifndef INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_H +#define INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_H #include <gr_block.h> #include <vector> -class gr_ofdm_insert_preamble; -typedef boost::shared_ptr<gr_ofdm_insert_preamble> gr_ofdm_insert_preamble_sptr; +class digital_ofdm_insert_preamble; +typedef boost::shared_ptr<digital_ofdm_insert_preamble> digital_ofdm_insert_preamble_sptr; -gr_ofdm_insert_preamble_sptr -gr_make_ofdm_insert_preamble(int fft_length, - const std::vector<std::vector<gr_complex> > &preamble); +digital_ofdm_insert_preamble_sptr +digital_make_ofdm_insert_preamble(int fft_length, + const std::vector<std::vector<gr_complex> > &preamble); /*! * \brief insert "pre-modulated" preamble symbols before each payload. @@ -62,15 +62,15 @@ gr_make_ofdm_insert_preamble(int fft_length, * \param preamble vector of symbols that represent the pre-modulated preamble. */ -class gr_ofdm_insert_preamble : public gr_block +class digital_ofdm_insert_preamble : public gr_block { - friend gr_ofdm_insert_preamble_sptr - gr_make_ofdm_insert_preamble(int fft_length, - const std::vector<std::vector<gr_complex> > &preamble); + friend digital_ofdm_insert_preamble_sptr + digital_make_ofdm_insert_preamble(int fft_length, + const std::vector<std::vector<gr_complex> > &preamble); protected: - gr_ofdm_insert_preamble(int fft_length, - const std::vector<std::vector<gr_complex> > &preamble); + digital_ofdm_insert_preamble(int fft_length, + const std::vector<std::vector<gr_complex> > &preamble); private: enum state_t { @@ -93,7 +93,7 @@ private: public: - ~gr_ofdm_insert_preamble(); + ~digital_ofdm_insert_preamble(); int general_work (int noutput_items, gr_vector_int &ninput_items, @@ -101,4 +101,4 @@ public: gr_vector_void_star &output_items); }; -#endif /* INCLUDED_GR_OFDM_INSERT_PREAMBLE_H */ +#endif /* INCLUDED_DIGITAL_OFDM_INSERT_PREAMBLE_H */ diff --git a/gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.h b/gr-digital/include/digital_ofdm_mapper_bcv.h index 5a21b90af2..e9b47eb9d9 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.h +++ b/gr-digital/include/digital_ofdm_mapper_bcv.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006,2007 Free Software Foundation, Inc. + * Copyright 2006,2007,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,19 +20,19 @@ * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_GR_OFDM_MAPPER_BCV_H -#define INCLUDED_GR_OFDM_MAPPER_BCV_H +#ifndef INCLUDED_DIGITAL_OFDM_MAPPER_BCV_H +#define INCLUDED_DIGITAL_OFDM_MAPPER_BCV_H #include <gr_sync_block.h> #include <gr_message.h> #include <gr_msg_queue.h> -class gr_ofdm_mapper_bcv; -typedef boost::shared_ptr<gr_ofdm_mapper_bcv> gr_ofdm_mapper_bcv_sptr; +class digital_ofdm_mapper_bcv; +typedef boost::shared_ptr<digital_ofdm_mapper_bcv> digital_ofdm_mapper_bcv_sptr; -gr_ofdm_mapper_bcv_sptr -gr_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned msgq_limit, - unsigned occupied_carriers, unsigned int fft_length); +digital_ofdm_mapper_bcv_sptr +digital_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned msgq_limit, + unsigned occupied_carriers, unsigned int fft_length); /*! * \brief take a stream of bytes in and map to a vector of complex @@ -42,14 +42,14 @@ gr_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned * \ingroup ofdm_blk */ -class gr_ofdm_mapper_bcv : public gr_sync_block +class digital_ofdm_mapper_bcv : public gr_sync_block { - friend gr_ofdm_mapper_bcv_sptr - gr_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned msgq_limit, + friend digital_ofdm_mapper_bcv_sptr + digital_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned msgq_limit, + unsigned occupied_carriers, unsigned int fft_length); +protected: + digital_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned msgq_limit, unsigned occupied_carriers, unsigned int fft_length); - protected: - gr_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned msgq_limit, - unsigned occupied_carriers, unsigned int fft_length); private: std::vector<gr_complex> d_constellation; @@ -74,7 +74,7 @@ class gr_ofdm_mapper_bcv : public gr_sync_block int randsym(); public: - ~gr_ofdm_mapper_bcv(void); + ~digital_ofdm_mapper_bcv(void); gr_msg_queue_sptr msgq() const { return d_msgq; } diff --git a/gnuradio-core/src/lib/general/gr_ofdm_sampler.h b/gr-digital/include/digital_ofdm_sampler.h index d059636edd..01aa40d46e 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_sampler.h +++ b/gr-digital/include/digital_ofdm_sampler.h @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007 Free Software Foundation, Inc. + * Copyright 2007,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,31 +20,31 @@ * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_GR_OFDM_SAMPLER_H -#define INCLUDED_GR_OFDM_SAMPLER_H +#ifndef INCLUDED_DIGITAL_OFDM_SAMPLER_H +#define INCLUDED_DIGITAL_OFDM_SAMPLER_H #include <gr_sync_block.h> -class gr_ofdm_sampler; -typedef boost::shared_ptr<gr_ofdm_sampler> gr_ofdm_sampler_sptr; +class digital_ofdm_sampler; +typedef boost::shared_ptr<digital_ofdm_sampler> digital_ofdm_sampler_sptr; -gr_ofdm_sampler_sptr gr_make_ofdm_sampler (unsigned int fft_length, - unsigned int symbol_length, - unsigned int timeout=1000); +digital_ofdm_sampler_sptr digital_make_ofdm_sampler (unsigned int fft_length, + unsigned int symbol_length, + unsigned int timeout=1000); /*! * \brief does the rest of the OFDM stuff * \ingroup ofdm_blk */ -class gr_ofdm_sampler : public gr_block +class digital_ofdm_sampler : public gr_block { - friend gr_ofdm_sampler_sptr gr_make_ofdm_sampler (unsigned int fft_length, - unsigned int symbol_length, - unsigned int timeout); + friend digital_ofdm_sampler_sptr digital_make_ofdm_sampler (unsigned int fft_length, + unsigned int symbol_length, + unsigned int timeout); - gr_ofdm_sampler (unsigned int fft_length, - unsigned int symbol_length, - unsigned int timeout); + digital_ofdm_sampler (unsigned int fft_length, + unsigned int symbol_length, + unsigned int timeout); private: enum state_t {STATE_NO_SIG, STATE_PREAMBLE, STATE_FRAME}; diff --git a/gr-digital/lib/Makefile.am b/gr-digital/lib/Makefile.am index 17baf2101b..2860974ca7 100644 --- a/gr-digital/lib/Makefile.am +++ b/gr-digital/lib/Makefile.am @@ -41,6 +41,12 @@ libgnuradio_digital_la_SOURCES = \ digital_lms_dd_equalizer_cc.cc \ digital_kurtotic_equalizer_cc.cc \ digital_mpsk_receiver_cc.cc \ + digital_ofdm_cyclic_prefixer.cc \ + digital_ofdm_frame_acquisition.cc \ + digital_ofdm_frame_sink.cc \ + digital_ofdm_insert_preamble.cc \ + digital_ofdm_mapper_bcv.cc \ + digital_ofdm_sampler.cc \ digital_gmskmod_bc.cc \ digital_cpmmod_bc.cc diff --git a/gnuradio-core/src/lib/general/gr_ofdm_cyclic_prefixer.cc b/gr-digital/lib/digital_ofdm_cyclic_prefixer.cc index fb40a3035f..192af2591d 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_cyclic_prefixer.cc +++ b/gr-digital/lib/digital_ofdm_cyclic_prefixer.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004,2006,2010 Free Software Foundation, Inc. + * Copyright 2004,2006,2010,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -24,16 +24,18 @@ #include "config.h" #endif -#include <gr_ofdm_cyclic_prefixer.h> +#include <digital_ofdm_cyclic_prefixer.h> #include <gr_io_signature.h> -gr_ofdm_cyclic_prefixer_sptr -gr_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size) +digital_ofdm_cyclic_prefixer_sptr +digital_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size) { - return gnuradio::get_initial_sptr(new gr_ofdm_cyclic_prefixer (input_size, output_size)); + return gnuradio::get_initial_sptr(new digital_ofdm_cyclic_prefixer (input_size, + output_size)); } -gr_ofdm_cyclic_prefixer::gr_ofdm_cyclic_prefixer (size_t input_size, size_t output_size) +digital_ofdm_cyclic_prefixer::digital_ofdm_cyclic_prefixer (size_t input_size, + size_t output_size) : gr_sync_interpolator ("ofdm_cyclic_prefixer", gr_make_io_signature (1, 1, input_size*sizeof(gr_complex)), gr_make_io_signature (1, 1, sizeof(gr_complex)), @@ -45,9 +47,9 @@ gr_ofdm_cyclic_prefixer::gr_ofdm_cyclic_prefixer (size_t input_size, size_t outp } int -gr_ofdm_cyclic_prefixer::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) +digital_ofdm_cyclic_prefixer::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]; diff --git a/gnuradio-core/src/lib/general/gr_ofdm_frame_acquisition.cc b/gr-digital/lib/digital_ofdm_frame_acquisition.cc index 201375597a..93b58aeca5 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_frame_acquisition.cc +++ b/gr-digital/lib/digital_ofdm_frame_acquisition.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006,2007,2008,2010 Free Software Foundation, Inc. + * Copyright 2006-2008,2010,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -24,7 +24,7 @@ #include "config.h" #endif -#include <gr_ofdm_frame_acquisition.h> +#include <digital_ofdm_frame_acquisition.h> #include <gr_io_signature.h> #include <gr_expj.h> #include <gr_math.h> @@ -34,20 +34,22 @@ #define M_TWOPI (2*M_PI) #define MAX_NUM_SYMBOLS 1000 -gr_ofdm_frame_acquisition_sptr -gr_make_ofdm_frame_acquisition (unsigned int occupied_carriers, unsigned int fft_length, - unsigned int cplen, - const std::vector<gr_complex> &known_symbol, - unsigned int max_fft_shift_len) +digital_ofdm_frame_acquisition_sptr +digital_make_ofdm_frame_acquisition (unsigned int occupied_carriers, + unsigned int fft_length, + unsigned int cplen, + const std::vector<gr_complex> &known_symbol, + unsigned int max_fft_shift_len) { - return gnuradio::get_initial_sptr(new gr_ofdm_frame_acquisition (occupied_carriers, fft_length, cplen, + return gnuradio::get_initial_sptr(new digital_ofdm_frame_acquisition (occupied_carriers, fft_length, cplen, known_symbol, max_fft_shift_len)); } -gr_ofdm_frame_acquisition::gr_ofdm_frame_acquisition (unsigned occupied_carriers, unsigned int fft_length, - unsigned int cplen, - const std::vector<gr_complex> &known_symbol, - unsigned int max_fft_shift_len) +digital_ofdm_frame_acquisition::digital_ofdm_frame_acquisition (unsigned occupied_carriers, + unsigned int fft_length, + unsigned int cplen, + const std::vector<gr_complex> &known_symbol, + unsigned int max_fft_shift_len) : gr_block ("ofdm_frame_acquisition", gr_make_io_signature2 (2, 2, sizeof(gr_complex)*fft_length, sizeof(char)*fft_length), gr_make_io_signature2 (2, 2, sizeof(gr_complex)*occupied_carriers, sizeof(char))), @@ -78,13 +80,13 @@ gr_ofdm_frame_acquisition::gr_ofdm_frame_acquisition (unsigned occupied_carriers } } -gr_ofdm_frame_acquisition::~gr_ofdm_frame_acquisition(void) +digital_ofdm_frame_acquisition::~digital_ofdm_frame_acquisition(void) { delete [] d_phase_lut; } void -gr_ofdm_frame_acquisition::forecast (int noutput_items, gr_vector_int &ninput_items_required) +digital_ofdm_frame_acquisition::forecast (int noutput_items, gr_vector_int &ninput_items_required) { unsigned ninputs = ninput_items_required.size (); for (unsigned i = 0; i < ninputs; i++) @@ -92,7 +94,7 @@ gr_ofdm_frame_acquisition::forecast (int noutput_items, gr_vector_int &ninput_it } gr_complex -gr_ofdm_frame_acquisition::coarse_freq_comp(int freq_delta, int symbol_count) +digital_ofdm_frame_acquisition::coarse_freq_comp(int freq_delta, int symbol_count) { // return gr_complex(cos(-M_TWOPI*freq_delta*d_cplen/d_fft_length*symbol_count), // sin(-M_TWOPI*freq_delta*d_cplen/d_fft_length*symbol_count)); @@ -103,7 +105,7 @@ gr_ofdm_frame_acquisition::coarse_freq_comp(int freq_delta, int symbol_count) } void -gr_ofdm_frame_acquisition::correlate(const gr_complex *symbol, int zeros_on_left) +digital_ofdm_frame_acquisition::correlate(const gr_complex *symbol, int zeros_on_left) { unsigned int i,j; @@ -131,7 +133,7 @@ gr_ofdm_frame_acquisition::correlate(const gr_complex *symbol, int zeros_on_left } void -gr_ofdm_frame_acquisition::calculate_equalizer(const gr_complex *symbol, int zeros_on_left) +digital_ofdm_frame_acquisition::calculate_equalizer(const gr_complex *symbol, int zeros_on_left) { unsigned int i=0; @@ -169,10 +171,10 @@ gr_ofdm_frame_acquisition::calculate_equalizer(const gr_complex *symbol, int zer } int -gr_ofdm_frame_acquisition::general_work(int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) +digital_ofdm_frame_acquisition::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 *symbol = (const gr_complex *)input_items[0]; const char *signal_in = (const char *)input_items[1]; diff --git a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink.cc b/gr-digital/lib/digital_ofdm_frame_sink.cc index 2799457661..f8fb1bbb1d 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink.cc +++ b/gr-digital/lib/digital_ofdm_frame_sink.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007,2008,2010 Free Software Foundation, Inc. + * Copyright 2007,2008,2010,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -24,7 +24,7 @@ #include "config.h" #endif -#include <gr_ofdm_frame_sink.h> +#include <digital_ofdm_frame_sink.h> #include <gr_io_signature.h> #include <gr_expj.h> #include <gr_math.h> @@ -37,7 +37,7 @@ #define VERBOSE 0 inline void -gr_ofdm_frame_sink::enter_search() +digital_ofdm_frame_sink::enter_search() { if (VERBOSE) fprintf(stderr, "@ enter_search\n"); @@ -47,7 +47,7 @@ gr_ofdm_frame_sink::enter_search() } inline void -gr_ofdm_frame_sink::enter_have_sync() +digital_ofdm_frame_sink::enter_have_sync() { if (VERBOSE) fprintf(stderr, "@ enter_have_sync\n"); @@ -68,7 +68,7 @@ gr_ofdm_frame_sink::enter_have_sync() } inline void -gr_ofdm_frame_sink::enter_have_header() +digital_ofdm_frame_sink::enter_have_header() { d_state = STATE_HAVE_HEADER; @@ -85,7 +85,7 @@ gr_ofdm_frame_sink::enter_have_header() } -unsigned char gr_ofdm_frame_sink::slicer(const gr_complex x) +unsigned char digital_ofdm_frame_sink::slicer(const gr_complex x) { unsigned int table_size = d_sym_value_out.size(); unsigned int min_index = 0; @@ -102,8 +102,8 @@ unsigned char gr_ofdm_frame_sink::slicer(const gr_complex x) return d_sym_value_out[min_index]; } -unsigned int gr_ofdm_frame_sink::demapper(const gr_complex *in, - unsigned char *out) +unsigned int digital_ofdm_frame_sink::demapper(const gr_complex *in, + unsigned char *out) { unsigned int i=0, bytes_produced=0; gr_complex carrier; @@ -178,22 +178,22 @@ unsigned int gr_ofdm_frame_sink::demapper(const gr_complex *in, } -gr_ofdm_frame_sink_sptr -gr_make_ofdm_frame_sink(const std::vector<gr_complex> &sym_position, - const std::vector<unsigned char> &sym_value_out, - gr_msg_queue_sptr target_queue, unsigned int occupied_carriers, - float phase_gain, float freq_gain) +digital_ofdm_frame_sink_sptr +digital_make_ofdm_frame_sink(const std::vector<gr_complex> &sym_position, + const std::vector<unsigned char> &sym_value_out, + gr_msg_queue_sptr target_queue, unsigned int occupied_carriers, + float phase_gain, float freq_gain) { - return gnuradio::get_initial_sptr(new gr_ofdm_frame_sink(sym_position, sym_value_out, - target_queue, occupied_carriers, - phase_gain, freq_gain)); + return gnuradio::get_initial_sptr(new digital_ofdm_frame_sink(sym_position, sym_value_out, + target_queue, occupied_carriers, + phase_gain, freq_gain)); } -gr_ofdm_frame_sink::gr_ofdm_frame_sink(const std::vector<gr_complex> &sym_position, - const std::vector<unsigned char> &sym_value_out, - gr_msg_queue_sptr target_queue, unsigned int occupied_carriers, - float phase_gain, float freq_gain) +digital_ofdm_frame_sink::digital_ofdm_frame_sink(const std::vector<gr_complex> &sym_position, + const std::vector<unsigned char> &sym_value_out, + gr_msg_queue_sptr target_queue, unsigned int occupied_carriers, + float phase_gain, float freq_gain) : gr_sync_block ("ofdm_frame_sink", gr_make_io_signature2 (2, 2, sizeof(gr_complex)*occupied_carriers, sizeof(char)), gr_make_io_signature (1, 1, sizeof(gr_complex)*occupied_carriers)), @@ -252,7 +252,7 @@ gr_ofdm_frame_sink::gr_ofdm_frame_sink(const std::vector<gr_complex> &sym_positi // make sure we stay in the limit currently imposed by the occupied_carriers if(d_subcarrier_map.size() > d_occupied_carriers) { - throw std::invalid_argument("gr_ofdm_mapper_bcv: subcarriers allocated exceeds size of occupied carriers"); + throw std::invalid_argument("digital_ofdm_mapper_bcv: subcarriers allocated exceeds size of occupied carriers"); } d_bytes_out = new unsigned char[d_occupied_carriers]; @@ -264,14 +264,14 @@ gr_ofdm_frame_sink::gr_ofdm_frame_sink(const std::vector<gr_complex> &sym_positi enter_search(); } -gr_ofdm_frame_sink::~gr_ofdm_frame_sink () +digital_ofdm_frame_sink::~digital_ofdm_frame_sink () { delete [] d_bytes_out; } bool -gr_ofdm_frame_sink::set_sym_value_out(const std::vector<gr_complex> &sym_position, - const std::vector<unsigned char> &sym_value_out) +digital_ofdm_frame_sink::set_sym_value_out(const std::vector<gr_complex> &sym_position, + const std::vector<unsigned char> &sym_value_out) { if (sym_position.size() != sym_value_out.size()) return false; @@ -288,9 +288,9 @@ gr_ofdm_frame_sink::set_sym_value_out(const std::vector<gr_complex> &sym_positio int -gr_ofdm_frame_sink::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) +digital_ofdm_frame_sink::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]; const char *sig = (const char *) input_items[1]; diff --git a/gnuradio-core/src/lib/general/gr_ofdm_insert_preamble.cc b/gr-digital/lib/digital_ofdm_insert_preamble.cc index ed10c94a89..a46133643d 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_insert_preamble.cc +++ b/gr-digital/lib/digital_ofdm_insert_preamble.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007,2010 Free Software Foundation, Inc. + * Copyright 2007,2010,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -23,21 +23,21 @@ #include <config.h> #endif -#include <gr_ofdm_insert_preamble.h> +#include <digital_ofdm_insert_preamble.h> #include <gr_io_signature.h> #include <stdexcept> #include <iostream> #include <string.h> -gr_ofdm_insert_preamble_sptr -gr_make_ofdm_insert_preamble(int fft_length, - const std::vector<std::vector<gr_complex> > &preamble) +digital_ofdm_insert_preamble_sptr +digital_make_ofdm_insert_preamble(int fft_length, + const std::vector<std::vector<gr_complex> > &preamble) { - return gnuradio::get_initial_sptr(new gr_ofdm_insert_preamble(fft_length, - preamble)); + return gnuradio::get_initial_sptr(new digital_ofdm_insert_preamble(fft_length, + preamble)); } -gr_ofdm_insert_preamble::gr_ofdm_insert_preamble +digital_ofdm_insert_preamble::digital_ofdm_insert_preamble (int fft_length, const std::vector<std::vector<gr_complex> > &preamble) : gr_block("ofdm_insert_preamble", @@ -56,22 +56,22 @@ gr_ofdm_insert_preamble::gr_ofdm_insert_preamble // sanity check preamble symbols for (size_t i = 0; i < d_preamble.size(); i++){ if (d_preamble[i].size() != (size_t) d_fft_length) - throw std::invalid_argument("gr_ofdm_insert_preamble: invalid length for preamble symbol"); + throw std::invalid_argument("digital_ofdm_insert_preamble: invalid length for preamble symbol"); } enter_idle(); } -gr_ofdm_insert_preamble::~gr_ofdm_insert_preamble() +digital_ofdm_insert_preamble::~digital_ofdm_insert_preamble() { } int -gr_ofdm_insert_preamble::general_work (int noutput_items, - gr_vector_int &ninput_items_v, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) +digital_ofdm_insert_preamble::general_work (int noutput_items, + gr_vector_int &ninput_items_v, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) { int ninput_items = std::min(ninput_items_v[0], ninput_items_v[1]); const gr_complex *in_sym = (const gr_complex *) input_items[0]; @@ -149,7 +149,7 @@ gr_ofdm_insert_preamble::general_work (int noutput_items, break; default: - std::cerr << "gr_ofdm_insert_preamble: (can't happen) invalid state, resetting\n"; + std::cerr << "digital_ofdm_insert_preamble: (can't happen) invalid state, resetting\n"; enter_idle(); } } @@ -159,7 +159,7 @@ gr_ofdm_insert_preamble::general_work (int noutput_items, } void -gr_ofdm_insert_preamble::enter_idle() +digital_ofdm_insert_preamble::enter_idle() { d_state = ST_IDLE; d_nsymbols_output = 0; @@ -167,7 +167,7 @@ gr_ofdm_insert_preamble::enter_idle() } void -gr_ofdm_insert_preamble::enter_preamble() +digital_ofdm_insert_preamble::enter_preamble() { d_state = ST_PREAMBLE; d_nsymbols_output = 0; @@ -175,13 +175,13 @@ gr_ofdm_insert_preamble::enter_preamble() } void -gr_ofdm_insert_preamble::enter_first_payload() +digital_ofdm_insert_preamble::enter_first_payload() { d_state = ST_FIRST_PAYLOAD; } void -gr_ofdm_insert_preamble::enter_payload() +digital_ofdm_insert_preamble::enter_payload() { d_state = ST_PAYLOAD; } diff --git a/gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.cc b/gr-digital/lib/digital_ofdm_mapper_bcv.cc index cc4aba0cbc..cf3d08703a 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.cc +++ b/gr-digital/lib/digital_ofdm_mapper_bcv.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006,2007,2008,2010 Free Software Foundation, Inc. + * Copyright 2006-2008,2010,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -25,22 +25,22 @@ #include "config.h" #endif -#include <gr_ofdm_mapper_bcv.h> +#include <digital_ofdm_mapper_bcv.h> #include <gr_io_signature.h> #include <stdexcept> #include <string.h> -gr_ofdm_mapper_bcv_sptr -gr_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned int msgq_limit, - unsigned int occupied_carriers, unsigned int fft_length) +digital_ofdm_mapper_bcv_sptr +digital_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned int msgq_limit, + unsigned int occupied_carriers, unsigned int fft_length) { - return gnuradio::get_initial_sptr(new gr_ofdm_mapper_bcv (constellation, msgq_limit, - occupied_carriers, fft_length)); + return gnuradio::get_initial_sptr(new digital_ofdm_mapper_bcv (constellation, msgq_limit, + occupied_carriers, fft_length)); } // Consumes 1 packet and produces as many OFDM symbols of fft_length to hold the full packet -gr_ofdm_mapper_bcv::gr_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned int msgq_limit, - unsigned int occupied_carriers, unsigned int fft_length) +digital_ofdm_mapper_bcv::digital_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, unsigned int msgq_limit, + unsigned int occupied_carriers, unsigned int fft_length) : gr_sync_block ("ofdm_mapper_bcv", gr_make_io_signature (0, 0, 0), gr_make_io_signature2 (1, 2, sizeof(gr_complex)*fft_length, sizeof(char))), @@ -54,7 +54,7 @@ gr_ofdm_mapper_bcv::gr_ofdm_mapper_bcv (const std::vector<gr_complex> &constella d_nresid(0) { if (!(d_occupied_carriers <= d_fft_length)) - throw std::invalid_argument("gr_ofdm_mapper_bcv: occupied carriers must be <= fft_length"); + throw std::invalid_argument("digital_ofdm_mapper_bcv: occupied carriers must be <= fft_length"); // this is not the final form of this solution since we still use the occupied_tones concept, // which would get us into trouble if the number of carriers we seek is greater than the occupied carriers. @@ -110,25 +110,25 @@ gr_ofdm_mapper_bcv::gr_ofdm_mapper_bcv (const std::vector<gr_complex> &constella // make sure we stay in the limit currently imposed by the occupied_carriers if(d_subcarrier_map.size() > d_occupied_carriers) { - throw std::invalid_argument("gr_ofdm_mapper_bcv: subcarriers allocated exceeds size of occupied carriers"); + throw std::invalid_argument("digital_ofdm_mapper_bcv: subcarriers allocated exceeds size of occupied carriers"); } d_nbits = (unsigned long)ceil(log10(float(d_constellation.size())) / log10(2.0)); } -gr_ofdm_mapper_bcv::~gr_ofdm_mapper_bcv(void) +digital_ofdm_mapper_bcv::~digital_ofdm_mapper_bcv(void) { } -int gr_ofdm_mapper_bcv::randsym() +int digital_ofdm_mapper_bcv::randsym() { return (rand() % d_constellation.size()); } int -gr_ofdm_mapper_bcv::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) +digital_ofdm_mapper_bcv::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]; diff --git a/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc b/gr-digital/lib/digital_ofdm_sampler.cc index f9a53c87f2..cab8c2ba93 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_sampler.cc +++ b/gr-digital/lib/digital_ofdm_sampler.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007,2008,2010 Free Software Foundation, Inc. + * Copyright 2007,2008,2010,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -24,22 +24,22 @@ #include "config.h" #endif -#include <gr_ofdm_sampler.h> +#include <digital_ofdm_sampler.h> #include <gr_io_signature.h> #include <gr_expj.h> #include <cstdio> -gr_ofdm_sampler_sptr -gr_make_ofdm_sampler (unsigned int fft_length, - unsigned int symbol_length, - unsigned int timeout) +digital_ofdm_sampler_sptr +digital_make_ofdm_sampler (unsigned int fft_length, + unsigned int symbol_length, + unsigned int timeout) { - return gnuradio::get_initial_sptr(new gr_ofdm_sampler (fft_length, symbol_length, timeout)); + return gnuradio::get_initial_sptr(new digital_ofdm_sampler (fft_length, symbol_length, timeout)); } -gr_ofdm_sampler::gr_ofdm_sampler (unsigned int fft_length, - unsigned int symbol_length, - unsigned int timeout) +digital_ofdm_sampler::digital_ofdm_sampler (unsigned int fft_length, + unsigned int symbol_length, + unsigned int timeout) : gr_block ("ofdm_sampler", gr_make_io_signature2 (2, 2, sizeof (gr_complex), sizeof(char)), gr_make_io_signature2 (2, 2, sizeof (gr_complex)*fft_length, sizeof(char)*fft_length)), @@ -49,7 +49,7 @@ gr_ofdm_sampler::gr_ofdm_sampler (unsigned int fft_length, } void -gr_ofdm_sampler::forecast (int noutput_items, gr_vector_int &ninput_items_required) +digital_ofdm_sampler::forecast (int noutput_items, gr_vector_int &ninput_items_required) { // FIXME do we need more //int nreqd = (noutput_items-1) * d_symbol_length + d_fft_length; @@ -61,10 +61,10 @@ gr_ofdm_sampler::forecast (int noutput_items, gr_vector_int &ninput_items_requir int -gr_ofdm_sampler::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) +digital_ofdm_sampler::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 *iptr = (const gr_complex *) input_items[0]; const char *trigger = (const char *) input_items[1]; diff --git a/gr-digital/python/ofdm.py b/gr-digital/python/ofdm.py index ba49c62502..c7654f0de1 100644 --- a/gr-digital/python/ofdm.py +++ b/gr-digital/python/ofdm.py @@ -94,12 +94,16 @@ class ofdm_mod(gr.hier_block2): elif(self._modulation.find("qam") >= 0): rotated_const = map(lambda pt: pt * rot, qam.constellation[arity]) #print rotated_const - self._pkt_input = gr.ofdm_mapper_bcv(rotated_const, msgq_limit, - options.occupied_tones, options.fft_length) + self._pkt_input = digital_swig.ofdm_mapper_bcv(rotated_const, + msgq_limit, + options.occupied_tones, + options.fft_length) - self.preambles = gr.ofdm_insert_preamble(self._fft_length, padded_preambles) + self.preambles = digital_swig.ofdm_insert_preamble(self._fft_length, + padded_preambles) self.ifft = gr.fft_vcc(self._fft_length, False, win, True) - self.cp_adder = gr.ofdm_cyclic_prefixer(self._fft_length, symbol_length) + self.cp_adder = digital_swig.ofdm_cyclic_prefixer(self._fft_length, + symbol_length) self.scale = gr.multiply_const_cc(1.0 / math.sqrt(self._fft_length)) self.connect((self._pkt_input, 0), (self.preambles, 0)) @@ -230,10 +234,10 @@ class ofdm_demod(gr.hier_block2): phgain = 0.25 frgain = phgain*phgain / 4.0 - self.ofdm_demod = gr.ofdm_frame_sink(rotated_const, range(arity), - self._rcvd_pktq, - self._occupied_tones, - phgain, frgain) + self.ofdm_demod = digital_swig.ofdm_frame_sink(rotated_const, range(arity), + self._rcvd_pktq, + self._occupied_tones, + phgain, frgain) self.connect(self, self.ofdm_recv) self.connect((self.ofdm_recv, 0), (self.ofdm_demod, 0)) diff --git a/gr-digital/python/ofdm_receiver.py b/gr-digital/python/ofdm_receiver.py index 6c19cb32e2..9d4d6e559d 100644 --- a/gr-digital/python/ofdm_receiver.py +++ b/gr-digital/python/ofdm_receiver.py @@ -23,6 +23,8 @@ import math from numpy import fft from gnuradio import gr + +import digital_swig from ofdm_sync_pn import ofdm_sync_pn from ofdm_sync_fixed import ofdm_sync_fixed from ofdm_sync_pnac import ofdm_sync_pnac @@ -119,11 +121,11 @@ class ofdm_receiver(gr.hier_block2): self.nco = gr.frequency_modulator_fc(nco_sensitivity) # generate a signal proportional to frequency error of sync block self.sigmix = gr.multiply_cc() - self.sampler = gr.ofdm_sampler(fft_length, fft_length+cp_length) + self.sampler = digital_swig.ofdm_sampler(fft_length, fft_length+cp_length) self.fft_demod = gr.fft_vcc(fft_length, True, win, True) - self.ofdm_frame_acq = gr.ofdm_frame_acquisition(occupied_tones, - fft_length, - cp_length, ks[0]) + self.ofdm_frame_acq = digital_swig.ofdm_frame_acquisition(occupied_tones, + fft_length, + cp_length, ks[0]) self.connect(self, self.chan_filt) # filter the input channel self.connect(self.chan_filt, self.ofdm_sync) # into the synchronization alg. diff --git a/gr-digital/swig/Makefile.am b/gr-digital/swig/Makefile.am index abc24be196..1afa447431 100644 --- a/gr-digital/swig/Makefile.am +++ b/gr-digital/swig/Makefile.am @@ -71,6 +71,12 @@ digital_swig_swiginclude_headers = \ digital_lms_dd_equalizer_cc.i \ digital_kurtotic_equalizer_cc.i \ digital_mpsk_receiver_cc.i \ + digital_ofdm_cyclic_prefixer.i \ + digital_ofdm_frame_acquisition.i \ + digital_ofdm_frame_sink.i \ + digital_ofdm_insert_preamble.i \ + digital_ofdm_mapper_bcv.i \ + digital_ofdm_sampler.i \ digital_gmskmod_bc.i \ digital_cpmmod_bc.i diff --git a/gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.i b/gr-digital/swig/digital_ofdm_cyclic_prefixer.i index e786c70f51..56d1629a8a 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_demapper_vcb.i +++ b/gr-digital/swig/digital_ofdm_cyclic_prefixer.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004,2006 Free Software Foundation, Inc. + * Copyright 2006,2009,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,17 +20,15 @@ * Boston, MA 02110-1301, USA. */ -GR_SWIG_BLOCK_MAGIC(gr,ofdm_mapper_bcv) +GR_SWIG_BLOCK_MAGIC(digital,ofdm_cyclic_prefixer) -gr_ofdm_mapper_bcv_sptr -gr_make_ofdm_mapper_bcv (unsigned int bits_per_symbol, - unsigned int vlen); +digital_ofdm_cyclic_prefixer_sptr +digital_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); -class gr_ofdm_mapper_bcv : public gr_sync_decimator +class digital_ofdm_cyclic_prefixer : public gr_sync_interpolator { protected: - gr_ofdm_mapper_bcv (unsigned int bits_per_symbol, - unsigned int vlen); + digital_ofdm_cyclic_prefixer (size_t input_size, size_t output_size); public: }; diff --git a/gnuradio-core/src/lib/general/gr_ofdm_frame_acquisition.i b/gr-digital/swig/digital_ofdm_frame_acquisition.i index 0fd0bc58bc..b61297bdea 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_frame_acquisition.i +++ b/gr-digital/swig/digital_ofdm_frame_acquisition.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006, 2007 Free Software Foundation, Inc. + * Copyright 2006,2007,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -22,23 +22,23 @@ #include <vector> -GR_SWIG_BLOCK_MAGIC(gr,ofdm_frame_acquisition); +GR_SWIG_BLOCK_MAGIC(digital,ofdm_frame_acquisition); -gr_ofdm_frame_acquisition_sptr -gr_make_ofdm_frame_acquisition (unsigned int occupied_carriers, - unsigned int fft_length, - unsigned int cplen, - const std::vector<gr_complex> &known_symbol, - unsigned int max_fft_shift_len=4); +digital_ofdm_frame_acquisition_sptr +digital_make_ofdm_frame_acquisition (unsigned int occupied_carriers, + unsigned int fft_length, + unsigned int cplen, + const std::vector<gr_complex> &known_symbol, + unsigned int max_fft_shift_len=4); -class gr_ofdm_frame_acquisition : public gr_sync_decimator +class digital_ofdm_frame_acquisition : public gr_sync_decimator { protected: - gr_ofdm_frame_acquisition (unsigned int occupied_carriers, - unsigned int fft_length, - unsigned int cplen, - const std::vector<gr_complex> &known_symbol, - unsigned int max_fft_shift_len); + digital_ofdm_frame_acquisition (unsigned int occupied_carriers, + unsigned int fft_length, + unsigned int cplen, + const std::vector<gr_complex> &known_symbol, + unsigned int max_fft_shift_len); public: float snr() { return d_snr_est; } diff --git a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink.i b/gr-digital/swig/digital_ofdm_frame_sink.i index 38ab50e973..cd3fa14229 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_frame_sink.i +++ b/gr-digital/swig/digital_ofdm_frame_sink.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007 Free Software Foundation, Inc. + * Copyright 2007,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,22 +20,22 @@ * Boston, MA 02110-1301, USA. */ -GR_SWIG_BLOCK_MAGIC(gr,ofdm_frame_sink); +GR_SWIG_BLOCK_MAGIC(digital,ofdm_frame_sink); -gr_ofdm_frame_sink_sptr -gr_make_ofdm_frame_sink(const std::vector<gr_complex> &sym_position, - const std::vector<unsigned char> &sym_value_out, - gr_msg_queue_sptr target_queue, unsigned int occupied_tones, - float phase_gain=0.25, float freq_gain=0.25*0.25/4); +digital_ofdm_frame_sink_sptr +digital_make_ofdm_frame_sink(const std::vector<gr_complex> &sym_position, + const std::vector<unsigned char> &sym_value_out, + gr_msg_queue_sptr target_queue, unsigned int occupied_tones, + float phase_gain=0.25, float freq_gain=0.25*0.25/4); -class gr_ofdm_frame_sink : public gr_sync_block +class digital_ofdm_frame_sink : public gr_sync_block { protected: - gr_ofdm_frame_sink(const std::vector<gr_complex> &sym_position, - const std::vector<unsigned char> &sym_value_out, - gr_msg_queue_sptr target_queue, unsigned int occupied_tones, - float phase_gain, float freq_gain); + digital_ofdm_frame_sink(const std::vector<gr_complex> &sym_position, + const std::vector<unsigned char> &sym_value_out, + gr_msg_queue_sptr target_queue, unsigned int occupied_tones, + float phase_gain, float freq_gain); public: - ~gr_ofdm_frame_sink(); + ~digital_ofdm_frame_sink(); }; diff --git a/gnuradio-core/src/lib/general/gr_ofdm_insert_preamble.i b/gr-digital/swig/digital_ofdm_insert_preamble.i index e33bd63a0b..5f7b163698 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_insert_preamble.i +++ b/gr-digital/swig/digital_ofdm_insert_preamble.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007 Free Software Foundation, Inc. + * Copyright 2007,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,16 +20,16 @@ * Boston, MA 02110-1301, USA. */ -GR_SWIG_BLOCK_MAGIC(gr,ofdm_insert_preamble); +GR_SWIG_BLOCK_MAGIC(digital,ofdm_insert_preamble); -gr_ofdm_insert_preamble_sptr -gr_make_ofdm_insert_preamble(int fft_length, - const std::vector<std::vector<gr_complex> > &preamble); +digital_ofdm_insert_preamble_sptr +digital_make_ofdm_insert_preamble(int fft_length, + const std::vector<std::vector<gr_complex> > &preamble); -class gr_ofdm_insert_preamble : public gr_block +class digital_ofdm_insert_preamble : public gr_block { protected: - gr_ofdm_insert_preamble(int fft_length, - const std::vector<std::vector<gr_complex> > &preamble); + digital_ofdm_insert_preamble(int fft_length, + const std::vector<std::vector<gr_complex> > &preamble); }; diff --git a/gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.i b/gr-digital/swig/digital_ofdm_mapper_bcv.i index 3850220bad..4e9aaba7d7 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_mapper_bcv.i +++ b/gr-digital/swig/digital_ofdm_mapper_bcv.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2006,2007 Free Software Foundation, Inc. + * Copyright 2006,2007,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,22 +20,22 @@ * Boston, MA 02110-1301, USA. */ -GR_SWIG_BLOCK_MAGIC(gr,ofdm_mapper_bcv); +GR_SWIG_BLOCK_MAGIC(digital,ofdm_mapper_bcv); -gr_ofdm_mapper_bcv_sptr -gr_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, - unsigned int msgq_limit, - unsigned int bits_per_symbol, - unsigned int fft_length) throw(std::exception); +digital_ofdm_mapper_bcv_sptr +digital_make_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, + unsigned int msgq_limit, + unsigned int bits_per_symbol, + unsigned int fft_length) throw(std::exception); -class gr_ofdm_mapper_bcv : public gr_sync_block +class digital_ofdm_mapper_bcv : public gr_sync_block { protected: - gr_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, - unsigned int msgq_limit, - unsigned int bits_per_symbol, - unsigned int fft_length); + digital_ofdm_mapper_bcv (const std::vector<gr_complex> &constellation, + unsigned int msgq_limit, + unsigned int bits_per_symbol, + unsigned int fft_length); public: gr_msg_queue_sptr msgq(); diff --git a/gnuradio-core/src/lib/general/gr_ofdm_sampler.i b/gr-digital/swig/digital_ofdm_sampler.i index 601330b077..91056c320b 100644 --- a/gnuradio-core/src/lib/general/gr_ofdm_sampler.i +++ b/gr-digital/swig/digital_ofdm_sampler.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2007 Free Software Foundation, Inc. + * Copyright 2007,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -20,16 +20,16 @@ * Boston, MA 02110-1301, USA. */ -GR_SWIG_BLOCK_MAGIC(gr,ofdm_sampler) +GR_SWIG_BLOCK_MAGIC(digital,ofdm_sampler) - gr_ofdm_sampler_sptr gr_make_ofdm_sampler (unsigned int fft_length, - unsigned int symbol_length, - unsigned int timeout=1000); + digital_ofdm_sampler_sptr digital_make_ofdm_sampler (unsigned int fft_length, + unsigned int symbol_length, + unsigned int timeout=1000); -class gr_ofdm_sampler : public gr_sync_block +class digital_ofdm_sampler : public gr_sync_block { private: - gr_ofdm_sampler (unsigned int fft_length, - unsigned int symbol_length, - unsigned int timeout); + digital_ofdm_sampler (unsigned int fft_length, + unsigned int symbol_length, + unsigned int timeout); }; diff --git a/gr-digital/swig/digital_swig.i b/gr-digital/swig/digital_swig.i index 2e3a3242e6..3e3a63b615 100644 --- a/gr-digital/swig/digital_swig.i +++ b/gr-digital/swig/digital_swig.i @@ -38,6 +38,12 @@ #include "digital_kurtotic_equalizer_cc.h" #include "digital_lms_dd_equalizer_cc.h" #include "digital_mpsk_receiver_cc.h" +#include "digital_ofdm_cyclic_prefixer.h" +#include "digital_ofdm_frame_acquisition.h" +#include "digital_ofdm_frame_sink.h" +#include "digital_ofdm_insert_preamble.h" +#include "digital_ofdm_mapper_bcv.h" +#include "digital_ofdm_sampler.h" #include "digital_cpmmod_bc.h" #include "digital_gmskmod_bc.h" %} @@ -56,6 +62,12 @@ %include "digital_kurtotic_equalizer_cc.i" %include "digital_lms_dd_equalizer_cc.i" %include "digital_mpsk_receiver_cc.i" +%include "digital_ofdm_cyclic_prefixer.i" +%include "digital_ofdm_frame_acquisition.i" +%include "digital_ofdm_frame_sink.i" +%include "digital_ofdm_insert_preamble.i" +%include "digital_ofdm_mapper_bcv.i" +%include "digital_ofdm_sampler.i" %include "digital_cpmmod_bc.i" %include "digital_gmskmod_bc.i" |