WSF
WsfEW_Technique Class Reference

#include <WsfEW_Technique.hpp>

Inheritance diagram for WsfEW_Technique:
Collaboration diagram for WsfEW_Technique:

Public Types

using EffectPtrVec = std::vector<WsfEW_Effect*>
 A vector type to hold list of effects.
Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.

Public Member Functions

 WsfEW_Technique ()
WsfEW_Techniqueoperator= (const WsfEW_Technique &)=delete
 ~WsfEW_Technique () override
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Technique application methods

bool CanApplyTechnique (unsigned int aSystemFunctionMask) const
virtual std::vector< WsfEW_Types::TechniqueId > * GetMitigatedTechniqueIds ()
 Returns a pointer to the mitigated techniques list for this technique.
virtual std::vector< WsfEW_Types::TechniqueId > * GetMitigatedTechniqueClassIds ()
 Returns a pointer to the mitigated techniques list for this technique.
virtual WsfStringId GetMitigationClassId () const
 WsfEW_Technique (const WsfEW_Technique &aSrc)
bool FindEffectIndex (WsfStringId aEffectNameId, unsigned int &aIndex) const

Common infrastructure methods.

WsfEW_TechniqueClone () const override
virtual bool Initialize (WsfSimulation &aSimulation)
bool ProcessInput (UtInput &aInput) override

Transmitter management methods.

virtual void RemoveJammerXmtr (unsigned int aXmtrId)
virtual void RemoveJammerXmtr (WsfEM_Xmtr *aXmtrPtr)

Class pointer methods.

void SetEA_EP_Ptr (WsfEW_EA_EP *aEA_Ptr)
WsfEW_EA_EPGetEA_EP_Ptr () const
WsfEW_EAGetEA_Ptr () const
WsfEW_EPGetEP_Ptr () const

Status methods

void SetDefaultOn (bool aDefaultOn)
bool IsDefaultOn () const
 Get the default 'on' state.
virtual bool IsExternallyControlled () const
void SetDebug (bool aDebug)
bool DebugEnabled () const

Effect methods

bool AddEffect (WsfEW_Effect *aEffectPtr)
bool EffectIsAvailable (WsfStringId aEffectNameId) const
unsigned int GetEffectCount ()
WsfEW_EffectGetEffect (unsigned int aIndex) const
WsfEW_EffectGetEffect (WsfStringId aEffectNameId) const
const EffectPtrVecGetEffects () const
WsfEW_EffectSelectUnmitigatedEffect (unsigned int aSystemFunctionMask)
WsfEW_EffectSelectUnmitigatedEffect (unsigned int aIndex, unsigned int aSystemFunctionMask)
bool SetDeltaGainEffect (double aSimTime, WsfStringId aEffectId, bool aDebug, double aJammingPowerGain, WsfStringId aSystemTypeId, WsfStringId aSystemFunctionID)
bool HasFrequencyAgilityEffect () const

Additional Inherited Members

 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Detailed Description

A class which encapsulates data and functionality related to Techniques.

Each EA and EP technique may have multiple EW Effects they may cause or perceive during operation. The individual EW Effect objects will be set via ProcessInput() at simulation start time and fixed thereafter. But in response to changing EA and EP Techniques, a different EW Effect will be referenced for the resulting tracks obscuration.

Member Typedef Documentation

◆ EffectPtrVec

A vector type to hold list of effects.

Constructor & Destructor Documentation

◆ WsfEW_Technique() [1/2]

◆ ~WsfEW_Technique()

WsfEW_Technique::~WsfEW_Technique ( )
override

◆ WsfEW_Technique() [2/2]

WsfEW_Technique::WsfEW_Technique ( const WsfEW_Technique & aSrc)
protected

Member Function Documentation

◆ AddEffect()

bool WsfEW_Technique::AddEffect ( WsfEW_Effect * aEffectPtr)

◆ CanApplyTechnique()

bool WsfEW_Technique::CanApplyTechnique ( unsigned int aSystemFunctionMask) const

Indicates if the specified technique can be applied to the specified system type.

Parameters
aSystemFunctionMaskThe system function mask.
Returns
Returns true if the technique can be applied to the system function.

Referenced by WsfEW_EA_EP::CanApplyTechnique(), WsfEW_EP::GetMitigatingEffects(), and WsfEW_Effects::Process().

◆ Clone()

WsfEW_Technique * WsfEW_Technique::Clone ( ) const
overridevirtual

Clone this object.

Returns
a pointer to the new object.

Implements WsfObject.

References WsfEW_Technique().

◆ DebugEnabled()

bool WsfEW_Technique::DebugEnabled ( ) const
inline

Get the debug flag state

Returns
Returns the debug flag state, 'true' or 'false'

◆ EffectIsAvailable()

bool WsfEW_Technique::EffectIsAvailable ( WsfStringId aEffectNameId) const

◆ FindEffectIndex()

bool WsfEW_Technique::FindEffectIndex ( WsfStringId aEffectNameId,
unsigned int & aIndex ) const
protected

◆ GetEA_EP_Ptr()

WsfEW_EA_EP * WsfEW_Technique::GetEA_EP_Ptr ( ) const
inline

Get the Electronic Attack / Electronic Protect pointer, returns NULL if not set.

Returns
Returns the associated EA pointer.

Referenced by SetDeltaGainEffect().

◆ GetEA_Ptr()

WsfEW_EA * WsfEW_Technique::GetEA_Ptr ( ) const

Get the Electronic Attack pointer, returns NULL if not set or if N/A.

Returns
Returns the associated EA pointer.

◆ GetEffect() [1/2]

◆ GetEffect() [2/2]

WsfEW_Effect * WsfEW_Technique::GetEffect ( WsfStringId aEffectNameId) const

◆ GetEffectCount()

unsigned int WsfEW_Technique::GetEffectCount ( )
inline

◆ GetEffects()

◆ GetEP_Ptr()

WsfEW_EP * WsfEW_Technique::GetEP_Ptr ( ) const

Get the Electronic Protect pointer, returns NULL if not set or if N/A.

Returns
Returns the associated EP pointer.

◆ GetMitigatedTechniqueClassIds()

virtual std::vector< WsfEW_Types::TechniqueId > * WsfEW_Technique::GetMitigatedTechniqueClassIds ( )
inlinevirtual

Returns a pointer to the mitigated techniques list for this technique.

Reimplemented in WsfEW_EP::EP_Technique.

Referenced by WsfEW_EP::GetMitigatingEffects().

◆ GetMitigatedTechniqueIds()

virtual std::vector< WsfEW_Types::TechniqueId > * WsfEW_Technique::GetMitigatedTechniqueIds ( )
inlinevirtual

Returns a pointer to the mitigated techniques list for this technique.

Reimplemented in WsfEW_EP::EP_Technique.

Referenced by WsfEW_EP::GetMitigatedTechniqueIds(), and WsfEW_EP::GetMitigatingEffects().

◆ GetMitigationClassId()

virtual WsfStringId WsfEW_Technique::GetMitigationClassId ( ) const
inlinevirtual

Returns the user input mitigation flag ID for this EA technique that can be used to select EP techniques for mitigation.

Reimplemented in WsfEW_EA::EA_Technique.

Referenced by WsfEW_EP::GetMitigatingEffects().

◆ HasFrequencyAgilityEffect()

bool WsfEW_Technique::HasFrequencyAgilityEffect ( ) const

◆ Initialize()

bool WsfEW_Technique::Initialize ( WsfSimulation & aSimulation)
virtual

◆ IsDefaultOn()

bool WsfEW_Technique::IsDefaultOn ( ) const
inline

Get the default 'on' state.

Referenced by WsfEW_EA_EP::Initialize(), and WsfEW_EA_EP::ResetTechniquesInUseList().

◆ IsExternallyControlled()

virtual bool WsfEW_Technique::IsExternallyControlled ( ) const
inlinevirtual

Check to see if this technique is externally controlled.

Note
Valid only for EP_Techniques.

Reimplemented in WsfEW_EP::EP_Technique.

Referenced by WsfEW_EP::GetMitigatingEffects(), WsfEW_EA_EP::ResetTechniquesInUseList(), WsfEW_EA_EP::SetTechnique(), and WsfEW_EA_EP::TechniqueIsExternallyControlled().

◆ operator=()

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

◆ ProcessInput()

bool WsfEW_Technique::ProcessInput ( UtInput & aInput)
overridevirtual

Process input from a generic source.

Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

Reimplemented from WsfObject.

References WsfScenario::FromInput(), and WsfEW_EffectTypes::Get().

Referenced by WsfEW_EA::EA_Technique::ProcessInput(), and WsfEW_EP::EP_Technique::ProcessInput().

◆ RemoveJammerXmtr() [1/2]

void WsfEW_Technique::RemoveJammerXmtr ( unsigned int aXmtrId)
virtual

Remove the specified jammer from the associate effects.

Parameters
aXmtrIdThe unique Id of the transmitter.

Referenced by operator=(), WsfEW_EA_EP::RemoveJammerXmtr(), and WsfEW_EA_EP::RemoveJammerXmtr().

◆ RemoveJammerXmtr() [2/2]

void WsfEW_Technique::RemoveJammerXmtr ( WsfEM_Xmtr * aXmtrPtr)
virtual

Remove the specified jammer transmitter from the associate effects.

Parameters
aXmtrPtrThe pointer to the transmitter.

◆ SelectUnmitigatedEffect() [1/2]

WsfEW_Effect * WsfEW_Technique::SelectUnmitigatedEffect ( unsigned int aIndex,
unsigned int aSystemFunctionMask )

Gets an effect based on the provided EW function.

Parameters
aIndexThe index of the effect of interest.
aSystemFunctionMaskIndicates what system function(s) that the effect will be applied to (i.e. Comms, Sensors, etc.).
Returns
Returns the appropriate EW effect (0 if none is found).

◆ SelectUnmitigatedEffect() [2/2]

WsfEW_Effect * WsfEW_Technique::SelectUnmitigatedEffect ( unsigned int aSystemFunctionMask)

Gets an effect based on the provided EW function.

Parameters
aSystemFunctionMaskIndicates what system function(s) that the effect will be applied to (i.e. Comms, Sensors, etc.).
Returns
Returns the appropriate EW effect (0 if none is found).

◆ SetDebug()

void WsfEW_Technique::SetDebug ( bool aDebug)
inline

Set the debug flag state

Parameters
aDebugThe debug flag state, 'true' or 'false'

Referenced by WsfEW_EA::SetDeltaGainTechnique().

◆ SetDefaultOn()

void WsfEW_Technique::SetDefaultOn ( bool aDefaultOn)
inline

Set the default 'on' state

Parameters
aDefaultOnThe default state of the technique, 'true' is on & 'false' is off.

Referenced by WsfEW_EA::SetDeltaGainTechnique().

◆ SetDeltaGainEffect()

bool WsfEW_Technique::SetDeltaGainEffect ( double aSimTime,
WsfStringId aEffectId,
bool aDebug,
double aJammingPowerGain,
WsfStringId aSystemTypeId,
WsfStringId aSystemFunctionId )

Set a jamming delta gain technique on an active spot using the supplied criteria.

Parameters
aSimTimeThe current simulation time.
aEffectIdThe assigned effect Id to set.
aDebugThe debug state to set for the technique.
aJammingPowerGainThe assigned jamming gain value.
aSystemTypeIdThe assigned System Type Id of the target types this technique applies to.
aSystemFunctionIdThe assigned System Function Id of the target types this technique applies to.
Returns
The request was successful.

References WsfEW_Effect::cEB_JAMMER_POWER_EFFECT, GetEA_EP_Ptr(), GetEffect(), WsfObject::GetName(), WsfEW_PowerEffect::Initialize(), WsfEW_Effect::SetBehavior(), WsfEW_Effect::SetDebug(), WsfEW_Effect::SetEA_EP_Ptr(), WsfEW_PowerEffect::SetJammingPowerGain(), WsfObject::SetName(), WsfEW_Effect::SetSystemFunctionMask(), and WsfEW_Effect::SetTechniquePtr().

Referenced by WsfEW_EA::SetDeltaGainTechnique().

◆ SetEA_EP_Ptr()

void WsfEW_Technique::SetEA_EP_Ptr ( WsfEW_EA_EP * aEA_Ptr)
inline

Set the Electronic Attack pointer, set to NULL by default.

Parameters
aEA_PtrThe associated EA pointer for the technique.

Referenced by WsfEW_EA::Initialize(), WsfEW_EP::Initialize(), and WsfEW_EA::SetDeltaGainTechnique().


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