Agora
1.2.0
Agora project
|
Go to the documentation of this file.
9 #ifndef AGORA_RECORDER_THREAD_H_
10 #define AGORA_RECORDER_THREAD_H_
12 #include <condition_variable>
24 size_t queue_size,
size_t antenna_offset,
size_t num_antennas,
26 const std::vector<RecorderWorker::RecorderWorkerTypes> &types,
27 bool wait_signal =
true);
43 std::vector<std::unique_ptr<RecorderWorker>>
workers_;
Definition: recorder_thread.h:21
std::mutex sync_
Definition: recorder_thread.h:59
Definition: concurrentqueue.h:630
void DoRecording()
Definition: recorder_thread.cc:94
thread_id_t thread_id()
Definition: concurrentqueue.h:157
bool DispatchWork(const EventData &event)
Definition: recorder_thread.cc:73
void PinToCoreWithOffset(ThreadType thread_type, size_t core_offset, size_t thread_id, bool allow_reuse, bool verbose)
Definition: utils.cc:157
RecorderThread(const Config *in_cfg, size_t thread_id, int core, size_t queue_size, size_t antenna_offset, size_t num_antennas, size_t interval, Direction rx_direction, const std::vector< RecorderWorker::RecorderWorkerTypes > &types, bool wait_signal=true)
Definition: recorder_thread.cc:17
bool wait_signal_
Definition: recorder_thread.h:58
Direction
Definition: symbols.h:39
void Finalize()
Definition: recorder_thread.cc:63
Recorder worker interface factory.
void HandleEvent(const EventData &event)
Definition: recorder_thread.cc:141
std::array< size_t, kMaxTags > tags_
Definition: message.h:146
#define AGORA_LOG_ERROR(...)
Definition: logger.h:39
Definition: hdf5_lib.cc:17
#define AGORA_LOG_TRACE(...)
Definition: logger.h:92
Definition: message.h:227
EventType event_type_
Definition: message.h:144
~RecorderThread()
Definition: recorder_thread.cc:41
Definition: message.h:142
bool running_
Definition: recorder_thread.h:61
size_t id_
Definition: recorder_thread.h:46
Self defined functions for message storage and passing.
bool enqueue(T const &item)
Definition: concurrentqueue.h:974
std::vector< std::unique_ptr< RecorderWorker > > workers_
Definition: recorder_thread.h:43
Plot Rx waveform for u
Definition: inspect_single_frame.m:108
int core_alloc_
Definition: recorder_thread.h:50
moodycamel::ConcurrentQueue< EventData > event_queue_
Definition: recorder_thread.h:41
std::thread thread_
Definition: recorder_thread.h:44
#define AGORA_LOG_INFO(...)
Definition: logger.h:62
#define AGORA_LOG_WARN(...)
Definition: logger.h:53
void Start()
Definition: recorder_thread.cc:45
void Stop()
Definition: recorder_thread.cc:57
bool try_dequeue(U &item)
Definition: concurrentqueue.h:1104
Definition: concurrentqueue.h:695
bool try_enqueue(T const &item)
Definition: concurrentqueue.h:1039
std::condition_variable condition_
Definition: recorder_thread.h:60
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
void Free()
Definition: message.h:216
moodycamel::ProducerToken producer_token_
Definition: recorder_thread.h:42
RxPacket * rx_packet_
Definition: message.h:228