|
WSF
|
#include <WsfEvent.hpp>

Public Types | |
| enum | EventDisposition { cDELETE , cRESCHEDULE } |
Public Member Functions | |
| WsfEvent ()=default | |
| WsfEvent (double aSimTime, int aPriority=0) | |
| WsfEvent (const WsfEvent &aSrc)=delete | |
| Copy constructor and copy assignment deleted to prevent copying. | |
| WsfEvent & | operator= (const WsfEvent &aRhs)=delete |
| virtual | ~WsfEvent ()=default |
| virtual EventDisposition | Execute ()=0 |
| double | GetTime () const |
| int | GetPriority () const |
| bool | ShouldExecute () const |
| void | SetTime (double aSimTime) |
| void | SetPriority (int aPriority) |
| void | SetShouldExecute (bool aExecute) |
| WsfSimulation * | GetSimulation () const |
| void | AddedToEventQueue (WsfSimulation &aSimulation) |
| Called when the event is added to the event queue of the specified simulation. | |
A abstract base class for all events within an event driven simulation.
WsfEvent represents events that are managed by WsfEventManager.
EventDisposition is the return value for the Execute method.
The event disposition is used by WsfEventManager to reschedule events that need to execute on a regular basis. This prevents the constant deletion and reallocation of events that need to execute repeatedly.
| Enumerator | |
|---|---|
| cDELETE | Delete the event from the event queue. |
| cRESCHEDULE | Reschedule the event. WsfEvent::SetTime should have been called with the new time. |
|
default |
Create an event with no specified dispatch time.
Referenced by WsfSimulation::AddPlatformEvent::AddPlatformEvent(), XWsfAirTraffic::AirTrafficEvent::AirTrafficEvent(), wsf::comm::ComponentHW::AltFrequencyChangeEvent::AltFrequencyChangeEvent(), WsfSensorMode::AltFrequencyChangeEvent::AltFrequencyChangeEvent(), WsfWeapon::CompleteReloadEvent::CompleteReloadEvent(), WsfTimeDelayQueue::CompleteRequestEvent::CompleteRequestEvent(), XWsfSeaTraffic::DepartureEvent::DepartureEvent(), WsfEclipseReport::EclipseEvent::EclipseEvent(), wsf::comm::Event::Event(), wsf::cyber::Event::Event(), WsfTaskManager::EventBase::EventBase(), WsfScriptContext::ExecuteTimedEventScript::ExecuteTimedEventScript(), XWsfAirTraffic::ExitLoiterEvent::ExitLoiterEvent(), XWsfSeaTraffic::ExitLoiterEvent::ExitLoiterEvent(), wsf::comm::GenericEvent< T >::GenericEvent(), wsf::comm::IGMP_SubscriptionEvent::IGMP_SubscriptionEvent(), WsfTSPI_Mover::InitializeMoverEvent::InitializeMoverEvent(), WsfTSPI_Mover::InitializeMoverEvent::InitializeMoverEvent(), wsf::comm::LayerEvent::LayerEvent(), WsfSensor::ModeChangeEvent::ModeChangeEvent(), WsfSensor::ModeChangeEvent::ModeChangeEvent(), operator=(), wsf::eventpipe::PartUpdateEvent::PartUpdateEvent(), WsfBallisticMissileLaunchComputer::PurgeSolutionEvent::PurgeSolutionEvent(), WsfWeapon::SalvoEvent::SalvoEvent(), WsfImplicitWeapon::TerminateEngagementEvent::TerminateEngagementEvent(), ToolUpdateEvent::ToolUpdateEvent(), WsfJTIDS_SlotGroup::TransmitHeartbeatEvent::TransmitHeartbeatEvent(), wsf::UCI_Message_Event::UCI_Message_Event(), wsf::UCI_SetDefaultModeEvent::UCI_SetDefaultModeEvent(), WsfRouteMover::UnpauseEvent::UnpauseEvent(), WsfMobilityAndFirepowerLethality::UpdateEvent::UpdateEvent(), WsfXIO_PlatformPartInfoService::UpdatePartEvent::UpdatePartEvent(), WsfArticulatedPartEvent::WsfArticulatedPartEvent(), WsfBrawlerConsicousnessEvent::WsfBrawlerConsicousnessEvent(), WsfEvent(), WsfEventAdapterT< RT, Args >::WsfEventAdapterT(), WsfMoverUpdateEvent::WsfMoverUpdateEvent(), WsfPerceptionProcessorUpdateEvent::WsfPerceptionProcessorUpdateEvent(), WsfPlatformPartEvent::WsfPlatformPartEvent(), WsfScriptEvent::WsfScriptEvent(), WsfScriptEvent::WsfScriptEvent(), WsfScriptEvent::WsfScriptEvent(), WsfTrackProcessor_PurgeTracksEvent::WsfTrackProcessor_PurgeTracksEvent(), WsfTrackProcessor_ReportTracksEvent::WsfTrackProcessor_ReportTracksEvent(), and WsfTrackStateController_RequestEvaluationEvent::WsfTrackStateController_RequestEvaluationEvent().
|
inline |
Create an event with a specified dispatch time and optional priority.
| aSimTime | The simulation time when the event should be dispatched. |
| aPriority | The priority associated with this event. |
|
delete |
Copy constructor and copy assignment deleted to prevent copying.
References WsfEvent().
|
virtualdefault |
|
inline |
Called when the event is added to the event queue of the specified simulation.
|
pure virtual |
Execute the specified event.
Implemented in ToolUpdateEvent, wsf::comm::ComponentHW::AltFrequencyChangeEvent, wsf::comm::Event, wsf::comm::GenericEvent< T >, wsf::comm::IGMP_SubscriptionEvent, wsf::comm::LayerEvent, wsf::cyber::Event, wsf::eventpipe::PartUpdateEvent, wsf::UCI_Message_Event, wsf::UCI_SetDefaultModeEvent, WsfArticulatedPartEvent, WsfBallisticMissileLaunchComputer::PurgeSolutionEvent, WsfBrawlerConsicousnessEvent, WsfEclipseReport::EclipseEvent, WsfImplicitWeapon::TerminateEngagementEvent, WsfJTIDS_SlotGroup::TransmitHeartbeatEvent, WsfLaserDesignations::UpdateEvent, WsfMobilityAndFirepowerLethality::UpdateEvent, WsfMoverUpdateEvent, WsfOneShotEvent, WsfPerceptionProcessorUpdateEvent, WsfPlatformPartEvent, WsfRecurringEvent, WsfRouteMover::UnpauseEvent, WsfScriptContext::ExecuteTimedEventScript, WsfScriptEvent, WsfSensor::ModeChangeEvent, WsfSensorMode::AltFrequencyChangeEvent, WsfSimulation::AddPlatformEvent, WsfTaskManager::EventBase, WsfTimeDelayQueue::CompleteRequestEvent, WsfTrackProcessor_PurgeTrackHistoryEvent, WsfTrackProcessor_PurgeTracksEvent, WsfTrackProcessor_ReportTracksEvent, WsfTrackStateController_RequestEvaluationEvent, WsfTSPI_Mover::InitializeMoverEvent, WsfWaypointMover::HitPointEvent, WsfWeapon::CompleteReloadEvent, WsfWeapon::SalvoEvent, WsfXIO_PlatformInfoService::EvaluateDeadReckoningEvent, WsfXIO_PlatformPartInfoService::UpdatePartEvent, WsfXIO_SimTimeService::UpdateEvent, XWsfAirTraffic::AirTrafficEvent, XWsfAirTraffic::ExitLoiterEvent, XWsfSeaTraffic::DepartureEvent, and XWsfSeaTraffic::ExitLoiterEvent.
|
inline |
Get the priority of the event, for correct execution of events occurring at the same discrete time.
|
inline |
Returns the simulation in which this event belongs. May be null if event was not added to a simulation
Referenced by WsfXIO_PlatformPartInfoService::UpdatePartEvent::CopyState(), wsf::comm::Event::Execute(), wsf::comm::IGMP_SubscriptionEvent::Execute(), wsf::comm::LayerEvent::Execute(), wsf::cyber::Event::Execute(), wsf::UCI_Message_Event::Execute(), wsf::UCI_SetDefaultModeEvent::Execute(), WsfArticulatedPartEvent::Execute(), WsfBrawlerConsicousnessEvent::Execute(), WsfImplicitWeapon::TerminateEngagementEvent::Execute(), WsfMoverUpdateEvent::Execute(), WsfPerceptionProcessorUpdateEvent::Execute(), WsfPlatformPartEvent::Execute(), WsfScriptEvent::Execute(), WsfSimulation::AddPlatformEvent::Execute(), WsfTrackProcessor_PurgeTrackHistoryEvent::Execute(), WsfTrackProcessor_PurgeTracksEvent::Execute(), WsfTrackProcessor_ReportTracksEvent::Execute(), WsfTrackStateController_RequestEvaluationEvent::Execute(), WsfXIO_PlatformInfoService::EvaluateDeadReckoningEvent::Execute(), WsfXIO_SimTimeService::UpdateEvent::Execute(), XWsfAirTraffic::ExitLoiterEvent::Execute(), XWsfSeaTraffic::ExitLoiterEvent::Execute(), and WsfXIO_SimTimeService::UpdateEvent::UpdateEvent().
|
inline |
Get the time at which the event is to execute
Referenced by WsfFrameStepSimulation::AdvanceFrame(), WsfSimulation::AdvanceTime(), WsfSimulation::AdvanceTime(), WsfXIO_PlatformInfoService::EvaluateDeadReckoningEvent::CopyState(), ToolUpdateEvent::Execute(), wsf::comm::ComponentHW::AltFrequencyChangeEvent::Execute(), wsf::comm::Event::Execute(), wsf::comm::IGMP_SubscriptionEvent::Execute(), wsf::comm::LayerEvent::Execute(), wsf::eventpipe::PartUpdateEvent::Execute(), wsf::UCI_Message_Event::Execute(), wsf::UCI_SetDefaultModeEvent::Execute(), WsfArticulatedPartEvent::Execute(), WsfBallisticMissileLaunchComputer::PurgeSolutionEvent::Execute(), WsfBrawlerConsicousnessEvent::Execute(), WsfEclipseReport::EclipseEvent::Execute(), WsfImplicitWeapon::TerminateEngagementEvent::Execute(), WsfJTIDS_SlotGroup::TransmitHeartbeatEvent::Execute(), WsfLaserDesignations::UpdateEvent::Execute(), WsfMobilityAndFirepowerLethality::UpdateEvent::Execute(), WsfMoverUpdateEvent::Execute(), WsfPerceptionProcessorUpdateEvent::Execute(), WsfPlatformPartEvent::Execute(), WsfRouteMover::UnpauseEvent::Execute(), WsfScriptContext::ExecuteTimedEventScript::Execute(), WsfScriptEvent::Execute(), WsfSensor::ModeChangeEvent::Execute(), WsfSensorMode::AltFrequencyChangeEvent::Execute(), WsfTimeDelayQueue::CompleteRequestEvent::Execute(), WsfTrackProcessor_PurgeTrackHistoryEvent::Execute(), WsfTrackProcessor_PurgeTracksEvent::Execute(), WsfTrackProcessor_ReportTracksEvent::Execute(), WsfTrackStateController_RequestEvaluationEvent::Execute(), WsfTSPI_Mover::InitializeMoverEvent::Execute(), WsfWaypointMover::HitPointEvent::Execute(), WsfWeapon::CompleteReloadEvent::Execute(), WsfWeapon::SalvoEvent::Execute(), WsfXIO_PlatformInfoService::EvaluateDeadReckoningEvent::Execute(), WsfXIO_PlatformPartInfoService::UpdatePartEvent::Execute(), WsfXIO_SimTimeService::UpdateEvent::Execute(), XWsfAirTraffic::AirTrafficEvent::Execute(), XWsfAirTraffic::ExitLoiterEvent::Execute(), XWsfSeaTraffic::DepartureEvent::Execute(), XWsfSeaTraffic::ExitLoiterEvent::Execute(), WsfTaskManager::TaskCompleteEvent::ExecuteEvent(), WsfTaskManager::TrackUpdateEvent::ExecuteEvent(), WsfSimulation::GetNextEventTime(), WsfXIO_SimTimeService::HandleClockRateChange(), WsfXIO_PlatformInfoService::EvaluateDeadReckoningEvent::SendState(), and WsfEventStepSimulation::WaitForAdvanceTime().
References WsfEvent().
|
inline |
Set the priority for correct order of execution of events at the same discrete time.
| aPriority | The priority of the event. |
|
inline |
Sets whether or not this event should be executed, allowing an event to be effectively canceled.
| aExecute | If this event should be executed. |
|
inline |
Set the time at which the event is to execute.
| aSimTime | The time at which the event is to execute. |
Referenced by WsfXIO_PlatformInfoService::EvaluateDeadReckoningEvent::EvaluateDeadReckoningEvent(), ToolUpdateEvent::Execute(), wsf::eventpipe::PartUpdateEvent::Execute(), wsf::UCI_Message_Event::Execute(), WsfArticulatedPartEvent::Execute(), WsfBrawlerConsicousnessEvent::Execute(), WsfEclipseReport::EclipseEvent::Execute(), WsfJTIDS_SlotGroup::TransmitHeartbeatEvent::Execute(), WsfLaserDesignations::UpdateEvent::Execute(), WsfMobilityAndFirepowerLethality::UpdateEvent::Execute(), WsfMoverUpdateEvent::Execute(), WsfPerceptionProcessorUpdateEvent::Execute(), WsfPlatformPartEvent::Execute(), WsfScriptContext::ExecuteTimedEventScript::Execute(), WsfTimeDelayQueue::CompleteRequestEvent::Execute(), WsfTrackProcessor_PurgeTrackHistoryEvent::Execute(), WsfTrackProcessor_PurgeTracksEvent::Execute(), WsfTrackProcessor_ReportTracksEvent::Execute(), WsfXIO_PlatformInfoService::EvaluateDeadReckoningEvent::Execute(), WsfXIO_PlatformPartInfoService::UpdatePartEvent::Execute(), WsfXIO_SimTimeService::UpdateEvent::Execute(), XWsfAirTraffic::AirTrafficEvent::Execute(), WsfTaskManager::TrackUpdateEvent::ExecuteEvent(), WsfXIO_PlatformInfoService::HandleRequest(), WsfXIO_SimTimeService::HandleRequest(), WsfScriptEvent::WsfScriptEvent(), WsfScriptEvent::WsfScriptEvent(), WsfScriptEvent::WsfScriptEvent(), and WsfTrackProcessor_PurgeTracksEvent::WsfTrackProcessor_PurgeTracksEvent().
|
inline |
Provides whether or not this event should be processed during simulation event execution.