Class for recording Voyant frames to binary files with automatic splitting.
More...
#include <voyant_data_recorder.hpp>
Class for recording Voyant frames to binary files with automatic splitting.
◆ VoyantRecorder() [1/2]
Constructor that takes a configuration struct.
- Parameters
-
| config | The configuration settings for the recorder |
◆ ~VoyantRecorder()
| VoyantRecorder::~VoyantRecorder |
( |
| ) |
|
Destructor - automatically finalizes recording if needed.
◆ VoyantRecorder() [2/2]
◆ finalize()
| bool VoyantRecorder::finalize |
( |
| ) |
|
Finalizes the recording and closes all files.
- Returns
- true if successful, false otherwise
◆ getCurrentFilePath()
| std::string VoyantRecorder::getCurrentFilePath |
( |
| ) |
const |
Path of the file being written, with timestamp and split naming resolved.
Construction opens the first file, so this reads immediately — use it to name files that have to pair with the recording. After finalize() the last path stays readable. Empty if the recorder never opened a file.
◆ getLastError()
| std::string VoyantRecorder::getLastError |
( |
| ) |
const |
Why construction failed, or an empty string if it did not.
Construction opens the first output file, so an invalid recorder has a reason here: a path that is not .vynt, an existing file with overwrite false, a directory that cannot be written. Pair with isValid().
◆ getSplitCount()
| std::optional< size_t > VoyantRecorder::getSplitCount |
( |
| ) |
const |
Gets the number of files created.
- Returns
- File count — 1 before any split — or std::nullopt if the recorder is invalid. After finalize() the final count stays readable.
◆ getTotalFramesRecorded()
| std::optional< size_t > VoyantRecorder::getTotalFramesRecorded |
( |
| ) |
const |
Gets the total number of frames recorded.
- Returns
- Total frame count, or std::nullopt if recorder is invalid. After finalize() the final count stays readable.
◆ isValid()
| bool VoyantRecorder::isValid |
( |
| ) |
const |
Checks if the recorder is valid.
- Returns
- true if recorder is properly initialized
◆ operator=()
◆ recordFrame()
Records a frame to the current file.
Live, replayed, and edited (withPoints()) frames all record identically; a frame that carries no state is recorded as an honest stateless entry.
- Parameters
-
- Returns
- RecordResult indicating the outcome of the recording operation
◆ finalFrames_
| std::optional<size_t> VoyantRecorder::finalFrames_ |
|
private |
◆ finalized_
| bool VoyantRecorder::finalized_ |
|
private |
◆ finalPath_
| std::string VoyantRecorder::finalPath_ |
|
private |
◆ finalSplits_
| std::optional<size_t> VoyantRecorder::finalSplits_ |
|
private |
◆ lastErrorMsg_
| std::string VoyantRecorder::lastErrorMsg_ |
|
private |
◆ recorderHandle_
The documentation for this class was generated from the following file: