GNU Radio 3.6.5.1 C++ API
ofdm_serializer_vcc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /* Copyright 2012 Free Software Foundation, Inc.
3  *
4  * This file is part of GNU Radio
5  *
6  * GNU Radio is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  *
11  * GNU Radio is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with GNU Radio; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H
23 #define INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H
24 
25 #include <digital/api.h>
26 #include <gr_tagged_stream_block.h>
28 
29 namespace gr {
30  namespace digital {
31 
32  /*!
33  * \brief Serializes complex modulations symbols from OFDM sub-carriers
34  * \ingroup ofdm_blk
35  *
36  * This is the inverse block to the carrier_allocator_cvc. It outputs the
37  * complex data symbols as a tagged stream, discarding the pilot symbols.
38  *
39  * If given, two different tags are parsed: The first key (\p len_tag_key)
40  * specifies the number of OFDM symbols in the frame at the input. The
41  * second key (\p packet_len_tag_key) specifies the number of complex symbols
42  * that are coded into this frame. If given, this second key is then used
43  * at the output, otherwise, \p len_tag_key is used.
44  * If both are given, the packet length specifies the maximum number of
45  * output items, and the frame length specifies the exact number of
46  * consumed input items.
47  *
48  * It is possible to correct a carrier offset in this function by passing
49  * another tag with said offset.
50  *
51  * Input: Complex vectors of length \p fft_len
52  * Output: Complex scalars, in the same order as specified in occupied_carriers.
53  */
55  {
56  public:
58 
59  /*!
60  * \param fft_len FFT length
61  * \param occupied_carriers See ofdm_carrier_allocator_cvc.
62  * \param len_tag_key The key of the tag identifying the length of the input frame in OFDM symbols.
63  * \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet.
64  * \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this
65  * \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)
66  * \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
67  */
68  static sptr make(
69  int fft_len,
70  const std::vector<std::vector<int> > &occupied_carriers,
71  const std::string &len_tag_key="frame_len",
72  const std::string &packet_len_tag_key="",
73  int symbols_skipped=0,
74  const std::string &carr_offset_key="",
75  bool input_is_shifted=true
76  );
77 
78  /*!
79  * \param allocator The carrier allocator block of which this shall be the inverse
80  * \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet.
81  * \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this
82  * \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)
83  * \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
84  */
85  static sptr make(
87  const std::string &packet_len_tag_key="",
88  int symbols_skipped=0,
89  const std::string &carr_offset_key="",
90  bool input_is_shifted=true
91  );
92  };
93 
94  } // namespace digital
95 } // namespace gr
96 
97 #endif /* INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H */
98