WSF
WsfMilDisInterface Class Reference

#include <WsfMilDisInterface.hpp>

Inheritance diagram for WsfMilDisInterface:
Collaboration diagram for WsfMilDisInterface:

Classes

struct  IncomingTransfer
 Incoming weapon transfer definition. More...
struct  OutgoingTransfer

Public Member Functions

 WsfMilDisInterface (WsfMilExtension *aMilExtensionPtr)
 WsfMilDisInterface (const WsfMilDisInterface &aSrc)
 WsfMilDisInterface (WsfMilDisInterface &&)=default
WsfMilDisInterfaceoperator= (const WsfMilDisInterface &)=delete
WsfMilDisInterfaceoperator= (WsfMilDisInterface &&)=default
 ~WsfMilDisInterface () override
WsfDisWeaponEventsGetWeaponEvents () const
Public Member Functions inherited from WsfComponentT< WsfDisInput >
 WsfComponentT ()
WsfComponentToperator= (const WsfComponentT &) noexcept
 ~WsfComponentT () override=default
virtual void ComponentParentChanged (ParentType *aParentPtr)
ParentTypeGetComponentParent () 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 bool PreInitialize (double aSimTime)
virtual bool Initialize2 (double aSimTime)
virtual void PreInput ()

Static Public Member Functions

static WsfMilDisInterfaceFind (const WsfDisInterface &aDisInterface)

Component infrastructure methods

using IncomingTransferList = std::vector<IncomingTransfer>
using OutgoingTransferList = std::vector<OutgoingTransfer>
WsfComponentCloneComponent () const override
WsfStringId GetComponentName () const override
const int * GetComponentRoles () const override
void * QueryInterface (int aRole) override
void AddedToDisInterface (WsfDisInterface *aDisInterfacePtr) override
bool Initialize (double aSimTime) override
bool ProcessInput (UtInput &aInput) override
bool TransferPlatformToInternalControl (double aSimTime, WsfPlatform *aPlatformPtr, DisEntityId &aEntityId, DisEntityType &aEntityType) override
bool TransferPlatformToExternalControl (double aSimTime, WsfPlatform *aPlatformPtr) override
void PrepareComponent (double aSimTime) override
void PlatformCreated (WsfDisPlatform *aPlatformPtr) override
bool UpdateEmissionSystem (WsfPlatform *aPlatformPtr, WsfDisEmission *aEmissionPtr, DisSystem *aSystemPtr) override
bool AddEmissionSystem (WsfPlatform *aPlatformPtr, WsfDisEmission *aEmissionPtr, DisSystem *aSystemPtr) override
bool UpdateXmtrFromBeam (WsfDisEmission *aEmissionPtr, DisBeam *aBeamPtr, WsfEM_Xmtr *aXmtrPtr, bool &aBeamOn) override
void UpdateWeapon (WsfDisEmission *aEmissionPtr, DisSystem *aSystemPtr, WsfWeapon *aWeaponPtr)
void RemoveXmtrs (WsfDisEmission *aEmissionPtr, DisSystem *aSystemPtr, WsfWeapon *aWeaponPtr)
const IncomingTransferListGetIncomingTransferList () const
const OutgoingTransferListGetOutgoingTransferList () const
WsfDisInterfaceGetDis () const
WsfMilExtensionGetMilExtension () const
const WsfScenarioGetScenario () const
void UpdateSystemFromWeapon (WsfWeapon *aWeaponPtr, DisSystem *aSystemPtr)
 Update a DIS System record from a Weapon object.
void UpdateBeamFromXmtr (WsfEM_Xmtr &aXmtr, DisBeam *aBeamPtr, double aMinAz, double aMaxAz, double aMinEl, double aMaxEl)
 Update a DIS Beam record from a Transmitter object.
void AddImplicitWeaponEngagement (WsfWeaponEngagement *aEngagement, const DisEventId &aId)
WsfWeaponEngagementFindImpicitWeaponEngagement (const DisEventId &aId) const
void AddDirectedEnergyWeapon (std::unique_ptr< WsfDirectedEnergyWeapon > aWeaponPtr, const DisEventId &aId)
WsfDirectedEnergyWeaponFindDirectedEnergyWeapon (const DisEventId &aId) const
void DeleteDirectedEnergyWeapon (const DisEventId &aId)

Additional Inherited Members

Public Types inherited from WsfComponentT< WsfDisInput >
typedef WsfDisInput ParentType
 This is needed to support the WsfComponentList template.

Member Typedef Documentation

◆ IncomingTransferList

◆ OutgoingTransferList

Constructor & Destructor Documentation

◆ WsfMilDisInterface() [1/3]

WsfMilDisInterface::WsfMilDisInterface ( WsfMilExtension * aMilExtensionPtr)

◆ WsfMilDisInterface() [2/3]

WsfMilDisInterface::WsfMilDisInterface ( const WsfMilDisInterface & aSrc)

References WsfMilDisInterface().

◆ WsfMilDisInterface() [3/3]

WsfMilDisInterface::WsfMilDisInterface ( WsfMilDisInterface && )
default

References WsfMilDisInterface().

◆ ~WsfMilDisInterface()

WsfMilDisInterface::~WsfMilDisInterface ( )
override

Member Function Documentation

◆ AddDirectedEnergyWeapon()

void WsfMilDisInterface::AddDirectedEnergyWeapon ( std::unique_ptr< WsfDirectedEnergyWeapon > aWeaponPtr,
const DisEventId & aId )

◆ AddedToDisInterface()

◆ AddEmissionSystem()

bool WsfMilDisInterface::AddEmissionSystem ( WsfPlatform * aPlatformPtr,
WsfDisEmission * aEmissionPtr,
DisSystem * aSystemPtr )
overridevirtual

◆ AddImplicitWeaponEngagement()

void WsfMilDisInterface::AddImplicitWeaponEngagement ( WsfWeaponEngagement * aEngagement,
const DisEventId & aId )

◆ CloneComponent()

WsfComponent * WsfMilDisInterface::CloneComponent ( ) const
overridevirtual

Clones a component. May return null if component does not support clone.

Implements WsfComponent.

References WsfMilDisInterface().

◆ DeleteDirectedEnergyWeapon()

void WsfMilDisInterface::DeleteDirectedEnergyWeapon ( const DisEventId & aId)

◆ Find()

◆ FindDirectedEnergyWeapon()

WsfDirectedEnergyWeapon * WsfMilDisInterface::FindDirectedEnergyWeapon ( const DisEventId & aId) const

◆ FindImpicitWeaponEngagement()

WsfWeaponEngagement * WsfMilDisInterface::FindImpicitWeaponEngagement ( const DisEventId & aId) const

◆ GetComponentName()

WsfStringId WsfMilDisInterface::GetComponentName ( ) const
inlineoverridevirtual

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.

◆ GetComponentRoles()

const int * WsfMilDisInterface::GetComponentRoles ( ) const
inlineoverridevirtual

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:

return roles;
@ cWSF_COMPONENT_SENSOR
A 'sensor' component (WsfSensor).
Definition WsfComponentRoles.hpp:105
@ cWSF_COMPONENT_PLATFORM_PART
The component derives from WsfPlatformPart.
Definition WsfComponentRoles.hpp:98
@ cWSF_COMPONENT_ARTICULATED_PART
The component derives from WsfArticulatedPart.
Definition WsfComponentRoles.hpp:99

Implements WsfComponent.

References cWSF_COMPONENT_MIL_DIS_EXTENSION.

◆ GetDis()

WsfDisInterface * WsfMilDisInterface::GetDis ( ) const
inline

◆ GetIncomingTransferList()

const IncomingTransferList & WsfMilDisInterface::GetIncomingTransferList ( ) const
inline

◆ GetMilExtension()

WsfMilExtension * WsfMilDisInterface::GetMilExtension ( ) const
inline

◆ GetOutgoingTransferList()

const OutgoingTransferList & WsfMilDisInterface::GetOutgoingTransferList ( ) const
inline

◆ GetScenario()

const WsfScenario & WsfMilDisInterface::GetScenario ( ) const

◆ GetWeaponEvents()

WsfDisWeaponEvents * WsfMilDisInterface::GetWeaponEvents ( ) const
inline

Referenced by WsfDisFire::Process().

◆ Initialize()

bool WsfMilDisInterface::Initialize ( double aSimTime)
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.

Parameters
aSimTimeThe current simulation time.
Returns
true if successful or false if unsuccessful (bad input data, etc.)
Note
This method should NOT add any other components to the platform. This MUST be done in PreInitialize().

Reimplemented from WsfComponent.

References WsfObserver::DirectedEnergyWeaponBeginShot(), WsfObserver::DirectedEnergyWeaponEndShot(), WsfObserver::DirectedEnergyWeaponUpdateShot(), WsfObserver::ImplicitWeaponEndEngagement(), WsfObserver::JammingRequestCanceled(), WsfObserver::JammingRequestInitiated(), WsfObserver::JammingRequestUpdated(), WsfObserver::WeaponFired(), WsfObserver::WeaponTerminated(), WsfObserver::WeaponTurnedOff(), and WsfObserver::WeaponTurnedOn().

◆ operator=() [1/2]

WsfMilDisInterface & WsfMilDisInterface::operator= ( const WsfMilDisInterface & )
delete

References WsfMilDisInterface().

◆ operator=() [2/2]

WsfMilDisInterface & WsfMilDisInterface::operator= ( WsfMilDisInterface && )
default

References WsfMilDisInterface().

◆ PlatformCreated()

void WsfMilDisInterface::PlatformCreated ( WsfDisPlatform * aPlatformPtr)
overridevirtual

Reimplemented from WsfDisComponent.

References WsfDisPlatform::AddComponent().

◆ PrepareComponent()

void WsfMilDisInterface::PrepareComponent ( double aSimTime)
overridevirtual

◆ ProcessInput()

bool WsfMilDisInterface::ProcessInput ( UtInput & aInput)
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.

Parameters
aInputThe input stream.
Returns
true if the current command was recognized (and processed), or false if the command was not recognized.
Exceptions
UtInput::ExceptionBaseif an invalid input was encountered.

Reimplemented from WsfComponent.

References WsfDisInterface::ReadEntityId(), and WsfDisInterface::ReadEntityType().

◆ QueryInterface()

void * WsfMilDisInterface::QueryInterface ( int aRole)
overridevirtual

Requests a component's role interface. A component can support one or more roles.

Parameters
aRoleThe role whose interface is to be returned.
Returns
A pointer to the object if it supports the indicated role, or 'null' if it does not. Usage: WsfProcessor* procPtrOrNull = (WsfProcessor*)componentPtr->QueryComponentInterface(cWSF_COMPONENT_PROCESSOR);

Implements WsfComponent.

References cWSF_COMPONENT_MIL_DIS_EXTENSION.

◆ RemoveXmtrs()

void WsfMilDisInterface::RemoveXmtrs ( WsfDisEmission * aEmissionPtr,
DisSystem * aSystemPtr,
WsfWeapon * aWeaponPtr )

Removes unused xmtrs from a weapon.

Parameters
aEmissionPtr[input] Pointer to the DIS emission PDU.
aSystemPtr[input] Pointer to the DIS emission PDU system.
aWeaponPtr[input] Pointer to the weapon to update.

References WsfEM_XmtrRcvr::GetBandwidth(), WsfWeapon::GetEM_Xmtr(), WsfWeapon::GetEM_XmtrCount(), WsfEM_XmtrRcvr::GetFrequency(), WsfDisPlatform::GetSysBeamIdToPartId(), WsfUniqueId::GetUniqueId(), and WsfWeapon::StopJamming().

Referenced by UpdateWeapon().

◆ TransferPlatformToExternalControl()

bool WsfMilDisInterface::TransferPlatformToExternalControl ( double aSimTime,
WsfPlatform * aPlatformPtr )
overridevirtual

Reimplemented from WsfDisComponent.

◆ TransferPlatformToInternalControl()

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

Reimplemented from WsfDisComponent.

◆ UpdateBeamFromXmtr()

void WsfMilDisInterface::UpdateBeamFromXmtr ( WsfEM_Xmtr & aXmtr,
DisBeam * aBeamPtr,
double aMinAz,
double aMaxAz,
double aMinEl,
double aMaxEl )

Update a DIS Beam record from a Transmitter object.

References WsfEW_EA::GetElectronicAttack(), WsfEW_EA_EP::GetTechniquesInUse(), and WsfEW_EA_EP::TechniquesAreInUse().

Referenced by UpdateSystemFromWeapon().

◆ UpdateEmissionSystem()

bool WsfMilDisInterface::UpdateEmissionSystem ( WsfPlatform * aPlatformPtr,
WsfDisEmission * aEmissionPtr,
DisSystem * aSystemPtr )
overridevirtual

◆ UpdateSystemFromWeapon()

◆ UpdateWeapon()

void WsfMilDisInterface::UpdateWeapon ( WsfDisEmission * aEmissionPtr,
DisSystem * aSystemPtr,
WsfWeapon * aWeaponPtr )

Updates the weapon from the DIS emitter system data.

Parameters
aEmissionPtr[input] Pointer to the DIS emission PDU.
aSystemPtr[input] Pointer to the DIS emission PDU system.
aWeaponPtr[input] Pointer to the weapon to update.

References WsfWeapon::GetEM_Xmtr(), WsfWeapon::GetEM_XmtrCount(), WsfWeapon::GetMaximumRequestCount(), WsfUniqueId::GetUniqueId(), platformPtr, RemoveXmtrs(), WsfWeapon::StartJamming(), targetIndex(), WsfWeapon::UpdateJamming(), WsfDisEmission::UpdateLocation(), WsfDisEmission::UpdateSysBeamMapping(), and WsfDisEmission::UpdateXmtr().

Referenced by AddEmissionSystem(), and UpdateEmissionSystem().

◆ UpdateXmtrFromBeam()


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