Closed chaeyoung-lee closed 2 years ago
Major changes after @733c2b9 (Andrew's review)
AgoraBuffer
class that stores buffers shared among the manager and the workers. Most of its members are private and can be accessed through Get/Set functions.// agora.h
std::unique_ptr<AgoraBuffer> buffer_;
// agora.cc: construction of Agora manager class
Agora::Agora(Config* const cfg)
: buffer_(std::make_unique<AgoraBuffer>(cfg)), ... { ... }
// agora.cc: example of accessing buffer class members
const auto* pkt = reinterpret_cast<const MacPacketPacked*>(
&buffer_->GetDlBitsBuffer(ue_id)[radio_buf_id *
config_->MacBytesNumPerframe(Direction::kDownlink)]);
An exception is network buffers. Changing how PacketTxRx
class stores and loads data from the network buffers result in conflicts with the PhyUe
class in the client side. Therefore, as of now, we leave such network buffers as public members of the AgoraBuffer
class.
class AgoraBuffer {
public:
// TX RX Buffers
// Direct access is allowed for packetTXRX classes
Table<char> socket_buffer_;
char* dl_socket_buffer_;
Table<complex_float> calib_ul_buffer_;
Table<complex_float> calib_dl_buffer_;
This PR is mainly about separating the worker module from the monolithic Agora class.
Summary
worker.cc
,worker.h
agora_helper.h
Moving Forward