|
FERS 1.0.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::Receiver * | findReceiver (const SimId id) |
| Finds a receiver by ID. | |
| 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 | scheduleInitialEvents () |
| Populates the event queue with the initial events for the simulation. | |
| 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 |
|
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 56 of file world.cpp.
| 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 46 of file world.cpp.
|
noexcept |
Adds a radar platform to the simulation world.
| plat | A unique pointer to a Platform object. |
Definition at line 38 of file world.cpp.
Referenced by serial::xml_parser_utils::parseAntenna(), serial::xml_parser_utils::parsePlatform(), serial::xml_parser_utils::parseReceiver(), serial::xml_parser_utils::parseTarget(), serial::xml_parser_utils::parseTiming(), serial::xml_parser_utils::parseTransmitter(), and serial::xml_parser_utils::parseWaveform().
Here is the caller graph for this function:
|
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 66 of file world.cpp.
|
noexcept |
Clears all objects and assets from the simulation world.
Definition at line 243 of file world.cpp.
Referenced by serial::json_to_world(), 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 338 of file world.cpp.
References core::toString().
Referenced by serial::xml_parser_utils::processParsedDocument().
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 82 of file world.cpp.
Referenced by serial::xml_parser_utils::parseReceiver(), serial::xml_parser_utils::parseTransmitter(), serial::update_monostatic_from_json(), serial::update_receiver_from_json(), and serial::update_transmitter_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 94 of file world.cpp.
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 112 of file world.cpp.
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 120 of file world.cpp.
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 88 of file world.cpp.
Referenced by serial::xml_parser_utils::parseReceiver(), serial::xml_parser_utils::parseTransmitter(), serial::update_monostatic_from_json(), serial::update_receiver_from_json(), serial::update_timing_from_json(), and serial::update_transmitter_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 104 of file world.cpp.
Referenced by fers_update_transmitter_from_json().
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 76 of file world.cpp.
Referenced by serial::xml_parser_utils::parseTransmitter(), and serial::update_transmitter_from_json().
Here is the caller graph for this function:
|
noexcept |
Retrieves the map of antennas.
Definition at line 239 of file world.h.
Referenced by serial::xml_parser_utils::processParsedDocument(), 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 275 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 190 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 210 of file world.h.
Referenced by simulation::calculatePreviewLinks(), serial::kml_generator_utils::generateKmlToStream(), core::SimulationEngine::handleTxPulsedStart(), serial::json_to_world(), serial::xml_parser_utils::parseReceiver(), core::SimulationEngine::processCwPhysics(), serial::xml_parser_utils::processParsedDocument(), and serial::xml_serializer_utils::serializePlatform().
Here is the caller graph for this function:
|
noexcept |
Gets a mutable reference to the global simulation state.
Definition at line 284 of file world.h.
Referenced by core::SimulationEngine::handleRxPulsedWindowEnd(), core::SimulationEngine::handleTxCwEnd(), core::SimulationEngine::handleTxCwStart(), core::SimulationEngine::processCwPhysics(), and core::SimulationEngine::run().
Here is the caller graph for this function:
|
noexcept |
Retrieves the list of radar targets.
Definition at line 200 of file world.h.
Referenced by core::SimulationEngine::calculateCwSample(), simulation::calculatePreviewLinks(), 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 249 of file world.h.
Referenced by serial::xml_parser_utils::processParsedDocument(), 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 220 of file world.h.
Referenced by simulation::calculatePreviewLinks(), serial::kml_generator_utils::generateKmlToStream(), serial::xml_parser_utils::parseTransmitter(), 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 230 of file world.h.
Referenced by serial::xml_parser_utils::processParsedDocument(), 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 | ) |
Replaces an existing antenna, updating internal pointers.
| antenna | Unique pointer to the new antenna. |
Definition at line 142 of file world.cpp.
| 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 173 of file world.cpp.
| 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 128 of file world.cpp.
References radar::Target::getId().
Referenced by serial::update_antenna_from_json(), serial::update_target_from_json(), and serial::update_timing_from_json().
Here is the call graph for this function:
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 200 of file world.cpp.
References timing::PrototypeTiming::getId(), and timing::PrototypeTiming::getName().
Here is the call 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 256 of file world.cpp.
References params::endTime(), radar::PULSED_MODE, core::RX_CW_END, core::RX_CW_START, core::RX_PULSED_WINDOW_START, params::startTime(), core::TX_CW_END, core::TX_CW_START, and core::TX_PULSED_START.
Referenced by serial::json_to_world(), and serial::xml_parser_utils::processParsedDocument().
Here is the call graph for this function:
Here is the caller graph for this function: