GNU Radio 3.7.0 C++ API
ofdm_cyclic_prefixer.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /* 
00003  * Copyright 2013 Free Software Foundation, Inc.
00004  * 
00005  * This file is part of GNU Radio
00006  * 
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 3, or (at your option)
00010  * any later version.
00011  * 
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 
00023 #ifndef INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_H
00024 #define INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_H
00025 
00026 #include <gnuradio/digital/api.h>
00027 #include <gnuradio/tagged_stream_block.h>
00028 
00029 namespace gr {
00030   namespace digital {
00031 
00032     /*!
00033      * \brief Adds a cyclic prefix and performs pulse shaping on OFDM symbols.
00034      * \ingroup ofdm_blk
00035      *
00036      * \details
00037      * Input: OFDM symbols (in the time domain, i.e. after the IFFT). Optionally,
00038      *        entire frames can be processed. In this case, \p len_tag_key must be
00039      *        specified which holds the key of the tag that denotes how
00040      *        many OFDM symbols are in a frame.
00041      * Output: A stream of (scalar) complex symbols, which include the cyclic prefix
00042      *         and the pulse shaping.
00043      *         Note: If complete frames are processed, and \p rolloff_len is greater
00044      *         than zero, the final OFDM symbol is followed by the delay line of
00045      *         the pulse shaping.
00046      *
00047      * The pulse shape is a raised cosine in the time domain.
00048      */
00049     class DIGITAL_API ofdm_cyclic_prefixer : virtual public tagged_stream_block
00050     {
00051      public:
00052       typedef boost::shared_ptr<ofdm_cyclic_prefixer> sptr;
00053 
00054       /*!
00055        * \param input_size FFT length (i.e. length of the OFDM symbols)
00056        * \param output_size FFT length + cyclic prefix length (in samples)
00057        * \param rolloff_len Length of the rolloff flank in samples
00058        * \param len_tag_key For framed processing the key of the length tag
00059        */
00060       static sptr make(
00061           size_t input_size,
00062           size_t output_size,
00063           int rolloff_len=0,
00064           const std::string &len_tag_key=""
00065       );
00066     };
00067 
00068   } // namespace digital
00069 } // namespace gr
00070 
00071 #endif /* INCLUDED_DIGITAL_OFDM_CYCLIC_PREFIXER_H */
00072