fun_ofdm
1.0
802.11a Physical Layer for USRP
|
The frame_builder class. More...
#include <frame_builder.h>
Public Member Functions | |
frame_builder () | |
Constructor for frame_builder class. More... | |
std::vector< std::complex < double > > | build_frame (std::vector< unsigned char > payload, Rate rate) |
Main function for building a PHY frame. More... | |
Private Attributes | |
fft | m_ifft |
The fft instance used to perform the inverse FFT on the OFDM symbols. More... | |
The frame_builder class.
Inputs vector of unsigned chars representing the payload (MPDU) and the transmission PHY transmission rate.
Outputs vector of raw complex samples representing the digital base-band time domain signal to be passed to the usrp class for up-conversion and transmission over the air.
This class takes input data (MPDUs) and builds PHY layer frames by first prepending a PHY header and appending an IEEE CRC-32 checksum to the data. It then encodes the data by scrambling, convolutional coding the data at the coding rate specified (this may or may not require puncturing), and interleaving the data. It then modulates the data as specified. The modulated data is then mapped into symbols with the data being mapped to the respective data subcarriers with pilots and nulls being mapped to their respective subcarriers. Each symbol is then run through an IFFT to convert it to time domain an a cyclic prefix is attached to each symbol. Finally, the symbols are concatenated together and a preamble is prepended to complete the frame. The frame is then returned so that it can be passed to the USRP for transmission.
Definition at line 46 of file frame_builder.h.
fun::frame_builder::frame_builder | ( | ) |
Constructor for frame_builder class.
-Initializations
Definition at line 40 of file frame_builder.cpp.
std::vector< std::complex< double > > fun::frame_builder::build_frame | ( | std::vector< unsigned char > | payload, |
Rate | rate | ||
) |
Main function for building a PHY frame.
payload | (MPDU) the data that needs to be transmitted over the air. |
rate | the PHY transmission rate at which to transmit the respective data at. |
The build_frame function is the main function where the input data is converted to the raw output samples. The ppdu class is used to append the PHY header, scramble, convolutional code, interleaves, and modulates the input data. The symbol mapper converts the modulated data into symbols and maps the data, pilots, and nulls to their respective subcarriers. The IFFT performs and IFFT (go figure). The cyclic prefixes are added and finally the preamble is prepended to complete the frame which is then returned to be passed to the usrp block.
Definition at line 53 of file frame_builder.cpp.
References fun::ppdu::encode(), fun::fft::inverse(), m_ifft, fun::symbol_mapper::map(), and fun::PREAMBLE_SAMPLES.
Referenced by fun::transmitter::send_packet(), and test_sim().
|
private |
The fft instance used to perform the inverse FFT on the OFDM symbols.
Definition at line 66 of file frame_builder.h.
Referenced by build_frame().