![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Asynchronous CSV dumper. Writes entries to CSV file from background thread. Recommended to be used from a single thread. More...
#include <roc_core/csv_dumper.h>

Public Member Functions | |
| CsvDumper (const char *path, const CsvConfig &config, IArena &arena) | |
Open file. path - output file. max_interval - maximum number of writes per second for each entry type. | |
| ~CsvDumper () | |
| Close file. | |
| bool | is_valid () const |
| Check if opened without errors. | |
| bool | would_write (char type) |
| Check whether write() would enqueue or drop entry. Lock-free operation. | |
| void | write (const CsvEntry &entry) |
| Enqueue entry for writing. Makes a copy of entry and pushes it to a lock-free ring buffer. If buffer size limit or rate limit is exceeded, entry is dropped. Lock-free operation. | |
| void | stop () |
| Stop background thread. | |
Public Member Functions inherited from roc::core::Thread | |
| bool | is_joinable () const |
| Check if thread was started and can be joined. | |
| bool | start () |
| Start thread. | |
| void | join () |
| Join thread. | |
Additional Inherited Members | |
Static Public Member Functions inherited from roc::core::Thread | |
| static uint64_t | get_pid () |
| Get numeric identifier of current process. | |
| static uint64_t | get_tid () |
| Get numeric identifier of current thread. | |
| static bool | enable_realtime () |
| Raise current thread priority to realtime. | |
Asynchronous CSV dumper. Writes entries to CSV file from background thread. Recommended to be used from a single thread.
Definition at line 64 of file csv_dumper.h.
Open file. path - output file. max_interval - maximum number of writes per second for each entry type.
| roc::core::CsvDumper::~CsvDumper | ( | ) |
Close file.
| bool roc::core::CsvDumper::is_valid | ( | ) | const |
Check if opened without errors.
| void roc::core::CsvDumper::stop | ( | ) |
Stop background thread.
| bool roc::core::CsvDumper::would_write | ( | char | type | ) |
Check whether write() would enqueue or drop entry. Lock-free operation.
Enqueue entry for writing. Makes a copy of entry and pushes it to a lock-free ring buffer. If buffer size limit or rate limit is exceeded, entry is dropped. Lock-free operation.