Agora  1.2.0
Agora project
recorder_worker.h
Go to the documentation of this file.
1 
5 #ifndef AGORA_RECORDER_WORKER_H_
6 #define AGORA_RECORDER_WORKER_H_
7 
8 #include <memory>
9 
10 #include "config.h"
11 #include "message.h"
12 #include "symbols.h"
13 
14 namespace Agora_recorder {
15 
16 static const std::string kOutputFilePath = "files/experiment/";
17 
19  public:
21  RecorderWorker([[maybe_unused]] const Config* in_cfg,
22  [[maybe_unused]] size_t antenna_offset,
23  [[maybe_unused]] size_t num_antennas,
24  [[maybe_unused]] size_t record_interval,
25  [[maybe_unused]] Direction rx_direction) {}
26  virtual ~RecorderWorker() = default;
27 
28  virtual void Init() = 0;
29  virtual int Record(const Packet* pkg) = 0;
30  virtual void Finalize() = 0;
31 
32  virtual size_t NumAntennas() const { return 0; }
33  virtual size_t AntennaOffset() const { return 0; }
34 
36  static std::unique_ptr<RecorderWorker> Create(
37  RecorderWorkerTypes type, const Config* in_cfg, size_t antenna_offset,
38  size_t num_antennas, size_t record_interval, Direction rx_direction);
39 };
40 }; /* End namespace Agora_recorder */
41 
42 #endif /* AGORA_RECORDER_WORKER_H_ */
Agora_recorder::RecorderWorker::NumAntennas
virtual size_t NumAntennas() const
Definition: recorder_worker.h:32
Agora_recorder::RecorderWorker
Definition: recorder_worker.h:18
Direction
Direction
Definition: symbols.h:39
recorder_worker.h
Recorder worker interface factory.
Agora_recorder
Definition: hdf5_lib.cc:17
recorder_worker_multifile.h
Recorder worker to write to multiple bin files per rx symbol.
Agora_recorder::RecorderWorker::RecorderWorkerTypes
RecorderWorkerTypes
Definition: recorder_worker.h:20
message.h
Self defined functions for message storage and passing.
Agora_recorder::RecorderWorker::Record
virtual int Record(const Packet *pkg)=0
Agora_recorder::RecorderWorker::Finalize
virtual void Finalize()=0
Agora_recorder::RecorderWorker::Init
virtual void Init()=0
Agora_recorder::RecorderWorker::~RecorderWorker
virtual ~RecorderWorker()=default
Packet
Definition: message.h:164
Agora_recorder::RecorderWorker::RecorderWorker
RecorderWorker([[maybe_unused]] const Config *in_cfg, [[maybe_unused]] size_t antenna_offset, [[maybe_unused]] size_t num_antennas, [[maybe_unused]] size_t record_interval, [[maybe_unused]] Direction rx_direction)
Definition: recorder_worker.h:21
symbols.h
Agora_recorder::kOutputFilePath
static const std::string kOutputFilePath
Definition: recorder_worker.h:16
Agora_recorder::RecorderWorker::AntennaOffset
virtual size_t AntennaOffset() const
Definition: recorder_worker.h:33
Config
Definition: config.h:26
Agora_recorder::RecorderWorker::kRecorderWorkerMultiFile
@ kRecorderWorkerMultiFile
Definition: recorder_worker.h:20
Agora_recorder::RecorderWorker::kRecorderWorkerHdf5
@ kRecorderWorkerHdf5
Definition: recorder_worker.h:20
config.h
Declaration file for the configuration class which importants json configuration values into class va...
recorder_worker_hdf5.h
Agora_recorder::RecorderWorker::Create
static std::unique_ptr< RecorderWorker > Create(RecorderWorkerTypes type, const Config *in_cfg, size_t antenna_offset, size_t num_antennas, size_t record_interval, Direction rx_direction)
Factory function to make concrete worker.
Definition: recorder_worker.cc:14
fmt::v8::detail::type
type
Definition: core.h:1131