Agora
1.2.0
Agora project
|
Go to the documentation of this file.
6 #ifndef TXRX_WORKER_SIM_H_
7 #define TXRX_WORKER_SIM_H_
18 TxRxWorkerSim(
size_t core_offset,
size_t tid,
size_t interface_count,
19 size_t interface_offset,
Config*
const config,
20 size_t* rx_frame_start,
25 std::vector<RxPacket>& rx_memory,
std::byte*
const tx_memory,
26 std::mutex& sync_mutex, std::condition_variable& sync_cond,
27 std::atomic<bool>& can_proceed);
36 std::vector<Packet*>
RecvEnqueue(
size_t interface_id);
44 #endif // TXRX_WORKER_SIM_H_
static constexpr bool kDebugMulticell
Definition: symbols.h:202
std::vector< std::byte > beacon_buffer_
Definition: txrx_worker_sim.h:41
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
Definition: concurrentqueue.h:630
uint32_t frame_id_
Definition: message.h:168
void PinToCoreWithOffset(ThreadType thread_type, size_t core_offset, size_t thread_id, bool allow_reuse, bool verbose)
Definition: utils.cc:157
static constexpr bool kDebugPrintBeacon
Definition: txrx_worker_sim.cc:16
auto printf(const S &fmt, const T &... args) -> int
Definition: printf.h:631
size_t NumBeaconSyms() const
Definition: framestats.cc:87
static constexpr size_t kSlowStartMulStage2
Definition: txrx_worker_sim.cc:21
size_t *const rx_frame_start_
Definition: txrx_worker.h:59
uint16_t symbol_id_
Definition: message.h:33
static constexpr size_t kFrameWnd
Definition: symbols.h:18
static double GetTimeUs()
Definition: gettime.h:14
size_t BsAntNum() const
Definition: config.h:35
uint32_t ant_id_
Definition: message.h:171
Packet * GetTxPacket(size_t frame, size_t symbol, size_t ant)
Definition: txrx_worker.cc:160
bool Running() const
Definition: txrx_worker.h:42
#define AGORA_LOG_ERROR(...)
Definition: logger.h:39
const FrameStats & Frame() const
Definition: config.h:340
#define AGORA_LOG_TRACE(...)
Definition: logger.h:92
Definition: message.h:227
void WaitSync()
Using a latch might be better but adds c++20 requirement.
Definition: txrx_worker.cc:64
void ReturnRxPacket(RxPacket &unused_packet)
Definition: txrx_worker.cc:129
static constexpr bool kDebugPrintInTask
Definition: symbols.h:201
txrx worker thread definition. This is the simulator declaration
static constexpr bool kDebugDownlink
Definition: symbols.h:180
std::vector< EventData > GetPendingTxEvents(size_t max_events=0)
Definition: txrx_worker.cc:85
Definition: message.h:142
static constexpr bool kEnableSlowStart
Definition: txrx_worker_sim.cc:15
int BsRruPort() const
Definition: config.h:305
uint32_t cell_id_
Definition: message.h:170
uint16_t ant_id_
Definition: message.h:38
Self defined functions for message storage and passing.
int BsServerPort() const
Definition: config.h:304
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
static size_t Rdtsc()
Return the TSC.
Definition: gettime.h:25
std::string BsServerAddr() const
Definition: config.h:299
static constexpr size_t kSlowStartMulStage1
Definition: txrx_worker_sim.cc:20
double beacon_send_time_
Definition: txrx_worker_sim.h:42
Definition: message.h:164
Config * Configuration()
Definition: txrx_worker.h:46
double GetFrameDurationSec() const
Return the frame duration in seconds.
Definition: config.h:464
uint32_t symbol_id_
Definition: message.h:169
size_t tag_
Definition: message.h:43
static constexpr size_t kNumStatsFrames
Definition: symbols.h:300
bool NotifyComplete(const EventData &complete_event)
Definition: txrx_worker.cc:75
Definition: txrx_worker.h:18
static constexpr bool kIsWorkerTimingEnabled
Definition: symbols.h:303
RxPacket & GetRxPacket()
Definition: txrx_worker.cc:104
Packet * RawPacket()
Definition: message.h:213
const size_t channels_per_interface_
Definition: txrx_worker.h:58
const std::vector< size_t > & CellId() const
Definition: config.h:368
static double MeasureRdtscFreq()
Definition: gettime.h:51
void SendBeacon(size_t frame_id)
Definition: txrx_worker_sim.cc:143
#define AGORA_LOG_SYMBOL(...)
Definition: logger.h:82
const size_t tid_
Definition: txrx_worker.h:54
std::vector< Packet * > RecvEnqueue(size_t interface_id)
Definition: txrx_worker_sim.cc:174
#define AGORA_LOG_FRAME(...)
Definition: logger.h:72
size_t DequeueSend()
Definition: txrx_worker_sim.cc:224
Definition: message.h:186
Definition: txrx_worker_sim.h:16
static constexpr size_t kSlowStartThresh2
Definition: txrx_worker_sim.cc:19
size_t NumCells() const
Definition: config.h:94
static constexpr size_t kSocketRxBufferSize
Definition: txrx_worker_sim.cc:23
void DoTxRx() final
Definition: txrx_worker_sim.cc:61
const size_t interface_offset_
Definition: txrx_worker.h:57
size_t PacketLength() const
Definition: config.h:238
static constexpr size_t kSlowStartThresh1
Definition: txrx_worker_sim.cc:18
const size_t num_interfaces_
Definition: txrx_worker.h:56
uint32_t frame_id_
Definition: message.h:32
size_t GetBeaconSymbol(size_t location) const
Definition: framestats.cc:126
txrx worker thread definition. This is the parent / interface
std::vector< std::unique_ptr< UDPComm > > udp_comm_
Definition: txrx_worker_sim.h:40
const size_t core_offset_
Definition: txrx_worker.h:55
bool running_
Definition: txrx_worker.h:60
std::string BsRruAddr() const
Definition: config.h:302