fun_ofdm  1.0
802.11a Physical Layer for USRP
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
fun::FrameData Struct Reference

The FrameData struct. More...

#include <frame_decoder.h>

Public Member Functions

 FrameData (RateParams _rate_params)
 Constructor for FrameData. More...
 
void Reset (RateParams _rate_params, int _sample_count, int _length)
 Resets the parameters of the object to the new parameters provided. More...
 

Public Attributes

int sample_count
 Number of samples in this frame. More...
 
int samples_copied
 Number of samples already copied. More...
 
RateParams rate_params
 Rate parameters for this frame. More...
 
std::vector< std::complex
< double > > 
samples
 Decoded Samples. More...
 
int length
 Data length. More...
 
int required_samples
 Number of samples required to decode frame. More...
 

Detailed Description

The FrameData struct.

This struct keeps track of frame parameters such as length etc.

Definition at line 29 of file frame_decoder.h.

Constructor & Destructor Documentation

fun::FrameData::FrameData ( RateParams  _rate_params)
inline

Constructor for FrameData.

Parameters
_rate_paramsthe rate parameters for this frame

Definition at line 42 of file frame_decoder.h.

References samples.

42  :
43  rate_params(_rate_params)
44  {
45  samples.reserve(100000);
46  }

Member Function Documentation

void fun::FrameData::Reset ( RateParams  _rate_params,
int  _sample_count,
int  _length 
)
inline

Resets the parameters of the object to the new parameters provided.

Parameters
_rate_paramsnew rate parameters for this frame
_sample_countnew sample count for this frame
_lengthnew length for this frame

Also calculates required_samples from the above parameters and resets samples_copied to 0.

Definition at line 57 of file frame_decoder.h.

References fun::RateParams::bpsc, length, rate_params, required_samples, sample_count, and samples_copied.

Referenced by fun::frame_decoder::frame_decoder(), and fun::frame_decoder::work().

58  {
59  rate_params = _rate_params;
60  length = _length;
61  sample_count = _sample_count;
62  required_samples = _sample_count / _rate_params.bpsc;
63  samples_copied = 0;
64  }

Member Data Documentation

int fun::FrameData::length

Data length.

Definition at line 35 of file frame_decoder.h.

Referenced by Reset(), and fun::frame_decoder::work().

RateParams fun::FrameData::rate_params

Rate parameters for this frame.

Definition at line 33 of file frame_decoder.h.

Referenced by Reset(), and fun::frame_decoder::work().

int fun::FrameData::required_samples

Number of samples required to decode frame.

Definition at line 36 of file frame_decoder.h.

Referenced by Reset().

int fun::FrameData::sample_count

Number of samples in this frame.

Definition at line 31 of file frame_decoder.h.

Referenced by Reset(), and fun::frame_decoder::work().

std::vector<std::complex<double> > fun::FrameData::samples

Decoded Samples.

Definition at line 34 of file frame_decoder.h.

Referenced by FrameData(), and fun::frame_decoder::work().

int fun::FrameData::samples_copied

Number of samples already copied.

Definition at line 32 of file frame_decoder.h.

Referenced by Reset(), and fun::frame_decoder::work().


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