|
WSF
|
#include <WsfWeaponTaskManager.hpp>


Public Member Functions | |
| WsfWeaponTaskManager () | |
| WsfWeaponTaskManager (const WsfWeaponTaskManager &aSrc) | |
| WsfWeaponTaskManager & | operator= (const WsfWeaponTaskManager &)=delete |
| ~WsfWeaponTaskManager () override=default | |
| virtual void | Update (double aSimTime) |
| virtual void | TaskCompleted (double aSimTime, WsfTask &aTask) |
| WsfProcessor * | GetProcessor () const |
| WsfPlatform * | GetPlatform () const |
| WsfSimulation * | GetSimulation () const |
| virtual void | TurnOn (double aSimTime) |
| virtual void | TurnOff (double aSimTime) |
| virtual bool | Initialize2 (double aSimTime) |
| virtual bool | PreInitialize (double aSimTime) |
| Public Member Functions inherited from WsfComponentT< WsfProcessor > | |
| WsfComponentT () | |
| WsfComponentT & | operator= (const WsfComponentT &) noexcept |
| ~WsfComponentT () override=default | |
| virtual void | ComponentParentChanged (ParentType *aParentPtr) |
| ParentType * | GetComponentParent () const |
| void | SetComponentParent (ParentType *aParentPtr) |
| Public Member Functions inherited from WsfComponent | |
| virtual | ~WsfComponent ()=default |
| virtual int | GetComponentInitializationOrder () const |
| template<typename T> | |
| bool | QueryInterfaceT (T *&aRolePtr) |
| bool | ComponentHasRole (int aRole) |
| Returns true if the component has the specified role. | |
| virtual void | PreInput () |
Static Public Member Functions | |
| static void | RegisterComponentFactory (WsfScenario &aScenario) |
| Register the component factory that handles input for this component. | |
| static WsfWeaponTaskManager * | Find (const WsfProcessor &aParent) |
| Find the instance of this component attached to the specified processor. | |
| static WsfWeaponTaskManager * | FindOrCreate (WsfProcessor &aParent) |
weapon log data. | |
These variables are used to keep record of all previously sent weapon tasks Entries only exist while a track is maintained on the target | |
| using | WeaponTaskLogEntry = std::set<std::pair<size_t, WsfStringId>> |
| using | WeaponTaskLogMap = std::map<WsfTrackId, WeaponTaskLogEntry> |
Query methods | |
| static UtCallbackListN< void(const WsfWeapon *, bool &)> | IsWeaponReadyForLaunch |
| Check for weapon ready states. | |
| double | TimeWeaponLastFiredFor (const WsfTrackId &aTrackId) |
| Return the simulation time of the most recent weapon firing against the specified track. | |
| double | TimeWeaponLastTerminatedFor (const WsfTrackId &aTrackId) |
| Return the simulation time of the most recent weapon termination against the specified track. | |
| int | WeaponsActiveFor (const WsfTrackId &aTrackId) |
| int | WeaponsActiveFor (const WsfTrackId &aTrackId, WsfPlatform *aPlatformPtr) |
| int | SalvosFiredAt (const WsfTrackId &aTrackId) |
| int | RoundsFiredAt (const WsfTrackId &aTrackId) |
| int | RoundsFiredAt (const WsfTrackId &aTrackId, WsfPlatform *aPlatformPtr) |
Internal methods. | |
These methods are not intended for public use. | |
| void | UplinkStart (double aSimTime, unsigned int aTaskId) |
| bool | IsAutoUplink () const |
| void | SetAutoUplink (bool aBool) |
| WsfStringId | GetAutoUplinkPlatformNameId () const |
| void | SetAutoUplinkPlatformNameId (WsfStringId aAutoUplinkPlatform) |
Required interface from WsfComponent. | |
| WsfComponent * | CloneComponent () const override |
| WsfStringId | GetComponentName () const override |
| const int * | GetComponentRoles () const override |
| void * | QueryInterface (int aRole) override |
Common interface from WsfComponent/WsfProcessorComponent. | |
| bool | Initialize (double aSimTime) override |
| bool | ProcessInput (UtInput &aInput) override |
WsfTaskManagerComponent interface. | |
| void | PlatformDeleted (WsfPlatform *aPlatformPtr) override |
| bool | AcquireResource (double aSimTime, WsfTask &aTask, const WsfTrack &aTrack, bool &aStatusOk) override |
| bool | ReleaseResource (double aSimTime, WsfTask &aTask) override |
| bool | AssignTask (double aSimTime, const WsfTrack &aTrack, const WsfTask &aTask, bool aLockTrack=true) override |
| void | PurgeReceivedTask (double aSimTime, WsfTask &aTask) override |
| void | PurgeTransmittedTask (double aSimTime, WsfTask &aTask) override |
| void | TaskCorrelated (double aSimTime, WsfTask &aTask) override |
| Called when a task has been correlated with a local track. | |
| void | TaskCanceled (double aSimTime, WsfTask &aTask) override |
| void | TrackDropped (double aSimTime, const WsfTrackId &aTrackId) override |
| bool | ProcessAssociationMessage (double aSimTime, const WsfAssociationMessage &aMessage) override |
| bool | ProcessTaskStatusMessage (double aSimTime, const WsfTaskStatusMessage &aMessage) override |
Command methods. | |
| virtual bool | AbortFiring (double aSimTime, const WsfTrackId &aTrackId) |
Simulation observer callbacks | |
| virtual void | WeaponFireAborted (double aSimTime, WsfWeapon *aWeaponPtr, const WsfTrack *aTargetTrackPtr, double aQuantity) |
| virtual void | WeaponFired (double aSimTime, const WsfWeaponEngagement *aEngagementPtr, const WsfTrack *aTargetTrackPtr) |
| void | WeaponTerminated (double aSimTime, const WsfWeaponEngagement *aEngagementPtr) |
Task manager observer callbacks. | |
| void | StartingWeaponTask (double aSimTime, const WsfTask &aTask) |
Additional Inherited Members | |
| Public Types inherited from WsfComponentT< WsfProcessor > | |
| typedef WsfProcessor | ParentType |
| This is needed to support the WsfComponentList template. | |
WsfWeaponTaskManager is a class for weapon task control. This class provides weapon uplink capability for sending tracks to weapons. There are a few methods to perform uplinking:
In general it is up to the derived classes to decide what actually needs to be done to perform a task, however some intrinsic capabilities are provided:
| using WsfWeaponTaskManager::WeaponTaskLogEntry = std::set<std::pair<size_t, WsfStringId>> |
| using WsfWeaponTaskManager::WeaponTaskLogMap = std::map<WsfTrackId, WeaponTaskLogEntry> |
| WsfWeaponTaskManager::WsfWeaponTaskManager | ( | ) |
Referenced by CloneComponent(), Find(), FindOrCreate(), operator=(), and WsfWeaponTaskManager().
| WsfWeaponTaskManager::WsfWeaponTaskManager | ( | const WsfWeaponTaskManager & | aSrc | ) |
References WsfWeaponTaskManager().
|
overridedefault |
|
virtual |
Abort weapon firing against a specified target. This is like a CancelTask for a weapon task except that it goes further and aborts ANY inflight rounds against the specified track ID that were initiated via command from this task manager.
References WsfWeapon::ActiveWeaponPlatformsFor(), WsfWeaponEngagement::cDUD, cTASK_RESOURCE_TYPE_WEAPON, WsfSimulation::DeletePlatform(), WsfWeaponEngagement::Find(), WsfTask::GetLocalTrackId(), WsfSimulation::GetPlatformByIndex(), WsfProcessorComponent::GetSimulation(), WsfTrackId::IsNull(), WsfTask::IsResourceTypeOf(), platformPtr, WsfWeaponEngagement::SetExtendedResult(), and WsfWeaponEngagement::Terminate().
Referenced by WsfXIO_WeaponComponent::HandleTaskCommand(), and WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT().
|
overridevirtual |
Reimplemented from WsfTaskManagerComponent.
References cTASK_RESOURCE_TYPE_JAMMER, cTASK_RESOURCE_TYPE_WEAPON, WsfWeapon::FireSalvo(), WsfTrackId::GetLocalTrackNumber(), WsfObject::GetName(), WsfTrackId::GetOwningPlatformId(), WsfProcessorComponent::GetPlatform(), WsfProcessorComponent::GetProcessor(), WsfTask::GetResource(), WsfTask::GetResourceName(), WsfProcessorComponent::GetSimulation(), WsfTrack::GetTargetIndex(), WsfTrack::GetTrackId(), WsfTask::IsResourceTypeOf(), WsfJammerTaskResource::mBandwidth, WsfJammerTaskResource::mBeamNumber, WsfWeaponTaskResource::mCount, WsfJammerTaskResource::mFrequency, WsfJammerTaskResource::mTechniqueName, WsfTask::SetObjectsPending(), WsfObserver::StartingWeaponTask(), WsfWeapon::StartJamming(), and WsfWeapon::StartJammingTrack().
|
overridevirtual |
Assign a task.
| aSimTime | The current simulation time. |
| aTrack | The track that represents the objective of the assignment. |
| aTask | The task to be assigned. |
| aLockTrack | 'true' if the track should be locked to prevent deletion. |
Reimplemented from WsfTaskManagerComponent.
References cTASK_RESOURCE_TYPE_WEAPON, WsfTaskManager::FindTask(), WsfTask::GetAssigneePlatformIndex(), WsfComponentList::GetComponent(), WsfPlatform::GetIndex(), WsfSimulation::GetPlatformByIndex(), WsfTask::GetResourceName(), WsfTask::GetResourceType(), WsfProcessorComponent::GetSimulation(), WsfTask::GetTaskType(), WsfTrack::GetTrackId(), WsfTask::GetUpdateTime(), WsfTrackId::IsNull(), and WsfTask::IsResourceTypeOf().
|
overridevirtual |
Clones a component. May return null if component does not support clone.
Implements WsfComponent.
References WsfWeaponTaskManager().
|
static |
Find the instance of this component attached to the specified processor.
References WsfComponentList::FindByRole(), WsfProcessor::GetComponents(), and WsfWeaponTaskManager().
Referenced by FindOrCreate(), WsfXIO_WeaponComponent::HandleTaskCommand(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), and WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT().
|
static |
Find the instance of this component attached to the specified processor, and create it if it doesn't exist.
References WsfComponentListT< COMPONENT_TYPE >::AddComponent(), Find(), WsfProcessor::GetComponents(), and WsfWeaponTaskManager().
|
inline |
|
overridevirtual |
Returns the component's name. Each component in a component list has a unique name. Names are usually defined by the user, but they may also be generated by code and prefixed with a '#' to guarantee no collisions with user-defined names.
Implements WsfComponent.
|
overridevirtual |
Returns a zero-terminated array of component roles. Note that the array should be in decreasing order of specificity and should generally the inheritance hierarchy. The first entry should be the components 'primary' role. For example a sensor would do the following:
Implements WsfComponent.
References cWSF_COMPONENT_NULL, cWSF_COMPONENT_PROCESSOR, cWSF_COMPONENT_TASK_MANAGER_COMPONENT, and cWSF_COMPONENT_WEAPON_TASK_MANAGER.
|
overridevirtual |
Perform phase 1 initialization. This is called by WsfPlatform::Initialize() during phase 1 initialization of the platform. The component should complete validation of input data that could not be done by ProcessInput, as well as any other functions to prepare for simulation use (subject to the next paragraph).
The order in which components are initialized is defined by GetComponentInitializationOrder. In general a component implementation of this method should not be dependent on the state of another component, i.e.: it should not assume that the other components Initialize() method has been called. If such a dependency exists one should use Initialize2() if possible, or specify a value GetComponentInitializationOrder to force things to initialize in a particular order.
| aSimTime | The current simulation time. |
Reimplemented from WsfProcessorComponent.
References WsfProcessorComponent::GetPlatform(), WsfProcessorComponent::GetProcessor(), WsfProcessorComponent::GetSimulation(), WsfUplinkProcessor::GetUplinkProcessor(), WsfUplinkProcessor::HasUplinkProcessor(), ok, platformPtr, WsfObserver::StartingWeaponTask(), StartingWeaponTask(), WsfUplinkProcessor::VerifyUplinks(), WsfObserver::WeaponFireAborted(), WeaponFireAborted(), WsfObserver::WeaponFired(), WeaponFired(), WsfObserver::WeaponTerminated(), and WeaponTerminated().
|
inline |
|
delete |
References WsfWeaponTaskManager().
|
overridevirtual |
|
overridevirtual |
Process the sensor track request association message.
When a sensor initiates a track that is the result of StartTracking() request, it will send a WSF_TRACK_ASSOCIATION_MESSAGE prior to sending the first WSF_TRACK_MESSAGE. This information provides the track ID of the StartTracking() request and the track ID of the track that is being produced as a result of that request.
This information is used to potentially uplink track data to a launched missile.
Reimplemented from WsfTaskManagerComponent.
References WsfProcessorComponent::GetPlatform(), WsfUplinkProcessor::GetUplinkProcessor(), WsfUplinkProcessor::HasUplinkProcessor(), and platformPtr.
|
overridevirtual |
Evaluate the current input command and determine if it is one processed by the component. The component should get the current command from the input stream and determine if it is one that it recognizes. If it does not recognize the command then it should leave the command in the input stream and return false. If it does recognize the command then it should process the command and return true. If invalid arguments are encountered then it should throw an exception.
| aInput | The input stream. |
| UtInput::ExceptionBase | if an invalid input was encountered. |
Reimplemented from WsfProcessorComponent.
References WsfUplinkProcessor::AddUplinkPath(), WsfProcessorComponent::GetPlatform(), WsfUplinkProcessor::GetUplinkProcessor(), platformPtr, and WsfUplinkProcessor::SetSendInterval().
|
overridevirtual |
Reimplemented from WsfTaskManagerComponent.
References cTASK_RESOURCE_TYPE_UPLINK, WsfTrackManager::FindTrack(), WsfObject::GetName(), WsfTaskStatusMessage::GetObjectPlatformIndex(), WsfProcessorComponent::GetPlatform(), WsfSimulation::GetPlatformByIndex(), WsfProcessorComponent::GetProcessor(), WsfTask::GetResource(), WsfProcessorComponent::GetSimulation(), WsfTaskStatusMessage::GetStatus(), WsfTaskStatusMessage::GetTaskType(), WsfTaskStatusMessage::GetTrackId(), WsfPlatform::GetTrackManager(), and WsfUplinkTaskResource::mUplinkDestination.
|
overridevirtual |
Perform the actions necessary to purge a received task. This routine is invoked by the receiver of a task after it has completed the task.
| aSimTime | The current simulation time. |
| aTask | The task being purged. |
Reimplemented from WsfTaskManagerComponent.
References WsfProcessorComponent::GetPlatform(), WsfTask::GetTaskId(), WsfUplinkProcessor::GetUplinkProcessor(), WsfUplinkProcessor::HasUplinkProcessor(), platformPtr, and WsfUplinkProcessor::RemoveUplink().
|
overridevirtual |
Perform the actions necessary to purge a transmitted task. This routine is invoked by the transmitter of a task after it has been notified that the receiver has completed the task (successfully, unsuccessfully or rejected) or if assignee did not accept the task in the required time interval.
| aSimTime | The current simulation time. |
| aTask | The task being purge. |
Reimplemented from WsfTaskManagerComponent.
References WsfTask::GetTaskType(), and WsfTask::GetTrackId().
|
overridevirtual |
Requests a component's role interface. A component can support one or more roles.
| aRole | The role whose interface is to be returned. |
Implements WsfComponent.
References cWSF_COMPONENT_PROCESSOR, cWSF_COMPONENT_TASK_MANAGER_COMPONENT, and cWSF_COMPONENT_WEAPON_TASK_MANAGER.
|
static |
Register the component factory that handles input for this component.
References WsfScenario::RegisterComponentFactory().
Referenced by WsfMilExtension::AddedToScenario().
|
overridevirtual |
Reimplemented from WsfTaskManagerComponent.
References cTASK_RESOURCE_TYPE_JAMMER, WsfTask::GetLocalTrackId(), WsfTrackId::GetLocalTrackNumber(), WsfObject::GetName(), WsfTrackId::GetOwningPlatformId(), WsfProcessorComponent::GetPlatform(), WsfProcessorComponent::GetProcessor(), WsfTask::GetResource(), WsfTask::GetResourceName(), WsfTask::GetTrackId(), WsfTask::IsResourceTypeOf(), WsfJammerTaskResource::mBandwidth, WsfJammerTaskResource::mBeamNumber, WsfJammerTaskResource::mFrequency, ok, and WsfWeapon::StopJamming().
| int WsfWeaponTaskManager::RoundsFiredAt | ( | const WsfTrackId & | aTrackId | ) |
Return the count of the number of rounds that have been fired at the specified track .
| aTrackId | The local track ID of the track of interest. |
References RoundsFiredAt().
Referenced by RoundsFiredAt(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), and WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT().
| int WsfWeaponTaskManager::RoundsFiredAt | ( | const WsfTrackId & | aTrackId, |
| WsfPlatform * | aPlatformPtr ) |
Return the count of the number of rounds that have been fired at the specified track for a given platform.
| aTrackId | The local track ID of the track of interest. |
| aPlatformPtr | The assignee platform. |
References WsfPlatform::GetIndex(), WsfSimulation::GetPlatformByIndex(), WsfProcessorComponent::GetSimulation(), and WsfWeapon::RoundsFiredAt().
| int WsfWeaponTaskManager::SalvosFiredAt | ( | const WsfTrackId & | aTrackId | ) |
Return the count of the number of salvos that have been fired at the specified track.
| aTrackId | The local track ID of the track of interest. |
References WsfSimulation::GetPlatformByIndex(), WsfProcessorComponent::GetSimulation(), and WsfWeapon::SalvosFiredAt().
Referenced by WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT().
|
inline |
|
inline |
| void WsfWeaponTaskManager::StartingWeaponTask | ( | double | aSimTime, |
| const WsfTask & | aTask ) |
A task manager callback to handle notification that a successful FireSalvo has been issued.
If the callback was invoked due to an assignment from this platform, increment the pending round count.
| aSimTime | The current simulation time. |
| aTask | The weapon task being started (as viewed by the assignee). |
References cTASK_RESOURCE_TYPE_WEAPON, WsfTaskManager::FindTask(), WsfTask::GetAssigneePlatformIndex(), WsfTask::GetResource(), WsfTask::GetResourceName(), WsfTask::GetTaskType(), WsfTask::GetTrackId(), WsfTask::IsResourceTypeOf(), and WsfWeaponTaskResource::mCount.
Referenced by Initialize().
|
overridevirtual |
Reimplemented from WsfTaskManagerComponent.
References WsfWeapon::AbortSalvo(), WsfComponentList::GetComponent(), WsfProcessorComponent::GetPlatform(), WsfTask::GetResourceName(), and WsfTask::GetTrackId().
|
overridevirtual |
Called when a task has been correlated with a local track.
Reimplemented from WsfTaskManagerComponent.
References WsfSimulation::AddEvent(), cTASK_RESOURCE_TYPE_UPLINK, WsfTask::GetResource(), WsfTask::GetResourceType(), WsfProcessorComponent::GetSimulation(), WsfTask::GetTaskId(), and WsfUplinkTaskResource::mUplinkDelay.
| double WsfWeaponTaskManager::TimeWeaponLastFiredFor | ( | const WsfTrackId & | aTrackId | ) |
Return the simulation time of the most recent weapon firing against the specified track.
References WsfSimulation::GetPlatformByIndex(), WsfProcessorComponent::GetSimulation(), simTime, and WsfWeapon::TimeWeaponLastFiredFor().
Referenced by WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT().
| double WsfWeaponTaskManager::TimeWeaponLastTerminatedFor | ( | const WsfTrackId & | aTrackId | ) |
Return the simulation time of the most recent weapon termination against the specified track.
References WsfSimulation::GetPlatformByIndex(), WsfProcessorComponent::GetSimulation(), simTime, and WsfWeapon::TimeWeaponLastTerminatedFor().
Referenced by WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT().
|
overridevirtual |
Reimplemented from WsfTaskManagerComponent.
| void WsfWeaponTaskManager::UplinkStart | ( | double | aSimTime, |
| unsigned int | aTaskId ) |
Internal method to begin uplinking a track as requested by a received task. This method is invoked by BeginUplinkEvent.
References WsfUplinkProcessor::AddUplink(), WsfTrackManager::FindRawTrack(), WsfTaskManager::FindTask(), WsfTrackManager::FindTrack(), WsfComponentList::GetComponent(), WsfTask::GetLocalTrackId(), WsfObject::GetName(), WsfProcessorComponent::GetPlatform(), WsfSimulation::GetPlatformByName(), WsfProcessorComponent::GetProcessor(), WsfLocalTrack::GetRawTrackIds(), WsfTask::GetResource(), WsfProcessorComponent::GetSimulation(), WsfTask::GetTrackId(), WsfPlatform::GetTrackManager(), WsfUplinkProcessor::GetUplinkProcessor(), WsfUplinkTaskResource::mUplinkCommName, WsfUplinkTaskResource::mUplinkDestination, WsfUplinkTaskResource::mUplinkSource, platformPtr, and trackPtr.
|
virtual |
A simulation observer callback to handle notification that a weapon firing request was aborted.
If the callback was invoked as the result of a weapon assignment from this platform, decrement the pending weapon count to account for the fact that some of the weapons were not released.
| aSimTime | The current simulation time. |
| aWeaponPtr | A pointer to the weapon. |
| aTargetTrackPtr | A pointer to the target track (may be 0). |
| aQuantity | The quantity of the weapon for which firing was requested but not completed. |
References WsfPlatform::GetIndex(), WsfObject::GetNameId(), WsfPlatformPart::GetPlatform(), WsfProcessorComponent::GetProcessor(), and WsfTrack::GetTrackId().
Referenced by Initialize().
|
virtual |
A simulation observer callback to handle weapon firing events.
| aSimTime | The current simulation time. |
| aEngagementPtr | A pointer to the weapon engagement data. |
| aTargetTrackPtr | A pointer to the target track (may be 0). |
References WsfSimulation::AddEvent(), WsfUplinkProcessor::AddTrackUplink(), WsfTaskStatusMessage::GetAssignerPlatformIndex(), WsfWeaponEngagement::GetFiringPlatformIndex(), WsfWeaponEngagement::GetInitialTargetTrackId(), WsfObject::GetName(), WsfProcessorComponent::GetPlatform(), WsfSimulation::GetPlatformByIndex(), WsfProcessorComponent::GetProcessor(), WsfWeaponEngagement::GetSerialNumber(), WsfProcessorComponent::GetSimulation(), WsfWeaponEngagement::GetTargetPlatformIndex(), WsfTrack::GetTrackId(), WsfUplinkProcessor::GetUplinkCommForTrack(), WsfUplinkProcessor::GetUplinkProcessor(), WsfWeaponEngagement::GetWeaponPlatform(), WsfWeaponEngagement::GetWeaponPlatformIndex(), WsfWeaponEngagement::GetWeaponSystem(), WsfWeaponEngagement::GetWeaponSystemName(), WsfUplinkProcessor::HasUplinkProcessor(), WsfTrackId::IsNull(), WsfUplinkProcessor::IsUplinkPathListEmpty(), IsWeaponReadyForLaunch, platformPtr, and WsfTaskStatusMessage::SetObjectPlatformIndex().
Referenced by Initialize().
| int WsfWeaponTaskManager::WeaponsActiveFor | ( | const WsfTrackId & | aTrackId | ) |
Return the count of the number of weapons that are active against the specified track.
| aTrackId | The local track ID of the track of interest. |
References WeaponsActiveFor().
Referenced by WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), and WeaponsActiveFor().
| int WsfWeaponTaskManager::WeaponsActiveFor | ( | const WsfTrackId & | aTrackId, |
| WsfPlatform * | aPlatformPtr ) |
Return the count of the number of weapons that are active against the specified track for the given platform.
| aTrackId | The local track ID of the track of interest. |
| aPlatformPtr | The assignee platform of interest. |
References cTASK_RESOURCE_TYPE_WEAPON, WsfPlatform::GetIndex(), WsfSimulation::GetPlatformByIndex(), WsfProcessorComponent::GetSimulation(), WsfTrackId::IsNull(), and WsfWeapon::WeaponsActiveAndPendingFor().
| void WsfWeaponTaskManager::WeaponTerminated | ( | double | aSimTime, |
| const WsfWeaponEngagement * | aEngagementPtr ) |
A simulation observer callback to handle weapon termination events.
| aSimTime | The current simulation time. |
| aEngagementPtr | A pointer to the weapon engagement data. |
References WsfWeaponEngagement::GetInitialTargetTrackId(), and WsfTrackId::IsNull().
Referenced by Initialize().
|
static |
Check for weapon ready states.
Referenced by WeaponFired().