GNU Radio 3.7.1 C++ API
ofdm_serializer_vcc.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /* Copyright 2012 Free Software Foundation, Inc.
00003  * 
00004  * This file is part of GNU Radio
00005  * 
00006  * GNU Radio is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 3, or (at your option)
00009  * any later version.
00010  * 
00011  * GNU Radio is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with GNU Radio; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H
00023 #define INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H
00024 
00025 #include <gnuradio/digital/api.h>
00026 #include <gnuradio/tagged_stream_block.h>
00027 #include <gnuradio/digital/ofdm_carrier_allocator_cvc.h>
00028 
00029 namespace gr {
00030   namespace digital {
00031 
00032     /*!
00033      * \brief Serializes complex modulations symbols from OFDM sub-carriers
00034      * \ingroup ofdm_blk
00035      *
00036      * \details
00037      * This is the inverse block to the carrier_allocator_cvc. It outputs the
00038      * complex data symbols as a tagged stream, discarding the pilot symbols.
00039      *
00040      * If given, two different tags are parsed: The first key (\p len_tag_key)
00041      * specifies the number of OFDM symbols in the frame at the input. The
00042      * second key (\p packet_len_tag_key) specifies the number of complex symbols
00043      * that are coded into this frame. If given, this second key is then used
00044      * at the output, otherwise, \p len_tag_key is used.
00045      * If both are given, the packet length specifies the maximum number of
00046      * output items, and the frame length specifies the exact number of
00047      * consumed input items.
00048      *
00049      * It is possible to correct a carrier offset in this function by passing
00050      * another tag with said offset.
00051      *
00052      * Input: Complex vectors of length \p fft_len
00053      * Output: Complex scalars, in the same order as specified in occupied_carriers.
00054      */
00055     class DIGITAL_API ofdm_serializer_vcc : virtual public tagged_stream_block
00056     {
00057      public:
00058       typedef boost::shared_ptr<ofdm_serializer_vcc> sptr;
00059 
00060       /*!
00061        * \param fft_len FFT length
00062        * \param occupied_carriers See ofdm_carrier_allocator_cvc.
00063        * \param len_tag_key The key of the tag identifying the length of the input frame in OFDM symbols.
00064        * \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet.
00065        * \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this
00066        * \param carr_offset_key When this block should correct a carrier offset, specify the tag key of the offset here (not necessary if following an ofdm_frame_equalizer_vcvc)
00067        * \param input_is_shifted If the input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this to false
00068        */
00069       static sptr make(
00070           int fft_len,
00071           const std::vector<std::vector<int> > &occupied_carriers,
00072           const std::string &len_tag_key="frame_len",
00073           const std::string &packet_len_tag_key="",
00074           int symbols_skipped=0,
00075           const std::string &carr_offset_key="",
00076           bool input_is_shifted=true
00077       );
00078 
00079       /*!
00080        * \param allocator The carrier allocator block of which this shall be the inverse
00081        * \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet.
00082        * \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this
00083        * \param carr_offset_key When this block should correct a carrier offset, specify the tag key of the offset here (not necessary if following an ofdm_frame_equalizer_vcvc)
00084        * \param input_is_shifted If the input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this to false
00085        */
00086       static sptr make(
00087           const gr::digital::ofdm_carrier_allocator_cvc::sptr &allocator,
00088           const std::string &packet_len_tag_key="",
00089           int symbols_skipped=0,
00090           const std::string &carr_offset_key="",
00091           bool input_is_shifted=true
00092       );
00093     };
00094 
00095   } // namespace digital
00096 } // namespace gr
00097 
00098 #endif /* INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H */
00099