Agora  1.2.0
Agora project
Receiver Class Reference

#include <receiver.h>

Collaboration diagram for Receiver:

Public Member Functions

 Receiver (Config *cfg, size_t rx_thread_num=1, size_t core_offset=1)
 
 Receiver (Config *cfg, size_t rx_thread_num, size_t core_offset, moodycamel::ConcurrentQueue< EventData > *in_queue_message, moodycamel::ProducerToken **in_rx_ptoks)
 
 ~Receiver ()=default
 
std::vector< std::thread > StartRecv (Table< char > &in_buffer, size_t in_buffer_length, Table< double > &in_frame_start)
 
void * LoopRecv (size_t tid)
 

Private Attributes

std::vector< std::vector< RxPacket > > rx_packets_
 
size_t buffers_per_thread_
 
size_t rx_thread_num_
 
Table< double > * frame_start_
 
moodycamel::ConcurrentQueue< EventData > * message_queue_
 
moodycamel::ProducerToken ** rx_ptoks_
 
size_t core_id_
 
Configcfg_
 

Constructor & Destructor Documentation

◆ Receiver() [1/2]

Receiver::Receiver ( Config cfg,
size_t  rx_thread_num = 1,
size_t  core_offset = 1 
)
explicit

◆ Receiver() [2/2]

Receiver::Receiver ( Config cfg,
size_t  rx_thread_num,
size_t  core_offset,
moodycamel::ConcurrentQueue< EventData > *  in_queue_message,
moodycamel::ProducerToken **  in_rx_ptoks 
)

rx_thread_num: RX thread number in_queue: message queue to communicate with main thread

◆ ~Receiver()

Receiver::~Receiver ( )
default

Member Function Documentation

◆ LoopRecv()

void * Receiver::LoopRecv ( size_t  tid)

receive thread context: ReceiverContext type

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartRecv()

std::vector< std::thread > Receiver::StartRecv ( Table< char > &  in_buffer,
size_t  in_buffer_length,
Table< double > &  in_frame_start 
)

Called in main threads to start the socket threads in_buffer: ring buffer to save packets in_buffer_status: record the status of each memory block (0: empty, 1: full) in_buffer_frame_num: number of packets the ring buffer could hold in_buffer_length: size of ring buffer in_core_id: attach socket threads to {in_core_id, ..., in_core_id + RX_THREAD_NUM - 1}

Here is the call graph for this function:

Member Data Documentation

◆ buffers_per_thread_

size_t Receiver::buffers_per_thread_
private

◆ cfg_

Config* Receiver::cfg_
private

◆ core_id_

size_t Receiver::core_id_
private

◆ frame_start_

Table<double>* Receiver::frame_start_
private

◆ message_queue_

moodycamel::ConcurrentQueue<EventData>* Receiver::message_queue_
private

◆ rx_packets_

std::vector<std::vector<RxPacket> > Receiver::rx_packets_
private

◆ rx_ptoks_

moodycamel::ProducerToken** Receiver::rx_ptoks_
private

◆ rx_thread_num_

size_t Receiver::rx_thread_num_
private

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