fun_ofdm  1.0
802.11a Physical Layer for USRP
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
transmitter.cpp
Go to the documentation of this file.
1 
8 #include "transmitter.h"
9 
10 namespace fun {
11 
15  transmitter::transmitter(double freq, double samp_rate, double tx_gain, double tx_amp, std::string device_addr) :
16  m_usrp(usrp_params(freq, samp_rate, tx_gain, 20, tx_amp, device_addr)),
17  m_frame_builder()
18  {
19  }
20 
25  m_usrp(params),
26  m_frame_builder()
27  {
28  }
29 
33  void transmitter::send_packet(std::vector<unsigned char> payload, Rate phy_rate)
34  {
35  std::vector<std::complex<double> > samples = m_frame_builder.build_frame(payload, phy_rate);
36  m_usrp.send_burst_sync(samples);
37  }
38 
39 }