FERS 0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
fers_context Struct Reference
+ Inheritance diagram for fers_context:
+ Collaboration diagram for fers_context:

Public Member Functions

core::WorldgetWorld () const noexcept
 Retrieves a pointer to the simulation world.
 
std::mt19937 & getMasterSeeder () noexcept
 Retrieves a mutable reference to the master random number seeder.
 
void setOutputDir (std::string dir)
 Sets the output directory for simulation results.
 
const std::string & getOutputDir () const noexcept
 Gets the output directory for simulation results.
 
void setOutputConfig (core::OutputConfig config)
 Sets the runtime output configuration.
 
const core::OutputConfiggetOutputConfig () const noexcept
 Gets the runtime output configuration.
 
void setLastOutputMetadata (core::OutputMetadata metadata)
 Stores metadata from the most recent simulation run.
 
void clearLastOutputMetadata ()
 Clears any stored simulation output metadata.
 
std::string getLastOutputMetadataJson () const
 Serializes the last simulation output metadata as JSON.
 

Detailed Description

Definition at line 53 of file api.cpp.

Member Function Documentation

◆ clearLastOutputMetadata()

void FersContext::clearLastOutputMetadata ( )
inherited

Clears any stored simulation output metadata.

Definition at line 98 of file fers_context.h.

98{ _last_output_metadata = core::OutputMetadata{}; }
Metadata summary for the full simulation output set.

◆ getLastOutputMetadataJson()

std::string FersContext::getLastOutputMetadataJson ( ) const
inherited

Serializes the last simulation output metadata as JSON.

Returns
JSON representation of the last output metadata.

Definition at line 104 of file fers_context.h.

105 {
106 return core::outputMetadataToJsonString(_last_output_metadata);
107 }
std::string outputMetadataToJsonString(const OutputMetadata &metadata)
Serializes a full simulation output metadata snapshot to JSON.

References core::outputMetadataToJsonString().

Referenced by fers_get_last_output_metadata_json().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMasterSeeder()

std::mt19937 & FersContext::getMasterSeeder ( )
noexceptinherited

Retrieves a mutable reference to the master random number seeder.

A single master generator is used to seed all other random number generators within the simulation (e.g., for noise models, RCS fluctuations). This design is crucial for ensuring that a simulation can be made fully deterministic and reproducible by controlling a single seed value at the top level.

Returns
A reference to the std::mt19937 engine.

Definition at line 67 of file fers_context.h.

67{ return _master_seeder; }

◆ getOutputConfig()

const core::OutputConfig & FersContext::getOutputConfig ( ) const
noexceptinherited

Gets the runtime output configuration.

Definition at line 87 of file fers_context.h.

87{ return _output_config; }

◆ getOutputDir()

const std::string & FersContext::getOutputDir ( ) const
noexceptinherited

Gets the output directory for simulation results.

Definition at line 77 of file fers_context.h.

77{ return _output_dir; }

◆ getWorld()

core::World * FersContext::getWorld ( ) const
noexceptinherited

Retrieves a pointer to the simulation world.

This provides direct, mutable access to the in-memory representation of the scenario, allowing API functions to modify it.

Returns
A non-owning pointer to the core::World object.

Definition at line 55 of file fers_context.h.

55{ return _world.get(); }

Referenced by fers_update_platform_from_json(), fers_update_receiver_from_json(), fers_update_target_from_json(), and fers_update_transmitter_from_json().

+ Here is the caller graph for this function:

◆ setLastOutputMetadata()

void FersContext::setLastOutputMetadata ( core::OutputMetadata  metadata)
inherited

Stores metadata from the most recent simulation run.

Parameters
metadataThe metadata snapshot to store.

Definition at line 93 of file fers_context.h.

93{ _last_output_metadata = std::move(metadata); }

◆ setOutputConfig()

void FersContext::setOutputConfig ( core::OutputConfig  config)
inherited

Sets the runtime output configuration.

Definition at line 82 of file fers_context.h.

82{ _output_config = std::move(config); }
math::Vec3 max

◆ setOutputDir()

void FersContext::setOutputDir ( std::string  dir)
inherited

Sets the output directory for simulation results.

Definition at line 72 of file fers_context.h.

72{ _output_dir = std::move(dir); }

Referenced by fers_set_output_directory().

+ Here is the caller graph for this function:

The documentation for this struct was generated from the following file: