GNU Radio 3.6.5 C++ API
|
Adds a cyclic prefix and performs pulse shaping on OFDM symbols.Input: OFDM symbols (in the time domain, i.e. after the IFFT). Optionally, entire frames can be processed. In this case, len_tag_key
must be specified which holds the key of the tag that denotes how many OFDM symbols are in a frame. Output: A stream of (scalar) complex symbols, which include the cyclic prefix and the pulse shaping. Note: If complete frames are processed, and rolloff_len
is greater than zero, the final OFDM symbol is followed by the delay line of the pulse shaping.
More...
#include <digital_ofdm_cyclic_prefixer.h>
Public Member Functions | |
int | work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
Just like gr_block::general_work, but makes sure the input is valid. | |
Protected Member Functions | |
digital_ofdm_cyclic_prefixer (size_t input_size, size_t output_size, int rolloff_len, const std::string &len_tag_key) | |
int | calculate_output_stream_length (const gr_vector_int &ninput_items) |
Return the number of complex samples from the number of OFDM symbols (includes rolloff) | |
Friends | |
DIGITAL_API digital_ofdm_cyclic_prefixer_sptr | digital_make_ofdm_cyclic_prefixer (size_t input_size, size_t output_size, int rolloff_len, const std::string &len_tag_key) |
Adds a cyclic prefix and performs pulse shaping on OFDM symbols.
Input: OFDM symbols (in the time domain, i.e. after the IFFT). Optionally, entire frames can be processed. In this case, len_tag_key
must be specified which holds the key of the tag that denotes how many OFDM symbols are in a frame. Output: A stream of (scalar) complex symbols, which include the cyclic prefix and the pulse shaping. Note: If complete frames are processed, and rolloff_len
is greater than zero, the final OFDM symbol is followed by the delay line of the pulse shaping.
The pulse shape is a raised cosine in the time domain.
digital_ofdm_cyclic_prefixer::digital_ofdm_cyclic_prefixer | ( | size_t | input_size, |
size_t | output_size, | ||
int | rolloff_len, | ||
const std::string & | len_tag_key | ||
) | [protected] |
int digital_ofdm_cyclic_prefixer::calculate_output_stream_length | ( | const gr_vector_int & | ninput_items | ) | [protected, virtual] |
Return the number of complex samples from the number of OFDM symbols (includes rolloff)
Reimplemented from gr_tagged_stream_block.
int digital_ofdm_cyclic_prefixer::work | ( | int | noutput_items, |
gr_vector_int & | ninput_items, | ||
gr_vector_const_void_star & | input_items, | ||
gr_vector_void_star & | output_items | ||
) | [virtual] |
Just like gr_block::general_work, but makes sure the input is valid.
The user must override work to define the signal processing code. Check the documentation for general_work() to see what happens here.
Like gr_sync_block, this calls consume() for you (it consumes ninput_items[i] items from the i-th port).
A note on tag propagation: The PDU length tags are handled by other functions, but all other tags are handled just as in any other gr_block
. So, most likely, you either set the tag propagation policy to TPP_DONT and handle the tag propagation manually, or you propagate tags through the scheduler and don't do anything here.
noutput_items | The size of the writable output buffer |
ninput_items | The exact size of the items on every input for this particular PDU. These will be consumed if a length tag key is provided! |
input_items | See gr_block |
output_items | See gr_block |
Implements gr_tagged_stream_block.
DIGITAL_API digital_ofdm_cyclic_prefixer_sptr digital_make_ofdm_cyclic_prefixer | ( | size_t | input_size, |
size_t | output_size, | ||
int | rolloff_len, | ||
const std::string & | len_tag_key | ||
) | [friend] |
input_size | FFT length (i.e. length of the OFDM symbols) |
output_size | FFT length + cyclic prefix length (in samples) |
rolloff_len | Length of the rolloff flank in samples |
len_tag_key | For framed processing the key of the length tag |