Agora
1.2.0
Agora project
|
Go to the documentation of this file.
41 Config*
const cfg,
size_t core_offset,
46 const std::string& log_filename =
"");
149 #endif // MAC_THREAD_H_
byte
Definition: core.h:388
Declaration file for the UDPComm class. This class is used to send messages and receive messages from...
size_t GetDLSymbolIdx(size_t symbol_number) const
Definition: framestats.cc:152
static constexpr char kMacRemoteHostname[]
Definition: symbols.h:324
struct MacThreadBaseStation::@8 client_
void Running(bool value)
Definition: config.h:33
size_t UeAntNum() const
Definition: config.h:41
void PinToCoreWithOffset(ThreadType thread_type, size_t core_offset, size_t thread_id, bool allow_reuse, bool verbose)
Definition: utils.cc:157
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="")
Definition: mac_thread_basestation.cc:12
size_t next_radio_id_
Definition: mac_thread_basestation.h:105
size_t MacPacketsPerframe(Direction dir) const
Definition: config.h:276
void ProcessUdpPacketsFromAppsBs(const char *payload)
Definition: mac_thread_basestation.cc:374
uint16_t symbol_id_
Definition: message.h:33
size_t frame_id_
modulation type (number of bits)
Definition: ran_config.h:18
static constexpr size_t kFrameWnd
Definition: symbols.h:18
uint16_t Ue() const
Definition: message.h:280
The struct that contains the RAN configuration that Agora must apply for a particular frame.
Definition: ran_config.h:14
The packet that contains the control information (DCI) that tells each UE which uplink resource block...
Definition: ran_config.h:30
size_t GetULSymbolIdx(size_t symbol_number) const
Definition: framestats.cc:156
Config *const cfg_
Definition: mac_thread_basestation.h:80
std::unique_ptr< UDPComm > udp_comm_
Definition: mac_thread_basestation.h:93
size_t BsAntNum() const
Definition: config.h:35
size_t MacDataBytesNumPerframe(Direction dir) const
Definition: config.h:259
const size_t core_offset_
Definition: mac_thread_basestation.h:87
std::array< size_t, kMaxTags > tags_
Definition: message.h:146
#define AGORA_LOG_ERROR(...)
Definition: logger.h:39
void ProcessUdpPacketsFromApps()
Definition: mac_thread_basestation.cc:270
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > & decoded_buffer_
Definition: mac_thread_basestation.h:131
const FrameStats & Frame() const
Definition: config.h:340
const size_t tsc_delta_
Definition: mac_thread_basestation.h:85
#define AGORA_LOG_TRACE(...)
Definition: logger.h:92
moodycamel::ConcurrentQueue< EventData > * rx_queue_
Definition: mac_thread_basestation.h:140
uint16_t ue_id_
Definition: message.h:37
std::vector< std::vector< size_t > > data_size_
Definition: mac_thread_basestation.h:125
EventType event_type_
Definition: message.h:144
std::array< size_t, kMaxUEs > n_filled_in_frame_
Definition: mac_thread_basestation.h:119
FILE * log_file_
Definition: mac_thread_basestation.h:89
~MacThreadBaseStation()
Definition: mac_thread_basestation.cc:71
snr
Definition: inspect_agora_results.m:118
static constexpr size_t kHeaderSize
Definition: message.h:276
Definition: message.h:142
@ kQaM16
Definition: comms-lib.h:43
Table< int8_t > * dl_bits_buffer_
Definition: mac_thread_basestation.h:136
uint32_t num_tags_
Definition: message.h:145
Self defined functions for message storage and passing.
static constexpr size_t kUdpRxBufferPadding
Definition: mac_thread_basestation.cc:10
void Set(const uint16_t &f, const uint16_t &s, const uint16_t &u, const uint16_t &data_size)
Definition: message.h:286
size_t ClientUlPilotSymbols() const
Definition: framestats.h:73
size_t last_mac_pkt_rx_tsc_
Definition: mac_thread_basestation.h:99
size_t scheduler_next_frame_id_
Definition: mac_thread_basestation.h:108
for i
Definition: generate_data.m:107
void RunEventLoop()
Definition: mac_thread_basestation.cc:526
std::vector< std::byte > udp_pkt_buf_
Definition: mac_thread_basestation.h:96
size_t MacPayloadMaxLength(Direction dir) const
Definition: config.h:272
std::unique_ptr< DoCRC > crc_obj_
Definition: mac_thread_basestation.h:146
bool enqueue(T const &item)
Definition: concurrentqueue.h:974
void SendRanConfigUpdate(EventData event)
Definition: mac_thread_basestation.cc:102
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
static size_t Rdtsc()
Return the TSC.
Definition: gettime.h:25
The MAC thread that runs alongside the PHY processing at the Agora server or client.
Definition: mac_thread_basestation.h:27
void SendControlInformation()
Definition: mac_thread_basestation.cc:258
auto fprintf(std::FILE *f, const S &fmt, const T &... args) -> int
Definition: printf.h:607
std::string BsServerAddr() const
Definition: config.h:299
size_t n_antennas_
Definition: ran_config.h:16
double GetFrameDurationSec() const
Return the frame duration in seconds.
Definition: config.h:464
size_t FramesToTest() const
Definition: config.h:309
moodycamel::ConcurrentQueue< EventData > * tx_queue_
Definition: mac_thread_basestation.h:143
std::array< std::vector< std::byte >, kMaxUEs > frame_data_
Definition: mac_thread_basestation.h:115
size_t MacPacketLength(Direction dir) const
Definition: config.h:268
size_t BsMacRxPort() const
Definition: config.h:320
size_t ue_id_
Definition: ran_config.h:32
static constexpr size_t kMaxPktsPerUE
Definition: mac_thread_basestation.h:34
size_t ClientDlPilotSymbols() const
Definition: framestats.h:76
FastRand fast_rand_
Definition: mac_thread_basestation.h:110
const double freq_ghz_
Definition: mac_thread_basestation.h:82
std::array< std::queue< float >, kMaxUEs > snr_
Definition: mac_thread_basestation.h:122
size_t UeAntTotal() const
Definition: config.h:43
static double MeasureRdtscFreq()
Definition: gettime.h:51
std::string log_filename_
Definition: mac_thread_basestation.h:90
void ProcessRxFromPhy()
Definition: mac_thread_basestation.cc:76
#define AGORA_LOG_INFO(...)
Definition: logger.h:62
struct MacThreadBaseStation::@7 server_
#define AGORA_LOG_FRAME(...)
Definition: logger.h:72
uint16_t PayloadLength() const
Definition: message.h:282
size_t mod_order_bits_
UE ID.
Definition: ran_config.h:33
static void RtAssert(bool condition, const char *throw_str)
Definition: utils.h:104
static constexpr bool kLogMacPackets
Definition: symbols.h:211
size_t GetULSymbolLast() const
Definition: framestats.h:47
std::string to_string() const
Definition: eth_common.h:64
Declaration file for the configuration class which importants json configuration values into class va...
size_t next_tx_frame_id_
Definition: mac_thread_basestation.h:102
bool try_dequeue(U &item)
Definition: concurrentqueue.h:1104
Definition: message.h:274
static constexpr size_t kSNRWindowSize
Definition: mac_thread_basestation.h:38
static constexpr size_t kMaxUEs
Definition: symbols.h:289
size_t NumUlDataSyms() const
Definition: framestats.h:80
uint32_t frame_id_
Definition: message.h:32
Table< int8_t > * dl_bits_buffer_status_
Definition: mac_thread_basestation.h:137
Definition: message.h:303
void ProcessSnrReportFromPhy(EventData event)
Definition: mac_thread_basestation.cc:91
void ProcessCodeblocksFromPhy(EventData event)
Definition: mac_thread_basestation.cc:122
size_t ModOrderBits(Direction dir) const
Definition: config.h:247
size_t mod_order_bits_
Number of active antennas at the base station.
Definition: ran_config.h:17
size_t GetULSymbol(size_t location) const
Definition: framestats.cc:114
std::array< size_t, kMaxUEs > dl_bits_buffer_id_
Definition: mac_thread_basestation.h:134
static constexpr size_t kMacBaseClientPort
Definition: symbols.h:337
std::string UeServerAddr() const
Definition: config.h:298
size_t BsMacTxPort() const
Definition: config.h:321
static constexpr char kDefaultLogFilename[]
Definition: mac_thread_basestation.h:30