|
FERS 0.1.0
The Flexible Extensible Radar Simulator
|
Classes | |
| struct | ActiveStreamingSource |
| Cached description of an active streaming transmitter segment. More... | |
| struct | ByteProjection |
| Describes a projected byte count and whether it saturated during arithmetic. More... | |
| class | Config |
| Configuration structure for the application. More... | |
| struct | Event |
| Represents a single event in the simulation's time-ordered queue. More... | |
| struct | EventComparator |
| A custom comparator for the event priority queue. More... | |
| struct | FmcwChirpBoundaryTracker |
| Tracks the current FMCW chirp boundary for a streaming path. More... | |
| struct | FmcwMetadata |
| FMCW waveform metadata captured for a streaming output file. More... | |
| struct | FmcwSourceMetadata |
| Metadata for one FMCW illuminator represented in a streaming output file. More... | |
| struct | FmcwSourceSegmentMetadata |
| Metadata for one active FMCW transmitter schedule segment. More... | |
| struct | FmcwTriangleBoundaryTracker |
| Tracks the current FMCW triangle leg boundary for a streaming path. More... | |
| struct | OutputConfig |
| struct | OutputFileMetadata |
| Metadata for one receiver output file. More... | |
| struct | OutputMetadata |
| Metadata summary for the full simulation output set. More... | |
| class | OutputMetadataCollector |
| Thread-safe collector for simulation output metadata. More... | |
| struct | OutputStats |
| class | ProgressReporter |
| A thread-safe wrapper for the simulation progress callback. More... | |
| struct | PulseChunkMetadata |
| Metadata for one pulsed output chunk written to HDF5. More... | |
| struct | ReceiverOutputPacketTrace |
| class | ReceiverOutputSink |
| struct | ReceiverSampleBlock |
| struct | ReceiverStreamDescriptor |
| struct | ReceiverStreamStats |
| struct | ReceiverTrackerCache |
| Per-receiver FMCW tracker state for direct and reflected streaming paths. More... | |
| struct | RenderingJob |
| A data packet containing all information needed to process one receive window. More... | |
| class | SimulationEngine |
| Encapsulates the state and logic of the event-driven simulation loop. More... | |
| struct | SimulationMemoryProjection |
| Captures startup memory and rendered-output projections for a simulation. More... | |
| struct | SimulationState |
| Holds the dynamic global state of the simulation. More... | |
| struct | StreamingSegmentMetadata |
| Metadata for one contiguous streaming output segment. More... | |
| struct | StreamingWaveformTracker |
| Tracks the current streaming waveform boundary for a path. More... | |
| struct | Vita49OutputConfig |
| struct | Vita49OutputMetadata |
| Metadata for the VITA 49.2 UDP output backend. More... | |
| struct | Vita49StreamMetadata |
| Metadata for one VITA 49.2 receiver stream. More... | |
| struct | Vita49Timestamp |
| class | World |
| The World class manages the simulator environment. More... | |
Typedefs | |
| using | ReceiverOutputTelemetryCallback = std::function< void(const std::optional< OutputStats > &, std::span< const ReceiverOutputPacketTrace >)> |
Enumerations | |
| enum class | OutputMode : std::uint8_t { Hdf5 , Vita49Udp } |
| enum class | EventType : std::uint8_t { TX_PULSED_START , RX_PULSED_WINDOW_START , RX_PULSED_WINDOW_END , TX_STREAMING_START , TX_STREAMING_END , RX_STREAMING_START , RX_STREAMING_END } |
| Enumerates the types of events that can occur in the simulation. More... | |
| enum class | StreamingWaveformKind : std::uint8_t { Cw , FmcwLinear , FmcwTriangle } |
| Streaming waveform shape cached for a currently active source. More... | |
Functions | |
| std::vector< std::shared_ptr< timing::Timing > > | collectCwPhaseNoiseTimings (const World &world) |
| Collects unique timing sources used by CW/FMCW transmitters and receivers. | |
| void | addStreamingReceiverProjection (SimulationMemoryProjection &projection, const radar::Receiver &receiver, const bool sample_count_overflowed) |
| void | addPulsedReceiverProjection (SimulationMemoryProjection &projection, const radar::Receiver &receiver) |
| SimulationMemoryProjection | projectSimulationMemory (const World &world) |
| Projects startup memory and rendered-output sizes for a simulation world. | |
| std::string | formatByteSize (std::uint64_t bytes) |
| Formats a byte count using binary units. | |
| std::string | memoryProjectionToJsonString (const SimulationMemoryProjection &projection) |
| Serializes a simulation memory projection as JSON. | |
| void | logSimulationMemoryProjection (const World &world) |
| Logs the projected simulation memory footprint for the provided world. | |
| bool | isVita49Enabled (const OutputConfig &config) noexcept |
| std::string | outputFileMetadataToJsonString (const OutputFileMetadata &metadata) |
| Serializes one output-file metadata entry to JSON. | |
| std::string | outputMetadataToJsonString (const OutputMetadata &metadata) |
| Serializes a full simulation output metadata snapshot to JSON. | |
| Vita49OutputMetadata | vita49MetadataFromConfig (const Vita49OutputConfig &config) |
| Builds the static VITA metadata section from runtime output configuration. | |
| RealType | besselJ1 (const RealType x) noexcept |
| Computes the Bessel function of the first kind (order 1) for a given value. | |
| unsigned | countProcessors () noexcept |
| Detects the number of CPUs on the machine. | |
| std::string | toString (const EventType type) |
| Converts an EventType enum to its string representation. | |
| OutputMetadata | runEventDrivenSim (World *world, pool::ThreadPool &pool, const std::function< void(const std::string &, int, int)> &progress_callback, const std::string &output_dir, const OutputConfig &output_config=OutputConfig{}, std::function< bool()> cancel_callback=nullptr, bool *cancelled=nullptr, ReceiverOutputTelemetryCallback telemetry_callback=nullptr) |
| Runs the unified, event-driven radar simulation. | |
| ActiveStreamingSource | makeActiveSource (const radar::Transmitter *tx, RealType segment_start, RealType segment_end) |
| Builds an active-source cache from a streaming transmitter and segment bounds. | |
| ActiveStreamingSource | makeActiveSourceFromWaveform (const fers_signal::RadarSignal *signal, RealType segment_start, RealType segment_end) |
| Builds an active-source cache directly from a waveform for receiver-local LO references. | |
| std::optional< RealType > | firstFmcwChirpStart (const ActiveStreamingSource &source, RealType active_start, RealType active_end) |
| Returns the first FMCW chirp start inside the absolute interval, if one exists. | |
| std::uint64_t | countFmcwChirpStarts (const ActiveStreamingSource &source, RealType active_start, RealType active_end) |
| Counts FMCW chirps that start inside the absolute interval. | |
| std::optional< RealType > | firstFmcwTriangleStart (const ActiveStreamingSource &source, RealType active_start, RealType active_end) |
| Returns the first FMCW triangle start inside the absolute interval, if one exists. | |
| std::uint64_t | countFmcwTriangleStarts (const ActiveStreamingSource &source, RealType active_start, RealType active_end) |
| Counts FMCW triangles that start inside the absolute interval. | |
| void | showHelp (const char *programName) noexcept |
| Displays the help message. | |
| void | showVersion () noexcept |
| Displays the version information. | |
| std::expected< Config, std::string > | parseArguments (int argc, char *argv[]) noexcept |
| Parses command-line arguments. | |
| std::filesystem::path | resolveOutputDir (const std::string &script_file, const std::optional< std::string > &output_dir) noexcept |
| Resolves the final simulation output directory from CLI arguments. | |
| std::filesystem::path | resolveKmlOutputPath (const std::string &script_file, const std::filesystem::path &final_output_dir, const std::optional< std::string > &kml_file) noexcept |
| Resolves the KML output file path from CLI arguments and output directory. | |
| using core::ReceiverOutputTelemetryCallback = typedef std::function<void(const std::optional<OutputStats>&, std::span<const ReceiverOutputPacketTrace>)> |
Definition at line 173 of file receiver_output.h.
|
strong |
Enumerates the types of events that can occur in the simulation.
Definition at line 29 of file sim_events.h.
|
strong |
| Enumerator | |
|---|---|
| Hdf5 | |
| Vita49Udp | |
Definition at line 17 of file output_config.h.
|
strong |
Streaming waveform shape cached for a currently active source.
| Enumerator | |
|---|---|
| Cw | |
| FmcwLinear | |
| FmcwTriangle | |
Definition at line 32 of file simulation_state.h.
| void core::addPulsedReceiverProjection | ( | SimulationMemoryProjection & | projection, |
| const radar::Receiver & | receiver | ||
| ) |
Definition at line 365 of file memory_projection.cpp.
Referenced by projectSimulationMemory().
Here is the caller graph for this function:| void core::addStreamingReceiverProjection | ( | SimulationMemoryProjection & | projection, |
| const radar::Receiver & | receiver, | ||
| const bool | sample_count_overflowed | ||
| ) |
Definition at line 340 of file memory_projection.cpp.
Referenced by projectSimulationMemory().
Here is the caller graph for this function:Computes the Bessel function of the first kind (order 1) for a given value.
| x | The value for which the Bessel function is to be computed. |
Definition at line 28 of file portable_utils.h.
References max.
| std::vector< std::shared_ptr< timing::Timing > > core::collectCwPhaseNoiseTimings | ( | const World & | world | ) |
Collects unique timing sources used by CW/FMCW transmitters and receivers.
| world | The simulation world to inspect. |
Definition at line 309 of file memory_projection.cpp.
References core::World::getReceivers(), core::World::getTransmitters(), and max.
Referenced by projectSimulationMemory().
Here is the call graph for this function:
Here is the caller graph for this function:| std::uint64_t core::countFmcwChirpStarts | ( | const ActiveStreamingSource & | source, |
| const RealType | active_start, | ||
| const RealType | active_end | ||
| ) |
Counts FMCW chirps that start inside the absolute interval.
Definition at line 249 of file simulation_state.cpp.
References core::ActiveStreamingSource::chirp_count, core::ActiveStreamingSource::chirp_period, max, core::ActiveStreamingSource::segment_end, and core::ActiveStreamingSource::segment_start.
| std::uint64_t core::countFmcwTriangleStarts | ( | const ActiveStreamingSource & | source, |
| const RealType | active_start, | ||
| const RealType | active_end | ||
| ) |
Counts FMCW triangles that start inside the absolute interval.
Definition at line 281 of file simulation_state.cpp.
References max, core::ActiveStreamingSource::segment_end, core::ActiveStreamingSource::segment_start, core::ActiveStreamingSource::triangle_count, and core::ActiveStreamingSource::triangle_period.
|
noexcept |
Detects the number of CPUs on the machine.
Definition at line 42 of file portable_utils.h.
References logging::ERROR, LOG, and max.
| std::optional< RealType > core::firstFmcwChirpStart | ( | const ActiveStreamingSource & | source, |
| const RealType | active_start, | ||
| const RealType | active_end | ||
| ) |
Returns the first FMCW chirp start inside the absolute interval, if one exists.
Definition at line 238 of file simulation_state.cpp.
References core::ActiveStreamingSource::chirp_period, max, and core::ActiveStreamingSource::segment_start.
| std::optional< RealType > core::firstFmcwTriangleStart | ( | const ActiveStreamingSource & | source, |
| const RealType | active_start, | ||
| const RealType | active_end | ||
| ) |
Returns the first FMCW triangle start inside the absolute interval, if one exists.
Definition at line 270 of file simulation_state.cpp.
References max, core::ActiveStreamingSource::segment_start, and core::ActiveStreamingSource::triangle_period.
| std::string core::formatByteSize | ( | std::uint64_t | bytes | ) |
Formats a byte count using binary units.
| bytes | The byte count to format. |
512 B or 1.50 MiB. Definition at line 455 of file memory_projection.cpp.
References max.
Referenced by logSimulationMemoryProjection(), and memoryProjectionToJsonString().
Here is the caller graph for this function:
|
noexcept |
Definition at line 40 of file output_config.h.
References max, and Vita49Udp.
Referenced by runEventDrivenSim().
Here is the caller graph for this function:Logs the projected simulation memory footprint for the provided world.
| world | The simulation world to inspect and report. |
Definition at line 501 of file memory_projection.cpp.
References logging::DEBUG, formatByteSize(), core::World::getReceivers(), LOG, max, projectSimulationMemory(), receiver, and logging::WARNING.
Referenced by core::SimulationEngine::run().
Here is the call graph for this function:
Here is the caller graph for this function:| ActiveStreamingSource core::makeActiveSource | ( | const radar::Transmitter *const | tx, |
| const RealType | segment_start, | ||
| const RealType | segment_end | ||
| ) |
Builds an active-source cache from a streaming transmitter and segment bounds.
Definition at line 195 of file simulation_state.cpp.
References FmcwTriangle, LOG, max, core::ActiveStreamingSource::transmitter, and logging::WARNING.
| ActiveStreamingSource core::makeActiveSourceFromWaveform | ( | const fers_signal::RadarSignal *const | signal, |
| const RealType | segment_start, | ||
| const RealType | segment_end | ||
| ) |
Builds an active-source cache directly from a waveform for receiver-local LO references.
Definition at line 228 of file simulation_state.cpp.
References max, and core::ActiveStreamingSource::segment_start.
| std::string core::memoryProjectionToJsonString | ( | const SimulationMemoryProjection & | projection | ) |
Serializes a simulation memory projection as JSON.
| projection | The projection to serialize. |
Definition at line 472 of file memory_projection.cpp.
References formatByteSize(), and max.
Referenced by fers_get_memory_projection_json().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string core::outputFileMetadataToJsonString | ( | const OutputFileMetadata & | metadata | ) |
Serializes one output-file metadata entry to JSON.
Definition at line 360 of file output_metadata.cpp.
References max, and outputFileMetadataToJsonString().
Referenced by outputFileMetadataToJsonString().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string core::outputMetadataToJsonString | ( | const OutputMetadata & | metadata | ) |
Serializes a full simulation output metadata snapshot to JSON.
Definition at line 365 of file output_metadata.cpp.
References max, and outputMetadataToJsonString().
Referenced by FersContext::getLastOutputMetadataJson(), and outputMetadataToJsonString().
Here is the call graph for this function:
Here is the caller graph for this function:Parses command-line arguments.
Processes the command-line arguments, validating them and extracting configurations like script file, logging level, and thread count.
| argc | The argument count. |
| argv | The argument vector. |
Definition at line 425 of file arg_parser.cpp.
| SimulationMemoryProjection core::projectSimulationMemory | ( | const World & | world | ) |
Projects startup memory and rendered-output sizes for a simulation world.
| world | The simulation world to inspect. |
Definition at line 384 of file memory_projection.cpp.
References addPulsedReceiverProjection(), addStreamingReceiverProjection(), core::ByteProjection::bytes, collectCwPhaseNoiseTimings(), core::World::earliestPhaseNoiseLookupStart(), params::endTime(), core::World::getReceivers(), max, params::oversampleRatio(), params::rate(), receiver, and params::startTime().
Referenced by fers_get_memory_projection_json(), and logSimulationMemoryProjection().
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
Resolves the KML output file path from CLI arguments and output directory.
Definition at line 25 of file cli_paths.cpp.
|
noexcept |
Resolves the final simulation output directory from CLI arguments.
Definition at line 8 of file cli_paths.cpp.
| OutputMetadata core::runEventDrivenSim | ( | World * | world, |
| pool::ThreadPool & | pool, | ||
| const std::function< void(const std::string &, int, int)> & | progress_callback, | ||
| const std::string & | output_dir, | ||
| const OutputConfig & | output_config = OutputConfig{}, |
||
| std::function< bool()> | cancel_callback = nullptr, |
||
| bool * | cancelled = nullptr, |
||
| ReceiverOutputTelemetryCallback | telemetry_callback = nullptr |
||
| ) |
Runs the unified, event-driven radar simulation.
This function is the core entry point of the simulator. It advances time by processing events from a global priority queue. It handles both pulsed and continuous-wave (CW) physics, dispatching finalization tasks to worker threads for asynchronous processing.
| world | A pointer to the simulation world containing all entities and state. |
| pool | A reference to the thread pool for executing tasks. |
| progress_callback | An optional callback function for reporting progress. |
| output_dir | Output directory for the simulation files. |
Definition at line 2009 of file sim_threading.cpp.
References isVita49Enabled(), LOG, serial::makeHdf5OutputSink(), serial::vita49::makeVita49OutputSink(), max, params::params, and vita49MetadataFromConfig().
Here is the call graph for this function:Displays the help message.
| programName | The name of the program. |
Definition at line 400 of file arg_parser.cpp.
References fers_get_version().
Here is the call graph for this function:
|
noexcept |
Converts an EventType enum to its string representation.
| type | The event type. |
Definition at line 74 of file sim_events.h.
References RX_PULSED_WINDOW_END, RX_PULSED_WINDOW_START, RX_STREAMING_END, RX_STREAMING_START, TX_PULSED_START, TX_STREAMING_END, and TX_STREAMING_START.
Referenced by core::World::dumpEventQueue().
Here is the caller graph for this function:| Vita49OutputMetadata core::vita49MetadataFromConfig | ( | const Vita49OutputConfig & | config | ) |
Builds the static VITA metadata section from runtime output configuration.
Definition at line 367 of file output_metadata.cpp.
References core::Vita49OutputMetadata::endpoint_host, max, and vita49MetadataFromConfig().
Referenced by runEventDrivenSim(), and vita49MetadataFromConfig().
Here is the call graph for this function:
Here is the caller graph for this function: