Agora
1.2.0
Agora project
|
The MAC thread that runs alongside the PHY processing at the Agora server or client. More...
#include <mac_thread_basestation.h>
Public Member Functions | |
MacThreadBaseStation (Config *const cfg, size_t core_offset, PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > &decoded_buffer, Table< int8_t > *dl_bits_buffer, Table< int8_t > *dl_bits_buffer_status, moodycamel::ConcurrentQueue< EventData > *rx_queue, moodycamel::ConcurrentQueue< EventData > *tx_queue, const std::string &log_filename="") | |
~MacThreadBaseStation () | |
void | RunEventLoop () |
Static Public Attributes | |
static constexpr char | kDefaultLogFilename [] = "data/mac_log_server" |
static constexpr size_t | kMaxPktsPerUE = 64 |
static constexpr size_t | kSNRWindowSize = 100 |
Private Member Functions | |
void | ProcessRxFromPhy () |
void | ProcessCodeblocksFromPhy (EventData event) |
void | ProcessSnrReportFromPhy (EventData event) |
void | SendRanConfigUpdate (EventData event) |
void | SendControlInformation () |
void | ProcessUdpPacketsFromApps () |
void | ProcessUdpPacketsFromAppsBs (const char *payload) |
Private Attributes | |
Config *const | cfg_ |
const double | freq_ghz_ |
const size_t | tsc_delta_ |
const size_t | core_offset_ |
FILE * | log_file_ |
std::string | log_filename_ |
std::unique_ptr< UDPComm > | udp_comm_ |
std::vector< std::byte > | udp_pkt_buf_ |
size_t | last_mac_pkt_rx_tsc_ = 0 |
size_t | next_tx_frame_id_ = 0 |
size_t | next_radio_id_ = 0 |
size_t | scheduler_next_frame_id_ = 0 |
FastRand | fast_rand_ |
struct { | |
std::array< std::vector< std::byte >, kMaxUEs > frame_data_ | |
std::array< size_t, kMaxUEs > n_filled_in_frame_ | |
std::array< std::queue< float >, kMaxUEs > snr_ | |
std::vector< std::vector< size_t > > data_size_ | |
} | server_ |
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > & | decoded_buffer_ |
struct { | |
std::array< size_t, kMaxUEs > dl_bits_buffer_id_ | |
Table< int8_t > * dl_bits_buffer_ | |
Table< int8_t > * dl_bits_buffer_status_ | |
} | client_ |
moodycamel::ConcurrentQueue< EventData > * | rx_queue_ |
moodycamel::ConcurrentQueue< EventData > * | tx_queue_ |
std::unique_ptr< DoCRC > | crc_obj_ |
The MAC thread that runs alongside the PHY processing at the Agora server or client.
This thread receives UDP data packets from remote apps and forwards them to Agora. It receives decoded symbols from Agora and forwards UDP data packets to applications.
MacThreadBaseStation::MacThreadBaseStation | ( | Config *const | cfg, |
size_t | core_offset, | ||
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > & | decoded_buffer, | ||
Table< int8_t > * | dl_bits_buffer, | ||
Table< int8_t > * | dl_bits_buffer_status, | ||
moodycamel::ConcurrentQueue< EventData > * | rx_queue, | ||
moodycamel::ConcurrentQueue< EventData > * | tx_queue, | ||
const std::string & | log_filename = "" |
||
) |
MacThreadBaseStation::~MacThreadBaseStation | ( | ) |
|
private |
Spot to be optimized #1
Spot to be optimized #2 – left shift data over to remove padding
|
private |
|
private |
|
private |
|
private |
void MacThreadBaseStation::RunEventLoop | ( | ) |
|
private |
|
private |
|
private |
struct { ... } MacThreadBaseStation::client_ |
|
private |
|
private |
std::vector<std::vector<size_t> > MacThreadBaseStation::data_size_ |
|
private |
Table<int8_t>* MacThreadBaseStation::dl_bits_buffer_ |
std::array<size_t, kMaxUEs> MacThreadBaseStation::dl_bits_buffer_id_ |
Table<int8_t>* MacThreadBaseStation::dl_bits_buffer_status_ |
|
private |
std::array<std::vector<std::byte>, kMaxUEs> MacThreadBaseStation::frame_data_ |
|
private |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
private |
|
private |
|
private |
std::array<size_t, kMaxUEs> MacThreadBaseStation::n_filled_in_frame_ |
|
private |
|
private |
|
private |
|
private |
struct { ... } MacThreadBaseStation::server_ |
std::array<std::queue<float>, kMaxUEs> MacThreadBaseStation::snr_ |
|
private |
|
private |
|
private |
|
private |