Agora  1.2.0
Agora project
packet_txrx_sim.h
Go to the documentation of this file.
1 
7 #ifndef PACKETTXRX_SIM_H_
8 #define PACKETTXRX_SIM_H_
9 
10 #include "packet_txrx.h"
11 
21 class PacketTxRxSim : public PacketTxRx {
22  public:
23  PacketTxRxSim(Config* const cfg, size_t core_offset,
26  moodycamel::ProducerToken** notify_producer_tokens,
27  moodycamel::ProducerToken** tx_producer_tokens,
28  Table<char>& rx_buffer, size_t packet_num_in_buffer,
29  Table<size_t>& frame_start, char* tx_buffer);
30  ~PacketTxRxSim() final = default;
31 
32  private:
33  bool CreateWorker(size_t tid, size_t interface_count, size_t interface_offset,
34  size_t* rx_frame_start, std::vector<RxPacket>& rx_memory,
35  std::byte* const tx_memory) final;
36 };
37 
38 #endif // PACKETTXRX_SIM_H_
AgoraTxRx
Definition: packet_txrx.h:18
PacketTxRx::cond_
std::condition_variable cond_
Definition: packet_txrx.h:90
fmt::v8::detail::byte
byte
Definition: core.h:388
PacketTxRx::mutex_
std::mutex mutex_
Owned by this class and shared with the workers.
Definition: packet_txrx.h:89
PacketTxRx::worker_threads_
std::vector< std::unique_ptr< TxRxWorker > > worker_threads_
Definition: packet_txrx.h:76
moodycamel::ProducerToken
Definition: concurrentqueue.h:630
AgoraTxRx::TxRxTypes
TxRxTypes
Definition: packet_txrx.h:19
PacketTxRx::tx_producer_tokens_
moodycamel::ProducerToken ** tx_producer_tokens_
Definition: packet_txrx.h:86
PacketTxRxSim
Implementations of this class provide packet I/O for Agora.
Definition: packet_txrx_sim.h:21
packet_txrx.h
Common definations for PacketTxRx. Including datapath functions for communicating with simulators.
PacketTxRx::cfg_
Config *const cfg_
Definition: packet_txrx.h:77
PacketTxRx::proceed_
std::atomic< bool > proceed_
Definition: packet_txrx.h:91
Table< char >
txrx_worker_sim.h
txrx worker thread definition. This is the simulator declaration
PacketTxRxSim::PacketTxRxSim
PacketTxRxSim(Config *const cfg, size_t core_offset, moodycamel::ConcurrentQueue< EventData > *event_notify_q, moodycamel::ConcurrentQueue< EventData > *tx_pending_q, moodycamel::ProducerToken **notify_producer_tokens, moodycamel::ProducerToken **tx_producer_tokens, Table< char > &rx_buffer, size_t packet_num_in_buffer, Table< size_t > &frame_start, char *tx_buffer)
Definition: packet_txrx_sim.cc:12
kUseUHD
static constexpr bool kUseUHD
Definition: symbols.h:162
kUseArgos
static constexpr bool kUseArgos
Definition: symbols.h:156
PacketTxRxSim::~PacketTxRxSim
~PacketTxRxSim() final=default
PacketTxRx
Implementations of this class provide packet I/O for Agora.
Definition: packet_txrx.h:34
moodycamel::ConcurrentQueue< EventData >
PacketTxRx::event_notify_q_
moodycamel::ConcurrentQueue< EventData > * event_notify_q_
Definition: packet_txrx.h:80
frame_start
frame_start
Definition: parse_dl_file.m:6
PacketTxRx::notify_producer_tokens_
moodycamel::ProducerToken ** notify_producer_tokens_
Definition: packet_txrx.h:84
PacketTxRxSim::CreateWorker
bool CreateWorker(size_t tid, size_t interface_count, size_t interface_offset, size_t *rx_frame_start, std::vector< RxPacket > &rx_memory, std::byte *const tx_memory) final
Definition: packet_txrx_sim.cc:24
Config
Definition: config.h:26
packet_txrx_sim.h
Common definations for PacketTxRxSim. Including datapath functions for communicating with the base st...
AGORA_LOG_INFO
#define AGORA_LOG_INFO(...)
Definition: logger.h:62
RtAssert
static void RtAssert(bool condition, const char *throw_str)
Definition: utils.h:104
PacketTxRx::core_offset_
const size_t core_offset_
Definition: packet_txrx.h:79
PacketTxRx::tx_pending_q_
moodycamel::ConcurrentQueue< EventData > * tx_pending_q_
Definition: packet_txrx.h:81
AgoraTxRx::kBaseStation
@ kBaseStation
Definition: packet_txrx.h:19
PacketTxRx::NumChannels
size_t NumChannels() const
Definition: packet_txrx.h:74