Agora  1.2.0
Agora project
Simulator Class Reference

#include <simulator.h>

Collaboration diagram for Simulator:

Public Member Functions

 Simulator (Config *cfg, size_t task_thread_num, size_t core_offset, size_t sender_delay)
 
 ~Simulator ()
 
void Start ()
 
void Stop ()
 
void UpdateFrameCount (int *frame_count)
 
void UpdateRxCounters (size_t frame_id, size_t frame_id_in_buffer, size_t symbol_id, size_t ant_id)
 
void PrintPerFrameDone (PrintType print_type, size_t frame_id)
 

Static Public Attributes

static constexpr size_t kTransposeBlockSize = 8
 
static constexpr size_t kTransposeBlockNum = 256
 
static constexpr size_t kDequeueBulkSize = 32
 
static constexpr size_t kDequeueBulkSizeSingle = 8
 

Private Member Functions

void InitializeQueues ()
 
void InitializeBuffers ()
 
void FreeBuffers ()
 
void FreeQueues ()
 

Private Attributes

size_t task_thread_num_
 
size_t socket_rx_thread_num_
 
size_t socket_tx_thread_num_
 
size_t core_offset_
 
Configconfig_
 
std::unique_ptr< Receiverreceiver_
 
std::unique_ptr< Sendersender_
 
Table< char > socket_buffer_
 
size_t socket_buffer_size_
 
size_t * rx_counter_packets_
 
moodycamel::ConcurrentQueue< EventDatamessage_queue_
 
moodycamel::ConcurrentQueue< EventDatacomplete_task_queue_
 
moodycamel::ProducerToken ** rx_ptoks_ptr_
 
Table< double > frame_start_
 
double * frame_start_receive_
 
double * frame_end_receive_
 
double * frame_start_tx_
 
double * frame_end_tx_
 

Constructor & Destructor Documentation

◆ Simulator()

Simulator::Simulator ( Config cfg,
size_t  task_thread_num,
size_t  core_offset,
size_t  sender_delay 
)
Here is the call graph for this function:

◆ ~Simulator()

Simulator::~Simulator ( )
Here is the call graph for this function:

Member Function Documentation

◆ FreeBuffers()

void Simulator::FreeBuffers ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FreeQueues()

void Simulator::FreeQueues ( )
private
Here is the caller graph for this function:

◆ InitializeBuffers()

void Simulator::InitializeBuffers ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeQueues()

void Simulator::InitializeQueues ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintPerFrameDone()

void Simulator::PrintPerFrameDone ( PrintType  print_type,
size_t  frame_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Start()

void Simulator::Start ( )
Here is the call graph for this function:

◆ Stop()

void Simulator::Stop ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateFrameCount()

void Simulator::UpdateFrameCount ( int *  frame_count)
inline

◆ UpdateRxCounters()

void Simulator::UpdateRxCounters ( size_t  frame_id,
size_t  frame_id_in_buffer,
size_t  symbol_id,
size_t  ant_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ complete_task_queue_

moodycamel::ConcurrentQueue<EventData> Simulator::complete_task_queue_
private

◆ config_

Config* Simulator::config_
private

◆ core_offset_

size_t Simulator::core_offset_
private

◆ frame_end_receive_

double* Simulator::frame_end_receive_
private

◆ frame_end_tx_

double* Simulator::frame_end_tx_
private

◆ frame_start_

Table<double> Simulator::frame_start_
private

◆ frame_start_receive_

double* Simulator::frame_start_receive_
private

◆ frame_start_tx_

double* Simulator::frame_start_tx_
private

◆ kDequeueBulkSize

constexpr size_t Simulator::kDequeueBulkSize = 32
staticconstexpr

◆ kDequeueBulkSizeSingle

constexpr size_t Simulator::kDequeueBulkSizeSingle = 8
staticconstexpr

◆ kTransposeBlockNum

constexpr size_t Simulator::kTransposeBlockNum = 256
staticconstexpr

◆ kTransposeBlockSize

constexpr size_t Simulator::kTransposeBlockSize = 8
staticconstexpr

◆ message_queue_

moodycamel::ConcurrentQueue<EventData> Simulator::message_queue_
private

◆ receiver_

std::unique_ptr<Receiver> Simulator::receiver_
private

◆ rx_counter_packets_

size_t* Simulator::rx_counter_packets_
private

◆ rx_ptoks_ptr_

moodycamel::ProducerToken** Simulator::rx_ptoks_ptr_
private

◆ sender_

std::unique_ptr<Sender> Simulator::sender_
private

◆ socket_buffer_

Table<char> Simulator::socket_buffer_
private

Received data

First dimension: SOCKET_THREAD_NUM

Second dimension of socket_buffer: kFrameWnd * BS_ANT_NUM * symbol_num_perframe * packet_length

Second dimension of buffer status: kFrameWnd * BS_ANT_NUM * symbol_num_perframe

◆ socket_buffer_size_

size_t Simulator::socket_buffer_size_
private

◆ socket_rx_thread_num_

size_t Simulator::socket_rx_thread_num_
private

◆ socket_tx_thread_num_

size_t Simulator::socket_tx_thread_num_
private

◆ task_thread_num_

size_t Simulator::task_thread_num_
private

The documentation for this class was generated from the following files: