Agora  1.2.0
Agora project
Agora Class Reference

#include <agora.h>

Collaboration diagram for Agora:

Public Member Functions

 Agora (Config *cfg)
 Create an Agora object and start the worker threads. More...
 
 ~Agora ()
 
void Start ()
 
void Stop ()
 The main Agora event loop. More...
 
void GetEqualData (float **ptr, int *size)
 

Public Attributes

struct {
   bool   enable_save_decode_data_to_file_ = false
 
   bool   enable_save_tx_data_to_file_ = false
 
flags_
 

Private Types

enum  ScheduleProcessingFlags : uint8_t { kNone = 0, kUplinkComplete = 0x1, kDownlinkComplete = 0x2, kProcessingComplete = (kUplinkComplete + kDownlinkComplete) }
 

Private Member Functions

bool CheckFrameComplete (size_t frame_id)
 
void CheckIncrementScheduleFrame (size_t frame_id, ScheduleProcessingFlags completed)
 
size_t FetchEvent (std::vector< EventData > &events_list, bool is_turn_to_dequeue_from_io)
 
void InitializeQueues ()
 
void InitializeCounters ()
 
void InitializeThreads ()
 
void FreeQueues ()
 
void SaveDecodeDataToFile (int frame_id)
 
void SaveTxDataToFile (int frame_id)
 
void HandleEventFft (size_t tag)
 
void UpdateRxCounters (size_t frame_id, size_t symbol_id)
 
void UpdateRanConfig (RanConfig rc)
 Update Agora's RAN config parameters. More...
 
void ScheduleSubcarriers (EventType event_type, size_t frame_id, size_t symbol_id)
 
void ScheduleAntennas (EventType event_type, size_t frame_id, size_t symbol_id)
 
void ScheduleAntennasTX (size_t frame_id, size_t symbol_id)
 
void ScheduleDownlinkProcessing (size_t frame_id)
 
void ScheduleCodeblocks (EventType event_type, Direction dir, size_t frame_id, size_t symbol_idx)
 Schedule LDPC decoding or encoding over code blocks. More...
 
void ScheduleUsers (EventType event_type, size_t frame_id, size_t symbol_id)
 
void SendSnrReport (EventType event_type, size_t frame_id, size_t symbol_id)
 

Private Attributes

const size_t base_worker_core_offset_
 
Config *const config_
 
size_t fft_created_count_
 
size_t max_equaled_frame_ = SIZE_MAX
 
std::unique_ptr< PacketTxRxpacket_tx_rx_
 
std::unique_ptr< MacThreadBaseStationmac_thread_
 
std::thread mac_std_thread_
 
std::unique_ptr< Statsstats_
 
std::unique_ptr< PhyStatsphy_stats_
 
std::unique_ptr< AgoraWorkerworker_set_
 
std::unique_ptr< AgoraBufferagora_memory_
 
FrameCounters pilot_fft_counters_
 
FrameCounters uplink_fft_counters_
 
FrameCounters beam_counters_
 
FrameCounters demul_counters_
 
FrameCounters decode_counters_
 
FrameCounters encode_counters_
 
FrameCounters precode_counters_
 
FrameCounters ifft_counters_
 
FrameCounters tx_counters_
 
FrameCounters tomac_counters_
 
FrameCounters mac_to_phy_counters_
 
FrameCounters rc_counters_
 
RxCounters rx_counters_
 
size_t beam_last_frame_ = SIZE_MAX
 
size_t rc_last_frame_ = SIZE_MAX
 
size_t ifft_next_symbol_ = 0
 
FrameInfo frame_tracking_ {0, 0}
 
std::unique_ptr< MessageInfomessage_
 
std::vector< size_t > fft_cur_frame_for_symbol_
 
std::vector< size_t > encode_cur_frame_for_symbol_
 
std::vector< size_t > ifft_cur_frame_for_symbol_
 
std::vector< size_t > precode_cur_frame_for_symbol_
 
std::array< std::queue< fft_req_tag_t >, kFrameWndfft_queue_arr_
 
moodycamel::ConcurrentQueue< EventDatamessage_queue_
 
moodycamel::ConcurrentQueue< EventDatamac_request_queue_
 
moodycamel::ConcurrentQueue< EventDatamac_response_queue_
 
moodycamel::ProducerTokenrx_ptoks_ptr_ [kMaxThreads]
 
moodycamel::ProducerTokentx_ptoks_ptr_ [kMaxThreads]
 
uint8_t schedule_process_flags_
 
std::queue< size_t > encode_deferral_
 
std::unique_ptr< Agora_recorder::RecorderThreadrecorder_
 

Member Enumeration Documentation

◆ ScheduleProcessingFlags

enum Agora::ScheduleProcessingFlags : uint8_t
private
Enumerator
kNone 
kUplinkComplete 
kDownlinkComplete 
kProcessingComplete 

Constructor & Destructor Documentation

◆ Agora()

Agora::Agora ( Config cfg)
explicit

Create an Agora object and start the worker threads.

Here is the call graph for this function:

◆ ~Agora()

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

Member Function Documentation

◆ CheckFrameComplete()

bool Agora::CheckFrameComplete ( size_t  frame_id)
private

Determines if all the work has been completed on the frame_id Completion is determined based on the ifft, tx, decode, and tomac counters. If frame processing is complete. All of the work counters are reset and the cur_proc_frame_id_ is incremented. Returns true if all processing is complete AND the frame_id is the last frame to test. False otherwise.

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

◆ CheckIncrementScheduleFrame()

void Agora::CheckIncrementScheduleFrame ( size_t  frame_id,
ScheduleProcessingFlags  completed 
)
private

Increments the cur_sche_frame_id when all ScheduleProcessingFlags have been acheived.

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

◆ FetchEvent()

size_t Agora::FetchEvent ( std::vector< EventData > &  events_list,
bool  is_turn_to_dequeue_from_io 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FreeQueues()

void Agora::FreeQueues ( )
private
Todo:
move this to the MessageInfo class..
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEqualData()

void Agora::GetEqualData ( float **  ptr,
int *  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleEventFft()

void Agora::HandleEventFft ( size_t  tag)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeCounters()

void Agora::InitializeCounters ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeQueues()

void Agora::InitializeQueues ( )
private
Todo:
move this to the MessageInfo class..
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeThreads()

void Agora::InitializeThreads ( )
private
Todo:
convert unique ptr to shared
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveDecodeDataToFile()

void Agora::SaveDecodeDataToFile ( int  frame_id)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveTxDataToFile()

void Agora::SaveTxDataToFile ( int  frame_id)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScheduleAntennas()

void Agora::ScheduleAntennas ( EventType  event_type,
size_t  frame_id,
size_t  symbol_id 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScheduleAntennasTX()

void Agora::ScheduleAntennasTX ( size_t  frame_id,
size_t  symbol_id 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScheduleCodeblocks()

void Agora::ScheduleCodeblocks ( EventType  event_type,
Direction  dir,
size_t  frame_id,
size_t  symbol_idx 
)
private

Schedule LDPC decoding or encoding over code blocks.

Parameters
task_typeEither LDPC decoding or LDPC encoding
frame_idThe monotonically increasing frame ID
symbol_idxThe index of the symbol among uplink symbols for LDPC decoding, and among downlink symbols for LDPC encoding
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScheduleDownlinkProcessing()

void Agora::ScheduleDownlinkProcessing ( size_t  frame_id)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScheduleSubcarriers()

void Agora::ScheduleSubcarriers ( EventType  event_type,
size_t  frame_id,
size_t  symbol_id 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScheduleUsers()

void Agora::ScheduleUsers ( EventType  event_type,
size_t  frame_id,
size_t  symbol_id 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendSnrReport()

void Agora::SendSnrReport ( EventType  event_type,
size_t  frame_id,
size_t  symbol_id 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Start()

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

◆ Stop()

void Agora::Stop ( )

The main Agora event loop.

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

◆ UpdateRanConfig()

void Agora::UpdateRanConfig ( RanConfig  rc)
private

Update Agora's RAN config parameters.

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

◆ UpdateRxCounters()

void Agora::UpdateRxCounters ( size_t  frame_id,
size_t  symbol_id 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ agora_memory_

std::unique_ptr<AgoraBuffer> Agora::agora_memory_
private

◆ base_worker_core_offset_

const size_t Agora::base_worker_core_offset_
private

◆ beam_counters_

FrameCounters Agora::beam_counters_
private

◆ beam_last_frame_

size_t Agora::beam_last_frame_ = SIZE_MAX
private

◆ config_

Config* const Agora::config_
private

◆ decode_counters_

FrameCounters Agora::decode_counters_
private

◆ demul_counters_

FrameCounters Agora::demul_counters_
private

◆ enable_save_decode_data_to_file_

bool Agora::enable_save_decode_data_to_file_ = false

◆ enable_save_tx_data_to_file_

bool Agora::enable_save_tx_data_to_file_ = false

◆ encode_counters_

FrameCounters Agora::encode_counters_
private

◆ encode_cur_frame_for_symbol_

std::vector<size_t> Agora::encode_cur_frame_for_symbol_
private

◆ encode_deferral_

std::queue<size_t> Agora::encode_deferral_
private

◆ fft_created_count_

size_t Agora::fft_created_count_
private

◆ fft_cur_frame_for_symbol_

std::vector<size_t> Agora::fft_cur_frame_for_symbol_
private

◆ fft_queue_arr_

std::array<std::queue<fft_req_tag_t>, kFrameWnd> Agora::fft_queue_arr_
private

◆ flags_

struct { ... } Agora::flags_

◆ frame_tracking_

FrameInfo Agora::frame_tracking_ {0, 0}
private

◆ ifft_counters_

FrameCounters Agora::ifft_counters_
private

◆ ifft_cur_frame_for_symbol_

std::vector<size_t> Agora::ifft_cur_frame_for_symbol_
private

◆ ifft_next_symbol_

size_t Agora::ifft_next_symbol_ = 0
private

◆ mac_request_queue_

moodycamel::ConcurrentQueue<EventData> Agora::mac_request_queue_
private

◆ mac_response_queue_

moodycamel::ConcurrentQueue<EventData> Agora::mac_response_queue_
private

◆ mac_std_thread_

std::thread Agora::mac_std_thread_
private

◆ mac_thread_

std::unique_ptr<MacThreadBaseStation> Agora::mac_thread_
private

◆ mac_to_phy_counters_

FrameCounters Agora::mac_to_phy_counters_
private

◆ max_equaled_frame_

size_t Agora::max_equaled_frame_ = SIZE_MAX
private

◆ message_

std::unique_ptr<MessageInfo> Agora::message_
private

◆ message_queue_

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

◆ packet_tx_rx_

std::unique_ptr<PacketTxRx> Agora::packet_tx_rx_
private

◆ phy_stats_

std::unique_ptr<PhyStats> Agora::phy_stats_
private

◆ pilot_fft_counters_

FrameCounters Agora::pilot_fft_counters_
private

◆ precode_counters_

FrameCounters Agora::precode_counters_
private

◆ precode_cur_frame_for_symbol_

std::vector<size_t> Agora::precode_cur_frame_for_symbol_
private

◆ rc_counters_

FrameCounters Agora::rc_counters_
private

◆ rc_last_frame_

size_t Agora::rc_last_frame_ = SIZE_MAX
private

◆ recorder_

std::unique_ptr<Agora_recorder::RecorderThread> Agora::recorder_
private

◆ rx_counters_

RxCounters Agora::rx_counters_
private

◆ rx_ptoks_ptr_

moodycamel::ProducerToken* Agora::rx_ptoks_ptr_[kMaxThreads]
private

◆ schedule_process_flags_

uint8_t Agora::schedule_process_flags_
private

◆ stats_

std::unique_ptr<Stats> Agora::stats_
private

◆ tomac_counters_

FrameCounters Agora::tomac_counters_
private

◆ tx_counters_

FrameCounters Agora::tx_counters_
private

◆ tx_ptoks_ptr_

moodycamel::ProducerToken* Agora::tx_ptoks_ptr_[kMaxThreads]
private

◆ uplink_fft_counters_

FrameCounters Agora::uplink_fft_counters_
private

◆ worker_set_

std::unique_ptr<AgoraWorker> Agora::worker_set_
private

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