GNU Radio Manual and C++ API Reference  3.7.13.4
The Free & Open Software Radio Ecosystem
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 <gnuradio/digital/api.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  * \details
37  * This is the inverse block to the carrier_allocator_cvc. It outputs the
38  * complex data symbols as a tagged stream, discarding the pilot symbols.
39  *
40  * If given, two different tags are parsed: The first key (\p len_tag_key)
41  * specifies the number of OFDM symbols in the frame at the input. The
42  * second key (\p packet_len_tag_key) specifies the number of complex symbols
43  * that are coded into this frame. If given, this second key is then used
44  * at the output, otherwise, \p len_tag_key is used.
45  * If both are given, the packet length specifies the maximum number of
46  * output items, and the frame length specifies the exact number of
47  * consumed input items.
48  *
49  * It is possible to correct a carrier offset in this function by passing
50  * another tag with said offset.
51  *
52  * Input: Complex vectors of length \p fft_len
53  * Output: Complex scalars, in the same order as specified in occupied_carriers.
54  */
56  {
57  public:
58  typedef boost::shared_ptr<ofdm_serializer_vcc> sptr;
59 
60  /*!
61  * \param fft_len FFT length
62  * \param occupied_carriers See ofdm_carrier_allocator_cvc.
63  * \param len_tag_key The key of the tag identifying the length of the input frame in OFDM symbols.
64  * \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet.
65  * \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this
66  * \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)
67  * \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
68  */
69  static sptr make(
70  int fft_len,
71  const std::vector<std::vector<int> > &occupied_carriers,
72  const std::string &len_tag_key="frame_len",
73  const std::string &packet_len_tag_key="",
74  int symbols_skipped=0,
75  const std::string &carr_offset_key="",
76  bool input_is_shifted=true
77  );
78 
79  /*!
80  * \param allocator The carrier allocator block of which this shall be the inverse
81  * \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet.
82  * \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this
83  * \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)
84  * \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
85  */
86  static sptr make(
88  const std::string &packet_len_tag_key="",
89  int symbols_skipped=0,
90  const std::string &carr_offset_key="",
91  bool input_is_shifted=true
92  );
93  };
94 
95  } // namespace digital
96 } // namespace gr
97 
98 #endif /* INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H */
99 
Block that operates on PDUs in form of tagged streamsOverride work to provide the signal processing i...
Definition: tagged_stream_block.h:37
boost::shared_ptr< ofdm_serializer_vcc > sptr
Definition: ofdm_serializer_vcc.h:58
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
boost::shared_ptr< ofdm_carrier_allocator_cvc > sptr
Definition: ofdm_carrier_allocator_cvc.h:74
Include this header to use the message passing features.
Definition: logger.h:695
Serializes complex modulations symbols from OFDM sub-carriers.
Definition: ofdm_serializer_vcc.h:55