fun_ofdm
1.0
802.11a Physical Layer for USRP
|
The transmitter class is the public interface for the fun_ofdm transmit chain. This is the easiest way to start transmitting 802.11a OFDM frames out of the box. More...
#include <transmitter.h>
Public Member Functions | |
transmitter (double freq=5.72e9, double samp_rate=5e6, double tx_gain=20, double tx_amp=1.0, std::string device_addr="") | |
Constructor for the transmitter with raw parameters. More... | |
transmitter (usrp_params params=usrp_params()) | |
Constructor for the transmitter that uses the usrp_params struct. More... | |
void | send_packet (std::vector< unsigned char > payload, Rate phy_rate=RATE_1_2_BPSK) |
Send a single PHY frame at the given PHY Rate. More... | |
Private Attributes | |
usrp | m_usrp |
The usrp object used to send the generated frames over the air. More... | |
frame_builder | m_frame_builder |
The frame builder object used to generate the frames. More... | |
The transmitter class is the public interface for the fun_ofdm transmit chain. This is the easiest way to start transmitting 802.11a OFDM frames out of the box.
Usage: Create a transmitter object with the desired USRP parameters (center frequency, sample rate, transmitter gain, and amplitude). Then to send a packet simply call the transmitter::send_packet() function passing it the desired packet to be transmitted and the desired Physical Layer rate (PHY Rate) to transmit it.
Definition at line 28 of file transmitter.h.
fun::transmitter::transmitter | ( | double | freq = 5.72e9 , |
double | samp_rate = 5e6 , |
||
double | tx_gain = 20 , |
||
double | tx_amp = 1.0 , |
||
std::string | device_addr = "" |
||
) |
Constructor for the transmitter with raw parameters.
freq | [Optional] Center frequency |
samp_rate | [Optional] Sample rate |
tx_gain | [Optional] Transmit Gain |
tx_amp | [Optional] Transmit Amplitude |
device_addr | [Optional] IP address of USRP device |
Defaults to:
This constructor shows exactly what parameters need to be set for the transmitter
Definition at line 15 of file transmitter.cpp.
fun::transmitter::transmitter | ( | usrp_params | params = usrp_params() ) |
Constructor for the transmitter that uses the usrp_params struct.
params | [Optional] The usrp parameters you want to use for this transmitter |
Defaults to:
This construct is for those who feel more comfortable using the usrp_params struct
Definition at line 24 of file transmitter.cpp.
void fun::transmitter::send_packet | ( | std::vector< unsigned char > | payload, |
Rate | phy_rate = RATE_1_2_BPSK |
||
) |
Send a single PHY frame at the given PHY Rate.
payload | The data to be transmitted (i.e. the MPDU) |
phy_rate | [Optional] The PHY data rate to transmit at - defaults to 1/2 BPSK |
This function uses the usrp::send_burst_sync() function which means that this function blocks until the packet is done transmitting.
Transmits a single frame, blocking until the frame is sent.
Definition at line 33 of file transmitter.cpp.
References fun::frame_builder::build_frame(), m_frame_builder, m_usrp, and fun::usrp::send_burst_sync().
Referenced by main(), and test_tx().
|
private |
The frame builder object used to generate the frames.
Definition at line 79 of file transmitter.h.
Referenced by send_packet().
|
private |
The usrp object used to send the generated frames over the air.
Definition at line 77 of file transmitter.h.
Referenced by send_packet().