RENEWLab  1.1.0
RENEW project
CommsLib Class Reference

#include <comms-lib.h>

Public Types

enum  SequenceType {
  STS_SEQ, LTS_SEQ, LTS_SEQ_F, LTE_ZADOFF_CHU,
  LTE_ZADOFF_CHU_F, GOLD_IFFT, HADAMARD
}
 
enum  ModulationOrder { QPSK = 2, QAM16 = 4, QAM64 = 6 }
 

Public Member Functions

 CommsLib (std::string)
 
 ~CommsLib ()
 

Static Public Member Functions

static std::vector< std::vector< float > > getSequence (size_t type, size_t seq_len=0)
 
static std::vector< std::complex< float > > modulate (std::vector< uint8_t >, int)
 
static std::vector< size_t > getDataSc (size_t fftSize, size_t DataScNum, size_t PilotScOffset=kDefaultPilotScOffset)
 
static std::vector< size_t > getNullSc (size_t fftSize, size_t DataScNum)
 
static std::vector< std::complex< float > > getPilotScValue (size_t fftSize, size_t DataScNum, size_t PilotScOffset=kDefaultPilotScOffset)
 
static std::vector< size_t > getPilotScIndex (size_t fftSize, size_t DataScNum, size_t PilotScOffset=kDefaultPilotScOffset)
 
static std::vector< std::complex< float > > FFT (const std::vector< std::complex< float >> &, int)
 
static std::vector< std::complex< float > > IFFT (const std::vector< std::complex< float >> &, int, float scale=0.5, bool normalize=true)
 
static int findLTS (const std::vector< std::complex< float >> &iq, int seqLen)
 
static size_t find_pilot_seq (const std::vector< std::complex< float >> &iq, const std::vector< std::complex< float >> &pilot, size_t seqLen)
 
template<typename T >
static std::vector< T > convolve (std::vector< T > const &f, std::vector< T > const &g)
 
static float find_max_abs (const std::vector< std::complex< float >> &in)
 
static std::vector< std::complex< float > > csign (const std::vector< std::complex< float >> &iq)
 
static int hadamard2 (int i, int j)
 
static std::vector< float > magnitudeFFT (std::vector< std::complex< float >> const &, std::vector< float > const &, size_t)
 
static std::vector< float > hannWindowFunction (size_t)
 
static double windowFunctionPower (std::vector< float > const &)
 
template<typename T >
static T findTone (std::vector< T > const &, double, double, size_t, const size_t delta=10)
 
static float measureTone (std::vector< std::complex< float >> const &, std::vector< float > const &, double, double, size_t, const size_t delta=10)
 
static int find_beacon (const std::vector< std::complex< float >> &iq)
 
static int find_beacon_avx (const std::vector< std::complex< float >> &iq, const std::vector< std::complex< float >> &seq)
 
static std::vector< float > correlate_avx_s (std::vector< float > const &f, std::vector< float > const &g)
 
static std::vector< int16_t > correlate_avx_si (std::vector< int16_t > const &f, std::vector< int16_t > const &g)
 
static std::vector< float > abs2_avx (std::vector< std::complex< float >> const &f)
 
static std::vector< int32_t > abs2_avx (std::vector< std::complex< int16_t >> const &f)
 
static std::vector< std::complex< float > > auto_corr_mult_avx (std::vector< std::complex< float >> const &f, const int dly, const bool conj=true)
 
static std::vector< std::complex< int16_t > > auto_corr_mult_avx (std::vector< std::complex< int16_t >> const &f, const int dly, const bool conj=true)
 
static std::vector< std::complex< float > > correlate_avx (std::vector< std::complex< float >> const &f, std::vector< std::complex< float >> const &g)
 
static std::vector< std::complex< int16_t > > correlate_avx (std::vector< std::complex< int16_t >> const &f, std::vector< std::complex< int16_t >> const &g)
 
static std::vector< std::complex< float > > complex_mult_avx (std::vector< std::complex< float >> const &f, std::vector< std::complex< float >> const &g, const bool conj)
 
static std::vector< std::complex< int16_t > > complex_mult_avx (std::vector< std::complex< int16_t >> const &f, std::vector< std::complex< int16_t >> const &g, const bool conj)
 

Member Enumeration Documentation

◆ ModulationOrder

Enumerator
QPSK 
QAM16 
QAM64 

◆ SequenceType

Enumerator
STS_SEQ 
LTS_SEQ 
LTS_SEQ_F 
LTE_ZADOFF_CHU 
LTE_ZADOFF_CHU_F 
GOLD_IFFT 
HADAMARD 

Constructor & Destructor Documentation

◆ CommsLib()

CommsLib::CommsLib ( std::string  )

◆ ~CommsLib()

CommsLib::~CommsLib ( )

Member Function Documentation

◆ abs2_avx() [1/2]

static std::vector<float> CommsLib::abs2_avx ( std::vector< std::complex< float >> const &  f)
static
Here is the caller graph for this function:

◆ abs2_avx() [2/2]

static std::vector<int32_t> CommsLib::abs2_avx ( std::vector< std::complex< int16_t >> const &  f)
static

◆ auto_corr_mult_avx() [1/2]

static std::vector<std::complex<float> > CommsLib::auto_corr_mult_avx ( std::vector< std::complex< float >> const &  f,
const int  dly,
const bool  conj = true 
)
static
Here is the caller graph for this function:

◆ auto_corr_mult_avx() [2/2]

static std::vector<std::complex<int16_t> > CommsLib::auto_corr_mult_avx ( std::vector< std::complex< int16_t >> const &  f,
const int  dly,
const bool  conj = true 
)
static

◆ complex_mult_avx() [1/2]

static std::vector<std::complex<float> > CommsLib::complex_mult_avx ( std::vector< std::complex< float >> const &  f,
std::vector< std::complex< float >> const &  g,
const bool  conj 
)
static
Here is the caller graph for this function:

◆ complex_mult_avx() [2/2]

static std::vector<std::complex<int16_t> > CommsLib::complex_mult_avx ( std::vector< std::complex< int16_t >> const &  f,
std::vector< std::complex< int16_t >> const &  g,
const bool  conj 
)
static

◆ convolve()

template<typename T >
static std::vector<T> CommsLib::convolve ( std::vector< T > const &  f,
std::vector< T > const &  g 
)
inlinestatic
Here is the caller graph for this function:

◆ correlate_avx() [1/2]

static std::vector<std::complex<float> > CommsLib::correlate_avx ( std::vector< std::complex< float >> const &  f,
std::vector< std::complex< float >> const &  g 
)
static
Here is the caller graph for this function:

◆ correlate_avx() [2/2]

static std::vector<std::complex<int16_t> > CommsLib::correlate_avx ( std::vector< std::complex< int16_t >> const &  f,
std::vector< std::complex< int16_t >> const &  g 
)
static

◆ correlate_avx_s()

static std::vector<float> CommsLib::correlate_avx_s ( std::vector< float > const &  f,
std::vector< float > const &  g 
)
static
Here is the caller graph for this function:

◆ correlate_avx_si()

static std::vector<int16_t> CommsLib::correlate_avx_si ( std::vector< int16_t > const &  f,
std::vector< int16_t > const &  g 
)
static
Here is the caller graph for this function:

◆ csign()

std::vector< std::complex< float > > CommsLib::csign ( const std::vector< std::complex< float >> &  iq)
static
Here is the caller graph for this function:

◆ FFT()

std::vector< std::complex< float > > CommsLib::FFT ( const std::vector< std::complex< float >> &  in,
int  fftSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_beacon()

int CommsLib::find_beacon ( const std::vector< std::complex< float >> &  iq)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_beacon_avx()

static int CommsLib::find_beacon_avx ( const std::vector< std::complex< float >> &  iq,
const std::vector< std::complex< float >> &  seq 
)
static
Here is the caller graph for this function:

◆ find_max_abs()

float CommsLib::find_max_abs ( const std::vector< std::complex< float >> &  in)
static

◆ find_pilot_seq()

size_t CommsLib::find_pilot_seq ( const std::vector< std::complex< float >> &  iq,
const std::vector< std::complex< float >> &  pilot,
size_t  seqLen 
)
static
Here is the call graph for this function:

◆ findLTS()

int CommsLib::findLTS ( const std::vector< std::complex< float >> &  iq,
int  seqLen 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findTone()

template<typename T >
T CommsLib::findTone ( std::vector< T > const &  magnitude,
double  winGain,
double  fftBin,
size_t  fftSize,
const size_t  delta = 10 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDataSc()

std::vector< size_t > CommsLib::getDataSc ( size_t  fftSize,
size_t  DataScNum,
size_t  PilotScOffset = kDefaultPilotScOffset 
)
static
Here is the caller graph for this function:

◆ getNullSc()

std::vector< size_t > CommsLib::getNullSc ( size_t  fftSize,
size_t  DataScNum 
)
static

◆ getPilotScIndex()

std::vector< size_t > CommsLib::getPilotScIndex ( size_t  fftSize,
size_t  DataScNum,
size_t  PilotScOffset = kDefaultPilotScOffset 
)
static
Here is the caller graph for this function:

◆ getPilotScValue()

std::vector< std::complex< float > > CommsLib::getPilotScValue ( size_t  fftSize,
size_t  DataScNum,
size_t  PilotScOffset = kDefaultPilotScOffset 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSequence()

std::vector< std::vector< float > > CommsLib::getSequence ( size_t  type,
size_t  seq_len = 0 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hadamard2()

static int CommsLib::hadamard2 ( int  i,
int  j 
)
inlinestatic
Here is the caller graph for this function:

◆ hannWindowFunction()

std::vector< float > CommsLib::hannWindowFunction ( size_t  fftSize)
static
Here is the caller graph for this function:

◆ IFFT()

std::vector< std::complex< float > > CommsLib::IFFT ( const std::vector< std::complex< float >> &  in,
int  fftSize,
float  scale = 0.5,
bool  normalize = true 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ magnitudeFFT()

std::vector< float > CommsLib::magnitudeFFT ( std::vector< std::complex< float >> const &  samps,
std::vector< float > const &  win,
size_t  fftSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ measureTone()

float CommsLib::measureTone ( std::vector< std::complex< float >> const &  samps,
std::vector< float > const &  win,
double  winGain,
double  fftBin,
size_t  fftSize,
const size_t  delta = 10 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ modulate()

std::vector< std::complex< float > > CommsLib::modulate ( std::vector< uint8_t >  in,
int  type 
)
static
Here is the caller graph for this function:

◆ windowFunctionPower()

double CommsLib::windowFunctionPower ( std::vector< float > const &  win)
static
Here is the caller graph for this function:

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