#include <sender.h>
|
| | Sender (Config *cfg, size_t socket_thread_num, size_t core_offset=30, size_t frame_duration=1000, size_t inter_frame_delay=0, size_t enable_slow_start=1, const std::string &server_mac_addr_str="ff:ff:ff:ff:ff:ff", bool create_thread_for_master=false) |
| | Create and optionally start a Sender that sends IQ packets to a server with MAC address [server_mac_addr_str]. More...
|
| |
| | ~Sender () |
| |
| void | StartTx () |
| |
| void | StartTxfromMain (double *in_frame_start, double *in_frame_end) |
| |
◆ Sender()
| Sender::Sender |
( |
Config * |
cfg, |
|
|
size_t |
socket_thread_num, |
|
|
size_t |
core_offset = 30, |
|
|
size_t |
frame_duration = 1000, |
|
|
size_t |
inter_frame_delay = 0, |
|
|
size_t |
enable_slow_start = 1, |
|
|
const std::string & |
server_mac_addr_str = "ff:ff:ff:ff:ff:ff", |
|
|
bool |
create_thread_for_master = false |
|
) |
| |
Create and optionally start a Sender that sends IQ packets to a server with MAC address [server_mac_addr_str].
- Parameters
-
| config | The Agora config |
| socket_thread_num | Number of worker threads sending packets |
| core_offset | The master thread runs on core [core_offset]. Worker thread i runs on core [core_offset + i] |
| frame_duration | The TTI slot duration |
| enable_slow_start | If 1, the sender initially sends frames in a duration larger than the TTI |
| server_mac_addr_str | The MAC address of the server's NIC |
◆ ~Sender()
◆ CreateWorkerThreads()
| void Sender::CreateWorkerThreads |
( |
size_t |
num_workers | ) |
|
|
private |
◆ DelayForFrame()
| void Sender::DelayForFrame |
( |
size_t |
tx_frame_count, |
|
|
uint64_t |
tick_start |
|
) |
| |
|
private |
◆ DelayForSymbol()
| void Sender::DelayForSymbol |
( |
size_t |
tx_frame_count, |
|
|
uint64_t |
tick_start |
|
) |
| |
|
private |
◆ FindNextSymbol()
| size_t Sender::FindNextSymbol |
( |
size_t |
start_symbol | ) |
|
|
private |
◆ GetMaxSymbolId()
| size_t Sender::GetMaxSymbolId |
( |
| ) |
const |
|
private |
◆ GetTicksForFrame()
| uint64_t Sender::GetTicksForFrame |
( |
size_t |
frame_id | ) |
const |
|
private |
◆ InitIqFromFile()
| void Sender::InitIqFromFile |
( |
const std::string & |
filename | ) |
|
|
private |
Read time-domain 32-bit floating-point IQ samples from [filename] and populate iq_data_short_ by converting to 16-bit fixed-point samples.
[filename] must contain data for one frame. For every symbol and antenna, the file must provide (CP_LEN + OFDM_CA_NUM) IQ samples.
◆ MasterThread()
| void * Sender::MasterThread |
( |
int |
tid | ) |
|
|
private |
◆ RunFft()
| void Sender::RunFft |
( |
Packet * |
pkt, |
|
|
complex_float * |
fft_inout, |
|
|
DFTI_DESCRIPTOR_HANDLE |
mkl_handle |
|
) |
| const |
|
private |
◆ ScheduleSymbol()
| void Sender::ScheduleSymbol |
( |
size_t |
frame, |
|
|
size_t |
symbol_id |
|
) |
| |
|
private |
◆ StartTx()
◆ StartTxfromMain()
| void Sender::StartTxfromMain |
( |
double * |
in_frame_start, |
|
|
double * |
in_frame_end |
|
) |
| |
◆ WorkerThread()
| void * Sender::WorkerThread |
( |
int |
tid | ) |
|
|
private |
◆ WriteStatsToFile()
| void Sender::WriteStatsToFile |
( |
size_t |
tx_frame_count | ) |
const |
|
private |
◆ cfg_
◆ completion_queue_
◆ core_offset_
| const size_t Sender::core_offset_ |
|
private |
◆ enable_slow_start_
| const size_t Sender::enable_slow_start_ |
|
private |
◆ frame_duration_
| size_t Sender::frame_duration_ |
|
private |
◆ frame_end_
| double* Sender::frame_end_ |
|
private |
◆ frame_start_
| double* Sender::frame_start_ |
|
private |
◆ freq_ghz_
| const double Sender::freq_ghz_ |
|
private |
◆ inter_frame_delay_
| const size_t Sender::inter_frame_delay_ |
|
private |
◆ iq_data_short_
| Table<short> Sender::iq_data_short_ |
|
private |
◆ kDequeueBulkSize
| constexpr size_t Sender::kDequeueBulkSize = 4 |
|
staticconstexpr |
◆ packet_count_per_symbol_
| size_t* Sender::packet_count_per_symbol_[kFrameWnd] |
|
private |
◆ send_queue_
◆ socket_thread_num_
| const size_t Sender::socket_thread_num_ |
|
private |
◆ task_ptok_
◆ threads_
| std::vector<std::thread> Sender::threads_ |
|
private |
◆ ticks_all_
| uint64_t Sender::ticks_all_ |
|
private |
◆ ticks_inter_frame_
| const uint64_t Sender::ticks_inter_frame_ |
|
private |
◆ ticks_per_usec_
| const double Sender::ticks_per_usec_ |
|
private |
◆ ticks_wnd1_
| uint64_t Sender::ticks_wnd1_ |
|
private |
◆ ticks_wnd2_
| uint64_t Sender::ticks_wnd2_ |
|
private |
The documentation for this class was generated from the following files: