FERS 0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
core::OutputMetadataCollector Class Reference

Thread-safe collector for simulation output metadata. More...

#include "output_metadata.h"

Public Member Functions

 OutputMetadataCollector (std::string output_dir)
 Constructs a metadata collector for the specified output directory.
 
void addFile (OutputFileMetadata file_metadata)
 Adds metadata for one generated output file.
 
OutputMetadata snapshot () const
 Returns a consistent snapshot of the collected metadata.
 

Detailed Description

Thread-safe collector for simulation output metadata.

Definition at line 189 of file output_metadata.h.

Constructor & Destructor Documentation

◆ OutputMetadataCollector()

core::OutputMetadataCollector::OutputMetadataCollector ( std::string  output_dir)
explicit

Constructs a metadata collector for the specified output directory.

Definition at line 338 of file output_metadata.cpp.

339 {
340 _metadata.output_directory = std::move(output_dir);
342 _metadata.start_time = params::startTime();
343 _metadata.end_time = params::endTime();
344 _metadata.sampling_rate = params::rate();
346 }
RealType endTime() noexcept
Get the end time for the simulation.
Definition parameters.h:109
RealType rate() noexcept
Get the rendering sample rate.
Definition parameters.h:121
RealType startTime() noexcept
Get the start time for the simulation.
Definition parameters.h:103
unsigned oversampleRatio() noexcept
Get the oversampling ratio.
Definition parameters.h:151
Parameters params
Global simulation parameter state.
Definition parameters.h:85
RealType sampling_rate
Output sampling rate in hertz.
RealType end_time
Simulation end time in seconds.
RealType start_time
Simulation start time in seconds.
unsigned oversample_ratio
Oversampling ratio used during rendering.
std::string output_directory
Directory containing generated output files.
std::string simulation_name
Simulation name from the loaded scenario.
std::string simulation_name
The name of the simulation, from the XML.
Definition parameters.h:74

References params::endTime(), params::oversampleRatio(), params::params, params::rate(), params::Parameters::simulation_name, and params::startTime().

+ Here is the call graph for this function:

Member Function Documentation

◆ addFile()

void core::OutputMetadataCollector::addFile ( OutputFileMetadata  file_metadata)

Adds metadata for one generated output file.

Definition at line 348 of file output_metadata.cpp.

349 {
350 std::scoped_lock const lock(_mutex);
351 _metadata.files.push_back(std::move(file_metadata));
352 }
math::Vec3 max
std::vector< OutputFileMetadata > files
Metadata for each generated output file.

References max.

◆ snapshot()

OutputMetadata core::OutputMetadataCollector::snapshot ( ) const

Returns a consistent snapshot of the collected metadata.

Definition at line 354 of file output_metadata.cpp.

355 {
356 std::scoped_lock const lock(_mutex);
357 return _metadata;
358 }

References max.


The documentation for this class was generated from the following files: