Agora  1.2.0
Agora project
agora_worker.h
Go to the documentation of this file.
1 
6 #ifndef AGORA_WORKER_H_
7 #define AGORA_WORKER_H_
8 
9 #include <memory>
10 #include <thread>
11 #include <vector>
12 
13 #include "agora_buffer.h"
14 #include "config.h"
15 #include "csv_logger.h"
16 #include "mat_logger.h"
17 #include "phy_stats.h"
18 #include "stats.h"
19 
20 class AgoraWorker {
21  public:
22  explicit AgoraWorker(Config* cfg, Stats* stats, PhyStats* phy_stats,
23  MessageInfo* message, AgoraBuffer* buffer,
24  FrameInfo* frame);
25  ~AgoraWorker();
26 
27  private:
28  void WorkerThread(int tid);
29  void CreateThreads();
30 
32 
33  Config* const config_;
34  std::vector<std::thread> workers_;
35 
41 };
42 
43 #endif // AGORA_WORKER_H_
AgoraWorker::config_
Config *const config_
Definition: agora_worker.h:33
PhyStats
Definition: phy_stats.h:15
Config::Running
void Running(bool value)
Definition: config.h:33
AgoraWorker::stats_
Stats * stats_
Definition: agora_worker.h:36
AgoraBuffer::GetEqual
Table< complex_float > & GetEqual()
Definition: agora_buffer.h:44
PinToCoreWithOffset
void PinToCoreWithOffset(ThreadType thread_type, size_t core_offset, size_t thread_id, bool allow_reuse, bool verbose)
Definition: utils.cc:157
agora_buffer.h
Defination file for the AgoraBuffer class.
AgoraBuffer::GetCalibDlMsum
Table< complex_float > & GetCalibDlMsum()
Definition: agora_buffer.h:52
EventType::kDecode
@ kDecode
AgoraWorker::buffer_
AgoraBuffer * buffer_
Definition: agora_worker.h:39
doifft.h
Declaration file for the DoIFFT class.
AgoraWorker::WorkerThread
void WorkerThread(int tid)
Definition: agora_worker.cc:49
Stats
Definition: stats.h:63
concurrent_queue_wrapper.h
kFrameWnd
static constexpr size_t kFrameWnd
Definition: symbols.h:18
MessageInfo::GetWorkerPtok
moodycamel::ProducerToken * GetWorkerPtok(size_t qid, size_t worker_id)
Definition: agora_buffer.h:120
csv_logger.h
Declaration file for the CsvLogger class which records runtime physical-layer performance into csv fi...
AgoraWorker::phy_stats_
PhyStats * phy_stats_
Definition: agora_worker.h:37
AgoraBuffer::GetDecod
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > & GetDecod()
Definition: agora_buffer.h:40
MessageInfo::GetConq
moodycamel::ConcurrentQueue< EventData > * GetConq(EventType event_type, size_t qid)
Definition: agora_buffer.h:109
AgoraBuffer::GetUlBeamMatrix
PtrGrid< kFrameWnd, kMaxDataSCs, complex_float > & GetUlBeamMatrix()
Definition: agora_buffer.h:31
AgoraBuffer::GetIfft
Table< complex_float > & GetIfft()
Definition: agora_buffer.h:48
AgoraWorker::workers_
std::vector< std::thread > workers_
Definition: agora_worker.h:34
AgoraWorker::CreateThreads
void CreateThreads()
Definition: agora_worker.cc:41
Config::Frame
const FrameStats & Frame() const
Definition: config.h:340
ThreadType::kWorker
@ kWorker
AgoraBuffer::GetDemod
PtrCube< kFrameWnd, kMaxSymbols, kMaxUEs, int8_t > & GetDemod()
Definition: agora_buffer.h:37
AgoraBuffer::GetDlModBits
Table< int8_t > & GetDlModBits()
Definition: agora_buffer.h:55
EventType::kBeam
@ kBeam
AgoraWorker
Definition: agora_worker.h:20
mat_logger.h
Declaration file for the MatLogger class which records runtime zero-forcing matrices into csv files....
doprecode.h
Declaration file for the DoPrecode class.
stats.h
Declaration file for the Stats class. Includes definations for DurationStat and FrameSummery types.
AgoraBuffer::GetDlBits
Table< int8_t > & GetDlBits()
Definition: agora_buffer.h:56
AgoraWorker::frame_
FrameInfo * frame_
Definition: agora_worker.h:40
kEnableMac
static constexpr bool kEnableMac
Definition: symbols.h:150
dofft.h
Declaration file for the DoFFT class.
EventType::kFFT
@ kFFT
doencode.h
Declaration file for the Docoding class. Includes the DoEncode and DoDecode classes.
AgoraBuffer::GetFft
Table< complex_float > & GetFft()
Definition: agora_buffer.h:43
dodemul.h
Declaration file for the DoDemul class.
i
for i
Definition: generate_data.m:107
MessageInfo::GetCompQueue
moodycamel::ConcurrentQueue< EventData > & GetCompQueue(size_t qid)
Definition: agora_buffer.h:116
AgoraWorker::AgoraWorker
AgoraWorker(Config *cfg, Stats *stats, PhyStats *phy_stats, MessageInfo *message, AgoraBuffer *buffer, FrameInfo *frame)
Definition: agora_worker.cc:19
FrameInfo
Definition: agora_buffer.h:172
AgoraBuffer::GetUeSpecPilot
Table< complex_float > & GetUeSpecPilot()
Definition: agora_buffer.h:45
dodecode.h
Declaration file for the DoDecode class.
Direction::kDownlink
@ kDownlink
EventType::kDemul
@ kDemul
EventType::kPrecode
@ kPrecode
AgoraWorker::~AgoraWorker
~AgoraWorker()
Definition: agora_worker.cc:32
FrameStats::NumDLSyms
size_t NumDLSyms() const
Definition: framestats.cc:83
AgoraBuffer::GetCalibUlMsum
Table< complex_float > & GetCalibUlMsum()
Definition: agora_buffer.h:49
Config::WorkerThreadNum
size_t WorkerThreadNum() const
Definition: config.h:181
FrameStats::NumULSyms
size_t NumULSyms() const
Definition: framestats.cc:85
AGORA_LOG_SYMBOL
#define AGORA_LOG_SYMBOL(...)
Definition: logger.h:82
Config::DlBits
Table< int8_t > & DlBits()
Definition: config.h:384
AgoraBuffer::GetCalibDl
Table< complex_float > & GetCalibDl()
Definition: agora_buffer.h:63
EventType::kEncode
@ kEncode
Config
Definition: config.h:26
AgoraWorker::message_
MessageInfo * message_
Definition: agora_worker.h:38
AgoraBuffer::GetDlBeamMatrix
PtrGrid< kFrameWnd, kMaxDataSCs, complex_float > & GetDlBeamMatrix()
Definition: agora_buffer.h:34
dobeamweights.h
Declaration file for the DoBeamWeights class. Zero forcing for one subcarrier.
AgoraBuffer::GetCsi
PtrGrid< kFrameWnd, kMaxUEs, complex_float > & GetCsi()
Definition: agora_buffer.h:28
AgoraBuffer
Definition: agora_buffer.h:20
config.h
Declaration file for the configuration class which importants json configuration values into class va...
EventType::kIFFT
@ kIFFT
FrameInfo::cur_sche_frame_id_
size_t cur_sche_frame_id_
Definition: agora_buffer.h:173
agora_worker.h
Declaration file for the main Agora worker class.
AgoraWorker::base_worker_core_offset_
const size_t base_worker_core_offset_
Definition: agora_worker.h:31
MessageInfo
Definition: agora_buffer.h:100
phy_stats.h
Declaration file for the PhyStats class.
AgoraBuffer::GetDlSocket
char * GetDlSocket()
Definition: agora_buffer.h:61
AgoraBuffer::GetCalibUl
Table< complex_float > & GetCalibUl()
Definition: agora_buffer.h:62
FrameInfo::cur_proc_frame_id_
size_t cur_proc_frame_id_
Definition: agora_buffer.h:174