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
receiver.h
Go to the documentation of this file.
1
8
#ifndef RECEIVER_H
9
#define RECEIVER_H
10
11
#include <semaphore.h>
12
#include <vector>
13
#include "
receiver_chain.h
"
14
#include "
usrp.h
"
15
16
#define NUM_RX_SAMPLES 4096
17
18
namespace
fun
19
{
20
36
class
receiver
37
{
38
public
:
39
58
receiver
(
void
(*
callback
)(std::vector<std::vector<unsigned char> > packets),
double
freq
= 5.72e9,
double
samp_rate = 5e6,
double
rx_gain
= 20, std::string device_addr =
""
);
59
73
receiver
(
void
(*
callback
)(std::vector<std::vector<unsigned char> > packets),
usrp_params
params =
usrp_params
());
74
78
void
pause
();
79
83
void
resume
();
84
85
private
:
86
87
void
receiver_chain_loop
();
88
89
void (*
m_callback
)(std::vector<std::vector<unsigned char> > packets);
90
91
usrp
m_usrp
;
92
93
receiver_chain
m_rec_chain
;
94
95
std::vector<std::complex<double> >
m_samples
;
96
97
std::thread
m_rec_thread
;
98
99
sem_t
m_pause
;
100
101
102
103
104
};
105
106
107
}
108
109
#endif // RECEIVER_H
src
receiver.h
Generated on Mon Oct 20 2014 10:26:27 for fun_ofdm by
1.8.4