WSF
WsfMilExtInterface Class Reference

#include <WsfMilExtInterface.hpp>

Inheritance diagram for WsfMilExtInterface:
Collaboration diagram for WsfMilExtInterface:

Static Public Member Functions

static WsfMilExtInterfaceFind (const WsfExtInterface &aExt)

Component infrastructure methods

typedef std::pair< WsfStringId, WsfStringIdWeaponTargetType
typedef std::map< WeaponTargetType, double > PK_Table
typedef std::map< WsfStringId, int > CategoryToWarheadMap
 A map of category ids to enumerations for output of warhead info.
static WsfWeaponGetWeapon (WsfPlatform *aPlatformPtr, WsfStringId aSensorTypeId, unsigned int aEmitterNameDIS, unsigned int aEmitterIdNumberDIS)
WsfComponentCloneComponent () const override
WsfStringId GetComponentName () const override
const int * GetComponentRoles () const override
void * QueryInterface (int aRole) override
 WsfMilExtInterface (WsfMilExtension *aMilExtensionPtr)
void PrintEmitterTypes (WsfScenario &aScenario, std::ostream &aStream) override
bool ProcessInput (UtInput &aInput) override
bool CompleteLoad (WsfScenario &aScenario) override
WsfWeaponGetWeapon (const WsfScenario &aScenario, WsfStringId aSensorTypeId, unsigned int aEmitterNameDIS, unsigned int aEmitterIdNumberDIS)
WsfWeaponAddWeapon (double aSimTime, WsfPlatform *aPlatformPtr, WsfStringId aSensorTypeId, unsigned int aEmitterNameDIS, unsigned int aEmitterIdNumberDIS)
WsfStringId SelectWeaponType (WsfSimulation &aSimulation, const WsfExtEntityType &aEntityType)
 Given an entity type, select the object type to be used.
int GetWarheadEnum (const WsfPlatformPart *aWarheadPtr)
int GetDebugWarfarePDU ()
void SetDebugWarfarePDU (int aDebugWarfarePDU)
std::string GetExternalWeaponEffectsType ()
double GetSimpleKillRange ()
bool GetUseSimpleDetonations ()
std::set< WsfStringId > & GetExcludedDetonationPlatformTypes ()
std::set< WsfStringId > & GetExcludedDetonationWeaponEffects ()
PK_TableGetPK_Table ()
void ProcessEW_TechniqueType (UtInput &aInput)
uint32_t GetJamModeSequence (WsfStringId aTechTypeId)
 Return the DIS jamming mode sequence name that corresponds to given WSF EW technique type Id.
WsfStringId GetTechniqueTypeId (uint32_t aJamModeSequence)
 Return the WSF technique type Id that corresponds to given DIS jamming mode sequence.

Additional Inherited Members

Public Types inherited from WsfComponentT< WsfExtData >
typedef WsfExtData ParentType
 This is needed to support the WsfComponentList template.
Public Member Functions inherited from WsfComponentT< WsfExtData >
 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 Initialize (double aSimTime)
virtual bool Initialize2 (double aSimTime)
virtual void PreInput ()

Member Typedef Documentation

◆ CategoryToWarheadMap

A map of category ids to enumerations for output of warhead info.

◆ PK_Table

◆ WeaponTargetType

Constructor & Destructor Documentation

◆ WsfMilExtInterface()

WsfMilExtInterface::WsfMilExtInterface ( WsfMilExtension * aMilExtensionPtr)

Referenced by CloneComponent(), and Find().

Member Function Documentation

◆ AddWeapon()

WsfWeapon * WsfMilExtInterface::AddWeapon ( double aSimTime,
WsfPlatform * aPlatformPtr,
WsfStringId aSensorTypeId,
unsigned int aEmitterNameDIS,
unsigned int aEmitterIdNumberDIS )

Adds a weapon to the given platform.

Parameters
aSimTime[input] Current simulation time.
aPlatformPtr[input] Pointer to the weapon's platform.
aSensorTypeId[input] Sensor type ID.
aEmitterNameDIS[input] DIS emitter system - emitter name
aEmitterIdNumberDIS[input] DIS emitter system - emitter ID number
Returns
A pointer to the weapon just added.

References WsfComponentListT< COMPONENT_TYPE >::AddComponent(), WsfWeapon::Clone(), WsfComponentList::DeleteComponent(), WsfObject::GetName(), WsfPlatform::GetScenario(), WsfPlatform::GetSimulation(), WsfObject::GetType(), GetWeapon(), WsfWeapon::Initialize(), and WsfObject::SetName().

Referenced by WsfMilDisInterface::AddEmissionSystem().

◆ CloneComponent()

WsfComponent * WsfMilExtInterface::CloneComponent ( ) const
overridevirtual

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

Implements WsfComponent.

References WsfMilExtInterface().

◆ CompleteLoad()

bool WsfMilExtInterface::CompleteLoad ( WsfScenario & aScenario)
overridevirtual

◆ Find()

◆ GetComponentName()

WsfStringId WsfMilExtInterface::GetComponentName ( ) const
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.

◆ GetComponentRoles()

const int * WsfMilExtInterface::GetComponentRoles ( ) const
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:

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_EXT_INTERFACE.

◆ GetDebugWarfarePDU()

int WsfMilExtInterface::GetDebugWarfarePDU ( )
inline

◆ GetExcludedDetonationPlatformTypes()

std::set< WsfStringId > & WsfMilExtInterface::GetExcludedDetonationPlatformTypes ( )
inline

◆ GetExcludedDetonationWeaponEffects()

std::set< WsfStringId > & WsfMilExtInterface::GetExcludedDetonationWeaponEffects ( )
inline

◆ GetExternalWeaponEffectsType()

std::string WsfMilExtInterface::GetExternalWeaponEffectsType ( )
inline

◆ GetJamModeSequence()

uint32_t WsfMilExtInterface::GetJamModeSequence ( WsfStringId aTechTypeId)

Return the DIS jamming mode sequence name that corresponds to given WSF EW technique type Id.

◆ GetPK_Table()

PK_Table & WsfMilExtInterface::GetPK_Table ( )
inline

◆ GetSimpleKillRange()

double WsfMilExtInterface::GetSimpleKillRange ( )
inline

◆ GetTechniqueTypeId()

WsfStringId WsfMilExtInterface::GetTechniqueTypeId ( uint32_t aJamModeSequence)

Return the WSF technique type Id that corresponds to given DIS jamming mode sequence.

◆ GetUseSimpleDetonations()

bool WsfMilExtInterface::GetUseSimpleDetonations ( )
inline

◆ GetWarheadEnum()

int WsfMilExtInterface::GetWarheadEnum ( const WsfPlatformPart * aWarheadPtr)

Get the warhead enum based on any input category associations. Default is to return 0 == "Other".

References WsfPlatformPart::GetCategories(), and WsfCategoryList::IsCategoryMember().

◆ GetWeapon() [1/2]

WsfWeapon * WsfMilExtInterface::GetWeapon ( const WsfScenario & aScenario,
WsfStringId aSensorTypeId,
unsigned int aEmitterNameDIS,
unsigned int aEmitterIdNumberDIS )

Gets a weapon from the given platform.

Parameters
aScenario[input] The current scenario.
aSensorTypeId[input] Sensor type ID.
aEmitterNameDIS[input] DIS emitter system - emitter name
aEmitterIdNumberDIS[input] DIS emitter system - emitter ID number
Returns
A pointer to the weapon just found.

References WsfObjectTypeList< T >::Clone(), WsfWeaponTypes::Get(), WsfAuxDataEnabled::GetAuxData(), and WsfAuxDataEnabled::GetAuxDataConst().

◆ GetWeapon() [2/2]

WsfWeapon * WsfMilExtInterface::GetWeapon ( WsfPlatform * aPlatformPtr,
WsfStringId aSensorTypeId,
unsigned int aEmitterNameDIS,
unsigned int aEmitterIdNumberDIS )
static

Gets a weapon from the given platform.

Parameters
aPlatformPtr[input] Pointer to the weapon's platform.
aSensorTypeId[input] Sensor type ID.
aEmitterNameDIS[input] DIS emitter system - emitter name
aEmitterIdNumberDIS[input] DIS emitter system - emitter ID number
Returns
A pointer to the weapon just found.

References WsfComponentList::RoleIterator< T >::AtEnd(), and WsfUtil::GetAuxValue().

Referenced by AddWeapon(), and WsfMilDisInterface::UpdateEmissionSystem().

◆ PrintEmitterTypes()

◆ ProcessEW_TechniqueType()

void WsfMilExtInterface::ProcessEW_TechniqueType ( UtInput & aInput)

Referenced by ProcessInput().

◆ ProcessInput()

bool WsfMilExtInterface::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 WsfExtInput::Find(), WsfExtInput::mData, WsfExtData::ProcessEntityType(), and ProcessEW_TechniqueType().

◆ QueryInterface()

void * WsfMilExtInterface::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_EXT_INTERFACE.

◆ SelectWeaponType()

WsfStringId WsfMilExtInterface::SelectWeaponType ( WsfSimulation & aSimulation,
const WsfExtEntityType & aEntityType )

◆ SetDebugWarfarePDU()

void WsfMilExtInterface::SetDebugWarfarePDU ( int aDebugWarfarePDU)
inline

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