fun_ofdm
1.0
802.11a Physical Layer for USRP
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Macros
Pages
tagged_vector.h
Go to the documentation of this file.
1
10
#ifndef TAGGED_VECTOR_H
11
#define TAGGED_VECTOR_H
12
13
#include <vector>
14
#include <complex>
15
#include <assert.h>
16
17
namespace
fun
18
{
25
enum
vector_tag
26
{
27
NONE
,
28
STS_START
,
29
STS_END
,
30
LTS_START
,
31
LTS1
,
32
LTS2
,
33
START_OF_FRAME
,
34
};
35
42
template
<
int
N>
43
struct
tagged_vector
44
{
45
46
std::complex<double>
samples
[N];
47
vector_tag
tag
;
48
58
tagged_vector
(
vector_tag
_tag =
NONE
) {
tag
= _tag; }
59
69
tagged_vector
(std::vector<std::complex<double> > _samples,
vector_tag
_tag =
NONE
)
70
{
71
assert(_samples.size() == N);
72
memcpy(&
samples
[0], &_samples[0], _samples.size() *
sizeof
(std::complex<double>));
73
tag
= _tag;
74
}
75
};
76
82
struct
tagged_sample
83
{
84
std::complex<double>
sample
;
85
vector_tag
tag
;
86
93
tagged_sample
() {
tag
=
NONE
; }
94
};
95
}
96
97
#endif // TAGGED_VECTOR_H
src
tagged_vector.h
Generated on Mon Oct 20 2014 10:26:27 for fun_ofdm by
1.8.4