|
WSF
|
#include <WsfSimulationExtension.hpp>


Public Member Functions | |
| WsfSimulationExtension () | |
| ~WsfSimulationExtension () override=default | |
| WsfSimulation & | GetSimulation () const |
| const WsfScenario & | GetScenario () const |
| Public Member Functions inherited from WsfExtension | |
| virtual | ~WsfExtension ()=default |
| const std::string & | GetExtensionName () const |
Friends | |
| class | WsfSimulation |
Notifications from the simulation. | |
These are called in the order they are listed. | |
| virtual void | AddedToSimulation () |
| virtual bool | Initialize () |
| virtual bool | PrepareExtension () |
| virtual bool | PlatformsInitialized () |
| virtual void | PendingStart () |
| virtual void | Start () |
| virtual void | Complete (double aSimTime) |
| static void | __private_SetSim (WsfSimulationExtension &aExtension, WsfSimulation *aSimPtr) |
Additional Inherited Members | |
| Protected Member Functions inherited from WsfExtension | |
| void | InitializeExtensionName (const std::string &aName) |
A base class for 'simulation extensions'.
An simulation extension is a object created and registered with an simulation object. The simulation object will notify registered simulation extensions when the simulation is initialized, started or completed.
An application extension may instantiate and register a derived version of this class, typically from within the derived class method WsfApplicationExtension::SimulationCreated(). A simulation extension is TYPICALLY necessary only if the application extension also registered an input extension as the simulation extension typically uses the data read by the input extension. There may be cases, however, where an input extension is created but the inputs are only used by instances of extension-created type objects. In this case a simulation extension MAY not be necessary. Your mileage may vary...
| WsfSimulationExtension::WsfSimulationExtension | ( | ) |
Referenced by __private_SetSim(), wsf::AirCombat::EventPipeInterface::Get(), wsf::cyber::SimulationExtension::Get(), wsf::p6dof::EventPipeInterface::Get(), wsf::six_dof::EventPipeInterface::Get(), wsf::space::EventPipeInterface::Get(), IADSC2SimulationExtension::IADSC2SimulationExtension(), wsf::six_dof::ObjectManager::ObjectManager(), engage::SimulationExtension::SimulationExtension(), WsfAccessReport::WsfAccessReport(), WsfBallisticMissileLaunchComputerSharedData::WsfBallisticMissileLaunchComputerSharedData(), WsfEclipseEventManager::WsfEclipseEventManager(), WsfEclipseReport::WsfEclipseReport(), WsfLOS_Manager::WsfLOS_Manager(), WsfP6DOF_ObjectManager::WsfP6DOF_ObjectManager(), WsfScriptObserver::WsfScriptObserver(), WsfSimulation, and XWsfOSM_Traffic::XWsfOSM_Traffic().
|
overridedefault |
|
inlinestatic |
References WsfSimulation, and WsfSimulationExtension().
|
virtual |
Called in response to WsfSimulation::RegisterExtension. The extension has now been registered in the simulation.
Reimplemented in engage::SimulationExtension, IADSC2SimulationExtension, wsf::AirCombat::EventPipeInterface, wsf::altloc::SimulationExtension, wsf::annotation::EventPipeInterface, wsf::cyber::SimulationExtension, wsf::p6dof::EventPipeInterface, wsf::simdis::Interface, wsf::six_dof::EventPipeInterface, wsf::six_dof::ObjectManager, wsf::space::EventPipeInterface, wsf::UCI_InterfaceExtension, WsfDisInterface, WsfEventPipeInterface, WsfL16::Interface, WsfMilInterface, WsfMTT_Interface, WsfP6DOF_ObjectManager, WsfScriptObserver, WsfWeaponServer, and XWsfOSM_Traffic.
|
virtual |
Called in response to a call to WsfSimulation::Complete. This method is used to release any resources (close files or sockets, delete objects, etc.) that were allocated by the Initialize/PrepareExtension methods or otherwise allocated during the execution of the simulation. No other events or observer callbacks will be dispatched after this is called.
| aSimTime | The final simulation time of the simulation. |
Reimplemented in wsf::coverage::SimulationExtension, wsf::six_dof::ObjectManager, and WsfP6DOF_ObjectManager.
Referenced by WsfSimulation::Complete().
| const WsfScenario & WsfSimulationExtension::GetScenario | ( | ) | const |
Returns the scenario in which this extension is registered.
Referenced by wsf::cyber::SimulationExtension::AddedToSimulation(), wsf::simdis::Interface::AddedToSimulation(), wsf::UCI_InterfaceExtension::AddedToSimulation(), WsfEventPipeInterface::AddedToSimulation(), WsfExtInterface::CreateExternalPlatform(), wsf::cyber::SimulationExtension::Initialize(), XWsfAirTraffic::Initialize(), XWsfOSM_Traffic::Initialize(), XWsfSeaTraffic::Vehicle::Initialize(), wsf::event::output::SimulationExtension::OpenFile(), wsf::comm::NetworkManager::PlatformsInitialized(), WsfWeaponServer::ProcessCommand(), WsfExtInterface::SelectPlatformType(), and WsfWeaponServer::WsfWeaponServer().
|
inline |
Returns the simulation to which this extension is registered.
References WsfSimulation.
Referenced by WsfDisInterface::ActivateConnection(), WsfMilDisInterface::AddedToDisInterface(), engage::SimulationExtension::AddedToSimulation(), IADSC2SimulationExtension::AddedToSimulation(), wsf::AirCombat::EventPipeInterface::AddedToSimulation(), wsf::altloc::SimulationExtension::AddedToSimulation(), wsf::annotation::EventPipeInterface::AddedToSimulation(), wsf::cyber::SimulationExtension::AddedToSimulation(), wsf::p6dof::EventPipeInterface::AddedToSimulation(), wsf::simdis::Interface::AddedToSimulation(), wsf::six_dof::EventPipeInterface::AddedToSimulation(), wsf::six_dof::ObjectManager::AddedToSimulation(), wsf::space::EventPipeInterface::AddedToSimulation(), WsfEventPipeInterface::AddedToSimulation(), WsfL16::Interface::AddedToSimulation(), WsfMilInterface::AddedToSimulation(), WsfMTT_Interface::AddedToSimulation(), WsfP6DOF_ObjectManager::AddedToSimulation(), WsfScriptObserver::AddedToSimulation(), XWsfOSM_Traffic::AddedToSimulation(), WsfScriptObserver::AddEvent(), WsfLaserDesignations::AddOrUpdate(), XWsfOSM_Traffic::AddScriptedConvoy(), XWsfOSM_Traffic::AddScriptedVehicle(), engage::SimulationExtension::AdvanceTime(), XWsfRoadTraffic::AdvanceTime(), WsfEventPipeInterface::Bookmark(), wsf::coverage::SimulationExtension::Complete(), MTT_PerceivedCluster::CopyFrom(), WsfZoneDefinition::Draw(), WsfEclipseEventManager::Enable(), WsfScriptObserver::EnableOrDisable(), WsfScriptObserver::EventEntry(), WsfScriptObserver::EventExit(), WsfEclipseReport::EclipseEvent::Execute(), WsfScriptObserver::ExecuteScriptList(), WsfScriptObserver::ExecuteScriptList(), WsfDisInterface::ExecuteSensorUpdateEvent(), wsf::altloc::SimulationExtension::GetDraw(), WsfDisUtil::GetSimTime(), WsfDisUtil::GetSimulation(), WsfRIPRJob::GetSimulation(), WsfWeaponServer::GetSimulation(), WsfLaserDesignations::Spot::GetTargetAdjustedLocationWCS(), WsfL16::Interface::GetWeaponTrackNumbers(), XWsfSeaTraffic::HandleDeparture(), XWsfSeaTraffic::HandleEnterLoiter(), WsfEventPipeInterface::HandleScheduledEntityStateRequest(), engage::SimulationExtension::Initialize(), wsf::coverage::SimulationExtension::Initialize(), wsf::cyber::SimulationExtension::Initialize(), WsfAccessReport::Initialize(), WsfBallisticMissileLaunchComputerSharedData::Initialize(), WsfEclipseEventManager::Initialize(), WsfEclipseReport::Initialize(), WsfL16::Interface::Initialize(), WsfLOS_Manager::Initialize(), XWsfAirTraffic::Initialize(), XWsfOSM_Traffic::Initialize(), XWsfRoadTraffic::Initialize(), XWsfSeaTraffic::SeaPort::Initialize(), WsfLOS_Manager::IsTargetVisible(), WsfLOS_Manager::IsTargetVisible(), WsfLOS_Manager::IsTargetVisible(), WsfMilInterface::KillPlatform(), WsfLOS_Manager::LOS_DataExists(), WsfLOS_Manager::LOS_DataExists(), WsfLOS_Manager::LOS_DataExists(), WsfLOS_Manager::MaskedByTerrain(), WsfLOS_Manager::MaskedByTerrain(), WsfLOS_Manager::MaskedByTerrain(), WsfLOS_Manager::MaskedByVegetation(), WsfLOS_Manager::MaskedByVegetation(), WsfLOS_Manager::MaskedByVegetation(), wsf::event::output::SimulationExtension::OpenFile(), wsf::coverage::SimulationExtension::PendingStart(), WsfLaserDesignations::PlatformDeleted(), WsfLOS_Manager::PlatformDeleted(), WsfDisInterface::PrepareExtension(), WsfExtInterface::PrepareExtension(), XWsfAirTraffic::ProcessEvent(), WsfEventPipeInterface::RecordBool(), WsfEventPipeInterface::RecordDouble(), WsfEventPipeInterface::RecordInt(), WsfEventPipeInterface::RecordString(), WsfMilScriptObserver::Register_script_observer(), WsfLaserDesignations::Remove(), XWsfOSM_Traffic::ScriptGoOffroad(), WsfEventPipeInterface::SendModeActive(), WsfLOS_Manager::SetLOS_Data(), WsfLOS_Manager::SetLOS_Data(), WsfLOS_Manager::SetStateData(), WsfLOS_Manager::SetStateData(), WsfDisInterface::SimulationPausing(), WsfLOS_Manager::StateDataExists(), WsfLOS_Manager::StateDataExists(), WsfLaserDesignations::UpdateCallbacks(), XWsfAirTraffic::UpdateFlightStatus(), WsfMilDisPlatform::UpdateJammerSystem(), WsfEventPipeInterface::UpdatePartArticulation(), XWsfOSM_Traffic::UpdateScriptedVehicleRoute(), WsfLOS_Manager::UpdateStateData(), WsfLaserDesignations::Spot::UpdateTo(), UT_DEFINE_SCRIPT_METHOD(), engage::SimulationExtension::WeaponFired(), and engage::SimulationExtension::WeaponTerminated().
|
virtual |
Called in response to WsfSimulation::Initialize. This is called to allow the extension to perform any initialization that is required.
Reimplemented in engage::SimulationExtension, wsf::comm::NetworkManager, wsf::coverage::SimulationExtension, wsf::cyber::SimulationExtension, wsf::six_dof::ObjectManager, WsfAccessReport, WsfBallisticMissileLaunchComputerSharedData, WsfDisInterface, WsfEclipseEventManager, WsfEclipseReport, WsfL16::Interface, WsfLaserDesignations, WsfLOS_Manager, WsfMTT_Interface, WsfP6DOF_ObjectManager, WsfScriptObserver, WsfWeaponServer, XWsfAirTraffic, XWsfOSM_Traffic, XWsfRoadTraffic, and XWsfSeaTraffic.
Referenced by WsfL16::Interface::Initialize(), and WsfSimulation::Initialize().
|
virtual |
Called in response to a call to WsfSimulation::Initialize complete and pending start state. PendingStart is typically called immediately after the simulation is initialized in the main event loop. The simulation is in its pending start state, although the extension may also add additional platforms. using WsfSimulation::AddPlatform.
Reimplemented in wsf::comm::NetworkManager, and wsf::coverage::SimulationExtension.
Referenced by WsfSimulation::Initialize().
|
virtual |
Called during WsfSimulation::Initialize, via WsfSimulation::AddInputPlatforms(), after all platforms have undergone Initialize() calls. This is called to allow any extension to perform processing that may be predicated on platforms being added to the simulation, with all platforms and components having undergone calls to Initialize(), but prior to calls to Initialize2() having been performed.
Reimplemented in wsf::comm::NetworkManager.
Referenced by WsfSimulation::AddInputPlatforms().
|
virtual |
Called in response to a call to WsfSimulation::Initialize and WsfSimulation::PrepareSimulation.
A simulation extension will typically implement either WsfSimulationExtension::Initialize or WsfSimulationExtension::PrepareExtension, or a combination of both. The main difference is that:
The primary criteria for deciding which method to use is to look at the extension and see if it uses any external resources such as files or sockets. If the extension uses external resources and wants to support snapshotting then it MUST use this this method so it can (re)establish connections to external resources (A snapshot cannot save the state of an open file or socket and so it must be reopened.)
Reimplemented in wsf::event::output::SimulationExtension, wsf::six_dof::ObjectManager, WsfDisInterface, WsfExtInterface, and WsfP6DOF_ObjectManager.
Referenced by WsfSimulation::Initialize(), and WsfSimulation::PrepareSimulation().
|
virtual |
Called in response to a call to WsfSimulation::Start. WsfSimulation::Start is typically called immediately before entry in the main event loop. The simulation is in its initial state, although the extension may also add additional platforms. using WsfSimulation::AddPlatform.
Reimplemented in wsf::annotation::EventPipeInterface, wsf::six_dof::ObjectManager, WsfP6DOF_ObjectManager, and WsfScriptObserver.
Referenced by WsfSimulation::Start().
|
friend |
References WsfSimulation, and WsfSimulationExtension().
Referenced by __private_SetSim(), engage::SimulationExtension::AddedToSimulation(), wsf::cyber::SimulationExtension::AddedToSimulation(), IADSC2SimulationExtension::Find(), wsf::comm::NetworkManager::Find(), wsf::EarthGravityModel::Find(), wsf::simdis::Interface::Find(), WsfCSV_EventOutput::Find(), WsfDisInterface::Find(), WsfDrawManager::Find(), WsfEventOutput::Find(), WsfEventPipeInterface::Find(), WsfExtInterface::Find(), WsfLOS_Manager::Find(), WsfMilInterface::Find(), WsfMilInterface::Find(), WsfMTT_Interface::Find(), WsfScriptObserver::Find(), WsfWeaponServer::Find(), XWsfOSM_Traffic::Find(), wsf::AirCombat::EventPipeInterface::Get(), wsf::altloc::SimulationExtension::Get(), wsf::annotation::EventPipeInterface::Get(), wsf::coverage::SimulationExtension::Get(), wsf::cyber::SimulationExtension::Get(), wsf::p6dof::EventPipeInterface::Get(), wsf::six_dof::EventPipeInterface::Get(), wsf::space::AtmosphereSimulationExtension::Get(), wsf::space::EventPipeInterface::Get(), wsf::UCI_InterfaceExtension::Get(), WsfConstellationManager::Get(), WsfDE_FileManager::Get(), WsfPromptObserver::Get(), WsfL16::Interface::GetControllerFromTrackNumber(), wsf::comm::NetworkManager::GetSimulation(), GetSimulation(), WsfWeaponServer::GetSimulation(), WsfWeaponServer::GetWeaponTrackNumbers(), WsfMilInterface::KillPlatform(), WsfLaserDesignations::Spot::LocalUpdate(), wsf::comm::NetworkManager::NetworkManager(), WsfLaserDesignations::Spot::operator=(), XWsfOSM_Traffic::operator=(), WsfDisInterface::PrepareExtension(), WsfAccessReport::SensorDetectionChangedHandler(), WsfLaserDesignations::Spot::SetDesignatedIndex(), WsfWeaponServer::SetSimulation(), WsfDisInterface::SimulationDestroyed(), WsfDisInterface::WsfDisInterface(), WsfScriptObserver::WsfScriptObserver(), WsfSimulation, WsfWeaponServer::WsfWeaponServer(), XWsfAirTraffic::XWsfAirTraffic(), XWsfSeaTraffic::XWsfSeaTraffic(), wsf::AirCombat::EventPipeInterface::~EventPipeInterface(), wsf::simdis::Interface::~Interface(), WsfConstellationManager::~WsfConstellationManager(), WsfDE_FileManager::~WsfDE_FileManager(), and WsfPromptObserver::~WsfPromptObserver().