fun_ofdm  1.0
802.11a Physical Layer for USRP
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
fun::tagged_vector< N > Struct Template Reference

tagged_vector struct More...

#include <tagged_vector.h>

Public Member Functions

 tagged_vector (vector_tag _tag=NONE)
 Non-initializing constructor for tagged_vector. More...
 
 tagged_vector (std::vector< std::complex< double > > _samples, vector_tag _tag=NONE)
 Initializing constructor for tagged_vector. More...
 

Public Attributes

std::complex< double > samples [N]
 The array of N complex doubles. More...
 
vector_tag tag
 The array's tag. More...
 

Detailed Description

template<int N>
struct fun::tagged_vector< N >

tagged_vector struct

An array of N complex doubles with a meta-data tag Note: tagged_vector's are not meant to be resized

Definition at line 43 of file tagged_vector.h.

Constructor & Destructor Documentation

template<int N>
fun::tagged_vector< N >::tagged_vector ( vector_tag  _tag = NONE)
inline

Non-initializing constructor for tagged_vector.

Does not initialize the elements of samples to anything. Initializes tag to _tag defaulting to NONE if left out.

Parameters
_tagoptional initial tag value. Default is NONE if left out. Default is NONE if left out

Definition at line 58 of file tagged_vector.h.

58 { tag = _tag; }
template<int N>
fun::tagged_vector< N >::tagged_vector ( std::vector< std::complex< double > >  _samples,
vector_tag  _tag = NONE 
)
inline

Initializing constructor for tagged_vector.

Initializes the elements of samples to _samples. Initializes tag to _tag defaulting to NONE if left out.

Parameters
_samplesinitial samples to populate the elements of samples with
_tagoptional initial tag value. Default is NONE if left out.

Definition at line 69 of file tagged_vector.h.

70  {
71  assert(_samples.size() == N);
72  memcpy(&samples[0], &_samples[0], _samples.size() * sizeof(std::complex<double>));
73  tag = _tag;
74  }

Member Data Documentation

template<int N>
std::complex<double> fun::tagged_vector< N >::samples[N]

The array of N complex doubles.

Definition at line 46 of file tagged_vector.h.

Referenced by fun::tagged_vector< 64 >::tagged_vector(), fun::fft_symbols::work(), and fun::channel_est::work().

template<int N>
vector_tag fun::tagged_vector< N >::tag

The array's tag.

Definition at line 47 of file tagged_vector.h.

Referenced by fun::tagged_vector< 64 >::tagged_vector(), fun::fft_symbols::work(), and fun::channel_est::work().


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