|
FERS 0.1.0
The Flexible Extensible Radar Simulator
|
The World class manages the simulator environment. More...
#include "world.h"
Public Member Functions | |
| World ()=default | |
| ~World () noexcept=default | |
| World (const World &)=delete | |
| World & | operator= (const World &)=delete |
| World (World &&)=delete | |
| World & | operator= (World &&)=delete |
| void | add (std::unique_ptr< radar::Platform > plat) noexcept |
| Adds a radar platform to the simulation world. | |
| void | add (std::unique_ptr< radar::Transmitter > trans) noexcept |
| Adds a radar transmitter to the simulation world. | |
| void | add (std::unique_ptr< radar::Receiver > recv) noexcept |
| Adds a radar receiver to the simulation world. | |
| void | add (std::unique_ptr< radar::Target > target) noexcept |
| Adds a radar target to the simulation world. | |
| void | add (std::unique_ptr< fers_signal::RadarSignal > waveform) |
| Adds a radar signal (waveform) to the simulation world. | |
| void | add (std::unique_ptr< antenna::Antenna > antenna) |
| Adds an antenna to the simulation world. | |
| void | add (std::unique_ptr< timing::PrototypeTiming > timing) |
| Adds a timing source to the simulation world. | |
| fers_signal::RadarSignal * | findWaveform (const SimId id) |
| Finds a radar signal by ID. | |
| antenna::Antenna * | findAntenna (const SimId id) |
| Finds an antenna by ID. | |
| timing::PrototypeTiming * | findTiming (const SimId id) |
| Finds a timing source by ID. | |
| radar::Platform * | findPlatform (const SimId id) |
| Finds a platform by ID. | |
| radar::Transmitter * | findTransmitter (const SimId id) |
| Finds a transmitter by ID. | |
| radar::Transmitter * | findTransmitterByName (const std::string &name) |
| Finds a transmitter by name. | |
| radar::Receiver * | findReceiver (const SimId id) |
| Finds a receiver by ID. | |
| fers_signal::RadarSignal * | findWaveformByName (const std::string &name) |
| Finds a waveform by name. | |
| RealType | earliestPhaseNoiseLookupStart () const |
| Finds the earliest simulation time that can require CW phase-noise samples. | |
| radar::Target * | findTarget (const SimId id) |
| Finds a target by ID. | |
| void | replace (std::unique_ptr< radar::Target > target) |
| Replaces an existing target, updating internal pointers. | |
| void | replace (std::unique_ptr< antenna::Antenna > antenna) |
| Replaces an existing antenna, updating internal pointers. | |
| void | replace (std::unique_ptr< fers_signal::RadarSignal > waveform) |
| Replaces an existing waveform, updating internal pointers. | |
| void | replace (std::unique_ptr< timing::PrototypeTiming > timing) |
| Replaces an existing timing prototype and refreshes dependent radar timing models. | |
| const std::vector< std::unique_ptr< radar::Platform > > & | getPlatforms () const noexcept |
| Retrieves the list of platforms. | |
| const std::vector< std::unique_ptr< radar::Target > > & | getTargets () const noexcept |
| Retrieves the list of radar targets. | |
| const std::vector< std::unique_ptr< radar::Receiver > > & | getReceivers () const noexcept |
| Retrieves the list of radar receivers. | |
| const std::vector< std::unique_ptr< radar::Transmitter > > & | getTransmitters () const noexcept |
| Retrieves the list of radar transmitters. | |
| const std::unordered_map< SimId, std::unique_ptr< fers_signal::RadarSignal > > & | getWaveforms () const noexcept |
| Retrieves the map of radar signals (waveforms). | |
| const std::unordered_map< SimId, std::unique_ptr< antenna::Antenna > > & | getAntennas () const noexcept |
| Retrieves the map of antennas. | |
| const std::unordered_map< SimId, std::unique_ptr< timing::PrototypeTiming > > & | getTimings () const noexcept |
| Retrieves the map of timing prototypes. | |
| void | clear () noexcept |
| Clears all objects and assets from the simulation world. | |
| void | swap (World &other) noexcept |
| Exchanges all owned world state with another world. | |
| void | scheduleInitialEvents () |
| Populates the event queue with the initial events for the simulation. | |
| void | resolveReceiverDechirpReferences () |
| Resolves and validates receiver FMCW dechirp references after all components are loaded. | |
| std::string | dumpEventQueue () const |
| Dumps the current state of the event queue to a string for debugging. | |
| std::priority_queue< Event, std::vector< Event >, EventComparator > & | getEventQueue () noexcept |
| Gets a mutable reference to the global event queue. | |
| SimulationState & | getSimulationState () noexcept |
| Gets a mutable reference to the global simulation state. | |
|
default |
|
defaultnoexcept |
|
delete |
| void core::World::add | ( | std::unique_ptr< antenna::Antenna > | antenna | ) |
Adds an antenna to the simulation world.
| antenna | A unique pointer to an Antenna object. |
| std::runtime_error | if an antenna with the same ID already exists. |
Definition at line 133 of file world.cpp.
References max.
| void core::World::add | ( | std::unique_ptr< fers_signal::RadarSignal > | waveform | ) |
Adds a radar signal (waveform) to the simulation world.
| waveform | A unique pointer to a RadarSignal object. |
| std::runtime_error | if a waveform with the same ID already exists. |
Definition at line 122 of file world.cpp.
References max.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
| void core::World::add | ( | std::unique_ptr< timing::PrototypeTiming > | timing | ) |
Adds a timing source to the simulation world.
| timing | A unique pointer to a PrototypeTiming object. |
| std::runtime_error | if a timing source with the same ID already exists. |
Definition at line 143 of file world.cpp.
References max.
|
noexcept |
Clears all objects and assets from the simulation world.
Definition at line 407 of file world.cpp.
Referenced by serial::parseSimulation(), and serial::parseSimulationFromString().
Here is the caller graph for this function:| std::string core::World::dumpEventQueue | ( | ) | const |
Dumps the current state of the event queue to a string for debugging.
Definition at line 618 of file world.cpp.
References max, and core::toString().
Here is the call graph for this function:| RealType core::World::earliestPhaseNoiseLookupStart | ( | ) | const |
Finds the earliest simulation time that can require CW phase-noise samples.
Includes active streaming transmitters and receivers. Pre-start transmitter periods that cross the simulation start are included so retarded emissions can sample transmitter phase noise before t_start.
Definition at line 209 of file world.cpp.
References radar::CW_MODE, params::endTime(), radar::FMCW_MODE, max, and params::startTime().
Referenced by core::projectSimulationMemory().
Here is the call graph for this function:
Here is the caller graph for this function:Finds an antenna by ID.
| id | The ID of the antenna to find. |
Definition at line 159 of file world.cpp.
References max.
Referenced by serial::update_monostatic_receiver_basics(), serial::update_receiver_antenna_from_json(), and serial::update_transmitter_antenna_from_json().
Here is the caller graph for this function:Finds a platform by ID.
| id | The ID of the platform to find. |
Definition at line 171 of file world.cpp.
References max.
Referenced by fers_update_platform_from_json().
Here is the caller graph for this function:Finds a receiver by ID.
| id | The ID of the receiver to find. |
Definition at line 195 of file world.cpp.
References max.
Referenced by fers_update_receiver_from_json().
Here is the caller graph for this function:Finds a target by ID.
| id | The ID of the target to find. |
Definition at line 273 of file world.cpp.
References max.
Referenced by fers_update_target_from_json().
Here is the caller graph for this function:| PrototypeTiming * core::World::findTiming | ( | const SimId | id | ) |
Finds a timing source by ID.
| id | The ID of the timing source to find. |
Definition at line 165 of file world.cpp.
References max.
Referenced by serial::update_monostatic_timing_from_json(), serial::update_receiver_timing_from_json(), serial::update_timing_from_json(), and serial::update_transmitter_timing_from_json().
Here is the caller graph for this function:| Transmitter * core::World::findTransmitter | ( | const SimId | id | ) |
Finds a transmitter by ID.
| id | The ID of the transmitter to find. |
Definition at line 181 of file world.cpp.
References max.
Referenced by fers_update_transmitter_from_json().
Here is the caller graph for this function:| Transmitter * core::World::findTransmitterByName | ( | const std::string & | name | ) |
Finds a transmitter by name.
| name | The transmitter name to find. |
Definition at line 189 of file world.cpp.
References max.
Referenced by resolveReceiverDechirpReferences().
Here is the caller graph for this function:| RadarSignal * core::World::findWaveform | ( | const SimId | id | ) |
Finds a radar signal by ID.
| id | The ID of the radar signal to find. |
Definition at line 153 of file world.cpp.
References max.
Referenced by findWaveformByName(), and serial::update_transmitter_waveform_from_json().
Here is the caller graph for this function:| RadarSignal * core::World::findWaveformByName | ( | const std::string & | name | ) |
Finds a waveform by name.
| name | The waveform name to find. |
Definition at line 203 of file world.cpp.
References findWaveform(), and max.
Referenced by resolveReceiverDechirpReferences().
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
Retrieves the map of antennas.
Definition at line 265 of file world.h.
Referenced by serial::world_to_json(), and serial::world_to_xml_string().
Here is the caller graph for this function:
|
noexcept |
Gets a mutable reference to the global event queue.
Definition at line 313 of file world.h.
Referenced by core::SimulationEngine::handleRxPulsedWindowEnd(), core::SimulationEngine::handleRxPulsedWindowStart(), core::SimulationEngine::handleTxPulsedStart(), and core::SimulationEngine::run().
Here is the caller graph for this function:
|
noexcept |
Retrieves the list of platforms.
Definition at line 216 of file world.h.
Referenced by serial::world_to_json(), and serial::world_to_xml_string().
Here is the caller graph for this function:
|
noexcept |
Retrieves the list of radar receivers.
Definition at line 236 of file world.h.
Referenced by simulation::calculatePreviewLinks(), core::collectCwPhaseNoiseTimings(), serial::kml_generator_utils::generateKmlToStream(), core::SimulationEngine::handleRxStreamingEnd(), core::SimulationEngine::handleRxStreamingStart(), core::SimulationEngine::handleTxPulsedStart(), core::logSimulationMemoryProjection(), core::projectSimulationMemory(), core::SimulationEngine::run(), serial::xml_serializer_utils::serializePlatform(), and core::SimulationEngine::SimulationEngine().
Here is the caller graph for this function:
|
noexcept |
Gets a mutable reference to the global simulation state.
Definition at line 322 of file world.h.
Referenced by core::SimulationEngine::handleRxStreamingEnd(), core::SimulationEngine::handleRxStreamingStart(), core::SimulationEngine::handleTxStreamingEnd(), core::SimulationEngine::handleTxStreamingStart(), core::SimulationEngine::processStreamingPhysics(), and core::SimulationEngine::run().
Here is the caller graph for this function:
|
noexcept |
Retrieves the list of radar targets.
Definition at line 226 of file world.h.
Referenced by serial::kml_generator_utils::generateKmlToStream(), core::SimulationEngine::handleTxPulsedStart(), and serial::xml_serializer_utils::serializePlatform().
Here is the caller graph for this function:
|
noexcept |
Retrieves the map of timing prototypes.
Definition at line 275 of file world.h.
Referenced by serial::world_to_json(), and serial::world_to_xml_string().
Here is the caller graph for this function:
|
noexcept |
Retrieves the list of radar transmitters.
Definition at line 246 of file world.h.
Referenced by simulation::calculatePreviewLinks(), core::collectCwPhaseNoiseTimings(), serial::kml_generator_utils::generateKmlToStream(), and serial::xml_serializer_utils::serializePlatform().
Here is the caller graph for this function:
|
noexcept |
Retrieves the map of radar signals (waveforms).
Definition at line 256 of file world.h.
Referenced by serial::world_to_json(), and serial::world_to_xml_string().
Here is the caller graph for this function:| void core::World::replace | ( | std::unique_ptr< antenna::Antenna > | antenna | ) |
| void core::World::replace | ( | std::unique_ptr< fers_signal::RadarSignal > | waveform | ) |
Replaces an existing waveform, updating internal pointers.
| waveform | Unique pointer to the new waveform. |
Definition at line 326 of file world.cpp.
References max.
| void core::World::replace | ( | std::unique_ptr< radar::Target > | target | ) |
Replaces an existing target, updating internal pointers.
| target | Unique pointer to the new target. |
Definition at line 281 of file world.cpp.
References max.
Referenced by serial::update_antenna_from_json(), serial::update_existing_antenna_pattern_fields(), serial::update_target_from_json(), and serial::update_timing_from_json().
Here is the caller graph for this function:| void core::World::replace | ( | std::unique_ptr< timing::PrototypeTiming > | timing | ) |
Replaces an existing timing prototype and refreshes dependent radar timing models.
| timing | Unique pointer to the new timing prototype. |
Definition at line 357 of file world.cpp.
References max.
| void core::World::resolveReceiverDechirpReferences | ( | ) |
Resolves and validates receiver FMCW dechirp references after all components are loaded.
| std::runtime_error | if a dechirped receiver has an invalid or inactive LO reference. |
Definition at line 552 of file world.cpp.
References findTransmitterByName(), findWaveformByName(), radar::FMCW_MODE, fers_signal::RadarSignal::getId(), fers_signal::RadarSignal::getName(), fers_signal::RadarSignal::isFmcwFamily(), and max.
Referenced by serial::update_monostatic_from_json(), and serial::update_receiver_from_json().
Here is the call graph for this function:
Here is the caller graph for this function:| void core::World::scheduleInitialEvents | ( | ) |
Populates the event queue with the initial events for the simulation.
This method should be called after all simulation objects have been parsed and added to the world.
Definition at line 439 of file world.cpp.
References params::endTime(), max, receiver, params::startTime(), and transmitter.
Here is the call graph for this function:Exchanges all owned world state with another world.
Definition at line 422 of file world.cpp.
References max.
Referenced by serial::json_to_world().
Here is the caller graph for this function: