fun_ofdm
1.0
802.11a Physical Layer for USRP
|
The frame_decoder block. More...
#include <frame_decoder.h>
Public Member Functions | |
frame_decoder () | |
Constructor for frame_decoder block. More... | |
virtual void | work () |
Signal processing happens here. More... | |
![]() | |
block (std::string block_name) | |
constructor More... | |
![]() | |
block_base (std::string block_name) | |
block_base constructor More... | |
Private Attributes | |
FrameData | m_current_frame |
Current frame that is being decoded. More... | |
Additional Inherited Members | |
![]() | |
std::vector< tagged_vector< 48 > > | input_buffer |
input_buffer contains new input items to be consumed More... | |
std::vector< std::vector < unsigned char > > | output_buffer |
output_buffer is where the output items of the block should be placed More... | |
The frame_decoder block.
Inputs tagged_vector<48> from phase_tracker block. Outputs std::vector<unsigned char> back to the receiver chain
The Frame Decoder block is in charge of decoding the frame header and then the frame body. This includes demodulating, deinterleaving, de-convolutional-coding, and descrambling. First these must all be done to the header so as to get the correct rate and length of the payload, then the payload must be decoded as well. If the block is succesful in decoding the frame as determined by an IEEE CRC-32 check the payload is passed into the output_buffer as unsigned char's or bytes.
Definition at line 80 of file frame_decoder.h.
fun::frame_decoder::frame_decoder | ( | ) |
Constructor for frame_decoder block.
Definition at line 30 of file frame_decoder.cpp.
References m_current_frame, fun::RATE_1_2_BPSK, and fun::FrameData::Reset().
|
virtual |
Signal processing happens here.
When a start of frame is detected this block first attempts to decode the ppdu header. If that is successful as determined by a simple parity check on the header bits it then tries to decode the payload of the frame using the parameters it gathered from header. If that is successful as deteremined by an IEEE CRC-32 check, the decoded payload is passed to the output_buffer to be returned to the receive chain so that it can be passed up to the MAC layer.
Implements fun::block< tagged_vector< 48 >, std::vector< unsigned char > >.
Definition at line 45 of file frame_decoder.cpp.
References fun::ppdu::decode_data(), fun::ppdu::decode_header(), fun::ppdu::get_length(), fun::ppdu::get_num_symbols(), fun::ppdu::get_payload(), fun::ppdu::get_rate(), fun::block< tagged_vector< 48 >, std::vector< unsigned char > >::input_buffer, fun::FrameData::length, m_current_frame, fun::block< tagged_vector< 48 >, std::vector< unsigned char > >::output_buffer, fun::RateParams::rate, fun::FrameData::rate_params, fun::FrameData::Reset(), fun::FrameData::sample_count, fun::FrameData::samples, fun::FrameData::samples_copied, and fun::START_OF_FRAME.
|
private |
Current frame that is being decoded.
Definition at line 90 of file frame_decoder.h.
Referenced by frame_decoder(), and work().