GNU Radio 3.6.5 C++ API

digital_ofdm_cyclic_prefixer Class Reference

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>

Inheritance diagram for digital_ofdm_cyclic_prefixer:
gr_tagged_stream_block gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

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]

Member Function Documentation

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.

Parameters:
noutput_itemsThe size of the writable output buffer
ninput_itemsThe exact size of the items on every input for this particular PDU. These will be consumed if a length tag key is provided!
input_itemsSee gr_block
output_itemsSee gr_block

Implements gr_tagged_stream_block.


Friends And Related Function Documentation

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]
Parameters:
input_sizeFFT length (i.e. length of the OFDM symbols)
output_sizeFFT length + cyclic prefix length (in samples)
rolloff_lenLength of the rolloff flank in samples
len_tag_keyFor framed processing the key of the length tag

The documentation for this class was generated from the following file: