|
WSF
|
The main controller for a simulation. More...
#include <WsfSimulation.hpp>


Classes | |
| class | InitializeError |
| An exception that is thrown when Initialize() fails. More... | |
| class | StartError |
| An exception that is thrown when Start() fails. More... | |
| class | CreateError |
| class | AddPlatformEvent |
| An internal event scheduled to add a platform at the specified time. More... | |
Public Types | |
| enum | State { cPENDING_INITIALIZE , cINITIALIZING , cPENDING_START , cSTARTING , cACTIVE , cPENDING_COMPLETE , cCOMPLETE } |
| An enumerated type specifying the state of the simulation. More... | |
| enum | CompletionReason { cNONE , cEND_TIME_REACHED , cRESET , cTERMINATE , cOTHER } |
| An enumerated type specifying the reason for completion of the simulation. More... | |
Public Member Functions | |
| WsfSimulation (const WsfScenario &aScenario, unsigned int aRunNumber) | |
| virtual | ~WsfSimulation () |
| WsfSimulation (const WsfSimulation &aSrc)=delete | |
| WsfSimulation & | operator= (const WsfSimulation &aRhs)=delete |
| const WsfScenario & | GetScenario () const |
| WsfApplication & | GetApplication () const |
AddInputPlatforms | |
Non-public method for adding platforms as part of the standard simulation initialization routine. During runtime, platforms are added individually using the AddPlatform methods that are publicly available as part of the WsfSimulation interface. | |
| WsfEM_Manager | mEM_Manager |
| EM manager. | |
| WsfEventManager | mEventManager |
| Simulation event manager object. | |
| WsfEventManager | mWallEventManager |
| Wall clock-based event manager object. | |
| std::unique_ptr< WsfClockSource > | mClockSourcePtr {nullptr} |
| Pointer to the simulation clock source object. | |
| WsfRealTimeClockSource * | mRealTimeClockSourcePtr {nullptr} |
| double | mSimTime {0.0} |
| The last time to which the simulation has been updated (seconds). | |
| double | mRealTime {false} |
| double | mTimeBehind {0.0} |
| The amount of time the simulation clock is behind the real-time clock. | |
| double | mTimestep {0.0} |
| double | mSyncAccumulatedTime {0.0} |
| The wall clock time taken to execute the current synchronized time step. | |
| volatile State | mState {cPENDING_INITIALIZE} |
| The current state of the simulation. | |
| volatile CompletionReason | mCompletionReason {cNONE} |
| The reason for simulation completion. | |
| bool | mExternalEventReady {false} |
| True if an external event needs to be processed. | |
| unsigned int | mRunNumber |
| The current run number being executed. | |
| const WsfSimulationInput & | mSimulationInput |
| WsfDateTime | mDateTime |
| bool | mMultiThreaded |
| double | mMinimumMoverTimestep |
| double | mEndTime {std::numeric_limits<double>::max()} |
| The end time of the simulation (seconds). | |
| bool | mIsRealTime {false} |
| bool | AddInputPlatforms () |
| virtual bool | TurnPartOffP (double aSimTime, WsfPlatformPart *aPartPtr) |
| virtual bool | TurnPartOnP (double aSimTime, WsfPlatformPart *aPartPtr) |
| virtual bool | SetPartOperationalP (double aSimTime, WsfPlatformPart *aPartPtr, bool aOperational) |
| virtual void | DispatchWallEvents () |
| Dispatch any pending wall clock events up to and including the indicated time. | |
| virtual void | DispatchSimEvents (double aSimTime) |
| virtual void | DispatchEvents (double aSimTime) |
| virtual bool | PlatformInitialized (double aSimTime, WsfPlatform *aNewPlatformPtr) |
| virtual bool | PlatformIntroduced (double aSimTime, WsfPlatform *aNewPlatformPtr) |
| virtual bool | SimulationInitialized () |
| virtual void | CreateClock () |
| virtual bool | PlatformIsAvailable (WsfPlatform *aPlatformPtr) |
Simulation State and Time management | |
| virtual void | Initialize () |
| virtual void | PrepareSimulation () |
| virtual void | AddEvent (std::unique_ptr< WsfEvent > aEventPtr) |
| template<typename T, typename... Args> | |
| T * | AddEventT (Args &&... args) |
| virtual void | AddWallEvent (std::unique_ptr< WsfEvent > aEventPtr) |
| template<typename T, typename... Args> | |
| T * | AddWallEventT (Args &&... args) |
| virtual double | AdvanceTime () |
| virtual double | AdvanceTime (double aSimTime) |
| virtual bool | ShouldExecute () const |
| virtual void | Start () |
| virtual void | Pause () |
| Pause execution of the simulation. | |
| void | PauseAndRequestAdvance (double) |
| Pause the execution of the simulation and request a time advance in scaled-and-stepped mode. | |
| virtual void | Resume () |
| Resume execution of the paused simulation. | |
| virtual void | Complete (double aSimTime) |
| virtual void | RequestReset () |
| virtual void | WaitForAdvanceTime () |
| bool | IsActive () const |
| State | GetState () const |
| Return the simulation's current state. | |
| const std::string & | GetStateString () const |
| Return the string representation of the simulation's current state. | |
| CompletionReason | GetCompletionReason () const |
| virtual std::string | GetCompletionReasonString () const |
| virtual void | RequestTermination () |
| void | SetEndTime (double aEndTime) |
| Set the defined end time of the simulation. | |
| double | GetSimTime () const |
| Get the last time to which the simulation was updated. | |
| double | GetEndTime () const |
| Get the defined end time of the simulation. | |
| virtual double | GetNextEventTime () const |
| double | GetRealTime () const |
| bool | IsRealTime () const |
| Return whether this simulation is running real-time, or a multiple of real-time. | |
| double | GetWallTime () const |
| Get the current wall-clock time since simulation creation. | |
| double | GetTimeBehind () const |
| double | GetTimestep () const |
| double | GetSyncTimestep () const |
| virtual void | SetRealtime (double aSimTime, bool aIsRealTime) |
| Instructs the simulation to run in a real-time mode. | |
| void | SetIsExternallyStarted (bool aIsExternallyStarted) |
| bool | IsExternallyStarted () const |
| Return whether the simulation is to be started by an external source. | |
| bool | MultiThreadingActive () const |
| Return whether the simulation multi-threading is currently active. | |
| void | SetMultiThreadingActive (bool aMultiThreadingActive) |
| Set whether multi-threading is currently active ('true') or not ('false'). | |
| bool | IsEventStepSimulation () const |
| Return event step simulation indicator. | |
| void | SetAmAnEventStepSimulation (bool aFlag) |
| void | SetClockSource (std::unique_ptr< WsfClockSource > aClockSourcePtr) |
| const WsfClockSource * | GetClockSource () const |
| virtual double | GetClockRate () const |
| Returns the clock rate of the simulation. | |
| virtual void | SetClockRate (double aClockRate) |
| Changes the clock rate of the simulation. | |
| virtual void | SetTimeParameters (int aTimeScheme, double aSimTime, double aClockRate, double aTimeStep, bool aTimeAdvance=false) |
| Change the time parameters of the simulation. | |
| static const std::string & | GetStateString (State aState) |
| Return the string representation of the provided simulation state. | |
Platform addition, deletion and query methods. | |
| virtual bool | AddPlatform (WsfPlatform *aPlatformPtr) |
| virtual bool | AddPlatform (double aSimTime, WsfPlatform *aPlatformPtr) |
| virtual void | DeletePlatform (double aSimTime, WsfPlatform *aPlatformPtr, bool aDeleteMemory=true) |
| WsfPlatform * | GetPlatformByIndex (size_t aIndex) const |
| WsfPlatform * | GetPlatformByName (WsfStringId aNameId) const |
| bool | PlatformExists (size_t aIndex) const |
| Returns 'true' if the platform with the specified index still exists. | |
| WsfStringId | GetPlatformNameId (size_t aIndex) const |
| Return the name (ID) of a platform, even if the platform has been deleted from the simulation. | |
| WsfStringId | GetPlatformTypeId (size_t aIndex) const |
| Return the type (ID) of a platform, even if the platform has been deleted from the simulation. | |
Platform list iteration methods | |
The following methods can be used to iterate over the list of known platforms. For example: for (size_t i = 0; i < simulationPtr->GetPlatformCount(); ++i)
{
WsfPlatform* platformPtr = simulationPtr->GetPlatformEntry(i);
... blah blah blah ...
}
| |
| size_t | GetPlatformCount () const |
| WsfPlatform * | GetPlatformEntry (size_t aEntry) const |
Subsystem status change methods | |
| virtual bool | TurnPartOff (double aSimTime, WsfPlatformPart *aPartPtr) |
| virtual bool | TurnPartOn (double aSimTime, WsfPlatformPart *aPartPtr) |
| virtual bool | SetPartOperational (double aSimTime, WsfPlatformPart *aPartPtr, bool aOperational=true) |
| virtual void | SetPartUpdateInterval (double aSimTime, WsfPlatformPart *aPartPtr, double aUpdateInterval) |
Methods that are public, but aren't part of the public interface. | |
| virtual bool | PlatformDeleted (double aSimTime, WsfPlatform *aOldPlatformPtr) |
| virtual void | ProcessRemovePlatformEvent (double aSimTime, WsfPlatform *aPlatformPtr, bool aDeletePlatform) |
| Called from RemovePlatformEvent to complete the processing of deleting a platform. | |
| virtual void | ProcessPlatformBrokenEvent (double aSimTime, WsfPlatform *aPlatformPtr) |
| Call from PlatformBrokenEvent to complete the processing of the broken of a platform. | |
Deprecated methods. | |
| virtual void | SimulationStarting () |
| Deprecated form of Start();. | |
| virtual void | SimulationComplete (double aSimTime) |
| Deprecated form of Complete();. | |
| bool | IsFlexibleRealtime () const |
| Return 'true' if the simulation's real-time constraint is flexible. | |
| void | SetFlexibleRealtime () |
Observer access methods. | |
| WsfAdvancedBehaviorObserver & | GetAdvancedBehaviorObserver () const |
| WsfBehaviorObserver & | GetBehaviorObserver () const |
| WsfCommObserver & | GetCommObserver () const |
| WsfDisObserver & | GetDisObserver () const |
| WsfExchangeObserver & | GetExchangeObserver () const |
| WsfFuelObserver & | GetFuelObserver () const |
| WsfMoverObserver & | GetMoverObserver () const |
| WsfPlatformObserver & | GetPlatformObserver () const |
| WsfPlatformPartObserver & | GetPlatformPartObserver () const |
| WsfProcessorObserver & | GetProcessorObserver () const |
| WsfScriptStateMachineObserver & | GetScriptStateMachineObserver () const |
| WsfSensorObserver & | GetSensorObserver () const |
| WsfSimulationObserver & | GetSimulationObserver () const |
| WsfTaskObserver & | GetTaskObserver () const |
| WsfTrackObserver & | GetTrackObserver () const |
| WsfZoneObserver & | GetZoneObserver () const |
Platform list maintenance methods. | |
| void | AddToPlatformList (WsfPlatform *aPlatformPtr) |
| bool | DeleteFromPlatformList (WsfPlatform *aPlatformPtr) |
| bool | PlatformPointerExists (WsfPlatform *aPlatformPtr) |
| void | ResetPlatformList () |
| Reset the list to its initial (empty) state. | |
The main controller for a simulation.
The 'simulation' object acts as the main controller for a simulation. While it is possible to use the framework without a simulation object, the simulation object will almost always be required for all but the most trivial of simulations.
The simulation object provides methods to:
Most methods within the class are virtual so a derived class may be used to provide custom simulation functionality.
An enumerated type specifying the reason for completion of the simulation.
| enum WsfSimulation::State |
An enumerated type specifying the state of the simulation.
| Enumerator | |
|---|---|
| cPENDING_INITIALIZE | The simulation has been constructed and is ready for WsfSimulation::Initialize to be called. |
| cINITIALIZING | The WsfSimulation::Initialize method is being called. |
| cPENDING_START | Initialization is complete, ready for WsfSimulation::Start to be called. |
| cSTARTING | The WsfSimulation::Start method is being called. |
| cACTIVE | Start is complete, the simulation is in progress. |
| cPENDING_COMPLETE | Simulation processing is complete; waiting on a call to WsfSimulation::Complete. |
| cCOMPLETE | Simulation is complete. |
| WsfSimulation::WsfSimulation | ( | const WsfScenario & | aScenario, |
| unsigned int | aRunNumber ) |
References GetDateTime(), GetPathFinderList(), WsfScenario::GetRandomSeed(), GetScriptContext(), GetSimulationInput(), GetTerrainInterface(), if(), WsfScenario::LoadIsComplete(), mDateTime, mEndTime, mEventManager, mIsRealTime, mMinimumMoverTimestep, mMultiThreaded, mRunNumber, mSimulationInput, mWallEventManager, wsf::TerrainInterface::PerformQueries(), and ResetPlatformList().
Referenced by operator=(), WsfEventStepSimulation::WsfEventStepSimulation(), WsfFrameStepSimulation::WsfFrameStepSimulation(), and WsfSimulation().
|
virtual |
References GetPlatformCount(), GetPlatformEntry(), and platformPtr.
|
delete |
References WsfSimulation().
|
virtual |
Add an event to the simulation event queue.
| aEventPtr | A pointer to the event to be queued. This classes assumes ownership of the object. |
Reimplemented in WsfFrameStepSimulation.
References mEventManager.
Referenced by wsf::comm::NetworkAdHoc::AddAddressRate(), AddEventT(), AddInputPlatforms(), wsf::comm::NetworkAdHoc::AddNamedRate(), AddPlatform(), WsfBrawlerProcessor::AddSelfCalledConsciousnessEvent(), WsfScriptContext::AddTimedEvents(), WsfRouteMover::AddUnpauseEventFor(), WsfImplicitWeapon::BeginEngagement(), WsfLaserWeapon::BeginShot(), WsfJTIDS_SlotGroup::BeginTransmitEvent(), WsfImplicitWeapon::CeaseFire(), wsf::comm::NetworkAdHoc::ChangeRate(), WsfTaskManager::CheckMessageAcknowledged(), WsfImplicitWeapon::ClearEngagement(), WsfWeapon::ContinueSalvo(), WsfTaskManager::CreateDelayTask(), DeletePlatform(), WsfTrackStateController::DeleteTrack(), WsfTrackStateController::DiscoverTrack(), WsfArticulatedPart::EnableArticulationUpdates(), WsfTrackStateController::EnterState(), WsfLaserWeapon::EvaluateCooling(), WsfTrackStateController::EvaluationComplete(), WsfPlatformPartEvent::Execute(), WsfPlatform::ExecuteScriptAtTime(), WsfScriptProcessor::ExecuteScriptAtTime(), WsfExplicitWeapon::FireP(), WsfWeapon::FireSalvo(), XWsfSeaTraffic::HandleDeparture(), XWsfSeaTraffic::HandleEnterLoiter(), Tool::Initialize(), wsf::comm::NetworkAdHoc::Initialize(), WsfClusterCorrelation::Initialize(), WsfEventStepSimulation::Initialize(), WsfMobilityAndFirepowerLethality::Initialize(), WsfPerceptionProcessor::Initialize(), Initialize(), WsfTSPI_Mover::Initialize(), XWsfAirTraffic::Initialize(), XWsfSeaTraffic::SeaPort::Initialize(), WsfTrackProcessor::InitializeMemberData(), WsfMilInterface::KillPlatform(), wsf::comm::ProtocolIGMP::NetworkReceive(), wsf::coverage::Coverage::PendingStart(), wsf::comm::router::ProtocolAdHoc::PerfectCommAdded(), wsf::comm::router::ProtocolAdHoc::PerfectCommRemoved(), wsf::comm::router::ProtocolAdHoc::PerfectConnectionAdded(), wsf::comm::router::ProtocolAdHoc::PerfectConnectionRemoved(), WsfEventStepSimulation::PlatformInitialized(), WsfDisInterface::PrepareExtension(), WsfExtInterface::PrepareExtension(), WsfTrackStateController::ProcessMessage(), WsfWeapon::ProcessReloading(), WsfQuantumTaskerProcessor::ProcessTaskStatusMessage(), WsfTaskManager::ProcessTaskStatusMessage(), wsf::comm::medium::Guided::PropagateMessage(), WsfCyclicTrackReporting::ReportFusedTracks(), WsfCyclicTrackReporting::ReportRawTracks(), wsf::space::OrbitalMissionSimulationContext::Schedule(), wsf::comm::ComponentHW::ScheduleAltFreqChange(), WsfOTH_RadarSensor::OTH_Mode::ScheduleAltFreqChange(), WsfRadarSensor::RadarMode::ScheduleAltFreqChange(), wsf::comm::LayerEvent::ScheduleCommLayerEvent(), wsf::comm::Event::ScheduleDeliverMessageEvent(), wsf::space::OrbitalMissionSimulationContext::ScheduleMission(), WsfSensor::ScheduleModeChange(), WsfEventPipeInterface::SendModeActive(), WsfDisPlatform::SendOrQueueEmissionsPDU(), WsfTaskManager::SendTaskMessage(), wsf::comm::medium::Medium::SetActiveModeDelayed(), wsf::comm::medium::Medium::SetActiveModeDelayed(), WsfPerceptionProcessor::SetAssetUpdateInterval(), WsfWaypointMover::SetCompleteTime(), WsfPlatformPart::SetDamageFactor(), SetEndTime(), WsfEventStepSimulation::SetPartUpdateInterval(), WsfPerceptionProcessor::SetThreatUpdateInterval(), SetTimeParameters(), wsf::UCI_SensorComponent::SlewComplete(), WsfTimeDelayQueue::SubmitRequest(), WsfWeaponTaskManager::TaskCorrelated(), WsfWeaponEngagement::Terminate(), wsf::comm::medium::Guided::TransmitMessage(), wsf::comm::medium::Unguided::TransmitMessage(), WsfDisPlatform::TrySendCMEData(), WsfEventStepSimulation::TurnPartOff(), WsfEventStepSimulation::TurnPartOn(), wsf::comm::NetworkAdHoc::Update(), wsf::comm::NetworkAdHoc::Update(), wsf::comm::NetworkAdHoc::Update(), XWsfAirTraffic::UpdateFlightStatus(), WsfL16::Interface_J11::WeaponFired(), and WsfWeaponTaskManager::WeaponFired().
|
inline |
References AddEvent().
|
protected |
Adds platforms to the simulation in a phase-stepped manner. This is only used by the simulation during initialization of platforms. Any addition of platforms outside of this process is done on a platform-by-platform basis using the standard AddPlatform call.
References AddEvent(), AddToPlatformList(), WsfPlatform::Clone(), WsfScriptContext::ExecuteScript(), WsfScriptContext::FindScript(), WsfScriptContext::GetClass(), GetExtension(), GetPlatformByName(), GetScriptContext(), ok, WsfObserver::PlatformAdded(), WsfObserver::PlatformInitialized(), PlatformInitialized(), PlatformIsAvailable(), WsfObserver::PlatformOmitted(), PlatformPointerExists(), platformPtr, WsfSimulationExtension::PlatformsInitialized(), and WsfScriptContext::ValidateScript().
Referenced by Initialize().
|
virtual |
Add a platform to an active simulation.
This method should be used to add platforms to a simulation that is running.
It is an error to invoke this before WsfSimulation::Initialize has been called.
| aSimTime | The time at which to add the platform to the simulation. |
| aPlatformPtr | Pointer to the platform to be added. This class assumes ownership of the platform. |
Reimplemented in WsfFrameStepSimulation.
References AddEvent(), AddToPlatformList(), cINITIALIZING, DeleteFromPlatformList(), WsfPlatform::GetIndex(), WsfObject::GetName(), WsfObject::GetNameId(), GetPlatformByName(), GetPlatformCount(), GetPlatformEntry(), GetSimTime(), WsfPlatform::Initialize(), WsfPlatform::Initialize2(), WsfPlatform::IsExternallyControlled(), mState, ok, WsfObserver::PlatformAdded(), WsfObserver::PlatformDeleted(), WsfPlatform::PlatformDeleted(), WsfObserver::PlatformInitialized(), PlatformInitialized(), PlatformPointerExists(), WsfPlatform::SetDeleted(), and simTime.
|
virtual |
Add a platform to an active simulation.
This method should be used to add platforms to a simulation that is running.
It is an error to invoke this before WsfSimulation::Initialize has been called.
| aPlatformPtr | Pointer to the platform to be added. This class assumes ownership of the platform. |
Reimplemented in WsfFrameStepSimulation.
References AddPlatform(), and GetSimTime().
Referenced by WsfFrameStepSimulation::AddPlatform(), WsfFrameStepSimulation::AddPlatform(), AddPlatform(), engage::Platform::AddToSimulation(), WsfP6DOF_Mover::CheckForNewlyJettisonedPlatforms(), Sensor::CreateAndInitialize(), Target::CreateAndInitialize(), HorizontalMapFunction::Execute(), WsfSimulation::AddPlatformEvent::Execute(), Tool::Initialize(), and wsf::coverage::RectangularGrid::PreparePlatforms().
|
protected |
Add a platform to the list of platforms.
It is assumed the caller has already verified the platform does not exist in the list.
| aPlatformPtr | Pointer to the platform to be added. |
References WsfPlatform::GetIndex(), WsfObject::GetNameId(), WsfObject::GetTypeId(), and WsfPlatform::SetIndex().
Referenced by AddInputPlatforms(), and AddPlatform().
|
virtual |
Add an event to the real-world event queue. Event will be triggered based on WallClock time, rather than simulation time, and will not pause if the simulation pauses. This should be used for Simulation Management events, not simulated events.
| aEventPtr | A pointer to the event to be queued. This class assumes ownership of the object. |
References mWallEventManager.
Referenced by AddWallEventT(), and WsfDisInterface::SimulationPausing().
|
inline |
References AddWallEvent().
|
virtual |
Dispatch the next event.
Reimplemented in WsfFrameStepSimulation.
References WsfObserver::AdvanceTime(), cPENDING_COMPLETE, DispatchEvents(), GetEndTime(), WsfEvent::GetTime(), mClockSourcePtr, mEventManager, mIsRealTime, mRealTimeClockSourcePtr, mSimTime, mState, and mSyncAccumulatedTime.
Referenced by WsfFrameStepSimulation::AdvanceTime(), WsfStandardApplication::RunEventLoop(), and weapon_tools().
|
virtual |
Dispatch the next event if its time is less than or equal to the specified time.
| aSimTime | Desired simulation time. |
Reimplemented in WsfFrameStepSimulation.
References WsfObserver::AdvanceTime(), cPENDING_COMPLETE, DispatchEvents(), GetEndTime(), WsfEvent::GetTime(), mClockSourcePtr, mEventManager, mSimTime, and mState.
| unsigned int WsfSimulation::AssignUniqueId | ( | ) |
Assign the next unique identifier for WsfUniqueId.
Referenced by WsfUniqueId::AssignUniqueId().
|
virtual |
Indicate that the application has completed its simulation loop.
This performs the following action (in the order specified):
| aSimTime | The current simulation time. |
Reimplemented in WsfEventStepSimulation, and WsfFrameStepSimulation.
References cACTIVE, cCOMPLETE, cEND_TIME_REACHED, cNONE, WsfSimulationExtension::Complete(), cPENDING_COMPLETE, GetExtension(), GetPlatformCount(), GetPlatformEntry(), mClockSourcePtr, mCompletionReason, mEndTime, mEventManager, mSimTime, mState, ProcessRemovePlatformEvent(), ResetPlatformList(), and WsfObserver::SimulationComplete().
Referenced by WsfEventStepSimulation::Complete(), WsfFrameStepSimulation::Complete(), WsfStandardApplication::RunEventLoop(), and SimulationComplete().
|
protectedvirtual |
This is a method used to create the type of clock the simulation expects.
Reimplemented in WsfEventStepSimulation, and WsfFrameStepSimulation.
References SetClockSource().
Referenced by Initialize().
| double WsfSimulation::CreateMessageDataTag | ( | ) |
|
protected |
Delete a platform pointer from the list of platforms.
This only deletes the pointer from the list. It does not delete the platform.
References WsfPlatform::GetIndex(), and WsfObject::GetNameId().
Referenced by AddPlatform(), and PlatformDeleted().
|
virtual |
Delete a platform from the simulation
| aSimTime | Current simulation time |
| aPlatformPtr | Pointer to platform to be deleted |
| aDeleteMemory | If true (default), platform's memory will be cleaned up. Otherwise, platform is simply removed from the simulation and ownership of platform is released. |
A platform cannot be deleted directly because the caller may be something on the platform itself (such as a mover). In such a case the platform pointer must remain valid until the active event completes. To get around this, we schedule this event for the current simulation time. This allows the current event to complete and causes the platform to actually get deleted when this event is dispatched.
Reimplemented in WsfFrameStepSimulation.
References AddEvent(), WsfPlatform::GetIndex(), WsfPlatform::IsDeleted(), WsfPlatform::NotifyDeleting(), PlatformExists(), ProcessRemovePlatformEvent(), and WsfPlatform::SetDeleted().
Referenced by WsfWeaponTaskManager::AbortFiring(), WsfExplicitWeapon::AddWeaponToSimulation(), WsfTowedMover::CleanUpStowedAsset(), WsfAirMover::CrashIntoGround(), WsfP6DOF_Mover::CrashIntoGroundCB(), WsfBrawlerMover::DeleteMover(), WsfFrameStepSimulation::DeletePlatform(), WsfMilInterface::KillPlatform(), ATG_LAR_And_LC_Generator::LARGenUpdate(), SAM_LaunchComputerGenerator::LCGenUpdate(), WsfTowedMover::OnPlatformDeleted(), WsfGuidedMoverBase::PrelaunchAdvanceTime(), WsfWeaponFuse::PrivateDetonate(), WsfDisRemoveEntity::Process(), WsfWeaponServer::ProcessCommand(), WsfPlatformPart::SetDamageFactor(), WsfDisPlatform::SetEntityState(), WsfDisWeaponEvents::TransferPlatformToInternalControl(), ATA_LaunchComputerGenerator::Update(), Fires::FiresMover::Update(), WsfChaffMover::Update(), WsfDisMover::Update(), WsfGuidedMoverBase::Update(), WsfOffsetMover::Update(), WsfTSPI_Mover::Update(), XWsfAirTraffic::UpdateFlightStatus(), and UT_DEFINE_SCRIPT_METHOD().
|
protectedvirtual |
Dispatch any pending events up to and including the indicated time.
| aSimTime | All events whose time is less than or equal to this value will be dispatched. |
References DispatchSimEvents(), and DispatchWallEvents().
Referenced by AdvanceTime(), and AdvanceTime().
|
protectedvirtual |
Dispatch any pending events up to and including the indicated time.
| aSimTime | All events whose time is less than or equal to this value will be dispatched. |
References mEventManager.
Referenced by DispatchEvents().
|
protectedvirtual |
Dispatch any pending wall clock events up to and including the indicated time.
References mWallEventManager.
Referenced by DispatchEvents().
| WsfSimulationExtension * WsfSimulation::FindExtension | ( | const std::string & | aName | ) | const |
Referenced by WsfMilDisInterface::AddedToDisInterface(), 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(), WsfXIO_Extension::Find(), XWsfOSM_Traffic::Find(), WsfXIO_Extension::FindDisExtension(), WsfXIO_Extension::FindSimulation(), wsf::AirCombat::EventPipeInterface::Get(), wsf::annotation::EventPipeInterface::Get(), wsf::cyber::SimulationExtension::Get(), wsf::p6dof::EventPipeInterface::Get(), wsf::six_dof::EventPipeInterface::Get(), wsf::space::EventPipeInterface::Get(), wsf::UCI_InterfaceExtension::Get(), WsfPromptObserver::Get(), WsfDraw::GetDrawManager(), WsfBallisticMissileLaunchComputer::Initialize(), WsfLaserDesignator::Initialize(), WsfLaserTracker::Initialize(), WsfRIPRProcessor::Initialize(), Initialize(), WsfWeaponServer::Initialize(), and WsfStandardApplication::UpdateOptionsP().
|
inline |
| WsfApplication & WsfSimulation::GetApplication | ( | ) | const |
References WsfScenario::GetApplication(), and GetScenario().
Referenced by WsfScriptObserver::AddEvent().
| UtAtmosphere & WsfSimulation::GetAtmosphere | ( | ) | const |
Return the UtAtmosphere object used by the simulation.
Referenced by WsfSA_Processor::CalculateObservables(), and WsfSA_Processor::UpdateFlightKinematicsData().
|
inline |
|
virtual |
Returns the clock rate of the simulation.
Referenced by PauseAndRequestAdvance(), WsfDisDataQueryR::ProduceResponse(), and WsfEventStepSimulation::WaitForAdvanceTime().
|
inline |
Return the current clock source object.
References mClockSourcePtr.
Referenced by WsfDisSetDataR::PopulateResponse(), SetTimeParameters(), WsfXIO_SimTimeService::UpdateEvent::UpdateEvent(), and WsfXIO_TimeSynchronization::WsfXIO_TimeSynchronization().
|
inline |
Referenced by wsf::comm::router::Router::AddInterface(), wsf::comm::NetworkGeneric::AddLinkP(), wsf::comm::NetworkDirectedRing::AddMemberP(), wsf::comm::NetworkMesh::AddMemberP(), wsf::comm::NetworkMeshLegacy::AddMemberP(), wsf::comm::NetworkPointToPoint::AddMemberP(), wsf::comm::NetworkRing::AddMemberP(), wsf::comm::NetworkStar::AddMemberP(), wsf::comm::router::OSPF_Area::ElectionDR(), wsf::comm::medium::Guided::EndPropagation(), wsf::comm::medium::Unguided::EndPropagation(), wsf::comm::medium::Guided::EndTransmission(), wsf::comm::medium::Unguided::EndTransmission(), wsf::comm::IGMP_SubscriptionEvent::Execute(), wsf::comm::router::ProtocolOSPF::GetGraph(), getLinkedAndReachablePlatformParts(), wsf::comm::ProtocolIGMP::GetQuerier(), wsf::comm::Comm::Initialize(), wsf::comm::router::ProtocolLegacy::Initialize(), wsf::comm::router::ProtocolMulticast::Initialize(), wsf::comm::router::Router::Initialize(), wsf::comm::router::OSPF_Area::InitializeCallbacks(), wsf::comm::Network::InitializeLinkage(), wsf::comm::NetworkDirectedRing::InitializeLinkageP(), wsf::comm::NetworkRing::InitializeLinkageP(), wsf::comm::router::ProtocolAdHoc::InitializeState(), wsf::comm::ProtocolIGMP::JoinGroup(), wsf::comm::ProtocolIGMP::LeaveGroup(), WsfMessageProcessor::Selector::Matches(), wsf::comm::ProtocolIGMP::PhysicalReceive(), WsfJTIDS_Terminal::PrintDebugReception(), wsf::comm::NetworkLayer::ProcessLayerMessage(), WsfUplinkProcessor::ProcessMessage(), wsf::comm::router::ProtocolOSPF::ReceiveDR_GraphAdd(), wsf::comm::router::ProtocolOSPF::ReceiveDR_GraphDrop(), wsf::comm::router::ProtocolOSPF::ReceiveHello(), WsfRIPRProcessor::ReceiveMessage(), wsf::comm::NetworkStar::RemoveHub(), wsf::comm::router::Router::RemoveInterface(), wsf::comm::NetworkGeneric::RemoveLinkP(), wsf::comm::NetworkDirectedRing::RemoveMemberP(), wsf::comm::NetworkMesh::RemoveMemberP(), wsf::comm::NetworkPointToPoint::RemoveMemberP(), wsf::comm::NetworkRing::RemoveMemberP(), wsf::comm::NetworkStar::RemoveMemberP(), wsf::comm::router::ProtocolOSPF::RouteFromBackbone(), wsf::comm::router::ProtocolOSPF::RouteToBackbone(), wsf::comm::router::ProtocolOSPF::Routing(), wsf::comm::PhysicalLayer::Send(), wsf::comm::router::ProtocolMulticast::Send(), wsf::comm::SlotGroupLayerJTIDS::Send(), wsf::comm::router::ProtocolOSPF::SendDR_GraphAdd(), wsf::comm::router::ProtocolOSPF::SendDR_GraphDrop(), WsfL16::ComputerPart::SendJMessage(), wsf::ExternalLinks::SendMessage(), WsfBMDisseminateC2::SendMessage(), WsfRIPRJob::SendMessageBidJob(), WsfRIPRProcessor::SendMessageJobAward(), WsfRIPRJob::SendMessageSetProgress(), WsfRIPRJob::SendMessageUnbidJob(), WsfTaskManager::SendTaskMessage(), wsf::comm::ProtocolIGMP::Setup(), wsf::comm::router::ProtocolLegacy::Setup(), wsf::comm::router::ProtocolMulticast::Setup(), wsf::comm::router::ProtocolOSPF::Setup(), wsf::comm::medium::Guided::TransmitMessage(), wsf::comm::medium::Unguided::TransmitMessage(), wsf::comm::NetworkAdHoc::Update(), wsf::comm::NetworkAdHoc::Update(), wsf::comm::NetworkAdHoc::Update(), WsfUplinkProcessor::UplinkTrack(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::Comm::ValidateGateway(), wsf::comm::router::ProtocolAdHoc::ValidNetwork(), and WsfMessage::WsfMessage().
|
inline |
Referenced by wsf::comm::router::Router::AddLink(), wsf::comm::router::Router::AddNode(), wsf::comm::router::Router::DisableLink(), wsf::comm::router::Router::EnableLink(), wsf::comm::router::ProtocolAdHoc::ExecuteOnCommAdded(), wsf::comm::router::ProtocolAdHoc::ExecuteOnCommRemoved(), wsf::comm::router::ProtocolAdHoc::ExecuteOnConnectionAdded(), wsf::comm::router::ProtocolAdHoc::ExecuteOnConnectionRemoved(), wsf::comm::router::Router::RemoveLink(), and wsf::comm::router::Router::RemoveNode().
|
inline |
Return the simulation's reason for completion. If the simulation has not actually completed, the returned value will be cNONE
References mCompletionReason.
Referenced by WsfStandardApplication::RunEventLoop().
|
virtual |
Return the string representation of the simulation's reason for completion. If the simulation has not actually completed, the returned value will be "NONE".
References cEND_TIME_REACHED, cNONE, cRESET, cTERMINATE, and mCompletionReason.
Referenced by WsfStandardApplication::RunEventLoop().
|
inline |
References mDateTime.
Referenced by WsfSpaceMoverBase::CreateKinematicModel(), WsfOrbitalScriptEvent::ExecuteEvent(), wsf::space::KinematicStateExtrapolation::Extrapolate(), WsfSpaceMover::GetDateTime(), WsfSpaceMoverBase::GetFutureLocationWCS(), WsfSolarTerminator::GetPlatformSolarIllumination(), WsfOrbitalManeuver::GetTargetPropagatorPerception(), UCI_Util::GetTimeStamp(), WsfAccessReport::Initialize(), WsfEclipseReport::Initialize(), WsfL16::Interface::Initialize(), WsfNORAD_SpaceMover::Initialize(), WsfOpticalEnvironment::Initialize(), WsfOrbitalScriptEvent::Initialize(), WsfOrbitDeterminationKalmanFilter::Initialize(), WsfSpaceMoverBase::Initialize(), WsfIntegratingSpaceMover::Initialize2(), WsfSpaceMoverBase::Initialize2(), wsf::coverage::Coverage::PendingStart(), WsfExclusionSensorComponent::PostAttemptToDetect(), WsfMoonLOS_SensorComponent::PostAttemptToDetect(), WsfSolarElevationAtTargetSensorComponent::PostAttemptToDetect(), WsfSolarIlluminationComponent::PostAttemptToDetect(), WsfSpaceMoverBase::PreInitialize(), wsf::event::utils::PrintDateTime(), wsf::event::utilsCSV::PrintDateTime(), wsf::event::utils::PrintTrackData(), wsf::event::utilsCSV::PrintTrackData(), WsfSpaceMoverBase::Update(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and WsfSimulation().
|
inline |
References mDateTime.
|
inline |
|
inline |
References mEM_Manager.
Referenced by WsfEM_XmtrRcvr::GetEM_Manager().
|
inline |
Get the defined end time of the simulation.
References mEndTime.
Referenced by WsfFrameStepSimulation::AdvanceTime(), AdvanceTime(), AdvanceTime(), engage::Task::Execute(), Initialize(), and WsfAccessReport::SensorDetectionChangedHandler().
| WsfEnvironment & WsfSimulation::GetEnvironment | ( | ) | const |
Referenced by WsfOrbitalManeuver::GetTargetPropagatorPerception(), WsfEM_SurfaceClutter::Initialize(), WsfPlatform::Initialize(), WsfRadarMTD_SignalProcessor::Initialize(), WsfRadarMTI_SignalProcessor::Initialize(), WsfRadarPD_SignalProcessor::Initialize(), and WsfOrbitalLaunchComputer::WriteOrbits().
|
inline |
| WsfSimulationExtension & WsfSimulation::GetExtension | ( | const std::string & | aName | ) | const |
Referenced by WsfL16::Interface::AddedToSimulation(), AddInputPlatforms(), Complete(), wsf::altloc::SimulationExtension::Get(), wsf::coverage::SimulationExtension::Get(), wsf::space::AtmosphereSimulationExtension::Get(), WsfConstellationManager::Get(), WsfDE_FileManager::Get(), Initialize(), PrepareSimulation(), WsfWeaponServerExtension::SimulationCreated(), and Start().
| const std::vector< std::string > & WsfSimulation::GetExtensionNames | ( | ) | const |
|
inline |
| unsigned int WsfSimulation::GetFinalRunNumber | ( | ) | const |
References WsfScenario::GetFinalRunNumber(), and GetScenario().
|
inline |
|
inline |
| WsfIFF_Manager * WsfSimulation::GetIFF_Manager | ( | ) | const |
|
inline |
|
inline |
References mMinimumMoverTimestep.
|
inline |
|
inline |
Referenced by WsfFrameStepSimulation::AddPlatform(), WsfFrameStepSimulation::AdvanceFrame(), WsfEventStepSimulation::Complete(), WsfFrameStepSimulation::Complete(), WsfFrameStepSimulation::DeletePlatform(), WsfPlatformPartEvent::Execute(), WsfEventStepSimulation::Initialize(), WsfFrameStepSimulation::Initialize(), WsfEventStepSimulation::PlatformDeleted(), WsfEventStepSimulation::PlatformIntroduced(), WsfFrameStepSimulation::TurnPartOffP(), and WsfFrameStepSimulation::TurnPartOnP().
|
virtual |
Return the time of the next event in the event queue. If there is no event, the current simulation time is returned.
References WsfEvent::GetTime(), mEventManager, and mSimTime.
|
inline |
Referenced by WsfSimulation().
| WsfPlatform * WsfSimulation::GetPlatformByIndex | ( | size_t | aIndex | ) | const |
Return the pointer to the platform given its unique platform index. The return value is 0 if the platform does not exist.
Referenced by WsfWeaponTaskManager::AbortFiring(), WsfRIPRProcessor::ActiveWeaponPlatform(), WsfQuantumTaskerProcessor::AssignTask(), WsfTaskManager::AssignTask(), WsfWeaponTaskManager::AssignTask(), WsfCTD_SensorComponent::AttemptToDetect(), WsfBMUtils::BelievedAlive(), WsfSA_Assess::CalculatePrioritizedTargets(), WsfSA_Assess::CalculatePrioritizedThreats(), WsfXIO_ScriptService::CheckParams(), WsfExchangeProcessor::ClosestPossibleProvider(), WsfBallisticMissileLaunchComputer::ComputeLateralTargetOffset(), WsfDisVisualization::Connected(), MTT_PerceivedCluster::CopyFrom(), WsfTruthCorrelation::CorrelateImpl(), WsfSA_Perceive::CreateAssetsList(), WsfSA_Perceive::CreateBanditsList(), WsfSA_Processor::DebugTestOutput(), WsfDisWeaponEvents::DirectedEnergyWeaponFired(), WsfDisWeaponEvents::DirectedEnergyWeaponHit(), WsfEclipseEventManager::Enable(), WsfTrackStateController::EnterState(), WsfBallisticMissileLaunchComputer::EstimatedTimeToIntercept(), WsfTabularLaunchComputer::EstimatedTimeToIntercept(), wsf::comm::ComponentHW::AltFrequencyChangeEvent::Execute(), wsf::comm::Event::Execute(), wsf::comm::LayerEvent::Execute(), WsfArticulatedPartEvent::Execute(), WsfBrawlerConsicousnessEvent::Execute(), WsfImplicitWeapon::TerminateEngagementEvent::Execute(), WsfMoverUpdateEvent::Execute(), WsfPerceptionProcessorUpdateEvent::Execute(), WsfScriptEvent::Execute(), WsfSensor::ModeChangeEvent::Execute(), WsfSensorMode::AltFrequencyChangeEvent::Execute(), WsfWeapon::SalvoEvent::Execute(), WsfTrackStateController::ExitState(), WsfSA_Assess::ExpectedDetectionRangeAgainstTarget(), WsfSA_Assess::ExpectedDetectionRangeByTarget(), WsfSA_Assess::ExpectedNormalizedDetectionRangeAgainstTarget(), WsfSA_Assess::ExpectedNormalizedWezRangeAgainstTarget(), WsfXIO_TaskService::FindTaskProcessor(), WsfBMUtils::GetAssignedPlatformFromAssignedIDRecord(), WsfTaskCancelMessage::GetAssignee(), WsfTaskControlMessage::GetAssignee(), WsfTaskStatusMessage::GetAssignee(), WsfTaskCancelMessage::GetAssigner(), WsfTaskControlMessage::GetAssigner(), WsfTaskStatusMessage::GetAssigner(), WsfWeaponEngagement::GetFiringPlatform(), WsfWeaponEngagement::GetMissDistance(), WsfStatusMessage::GetPlatform(), WsfBMUtils::GetPlatformFromUnitID(), WsfBMUtils::GetPlatformFromUnitIDRecord(), WsfZoneDefinition::GetReferencePlatform(), WsfAssociationMessage::GetSensorPlatform(), WsfBMUtils::GetTarget(), WsfLaserDesignations::Spot::GetTargetAdjustedLocationWCS(), wsf::event::utils::GetTargetName(), wsf::event::utilsCSV::GetTargetName(), WsfWeaponEngagement::GetTargetPlatform(), WsfOrbitalManeuver::GetTargetPropagatorPerception(), WsfBMUtils::GetUnitIDRecordFromPlatformIndex(), WsfWeaponEngagement::GetWeaponPlatform(), WsfEventPipeInterface::HandleScheduledEntityStateRequest(), WsfWeaponEngagement::Initialize(), WsfGuidedMoverBase::Initialize2(), WsfThreatProcessor::IsThreatening(), WsfRIPRProcessor::IsUplinkingTo(), WsfMilInterface::KillPlatform(), ATG_LAR_And_LC_Generator::LARGenUpdate(), SAM_LaunchComputerGenerator::LCGenUpdate(), WsfLaserDesignations::Spot::LocalUpdate(), WsfEOIR_Sensor::NotifyObservers(), WsfExchange::Transactor::OppositePlatformName(), WsfExchange::Transactor::OwningPlatformName(), WsfEventPipeInterface::PackTrack(), WsfTaskManager::PendingMessage::PendingMessage(), WsfLaserDesignator::PerformScheduledDetections(), WsfOTH_RadarSensor::PerformScheduledDetections(), WsfRadarSensor::PerformScheduledDetections(), WsfSensor::PerformScheduledDetections(), WsfBeamDirector::WsfBeamDirectorMode::PointAtTargetUpdate(), WsfZoneDefinition::PointIsInside(), WsfGuidedMoverBase::PrelaunchAdvanceTime(), wsf::event::ExchangeCompleted::Print(), wsf::event::ExchangeNegotiated::Print(), wsf::event::ExchangeQueried::Print(), wsf::event::ExchangeRequestFailed::Print(), wsf::event::ExchangeCompleted::PrintCSV(), wsf::event::ExchangeNegotiated::PrintCSV(), wsf::event::ExchangeQueried::PrintCSV(), wsf::event::ExchangeRequestFailed::PrintCSV(), wsf::event::utils::PrintTrackData(), wsf::event::utilsCSV::PrintTrackData(), wsf::event::utils::PrintWE_PlayerData(), wsf::event::utilsCSV::PrintWE_PlayerData(), WsfWeaponFuse::PrivateDetonate(), WsfWeaponServer::ProcessCommand(), WsfSA_Perceive::ProcessMessage(), WsfTrackProcessor::ProcessMessage(), WsfWeaponTaskManager::ProcessTaskStatusMessage(), WsfDefaultHEL::Propagate(), WsfQuantumTaskerProcessor::RejectTask(), WsfExchange::Transactor::RequestorPlatformName(), WsfExchange::Transactor::ResponderPlatformName(), WsfWeaponTaskManager::RoundsFiredAt(), WsfRouteFinder::Route(), WsfWeaponTaskManager::SalvosFiredAt(), wsf::comm::util::SelectRecipients(), WsfDefaultSensorScheduler::SelectTarget(), WsfPhysicalScanSensorScheduler::SelectTarget(), WsfSectorScanSensorScheduler::SelectTarget(), WsfSpinSensorScheduler::SelectTarget(), WsfTaskManager::SendTaskMessage(), WsfAccessReport::SensorDetectionChangedHandler(), WsfLaserDesignations::Spot::SetDesignatedIndex(), WsfExchangeProcessor::SetSupplierAbility(), WsfPerfectTracker::SetTargetByIndex(), WsfRIPRProcessor::StartUplinking(), WsfUplinkProcessor::StartUplinking(), WsfRIPRProcessor::StopUplinking(), WsfUplinkProcessor::StopUplinking(), WsfRIPRProcessor::TargetPlatform(), WsfWeaponEffects::Terminate(), WsfWeaponTaskManager::TimeWeaponLastFiredFor(), WsfWeaponTaskManager::TimeWeaponLastTerminatedFor(), WsfCTD_SensorComponent::TrackerAllowTracking(), ATA_LaunchComputerGenerator::Update(), TargetMover::Update(), WsfEOIR_Sensor::Update(), WsfLaserTracker::Update(), WsfPerfectTracker::Update(), WsfQuantumTaskerProcessor::Update(), WsfShadowMover::Update(), WsfStraightLineMover::Update(), WsfHighEnergyLaser::UpdateEngagementGeometry(), WsfSA_Assess::UpdateEngagementsData(), WsfMilDisPlatform::UpdateJammerSystem(), WsfOrbitDeterminationFusion::UpdateLocalTrackFromNonLocalTrack(), WsfEventPipeInterface::UpdatePartArticulation(), WsfSA_Perceive::UpdatePerceivedItemsCalculation(), WsfZoneDefinition::UpdateReference(), WsfLOS_Manager::UpdateStateData(), WsfLocalTrackStatus::UpdateTargetName(), WsfGuidanceComputer::UpdateTargetPerception(), WsfP6DOF_GuidanceComputer::UpdateTargetPerception(), WsfWeaponFuse::UpdateTargetState(), WsfWeaponTrackProcessor::UpdateTargetTrack(), WsfSA_Processor::UpdateTrackData(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), WsfWeaponTaskManager::WeaponFired(), WsfWeaponTaskManager::WeaponsActiveFor(), WsfRIPRProcessor::WeaponsIncoming(), WsfL16::Interface_J11::WeaponTerminated(), and WsfWeaponEngagement::WsfWeaponEngagement().
| WsfPlatform * WsfSimulation::GetPlatformByName | ( | WsfStringId | aNameId | ) | const |
Return a pointer to a platform given the string ID of the platform name.
References platformPtr.
Referenced by AddInputPlatforms(), AddPlatform(), WsfSensorProcessor::AddSensor(), WsfFusionCenter::AdjustTrackQuantities(), WsfImplicitWeapon::BeginEngagement(), wsf::coverage::Grid::CategorizeAssets(), WsfXIO_ScriptService::CheckParams(), WsfSatelliteBreakupModel::CollisionalBreakup(), MTT_PerceivedCluster::CopyFrom(), wsf::cyber::EngagementManager::CyberAttack(), wsf::cyber::EngagementManager::CyberScan(), FlightPathAnalysisFunction::Execute(), HorizontalMapFunction::Execute(), WsfSatelliteBreakupModel::ExplosiveBreakup(), WsfCuedLaserWeapon::Fire(), wsf::comm::Network::GetAddressFromNamedComm(), WsfTaskManager::GetMessageSender(), WsfFalseTargetBlip::GetReferenceJammerToRadarRange(), WsfZoneDefinition::GetReferencePlatform(), WsfTrack::GetTargetIndex(), WsfOrbitalManeuver::GetTargetPropagatorTruth(), Tool::Initialize(), WsfFormationFlyer::Initialize(), WsfOffsetMover::Initialize(), WsfTrack::Initialize(), wsf::comm::NetworkManager::InitializeUserLinks(), notifyOfPlatformsNotPresentInSimulation(), WsfZoneDefinition::PointIsInside(), wsf::altloc::Component::PreInitialize(), wsf::coverage::CompositeGrid::PreparePlatforms(), wsf::coverage::ExistingPlatformGrid::PreparePlatforms(), WsfWeaponServer::ProcessCommand(), WsfL16::Interface_J11::ProcessJ11_0Message(), WsfSensorProcessor::RemoveSensor(), wsf::comm::SlotGroupLayerJTIDS::Send(), wsf::ExternalLinks::SendMessage(), WsfOffsetMover::SetReference(), WsfRIPRProcessor::SetTargetByName(), wsf::comm::NetworkAdHoc::Update(), WsfPerfectTracker::Update(), WsfFalseTarget::UpdateBaseBlipPositions(), WsfFalseTarget::UpdateBlipPositions(), WsfFusionCenter::UpdateFalseTargetTracks(), WsfFormationFlyer::UpdateLeadInfo(), WsfFusionCenter::UpdateRealTargetTracks(), WsfZoneDefinition::UpdateReference(), WsfWeaponFuse::UpdateTargetState(), WsfWeaponTaskManager::UplinkStart(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::cyber::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::Comm::ValidateGateway(), WsfRIPRProcessor::WeaponsIncoming(), and WsfMessage::WsfMessage().
| size_t WsfSimulation::GetPlatformCount | ( | ) | const |
Return the number of platforms in the platform list.
Referenced by WsfMobilityAndFirepowerLethality::AddInitialCM_States(), AddPlatform(), WsfFrameStepSimulation::AdvanceFrame(), WsfWeaponFuse::CheckAllTargets(), Complete(), HorizontalMapFunction::CreateSensorList(), WsfEclipseEventManager::Enable(), wsf::comm::router::ProtocolOSPF::GetAllOSPF(), WsfL16::Interface::GetControllerFromTrackNumber(), WsfExtEntityDeadReckon::Initialize(), notifyOfPlatformsNotPresentInSimulation(), PlatformDeleted(), WsfMilDisInterface::PrepareComponent(), WsfDisInterface::PrepareExtension(), WsfWeaponEffects::ProcessEffectCommon(), WsfExtEntityDeadReckon::RequireExternalEntities(), WsfDefaultSensorScheduler::TurnOn(), WsfEOIR_Sensor::TurnOn(), WsfPhysicalScanSensorScheduler::TurnOn(), WsfSectorScanSensorScheduler::TurnOn(), WsfSensorsManagerFovSensorScheduler::TurnOn(), WsfSpinSensorScheduler::TurnOn(), UT_DEFINE_SCRIPT_METHOD(), and ~WsfSimulation().
| WsfPlatform * WsfSimulation::GetPlatformEntry | ( | size_t | aEntry | ) | const |
Return a specific entry from the list of platforms.
| aEntry | The slot of the desired entry. This is not the same as the platform index. It must be valid, i.e.: 0 <= aEntry < GetPlatformCount(). |
Referenced by WsfMobilityAndFirepowerLethality::AddInitialCM_States(), AddPlatform(), WsfFrameStepSimulation::AdvanceFrame(), WsfWeaponFuse::CheckAllTargets(), Complete(), HorizontalMapFunction::CreateSensorList(), WsfL16::Interface::GetControllerFromTrackNumber(), WsfExtEntityDeadReckon::Initialize(), PlatformDeleted(), WsfMilDisInterface::PrepareComponent(), WsfDisInterface::PrepareExtension(), WsfWeaponEffects::ProcessEffectCommon(), WsfExtEntityDeadReckon::RequireExternalEntities(), WsfDefaultSensorScheduler::TurnOn(), WsfEOIR_Sensor::TurnOn(), WsfPhysicalScanSensorScheduler::TurnOn(), WsfSectorScanSensorScheduler::TurnOn(), WsfSensorsManagerFovSensorScheduler::TurnOn(), WsfSpinSensorScheduler::TurnOn(), UT_DEFINE_SCRIPT_METHOD(), and ~WsfSimulation().
| WsfStringId WsfSimulation::GetPlatformNameId | ( | size_t | aIndex | ) | const |
Return the name (ID) of a platform, even if the platform has been deleted from the simulation.
Referenced by WsfTaskManager::CheckMessageAcknowledged(), WsfWeaponEngagement::GetFiringPlatformName(), WsfImage::Object::GetTruthName(), WsfWeaponEngagement::GetWeaponPlatformName(), wsf::event::utils::PrintTrackTargetName(), wsf::event::utilsCSV::PrintTrackTargetName(), wsf::event::utils::PrintWE_PlayerData(), wsf::event::utilsCSV::PrintWE_PlayerData(), WsfCompositeSensor::ProcessMessage(), WsfBallisticMissileLaunchComputer::QueuedSolutionPurge(), WsfDefaultSensorScheduler::SelectTarget(), WsfTaskManager::SendTaskMessage(), WsfCompositeSensor::SensorDetectionChanged(), and engage::Events::SensorDetectionChanged::Write().
|
inline |
|
inline |
| WsfStringId WsfSimulation::GetPlatformTypeId | ( | size_t | aIndex | ) | const |
Return the type (ID) of a platform, even if the platform has been deleted from the simulation.
|
inline |
| ut::Random & WsfSimulation::GetRandom | ( | ) |
Referenced by WsfJamStrobeDetector::ApplyMeasurementErrors(), WsfTRIMSIM_Processor::ComputeMeasurementErrors(), WsfBrawlerProcessor::GetConsciousnessEventTime(), wsf::altloc::SimulationExtension::GetDraw(), WsfSensorTracker::GetRandom(), WsfNavigationMesh::GetRandomLocation(), WsfPathFinder::GetRandomLocation(), WsfNavigationErrors::GlobalGaussian(), XWsfSeaTraffic::HandleDeparture(), WsfGuidedMover::IgniteStage(), WsfClusterCorrelation::Initialize(), WsfDirectionFinderProcessor::Initialize(), WsfElementESA_AntennaPattern::Initialize(), WsfESA_AntennaPattern::Initialize(), WsfESA_NX_AntennaPattern::Initialize(), WsfFalseTargetScreener::Initialize(), WsfJTIDS_SlotGroup::Initialize(), WsfL16::SurveillancePart::Initialize(), WsfNavigationErrors::Initialize(), WsfNoiseCloud::Initialize(), WsfPhysicalScanSensorScheduler::Initialize(), WsfRandomVariable::Initialize(), WsfSensor::Initialize(), WsfSpinSensorScheduler::Initialize(), WsfTrackProcessor::InitializeMemberData(), WsfIntersectMesh::Intersect(), WsfIntersectProcessor::Intersect(), WsfBehaviorTreeWeightedRandomNode::LocalExecute(), WsfPlatformAvailability::PlatformIsAvailable(), XWsfAirTraffic::ProcessEvent(), WsfGuidedMover::SeparateStage(), WsfP6DOF_Mover::SetDestroyed(), WsfRandomVariable::SetGenerator(), WsfAdvancedBehaviorTreeWeightedRandomNode::TickFunction(), WsfSensorsManagerFovSensorScheduler::TurnOn(), WsfEventStepSimulation::TurnPartOn(), WsfHighEnergyLaser::UpdateEngagementGeometry(), WsfEmitterTypeReporting::UpdateReportedEmitterType(), and WsfTargetTypeReporting::UpdateReportedTargetType().
|
inline |
Get the last sampled real-time clock time.
References mRealTime.
Referenced by WsfStandardApplication::RunEventLoop().
|
inline |
Get the current run number.
References mRunNumber.
Referenced by WsfStandardApplication::InitializeSimulation(), WsfStandardApplication::RunEventLoop(), WsfMultiresolutionMultirunTable::SimulationCreated(), and SubstituteOutputFileVariables().
|
inline |
Referenced by WsfExtEmission::AddSensor(), WsfScriptBMAssetRecordClass::AttachUnitZone(), WsfScriptBMWeaponInterface::AttachWeaponZone(), WsfEM_ALARM_Attenuation::atmosphere::attenuation(), WsfBMUtils::ConvertTrack(), Sensor::CreateAndInitialize(), Target::CreateAndInitialize(), wsf::cyber::EngagementManager::CyberAttack(), wsf::cyber::EngagementManager::CyberScan(), HorizontalMapFunction::Execute(), Fires::FiresPath::FiresPath(), GetApplication(), WsfBMUtils::GetAssignedIDRecord(), ZoneUtils::GetClosestPointInZone(), ZoneUtils::GetDistanceFromEllipseToPoint(), ZoneUtils::GetDistanceFromPointToZone(), GetFinalRunNumber(), WsfBMUtils::GetWeaponID(), wsf::cyber::Attack::Initialize(), WsfATG_WeaponLAR::Initialize(), WsfEM_Rcvr::Initialize(), WsfEM_Xmtr::Initialize(), WsfEM_XmtrRcvr::Initialize(), WsfESA_AntennaPattern::Initialize(), WsfEW_FalseTargetEffect::FT_Data::Initialize(), WsfNoiseCloud::Initialize(), Initialize(), WsfStandardApplication::InitializeSimulation(), notifyOfPlatformsNotPresentInSimulation(), engage::Platform::Platform(), WsfPlatformAvailability::PlatformIsAvailable(), wsf::coverage::RectangularGrid::PreparePlatforms(), and wsf::coverage::ZoneBasedGrid::PreparePlatforms().
|
inline |
Referenced by WsfEventPipeInterface::AddedToSimulation(), AddInputPlatforms(), WsfScriptedOrbitalDynamicsTerm::ComputeAcceleration(), WsfScriptObserver::EnableOrDisable(), Function::Execute(), WsfScriptEvent::Execute(), WsfAdvancedBehaviorTree::GetSimulation(), WsfBehaviorTree::GetSimulation(), WsfImageProcessor::Initialize(), WsfMover::Initialize(), WsfNavigationErrors::Initialize(), WsfPlatform::Initialize(), WsfRandomVariable::Initialize(), WsfScriptContext::Initialize(), WsfScriptContext::Initialize(), WsfSignatureInterface::Initialize(), Initialize(), WsfWeapon::Initialize(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and WsfSimulation().
|
inline |
|
inline |
| ut::Random & WsfSimulation::GetScriptRandom | ( | ) |
Referenced by WsfScriptContext::AddTimedEvents().
|
inline |
|
inline |
|
inline |
Get the last time to which the simulation was updated.
References mSimTime.
Referenced by wsf::comm::NetworkAdHoc::AddAddressRate(), WsfPassiveSensor::PassiveMode::AddInteractor(), wsf::comm::NetworkGeneric::AddLinkP(), wsf::comm::NetworkDirectedRing::AddMemberP(), wsf::comm::NetworkMesh::AddMemberP(), wsf::comm::NetworkMeshLegacy::AddMemberP(), wsf::comm::NetworkPointToPoint::AddMemberP(), wsf::comm::NetworkRing::AddMemberP(), wsf::comm::NetworkStar::AddMemberP(), wsf::comm::NetworkAdHoc::AddNamedRate(), WsfLaserDesignations::AddOrUpdate(), AddPlatform(), AddPlatform(), WsfUplinkProcessor::AddTrackUplink(), WsfUplinkProcessor::AddUplink(), engage::SimulationExtension::AdvanceTime(), WsfEW_AgilityEffect::ApplyUnmitigatedEffect(), wsf::comm::NetworkAdHoc::ChangeRate(), WsfArticulatedPart::ClearCueing(), WsfTRIMSIM_Processor::ComputeMeasurementErrors(), wsf::cyber::EngagementManager::CyberScan(), WsfRIPRJobBoard::DeleteCompletedJobs(), WsfBrawlerMover::DeleteMover(), WsfLaserWeapon::GetCoolingTimeRemaining(), WsfEW_EP::GetMitigatingEffects(), WsfDisUtil::GetSimTime(), WsfGuidanceComputer::GetSimTime(), WsfXIO_WeaponComponent::GetSimTime(), WsfXIO_WeaponComponent::HandleStateChangeRequest(), AirToAirLaunchComputerGenerator::Initialize(), ATA_LaunchComputerGenerator::Initialize(), BallisticMissileLaunchComputerGenerator::Initialize(), OrbitalLaunchComputerGenerator::Initialize(), Tool::Initialize(), wsf::comm::NetworkAdHoc::Initialize(), WsfClusterCorrelation::Initialize(), WsfEM_Rcvr::Initialize(), WsfEM_Xmtr::Initialize(), WsfEventStepSimulation::Initialize(), WsfEW_TrackEffect::TrackEffectData::Initialize(), WsfExtEntityDeadReckon::Initialize(), WsfScriptContext::Initialize(), wsf::comm::NetworkDirectedRing::InitializeLinkageP(), wsf::comm::NetworkRing::InitializeLinkageP(), WsfBehaviorTreeNode::LogNodeStructure(), WsfExchange::ModifyCapabilities(), notifyOfPlatformsNotPresentInSimulation(), WsfSpaceMoverBase::PerformStagingOperation(), WsfSpinSensorScheduler::PlatformAdded(), WsfTankedFuel::PlatformDeleted(), WsfWeaponTaskManager::PlatformDeleted(), WsfDisInterface::PrepareExtension(), wsf::event::utils::PrintDateTime(), wsf::event::utilsCSV::PrintDateTime(), wsf::event::utils::PrintTime(), wsf::event::utilsCSV::PrintTime(), WsfDisDataQuery::Process(), WsfDisResupplyCancel::Process(), WsfWeaponServer::ProcessCommand(), WsfL16::Interface_J11::ProcessJ11_0Message(), WsfL16::Interface_J11::ProcessJ11_1Message(), WsfL16::Interface_J11::ProcessJ11_2Message(), WsfL16::Interface_J11::ProcessWIFT_Event(), WsfRIPRJobBoard::PurgeUntouchedJobs(), WsfEventPipeInterface::RecordBool(), WsfEventPipeInterface::RecordDouble(), WsfEventPipeInterface::RecordInt(), WsfEventPipeInterface::RecordString(), WsfLaserDesignations::Remove(), wsf::comm::NetworkStar::RemoveHub(), WsfPassiveSensor::PassiveMode::RemoveInteractor(), wsf::comm::NetworkGeneric::RemoveLinkP(), wsf::comm::NetworkDirectedRing::RemoveMemberP(), wsf::comm::NetworkMesh::RemoveMemberP(), wsf::comm::NetworkPointToPoint::RemoveMemberP(), wsf::comm::NetworkRing::RemoveMemberP(), wsf::comm::NetworkStar::RemoveMemberP(), WsfUplinkProcessor::RemoveUplink(), WsfExtEntityDeadReckon::RequireExternalEntities(), WsfL16::Interface_J11::SendBombHitIndicationReport(), WsfL16::Interface_J11::SendWeaponSelfAbortReport(), wsf::comm::medium::Medium::SetActiveModeDelayed(), wsf::comm::medium::Medium::SetActiveModeDelayed(), WsfTrackManager::SetCorrelationStrategy(), WsfArticulatedPart::SetCuedLocationWCS(), WsfArticulatedPart::SetCuedOrientation(), WsfBehaviorTreeNode::SetExecutedLastRun(), WsfTrackManager::SetFusionStrategy(), WsfWeapon::SetQuantityRemaining(), WsfSpaceMoverBase::SetTargetOrientationECI(), WsfHybridMover::SetType(), WsfDisInterface::SimulationPausing(), WsfUplinkProcessor::StartUplinking(), WsfUplinkProcessor::StopUplinking(), SAM_LaunchComputerGenerator::TestPoints(), WsfAdvancedBehaviorTreeRepeaterNode::TickFunction(), WsfRIPRJob::Touch(), WsfJTIDS_SlotGroup::TransmitEventsStopped(), wsf::comm::NetworkAdHoc::Update(), wsf::comm::NetworkAdHoc::Update(), wsf::comm::NetworkAdHoc::Update(), WsfStandardApplication::UpdateOptionsP(), WsfLaserDesignations::Spot::UpdateTo(), UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), WsfEventStepSimulation::WaitForAdvanceTime(), WsfL16::Interface_J11::WeaponFired(), WsfRIPRJob::WsfRIPRJob(), WsfRIPRJob::WsfRIPRJob(), WsfScriptEvent::WsfScriptEvent(), WsfScriptEvent::WsfScriptEvent(), and WsfScriptEvent::WsfScriptEvent().
|
inline |
References mSimulationInput.
Referenced by WsfSensor::GetRequiredPd(), and WsfSimulation().
|
inline |
|
inline |
Return the simulation's current state.
References mState.
Referenced by WsfWeaponEngagement::Delete(), WsfStandardApplication::InitializeSimulation(), and WsfStandardApplication::RunEventLoop().
| const std::string & WsfSimulation::GetStateString | ( | ) | const |
Return the string representation of the simulation's current state.
References mState.
|
static |
Return the string representation of the provided simulation state.
|
inline |
Return the scaled and stepped DIS-NRT timestep (if running DIS-NRT).
| WsfSystemLog & WsfSimulation::GetSystemLog | ( | ) | const |
|
inline |
| wsf::TerrainInterface * WsfSimulation::GetTerrainInterface | ( | ) | const |
References wsf::TerrainInterface::Get().
Referenced by wsf::comm::ComponentHW_Subsurface::CanSendTo(), WsfNavigationMesh::DebugDrawMesh(), ClutterTableFunction::Execute(), wsf::Terrain::Initialize(), WsfTerrainPathFinder::Initialize(), WsfLOS_Manager::MaskedByTerrain(), WsfLOS_Manager::MaskedByTerrain(), WsfLOS_Manager::MaskedByTerrain(), WsfLOS_Manager::MaskedByVegetation(), WsfLOS_Manager::MaskedByVegetation(), WsfLOS_Manager::MaskedByVegetation(), wsf::altloc::Component::PreInitialize(), WsfParabolicMover::SetImpactTOFAndLL(), Fires::FiresMover::Update(), and WsfSimulation().
|
inline |
Get the amount of time the simulation clock is behind real-time clock.
A derived class may optionally maintain this value for use as a hint to other simulation components that the simulation clock has fallen 'sufficiently' behind the real-time clock and that they should take action to try to reduce the workload. The default value is zero (not running behind).
References mTimeBehind.
|
inline |
Return the simulation timestep (if the simulation is time-stepped).
References mTimestep.
Referenced by WsfDisInterface::ExecuteSensorUpdateEvent(), WsfARGO8_Mover::Initialize(), WsfDisSetDataR::PopulateResponse(), and WsfDisDataQueryR::ProduceResponse().
|
inline |
| double WsfSimulation::GetWallTime | ( | ) | const |
Get the current wall-clock time since simulation creation.
Get the current wall clock elapsed time since simulation creation.
Referenced by WsfDisInterface::SimulationPausing().
|
inline |
|
inline |
|
virtual |
Initialize the simulation.
This method initializes the simulation by performing the following actions:
Upon completion of this call, the application should call WsfSimulation::Start, enter a loop to execute events and then call WsfSimulation::Complete.
| WsfSimulation::InitializeError | if an error is encountered. |
Reimplemented in WsfEventStepSimulation, and WsfFrameStepSimulation.
References AddEvent(), AddInputPlatforms(), WsfObserver::InitializeCallback::Callback(), cINITIALIZING, cPENDING_INITIALIZE, cPENDING_START, WsfSimulationInput::cPP_ABOVE_NORMAL, WsfSimulationInput::cPP_BELOW_NORMAL, WsfSimulationInput::cPP_HIGH, WsfSimulationInput::cPP_NORMAL, WsfSimulationInput::cPP_REALTIME, CreateClock(), FindExtension(), GetEndTime(), GetExtension(), GetScenario(), GetScriptContext(), WsfObserver::Initialize(), WsfSimulationExtension::Initialize(), WsfScriptContext::InitializeGlobalContext(), mIsRealTime, mRealTime, mSimTime, mSimulationInput, mState, mTimeBehind, ok, WsfSimulationExtension::PendingStart(), WsfSimulationExtension::PrepareExtension(), SimulationInitialized(), WsfObserver::SimulationInitializing(), and WsfObserver::SimulationPendingStart().
Referenced by WsfPlatform::AssignToSimulation(), WsfEventStepSimulation::Initialize(), WsfFrameStepSimulation::Initialize(), and WsfStandardApplication::InitializeSimulation().
|
inline |
Return whether the simulation currently is in the ACTIVE state (see WsfSimulation::State for a list of simulation states).
References cACTIVE, and mState.
Referenced by engage::Task::Execute(), and WsfStandardApplication::RunEventLoop().
|
inline |
Return event step simulation indicator.
Referenced by WsfExtEntityDeadReckon::Initialize().
|
inline |
Return whether the simulation is to be started by an external source.
Referenced by WsfEventStepSimulation::SetRealtime(), WsfFrameStepSimulation::SetRealtime(), and WsfFrameStepSimulation::Start().
|
inline |
Return 'true' if the simulation's real-time constraint is flexible.
|
inline |
Return whether this simulation is running real-time, or a multiple of real-time.
References mIsRealTime.
Referenced by WsfDisIO_Thread::Initialize(), WsfStandardApplication::RunEventLoop(), WsfEventStepSimulation::TurnPartOn(), and WsfStandardApplication::UpdateOptionsP().
| ut::Random & WsfSimulation::LockRandom | ( | ) |
Referenced by WsfEW_Effect::Initialize(), and WsfExoAtmosphericLethality::Initialize().
| ut::Random & WsfSimulation::LockScriptRandom | ( | ) |
|
inline |
Return whether the simulation should multi-thread were appropriate.
References mMultiThreaded.
Referenced by WsfFrameStepSimulation::AddPlatform(), WsfFrameStepSimulation::AdvanceFrame(), WsfEventStepSimulation::Complete(), WsfFrameStepSimulation::Complete(), WsfFrameStepSimulation::DeletePlatform(), WsfEventStepSimulation::Initialize(), WsfFrameStepSimulation::Initialize(), WsfEventStepSimulation::PlatformDeleted(), WsfEventStepSimulation::PlatformInitialized(), WsfEventStepSimulation::PlatformIntroduced(), WsfFrameStepSimulation::TurnPartOffP(), WsfEventStepSimulation::TurnPartOn(), and WsfFrameStepSimulation::TurnPartOnP().
|
inline |
Return whether the simulation multi-threading is currently active.
Referenced by WsfLOS_Manager::LOS_DataExists(), WsfLOS_Manager::LOS_DataExists(), WsfLOS_Manager::LOS_DataExists(), WsfLOS_Manager::PlatformDeleted(), WsfLOS_Manager::SetLOS_Data(), WsfLOS_Manager::SetLOS_Data(), WsfLOS_Manager::SetStateData(), WsfLOS_Manager::SetStateData(), WsfLOS_Manager::StateDataExists(), and WsfLOS_Manager::StateDataExists().
|
inline |
Referenced by WsfWeaponEngagement::WsfWeaponEngagement().
|
inline |
|
delete |
References WsfSimulation().
|
virtual |
Pause execution of the simulation.
References cACTIVE, mClockSourcePtr, mState, and WsfObserver::SimulationPausing().
Referenced by PauseAndRequestAdvance(), and WsfDisStopFreeze::Process().
| void WsfSimulation::PauseAndRequestAdvance | ( | double | aSimTime | ) |
Pause the execution of the simulation and request a time advance in scaled-and-stepped mode.
References GetClockRate(), mSyncAccumulatedTime, Pause(), and WsfObserver::RequestTimeAdvance().
Referenced by SetTimeParameters().
|
virtual |
Virtual method invoked by the base class used to notify other platforms and observers of the impending deletion of a platform. This is called immediately prior to deleting the platform object.
| aSimTime | The current simulation time. |
| aOldPlatformPtr | Pointer to the platform to be deleted. |
Reimplemented in WsfEventStepSimulation.
References DeleteFromPlatformList(), WsfPlatform::GetDamageFactor(), GetPlatformCount(), GetPlatformEntry(), WsfPlatform::IsBroken(), WsfPlatform::NotifyDeleted(), WsfObserver::PlatformBroken(), WsfObserver::PlatformDeleted(), and platformPtr.
Referenced by WsfEventStepSimulation::PlatformDeleted(), and ProcessRemovePlatformEvent().
| bool WsfSimulation::PlatformExists | ( | size_t | aIndex | ) | const |
Returns 'true' if the platform with the specified index still exists.
Referenced by DeletePlatform().
|
protectedvirtual |
Virtual method invoked by the base class just after it has called the a platforms Initialize() method.
It is provided so derived classes can perform their own unique platform initialization.
| aSimTime | The current simulation time. |
| aNewPlatformPtr | Pointer to the platform just initialized. |
Reimplemented in WsfEventStepSimulation.
Referenced by AddInputPlatforms(), and AddPlatform().
|
protectedvirtual |
Virtual method invoked by the base class after it has introduced a new platform to the simulation.
| aSimTime | The current simulation time. |
| aNewPlatformPtr | Pointer to the platform just introduced. |
Reimplemented in WsfEventStepSimulation.
Referenced by WsfEventStepSimulation::PlatformIntroduced().
|
protectedvirtual |
Referenced by AddInputPlatforms().
|
protected |
Does the platform pointer already exist in the list?
| aPlatformPtr | The pointer to be tested. |
Referenced by AddInputPlatforms(), and AddPlatform().
|
virtual |
References GetExtension(), ok, and WsfSimulationExtension::PrepareExtension().
|
inline |
Referenced by WsfWeaponEngagement::CopySerialNumber().
|
virtual |
Call from PlatformBrokenEvent to complete the processing of the broken of a platform.
References WsfPlatform::OnBrokenEvent().
Referenced by WsfMilInterface::KillPlatform().
|
virtual |
Called from RemovePlatformEvent to complete the processing of deleting a platform.
References PlatformDeleted(), and WsfPlatform::SetDeleted().
Referenced by Complete(), and DeletePlatform().
| bool WsfSimulation::RandomizeFrequency | ( | ) | const |
References mSimulationInput.
Referenced by WsfOTH_RadarSensor::OTH_Mode::Initialize(), and WsfRadarSensor::RadarMode::Initialize().
|
inline |
Referenced by WsfWeaponEngagement::CopySerialNumber().
| void WsfSimulation::RegisterExtension | ( | const std::string & | aName, |
| std::unique_ptr< WsfSimulationExtension > | aExtensionPtr ) |
Referenced by WsfPrivate::RegisterSimulationExtension(), engage::InputConfig::SimulationCreated(), IADSC2ScenarioExtension::SimulationCreated(), wsf::comm::NetworkManagerExtension::SimulationCreated(), wsf::cyber::ScenarioExtension::SimulationCreated(), wsf::dis::ScenarioExtension::SimulationCreated(), wsf::EarthGravityModelExtension::SimulationCreated(), wsf::event::output::ScenarioExtension< DATA, SIM_EXTENSION >::SimulationCreated(), wsf::OMS_UCI_Extension::SimulationCreated(), wsf::simdis::ScenarioExtension::SimulationCreated(), wsf::six_dof::TypeManager::SimulationCreated(), WsfAirCombatTypeManager::SimulationCreated(), WsfAnnotationExtension::SimulationCreated(), WsfCloneableScenarioExtension::SimulationCreated(), WsfConfigureAccessReport::SimulationCreated(), WsfConfigureEclipseEventManger::SimulationCreated(), WsfConfigureEclipseReport::SimulationCreated(), WsfEventPipeExtension::SimulationCreated(), WsfExtInput::SimulationCreated(), WsfL16_Extension::SimulationCreated(), WsfLOS_ManagerExtension::SimulationCreated(), WsfP6DOF_TypeManager::SimulationCreated(), WsfRIPR_ModuleSetup::SimulationCreated(), WsfScriptObserverExtension::SimulationCreated(), WsfSpaceExtension::SimulationCreated(), and WsfWeaponServerExtension::SimulationCreated().
|
virtual |
Reset the simulation.
This method is called when some external source wants to reset the simulation. A derived class can override this method to perform its own special processing.
The default behavior is to set the simulation state to PENDING_COMPLETE with a completion reason of RESET. It is the responsibility of the caller to detect this condition and take action.
References cACTIVE, cPENDING_COMPLETE, cRESET, mCompletionReason, and mState.
Referenced by WsfDisStopFreeze::Process().
|
virtual |
Terminate the simulation.
This method is called when some external source wants to terminate the simulation. A derived class can override this method to perform its own special processing.
The default behavior is to set the simulation state to PENDING_COMPLETE with a completion reason of TERMINATE. It is the responsibility of the caller to detect this condition and take action.
References cACTIVE, cPENDING_COMPLETE, cTERMINATE, mCompletionReason, and mState.
Referenced by WsfDisStopFreeze::Process(), and engage::SimulationExtension::WeaponTerminated().
|
protected |
Reset the list to its initial (empty) state.
Referenced by Complete(), and WsfSimulation().
|
virtual |
Resume execution of the paused simulation.
References cACTIVE, mClockSourcePtr, mState, and WsfObserver::SimulationResuming().
Referenced by WsfDisStartResume::Process(), WsfDisStartResumeR::ProcessStartCommand(), and SetTimeParameters().
|
inline |
Referenced by WsfEventStepSimulation::WsfEventStepSimulation().
|
virtual |
Changes the clock rate of the simulation.
References mClockSourcePtr, and WsfObserver::SimulationClockRateChange().
Referenced by WsfDisSetData::Process(), WsfDisSetDataR::ProcessSetDataRequest(), and SetTimeParameters().
| void WsfSimulation::SetClockSource | ( | std::unique_ptr< WsfClockSource > | aClockSourcePtr | ) |
Set the clock source object.
The clock source object is the source of time for the simulation. Not all simulations require a simulation clock. For instance, in an event-stepped simulation the flow of time can be derived from the events. However one may want to run the event-stepped simulation in a real-time environment. Attaching a real-time clock object will (if used properly) prevent events from being dispatched until the correct simulation is encountered.
There can be only once clock source. Calling this method deletes any previously defined clock source and replaces it with the new source. The clock source is owned by the simulation and will be deleted when the simulation is deleted.
| aClockSourcePtr | Pointer to the clock source object. This class assumes ownership of the object. |
References mClockSourcePtr, mRealTimeClockSourcePtr, mSimulationInput, and WsfObserver::SimulationClockRateChange().
Referenced by WsfEventStepSimulation::CreateClock(), WsfFrameStepSimulation::CreateClock(), and CreateClock().
| void WsfSimulation::SetEndTime | ( | double | aEndTime | ) |
Set the defined end time of the simulation.
References AddEvent(), cCOMPLETE, cINITIALIZING, mEndTime, and mState.
Referenced by weapon_tools(), and engage::SimulationExtension::WeaponTerminated().
|
inline |
| void WsfSimulation::SetIsExternallyStarted | ( | bool | aIsExternallyStarted | ) |
Allow an external source (esp., an observer such as the DIS Interface) to start the simulation in lieu of the simulation's starting itself.
Referenced by WsfDisInterface::ActivateConnection(), WsfXIO_Simulation::Initialize(), and WsfDisInterface::PrepareExtension().
|
inline |
Set whether multi-threading is currently active ('true') or not ('false').
|
inlinevirtual |
References SetPartOperationalP().
|
protectedvirtual |
Set the platform part operation state
| aSimTime | The current simulation time. |
| aPartPtr | A pointer to the system whose operational state is to be changed |
| aOperational | Desired operational state of the system |
References WsfPlatformPart::IsOperational(), and WsfPlatformPart::SetOperational().
Referenced by SetPartOperational().
|
virtual |
Set the update interval for a platform part. This method defines how often the simulation executive will call the Update() method.
| aSimTime | The current simulation time. |
| aPartPtr | A pointer to the sensor whose update interval is to be changed. |
| aUpdateInterval | The new update interval. If this value is less than or equal to zero, the periodic calls to Update() will be deactivated until another call is made to reactive the periodic calls. |
Reimplemented in WsfEventStepSimulation.
References WsfPlatformPart::SetUpdateInterval().
Referenced by WsfSensor::SetNextUpdateTime().
|
inlinevirtual |
Instructs the simulation to run in a real-time mode.
Reimplemented in WsfEventStepSimulation, and WsfFrameStepSimulation.
Referenced by WsfStandardApplication::UpdateOptionsP().
|
virtual |
Change the time parameters of the simulation.
References AddEvent(), GetClockSource(), mClockSourcePtr, mRealTime, mSyncAccumulatedTime, PauseAndRequestAdvance(), Resume(), and SetClockRate().
Referenced by WsfDisSetData::Process(), WsfDisActionResponse::ProcessJoinExerciseResponseTo(), WsfDisActionResponseR::ProcessJoinExerciseResponseTo(), and WsfDisSetDataR::ProcessSetDataRequest().
|
virtual |
Determine whether the simulation should be executed. To test for a reset condition or the end of a set of Monte-Carlo repetitions, this method can be called as the exit condition of a while loop (see example, below).
References cCOMPLETE, cPENDING_INITIALIZE, cRESET, mCompletionReason, and mState.
|
inlinevirtual |
Deprecated form of Complete();.
References Complete().
|
protectedvirtual |
Virtual method invoked by the base class Initialize() method after it has performed the basic simulation initialization.
Derived classes can use it to add any additional functionality they require.
Referenced by Initialize().
|
inlinevirtual |
|
virtual |
Indicate the application is going to start its simulation loop.
This performs the following actions:
Reimplemented in WsfFrameStepSimulation.
References cACTIVE, cCOMPLETE, cNONE, cPENDING_START, cSTARTING, GetExtension(), mClockSourcePtr, mCompletionReason, mState, WsfObserver::SimulationStarting(), and WsfSimulationExtension::Start().
Referenced by WsfStandardApplication::RunEventLoop(), SimulationStarting(), WsfFrameStepSimulation::Start(), and weapon_tools().
| std::string WsfSimulation::SubstituteOutputFileVariables | ( | const std::string & | aOutputFile | ) |
Performs substitution for naming output files d - Run Number D - Date M-D-Y T - Time HHMMSS
References GetRunNumber().
Referenced by WsfDisInterface::ActivateConnection(), WsfEventPipeInterface::AddedToSimulation(), wsf::event::output::SimulationExtension::OpenFile(), and wsf::console::ScenarioExtension::SimulationCreated().
|
inlinevirtual |
Reimplemented in WsfEventStepSimulation.
References TurnPartOffP().
Referenced by WsfWeaponServer::PlatformDeleted(), WsfTaskManager::ReleaseResource(), and WsfDisEmission::UpdateSensor().
|
protectedvirtual |
Turn off a platform part.
| aSimTime | The current simulation time. |
| aPartPtr | A pointer to the system to be turned off. |
Reimplemented in WsfFrameStepSimulation.
References WsfPlatformPart::IsTurnedOn(), and WsfPlatformPart::TurnOff().
Referenced by TurnPartOff(), and WsfFrameStepSimulation::TurnPartOffP().
|
inlinevirtual |
Reimplemented in WsfEventStepSimulation.
References TurnPartOnP().
Referenced by WsfTaskManager::AcquireResource(), HorizontalMapFunction::CreateSensorList(), WsfCuedLaserWeapon::Fire(), WsfCuedLaserWeapon::Initialize(), WsfBeamDirector::PointAtTarget(), WsfExplicitWeapon::ProcessDeferredLaunchEvent(), WsfPlatform::SwapMover(), WsfWeaponTrackProcessor::Update(), and WsfDisEmission::UpdateSensor().
|
protectedvirtual |
Turn on a platform part.
| aSimTime | The current simulation time. |
| aPartPtr | A pointer to the system to be turned on. |
Reimplemented in WsfFrameStepSimulation.
References WsfPlatformPart::CanBeTurnedOn(), WsfPlatformPart::IsOperational(), WsfPlatformPart::IsTurnedOn(), and WsfPlatformPart::TurnOn().
Referenced by TurnPartOn(), and WsfFrameStepSimulation::TurnPartOnP().
| void WsfSimulation::UnlockRandom | ( | ) |
Referenced by WsfEW_Effect::Initialize(), and WsfExoAtmosphericLethality::Initialize().
| void WsfSimulation::UnlockScriptRandom | ( | ) |
| bool WsfSimulation::UseDefaultFrequency | ( | ) | const |
References mSimulationInput.
|
virtual |
Reimplemented in WsfEventStepSimulation, and WsfFrameStepSimulation.
Referenced by WsfStandardApplication::RunEventLoop().
|
protected |
Pointer to the simulation clock source object.
Referenced by WsfFrameStepSimulation::AdvanceFrame(), WsfFrameStepSimulation::AdvanceTime(), WsfFrameStepSimulation::AdvanceTime(), AdvanceTime(), AdvanceTime(), Complete(), GetClockSource(), Pause(), Resume(), SetClockRate(), SetClockSource(), WsfEventStepSimulation::SetRealtime(), WsfFrameStepSimulation::SetRealtime(), SetTimeParameters(), WsfFrameStepSimulation::Start(), Start(), WsfEventStepSimulation::WaitForAdvanceTime(), and WsfFrameStepSimulation::WaitForAdvanceTime().
|
protected |
The reason for simulation completion.
Referenced by Complete(), GetCompletionReason(), GetCompletionReasonString(), RequestReset(), RequestTermination(), ShouldExecute(), and Start().
|
protected |
Referenced by GetDateTime(), GetDateTime(), and WsfSimulation().
|
protected |
EM manager.
Referenced by GetEM_Manager().
|
protected |
The end time of the simulation (seconds).
Referenced by Complete(), GetEndTime(), SetEndTime(), and WsfSimulation().
|
protected |
Simulation event manager object.
Referenced by WsfFrameStepSimulation::AddEvent(), AddEvent(), WsfFrameStepSimulation::AdvanceFrame(), AdvanceTime(), AdvanceTime(), Complete(), DispatchSimEvents(), GetNextEventTime(), WsfEventStepSimulation::WaitForAdvanceTime(), and WsfSimulation().
|
protected |
True if an external event needs to be processed.
|
protected |
Referenced by WsfFrameStepSimulation::AdvanceFrame(), AdvanceTime(), WsfFrameStepSimulation::Complete(), WsfEventStepSimulation::CreateClock(), WsfFrameStepSimulation::CreateClock(), WsfEventStepSimulation::Initialize(), Initialize(), IsRealTime(), WsfEventStepSimulation::SetRealtime(), WsfFrameStepSimulation::SetRealtime(), WsfEventStepSimulation::WaitForAdvanceTime(), and WsfSimulation().
|
protected |
|
protected |
Referenced by MultiThreaded(), and WsfSimulation().
|
protected |
The last sampled real-time clock value (seconds) See GetRealTime() for more information.
Referenced by WsfFrameStepSimulation::AdvanceFrame(), GetRealTime(), Initialize(), SetTimeParameters(), WsfEventStepSimulation::WaitForAdvanceTime(), and WsfFrameStepSimulation::WaitForAdvanceTime().
|
protected |
If mClockSourcePtr is a WsfRealTimeClockSource, points to mClockSourcePtr, otherwise it is nullptr.
Referenced by AdvanceTime(), and SetClockSource().
|
protected |
The current run number being executed.
Referenced by GetRunNumber(), and WsfSimulation().
|
protected |
The last time to which the simulation has been updated (seconds).
Referenced by WsfFrameStepSimulation::AdvanceTime(), AdvanceTime(), AdvanceTime(), Complete(), GetNextEventTime(), GetSimTime(), and Initialize().
|
protected |
Referenced by GetSimulationInput(), Initialize(), RandomizeFrequency(), SetClockSource(), UseDefaultFrequency(), and WsfSimulation().
|
protected |
The current state of the simulation.
Referenced by AddPlatform(), WsfFrameStepSimulation::AdvanceTime(), AdvanceTime(), AdvanceTime(), Complete(), GetState(), GetStateString(), Initialize(), IsActive(), Pause(), RequestReset(), RequestTermination(), Resume(), SetEndTime(), ShouldExecute(), and Start().
|
protected |
The wall clock time taken to execute the current synchronized time step.
Referenced by AdvanceTime(), PauseAndRequestAdvance(), and SetTimeParameters().
|
protected |
The amount of time the simulation clock is behind the real-time clock.
Referenced by GetTimeBehind(), Initialize(), and WsfEventStepSimulation::WaitForAdvanceTime().
|
protected |
The timestep or frame time for a fixed timestep simulation. For event-driven simulations this will be zero (the default value). For time-stepped simulations, the derived class must set this to their timestep.
Referenced by GetTimestep(), and WsfFrameStepSimulation::Initialize().
|
protected |
Wall clock-based event manager object.
Referenced by AddWallEvent(), DispatchWallEvents(), and WsfSimulation().