WSF
WsfDisWeaponEvents Class Reference

A Helper class for WsfDisInterface to process weapon launch and termination events. More...

#include <WsfDisWeaponEvents.hpp>

Public Member Functions

 WsfDisWeaponEvents (WsfMilDisInterface *aInterfacePtr)
virtual ~WsfDisWeaponEvents ()=default
void WeaponFired (double aSimTime, const WsfWeaponEngagement *aEngagementPtr, const WsfTrack *aTrackPtr)
void DirectedEnergyWeaponFired (double aSimTime, const WsfDirectedEnergyWeapon *aWeaponPtr, const WsfWeaponEngagement *aEngagementPtr)
void DirectedEnergyWeaponHit (double aSimTime, const WsfDirectedEnergyWeapon *aWeaponPtr, const WsfWeaponEngagement *aEngagementPtr)
void ImplicitWeaponEndEngagement (double aSimTime, WsfImplicitWeapon *aImplicitWeapon, const WsfWeaponEngagement *aEngagementPtr)
void WeaponTerminated (double aSimTime, const WsfWeaponEngagement *aEngagementPtr)
bool InitiateWeaponTransfer (double aSimTime, DisFire *aPduPtr)
bool TransferPlatformToExternalControl (double aSimTime, WsfPlatform *aPlatformPtr)
bool TransferPlatformToInternalControl (double aSimTime, WsfPlatform *aPlatformPtr, DisEntityId &aEntityId, DisEntityType &aEntityType)
bool IsOutgoingWeaponTransfer (double aSimTime, WsfPlatform *aPlatformPtr)
WsfSimulationGetSimulation () const

Public Attributes

UtCallbackListN< void(DisFire &)> ProcessFirePDU
UtCallbackListN< void(DisDetonation &)> ProcessDetonationPDU
UtCallbackListN< void(const WsfWeapon *, WsfPlatform *, WsfDisPlatform *, DisEntityId &, bool &)> ProcessWeaponPrelaunchStatus
UtCallbackListN< void(WsfDisPlatform *, DisEntityId &)> ProcessWeaponTerminated
UtCallbackListN< void(std::string)> ReportErrorMessage
UtCallbackListN< void(WsfGeoPoint &, int)> SetTrackLocationData
UtCallbackListN< void(WsfPlatform *, const WsfWeapon *, const WsfWeaponEngagement *, DisEntityId &)> UpdateFiringPlatformSystems

Detailed Description

A Helper class for WsfDisInterface to process weapon launch and termination events.

Constructor & Destructor Documentation

◆ WsfDisWeaponEvents()

WsfDisWeaponEvents::WsfDisWeaponEvents ( WsfMilDisInterface * aInterfacePtr)

◆ ~WsfDisWeaponEvents()

Member Function Documentation

◆ DirectedEnergyWeaponFired()

◆ DirectedEnergyWeaponHit()

◆ GetSimulation()

◆ ImplicitWeaponEndEngagement()

void WsfDisWeaponEvents::ImplicitWeaponEndEngagement ( double aSimTime,
WsfImplicitWeapon * aImplicitWeapon,
const WsfWeaponEngagement * aEngagementPtr )

◆ InitiateWeaponTransfer()

bool WsfDisWeaponEvents::InitiateWeaponTransfer ( double aSimTime,
DisFire * aPduPtr )

◆ IsOutgoingWeaponTransfer()

bool WsfDisWeaponEvents::IsOutgoingWeaponTransfer ( double aSimTime,
WsfPlatform * aPlatformPtr )

Is the specified platform selected by an 'outbound_weapon_transfer' command.

Parameters
aSimTimeThe current simulation time.
aPlatformPtrThe platform to be tested.
Returns
'true' if the platform was selected for transfer via an 'outbound_weapon_transfer' command.

References WsfWeaponEngagement::Find(), WsfObject::GetTypeId(), WsfWeaponEngagement::GetWeaponSystem(), and WsfPlatform::IsExternallyControlled().

Referenced by TransferPlatformToExternalControl(), and ~WsfDisWeaponEvents().

◆ TransferPlatformToExternalControl()

bool WsfDisWeaponEvents::TransferPlatformToExternalControl ( double aSimTime,
WsfPlatform * aPlatformPtr )

Transfer the platform being created from internal to external control.

This is invoked by WsfDisInterface::AddPlatform to transfer control of the newly created platform to some external application.

Parameters
aSimTimeThe current simulation time.
aPlatformPtrThe platform to be transferred from local to external control.
Note
This is indirectly called via the PlatformAdded observer interface. The platform to be transferred must have not yet been initialized because platform subsystems are being deleted.
This does not mark the platform as externally controlled. This is not done until after the Fire PDU is issued because the platform must remain under internal control so the initial PDU gets sent out.

References WsfComponentList::DeleteComponent(), IsOutgoingWeaponTransfer(), moverPtr, WsfPlatform::SetMover(), and WsfExtInterface::StripExternalPlatform().

Referenced by ~WsfDisWeaponEvents().

◆ TransferPlatformToInternalControl()

bool WsfDisWeaponEvents::TransferPlatformToInternalControl ( double aSimTime,
WsfPlatform * aPlatformPtr,
DisEntityId & aEntityId,
DisEntityType & aEntityType )

Transfer the platform being created from external to internal control.

This is invoked by WsfDisInterface::AddPlatform to transfer control of the platform being created to internal control. This really isn't so much a transfer as it is making the new platform assume the identity of a platform that may already exist as an externally control platform.

Parameters
aSimTime[input] The current simulation time.
aPlatformPtr[input] The platform to be transferred from external to local control.
aEntityId[output] The DIS Entity Id to be assigned to the platform IF the method return value is true.
aEntityType[output] The DIS Entity Type to be assigned to the platform IF the method return value is true.
Note
This is indirectly called via the PlatformAdded observer interface.

References WsfSimulation::DeletePlatform(), WsfWeaponEngagement::Find(), WsfDisUtil::FindDisPlatform(), WsfWeaponEngagement::GetFiringPlatformIndex(), WsfWeaponEngagement::GetInitialTargetTrackId(), WsfDisPlatform::GetPlatform(), GetSimulation(), WsfWeaponEngagement::GetStartTime(), WsfWeaponEngagement::GetWeaponSystemName(), and WsfDisPlatform::SetHasBeenReplaced().

Referenced by ~WsfDisWeaponEvents().

◆ WeaponFired()

void WsfDisWeaponEvents::WeaponFired ( double aSimTime,
const WsfWeaponEngagement * aEngagementPtr,
const WsfTrack * aTrackPtr )

◆ WeaponTerminated()

Member Data Documentation

◆ ProcessDetonationPDU

UtCallbackListN<void(DisDetonation&)> WsfDisWeaponEvents::ProcessDetonationPDU

Referenced by WeaponTerminated().

◆ ProcessFirePDU

UtCallbackListN<void(DisFire&)> WsfDisWeaponEvents::ProcessFirePDU

◆ ProcessWeaponPrelaunchStatus

UtCallbackListN<void(const WsfWeapon*, WsfPlatform*, WsfDisPlatform*, DisEntityId&, bool&)> WsfDisWeaponEvents::ProcessWeaponPrelaunchStatus

◆ ProcessWeaponTerminated

UtCallbackListN<void(WsfDisPlatform*, DisEntityId&)> WsfDisWeaponEvents::ProcessWeaponTerminated

Referenced by WeaponTerminated().

◆ ReportErrorMessage

UtCallbackListN<void(std::string)> WsfDisWeaponEvents::ReportErrorMessage

Referenced by InitiateWeaponTransfer().

◆ SetTrackLocationData

UtCallbackListN<void(WsfGeoPoint&, int)> WsfDisWeaponEvents::SetTrackLocationData

Referenced by InitiateWeaponTransfer().

◆ UpdateFiringPlatformSystems

UtCallbackListN<void(WsfPlatform*, const WsfWeapon*, const WsfWeaponEngagement*, DisEntityId&)> WsfDisWeaponEvents::UpdateFiringPlatformSystems

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved