GNU Radio Manual and C++ API Reference  3.10.9.1
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  * SPDX-License-Identifier: GPL-3.0-or-later
7  *
8  */
9 
10 #ifndef INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H
11 #define INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H
12 
13 #include <gnuradio/digital/api.h>
16 
17 namespace gr {
18 namespace digital {
19 
20 /*!
21  * \brief Serializes complex modulations symbols from OFDM sub-carriers
22  * \ingroup ofdm_blk
23  *
24  * \details
25  * This is the inverse block to the carrier_allocator_cvc. It outputs the
26  * complex data symbols as a tagged stream, discarding the pilot symbols.
27  *
28  * If given, two different tags are parsed: The first key (\p len_tag_key)
29  * specifies the number of OFDM symbols in the frame at the input. The
30  * second key (\p packet_len_tag_key) specifies the number of complex symbols
31  * that are coded into this frame. If given, this second key is then used
32  * at the output, otherwise, \p len_tag_key is used.
33  * If both are given, the packet length specifies the maximum number of
34  * output items, and the frame length specifies the exact number of
35  * consumed input items.
36  *
37  * It is possible to correct a carrier offset in this function by passing
38  * another tag with said offset.
39  *
40  * Input: Complex vectors of length \p fft_len
41  * Output: Complex scalars, in the same order as specified in occupied_carriers.
42  */
44 {
45 public:
46  typedef std::shared_ptr<ofdm_serializer_vcc> sptr;
47 
48  /*!
49  * \param fft_len FFT length
50  * \param occupied_carriers See ofdm_carrier_allocator_cvc.
51  * \param len_tag_key The key of the tag identifying the length of the input frame in
52  * OFDM symbols. \param packet_len_tag_key The key of the tag identifying the number
53  * of complex symbols in this packet. \param symbols_skipped If the first symbol is
54  * not allocated as in \p occupied_carriers[0], set this \param carr_offset_key When
55  * this block should correct a carrier offset, specify the tag key of the offset here
56  * (not necessary if following an ofdm_frame_equalizer_vcvc) \param input_is_shifted
57  * If the input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this
58  * to false
59  */
60  static sptr make(int fft_len,
61  const std::vector<std::vector<int>>& occupied_carriers,
62  const std::string& len_tag_key = "frame_len",
63  const std::string& packet_len_tag_key = "",
64  int symbols_skipped = 0,
65  const std::string& carr_offset_key = "",
66  bool input_is_shifted = true);
67 
68  /*!
69  * \param allocator The carrier allocator block of which this shall be the inverse
70  * \param packet_len_tag_key The key of the tag identifying the number of complex
71  * symbols in this packet. \param symbols_skipped If the first symbol is not allocated
72  * as in \p occupied_carriers[0], set this \param carr_offset_key When this block
73  * should correct a carrier offset, specify the tag key of the offset here (not
74  * necessary if following an ofdm_frame_equalizer_vcvc) \param input_is_shifted If the
75  * input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this to false
76  */
78  const std::string& packet_len_tag_key = "",
79  int symbols_skipped = 0,
80  const std::string& carr_offset_key = "",
81  bool input_is_shifted = true);
82 };
83 
84 } // namespace digital
85 } // namespace gr
86 
87 #endif /* INCLUDED_DIGITAL_OFDM_SERIALIZER_VCC_H */
std::shared_ptr< ofdm_carrier_allocator_cvc > sptr
Definition: ofdm_carrier_allocator_cvc.h:62
Serializes complex modulations symbols from OFDM sub-carriers.
Definition: ofdm_serializer_vcc.h:44
static sptr make(int fft_len, const std::vector< std::vector< int >> &occupied_carriers, const std::string &len_tag_key="frame_len", const std::string &packet_len_tag_key="", int symbols_skipped=0, const std::string &carr_offset_key="", bool input_is_shifted=true)
std::shared_ptr< ofdm_serializer_vcc > sptr
Definition: ofdm_serializer_vcc.h:46
static sptr make(const gr::digital::ofdm_carrier_allocator_cvc::sptr &allocator, const std::string &packet_len_tag_key="", int symbols_skipped=0, const std::string &carr_offset_key="", bool input_is_shifted=true)
Block that operates on PDUs in form of tagged streams.
Definition: tagged_stream_block.h:26
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29