WSF
WsfEW_EA_EP Class Referenceabstract

#include <WsfEW_EA_EP.hpp>

Inheritance diagram for WsfEW_EA_EP:
Collaboration diagram for WsfEW_EA_EP:

Public Member Functions

 WsfEW_EA_EP ()
WsfEW_EA_EPoperator= (const WsfEW_EA_EP &)=delete
 ~WsfEW_EA_EP () override=default
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)

Effect methods.

WsfSimulationmSimulationPtr
WsfEW_Types::TechniqueIdVec mTechniques
 A collection/list of all the Techniques by Id.
WsfEW_Types::TechniqueIdVec mTechniquesInUse
 A collection of all the Techniques currently in use by Id.
bool mDebug
 Debug flag 'true' if debug is enabled, 'false' otherwise.
WsfEM_XmtrRcvrmLinkedXmtrRcvrPtr
 The transmitter/receiver to which this EA/EP is linked to.
bool HasFrequencyAgilityEffect () const
bool EffectIsAvailable (WsfStringId aEffectNameId) const
bool EffectIsAvailable (WsfEW_Types::TechniqueId aTechId, WsfStringId aEffectNameId) const
virtual WsfEW_EffectGetEffect (WsfEW_Types::TechniqueId aTechId, unsigned int aIndex) const
virtual WsfEW_EffectGetEffect (WsfEW_Types::TechniqueId aTechId, WsfStringId aEffectId) const
virtual const WsfEW_Technique::EffectPtrVecGetEffects (WsfEW_Types::TechniqueId aId) const
WsfSimulationGetSimulation () const
 WsfEW_EA_EP (const WsfEW_EA_EP &aSrc)
bool PrivateSetTechnique (WsfEW_Types::TechniqueId aTechnique, bool aOnOff)

Common infrastructure methods.

WsfEW_EA_EPClone () const override=0
virtual bool Initialize (WsfSimulation &aSimulation, WsfEM_XmtrRcvr *aXmtrRcvrPtr)
bool ProcessInput (UtInput &aInput) override
virtual bool DebugEnabled () const
 Determines if debugging is enabled.

Linkage methods.

virtual WsfEM_XmtrRcvrGetLinkedXmtrRcvr () const

Jammer management methods.

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

EA methods.

virtual bool SetDeltaGainTechnique (double aSimTime, WsfStringId aTechniqueId, bool aOnOff, bool aDebug, WsfStringId aEffectId, double aJammingDeltaGain, WsfStringId aSystemTypeId, WsfStringId aSystemFunctionId)

EP methods.

virtual WsfEW_Technique::EffectPtrVec GetMitigatingEffects (const WsfEW_Effect *aEA_EffectPtr, WsfEW_Effect::SystemFunction aAffectingSystemFunction, WsfEW_Effect::SystemFunction aAffectedSystemFunction)

Technique methods.

virtual bool AddTechnique (WsfEW_Technique *aTechniquePtr)
bool TechniquesAreAvailable () const
 Return true if there are techniques available, 0 otherwise.
bool TechniquesAreInUse () const
 Return true if there are techniques in use, 0 otherwise.
bool TechniqueIsAvailable (WsfEW_Types::TechniqueId aId) const
bool TechniqueIsInUse (WsfEW_Types::TechniqueId aId) const
bool TechniqueIsExternallyControlled (WsfEW_Types::TechniqueId aId) const
const WsfEW_Types::TechniqueIdVecGetTechniquesAvailable () const
 Return a list of all the technique Ids that are currently available.
const WsfEW_Types::TechniqueIdVecGetTechniquesInUse () const
 Return a list of all the technique Ids that are currently in use.
void SetTechnique (WsfEW_Types::TechniqueId aTechniqueId, bool aOnOff)
virtual WsfEW_TechniqueGetTechnique (WsfEW_Types::TechniqueId aTechniqueId) const
virtual WsfEW_TechniqueGetTechnique (unsigned int aIndex) const
void ResetTechniquesInUseList ()
virtual bool SelectTechnique (unsigned int aIndex)
virtual bool SelectTechnique (WsfEW_Types::TechniqueId aId)
virtual bool DeselectTechnique (unsigned int aIndex)
virtual bool DeselectTechnique (WsfEW_Types::TechniqueId aId)
virtual bool CanApplyTechnique (WsfEW_Types::TechniqueId aId, WsfEW_Effect::SystemFunction aSystemFunction) const
virtual WsfEW_Types::TechniqueIdVecGetMitigatedTechniques ()

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Detailed Description

A class which encapsulates data and functionality related to an Electronic Attack and an Electronic Protect techniques.

This is an inheritable class which is inherited by WsfEW_EA and WsfEW_EP and and provides the data and functionality related to both of these instances.

Please note that the list/map of technique pointers is kept by the inheriting class as the technique type may be a special case and not necessarily the base WsfEW_Technique class.

Constructor & Destructor Documentation

◆ WsfEW_EA_EP() [1/2]

◆ ~WsfEW_EA_EP()

WsfEW_EA_EP::~WsfEW_EA_EP ( )
overridedefault

◆ WsfEW_EA_EP() [2/2]

WsfEW_EA_EP::WsfEW_EA_EP ( const WsfEW_EA_EP & aSrc)
protected

Member Function Documentation

◆ AddTechnique()

bool WsfEW_EA_EP::AddTechnique ( WsfEW_Technique * aTechniquePtr)
virtual

◆ CanApplyTechnique()

bool WsfEW_EA_EP::CanApplyTechnique ( WsfEW_Types::TechniqueId aId,
WsfEW_Effect::SystemFunction aSystemFunction ) const
virtual

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

Parameters
aIdThe technique id.
aSystemFunctionThe system function.
Returns
Returns true if the technique is valid and can be applied to the system type.

References WsfEW_Technique::CanApplyTechnique(), and GetTechnique().

Referenced by WsfEW_EP::GetMitigatingEffects().

◆ Clone()

WsfEW_EA_EP * WsfEW_EA_EP::Clone ( ) const
overridepure virtual

Clone this object.

Returns
a pointer to the new object.

Implements WsfObject.

Implemented in WsfEW_EA, and WsfEW_EP.

References Initialize(), and WsfEW_EA_EP().

Referenced by WsfRF_Jammer::StartJamming().

◆ DebugEnabled()

virtual bool WsfEW_EA_EP::DebugEnabled ( ) const
inlinevirtual

Determines if debugging is enabled.

References mDebug.

Referenced by WsfRF_Jammer::SetEA_DeltaGainTechnique(), and WsfRF_Jammer::SetEA_DeltaGainTechnique().

◆ DeselectTechnique() [1/2]

bool WsfEW_EA_EP::DeselectTechnique ( unsigned int aIndex)
virtual

Deselect a technique for use based on technique index

Parameters
aIndexSpecifies the index of the technique in the list (0 - size mTechniques-1).
Returns
Returns true if the technique was successfully deselected.

Reimplemented in WsfEW_EA, and WsfEW_EP.

References mDebug, mTechniques, and PrivateSetTechnique().

Referenced by WsfRF_Jammer::DeselectEA_Technique(), and WsfEW_SensorComponent::DeselectEP_Technique().

◆ DeselectTechnique() [2/2]

bool WsfEW_EA_EP::DeselectTechnique ( WsfEW_Types::TechniqueId aId)
virtual

Deselect a technique for use based on technique Id

Parameters
aIdSpecifies the Id of the technique in the list.
Returns
Returns true if the technique was successfully deselected.

Reimplemented in WsfEW_EA, and WsfEW_EP.

References mDebug, mTechniques, and PrivateSetTechnique().

◆ EffectIsAvailable() [1/2]

bool WsfEW_EA_EP::EffectIsAvailable ( WsfEW_Types::TechniqueId aTechId,
WsfStringId aEffectNameId ) const

◆ EffectIsAvailable() [2/2]

bool WsfEW_EA_EP::EffectIsAvailable ( WsfStringId aEffectNameId) const

References EffectIsAvailable(), and mTechniques.

Referenced by EffectIsAvailable().

◆ GetEffect() [1/2]

WsfEW_Effect * WsfEW_EA_EP::GetEffect ( WsfEW_Types::TechniqueId aTechId,
unsigned int aIndex ) const
virtual

◆ GetEffect() [2/2]

WsfEW_Effect * WsfEW_EA_EP::GetEffect ( WsfEW_Types::TechniqueId aTechId,
WsfStringId aEffectId ) const
virtual

◆ GetEffects()

const WsfEW_Technique::EffectPtrVec & WsfEW_EA_EP::GetEffects ( WsfEW_Types::TechniqueId aId) const
virtual

◆ GetLinkedXmtrRcvr()

virtual WsfEM_XmtrRcvr & WsfEW_EA_EP::GetLinkedXmtrRcvr ( ) const
inlinevirtual

◆ GetMitigatedTechniques()

virtual WsfEW_Types::TechniqueIdVec * WsfEW_EA_EP::GetMitigatedTechniques ( )
inlinevirtual

◆ GetMitigatingEffects()

WsfEW_Technique::EffectPtrVec WsfEW_EA_EP::GetMitigatingEffects ( const WsfEW_Effect * aEA_EffectPtr,
WsfEW_Effect::SystemFunction aAffectingSystemFunction,
WsfEW_Effect::SystemFunction aAffectedSystemFunction )
virtual

This non-const method selects appropriate EP Technique(s) (if available), that will mitigate the applied Electronic Attack Techniques, and then returns the resulting effect.

Parameters
aEA_EffectPtrPointer to the applied electronic attack effect to mitigate
aAffectingSystemFunctionIndicates the system function the attack was applied to.
aAffectedSystemFunctionIndicates the system function the attack was applied to.
Returns
The 'effect' resulting from the interchange (can be zero).

Reimplemented in WsfEW_EP.

Referenced by WsfEW_Effects::Process(), and WsfEW_SimpleFT_Effect::UpdateEffects().

◆ GetSimulation()

WsfSimulation * WsfEW_EA_EP::GetSimulation ( ) const

◆ GetTechnique() [1/2]

WsfEW_Technique * WsfEW_EA_EP::GetTechnique ( unsigned int aIndex) const
virtual

Reimplemented in WsfEW_EA, and WsfEW_EP.

◆ GetTechnique() [2/2]

◆ GetTechniquesAvailable()

const WsfEW_Types::TechniqueIdVec & WsfEW_EA_EP::GetTechniquesAvailable ( ) const
inline

Return a list of all the technique Ids that are currently available.

References mTechniques.

◆ GetTechniquesInUse()

const WsfEW_Types::TechniqueIdVec & WsfEW_EA_EP::GetTechniquesInUse ( ) const
inline

Return a list of all the technique Ids that are currently in use.

References mTechniquesInUse.

Referenced by WsfEW_Effects::Process(), WsfMilDisInterface::UpdateBeamFromXmtr(), and WsfEW_SensorComponent::EW_Mode::UpdateFalseTargetInteractors().

◆ HasFrequencyAgilityEffect()

bool WsfEW_EA_EP::HasFrequencyAgilityEffect ( ) const

◆ Initialize()

◆ operator=()

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

References WsfEW_EA_EP().

◆ PrivateSetTechnique()

◆ ProcessInput()

bool WsfEW_EA_EP::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(), WsfEW_TechniqueTypes::Get(), and mDebug.

◆ RemoveJammerXmtr() [1/2]

void WsfEW_EA_EP::RemoveJammerXmtr ( unsigned int aXmtrId)
virtual

Remove the specified jammer transmitter from the associate techniques.

Parameters
aXmtrIdThe unique Id of the transmitter.

References GetTechnique(), mTechniques, and WsfEW_Technique::RemoveJammerXmtr().

◆ RemoveJammerXmtr() [2/2]

void WsfEW_EA_EP::RemoveJammerXmtr ( WsfEM_Xmtr * aXmtrPtr)
virtual

Remove the specified jammer transmitter from the associate techniques.

Parameters
aXmtrPtrThe pointer to the transmitter.

References GetTechnique(), mTechniques, and WsfEW_Technique::RemoveJammerXmtr().

◆ ResetTechniquesInUseList()

void WsfEW_EA_EP::ResetTechniquesInUseList ( )

Reset the techniques in use list to the techniques that are on by default or are externally controlled and currently in use, any changes made to the techniques or associated effects will be kept.

References GetTechnique(), WsfEW_Technique::IsDefaultOn(), WsfEW_Technique::IsExternallyControlled(), mTechniques, PrivateSetTechnique(), and TechniqueIsInUse().

Referenced by WsfEW_EP::GetMitigatingEffects().

◆ SelectTechnique() [1/2]

bool WsfEW_EA_EP::SelectTechnique ( unsigned int aIndex)
virtual

Selects a technique for use based on technique index

Parameters
aIndexSpecifies the index of the technique in the list (0 - size mTechniques-1).
Returns
Returns true if the technique was successfully selected.

Reimplemented in WsfEW_EA, and WsfEW_EP.

References mDebug, mTechniques, and PrivateSetTechnique().

Referenced by WsfRF_Jammer::SelectEA_Technique(), WsfEW_SensorComponent::SelectEP_Technique(), WsfRF_Jammer::StartJamming(), and WsfRF_Jammer::UpdateJamming().

◆ SelectTechnique() [2/2]

bool WsfEW_EA_EP::SelectTechnique ( WsfEW_Types::TechniqueId aId)
virtual

Selects a technique for use based on technique Id

Parameters
aIdSpecifies the Id of the technique in the list.
Returns
Returns true if the technique was successfully selected.

Reimplemented in WsfEW_EA, and WsfEW_EP.

References mDebug, mTechniques, and PrivateSetTechnique().

◆ SetDeltaGainTechnique()

virtual bool WsfEW_EA_EP::SetDeltaGainTechnique ( double aSimTime,
WsfStringId aTechniqueId,
bool aOnOff,
bool aDebug,
WsfStringId aEffectId,
double aJammingDeltaGain,
WsfStringId aSystemTypeId,
WsfStringId aSystemFunctionId )
inlinevirtual

◆ SetTechnique()

void WsfEW_EA_EP::SetTechnique ( WsfEW_Types::TechniqueId aTechniqueId,
bool aOnOff )

Set the technique state to 'on' or 'off', must be set to 'externally_controlled'.

Parameters
aTechniqueIdThe technique Id for which to change the state.
aOnOffThe state of the supplied technique to change to, 'true' is on and 'false' is off.

References GetTechnique(), WsfEW_Technique::IsExternallyControlled(), and PrivateSetTechnique().

◆ TechniqueIsAvailable()

bool WsfEW_EA_EP::TechniqueIsAvailable ( WsfEW_Types::TechniqueId aId) const

Check to see if a technique is available for use by technique Id

Parameters
aIdThe technique Id of the technique of interest.
Returns
Returns 'true' if the technique with Id is available, returns 'false otherwise.

References mTechniques.

Referenced by AddTechnique(), WsfEW_TechniqueTypes::LoadInstance(), and UT_DEFINE_SCRIPT_METHOD().

◆ TechniqueIsExternallyControlled()

bool WsfEW_EA_EP::TechniqueIsExternallyControlled ( WsfEW_Types::TechniqueId aId) const

◆ TechniqueIsInUse()

bool WsfEW_EA_EP::TechniqueIsInUse ( WsfEW_Types::TechniqueId aId) const

Check to see if a technique is in use by technique Id

Parameters
aIdThe technique Id of the technique of interest.
Returns
Returns 'true' if the technique with Id is in use, returns 'false otherwise.

References mTechniquesInUse.

Referenced by WsfEW_EP::GetMitigatingEffects(), WsfEW_SensorComponent::IsEP_TechniqueActive(), PrivateSetTechnique(), ResetTechniquesInUseList(), and WsfRF_Jammer::UpdateJamming().

◆ TechniquesAreAvailable()

bool WsfEW_EA_EP::TechniquesAreAvailable ( ) const
inline

Return true if there are techniques available, 0 otherwise.

References mTechniques.

◆ TechniquesAreInUse()

bool WsfEW_EA_EP::TechniquesAreInUse ( ) const
inline

Return true if there are techniques in use, 0 otherwise.

References mTechniquesInUse.

Referenced by WsfMilDisInterface::UpdateBeamFromXmtr().

Member Data Documentation

◆ mDebug

◆ mLinkedXmtrRcvrPtr

WsfEM_XmtrRcvr* WsfEW_EA_EP::mLinkedXmtrRcvrPtr
protected

The transmitter/receiver to which this EA/EP is linked to.

Referenced by GetLinkedXmtrRcvr(), Initialize(), WsfEW_EA_EP(), and WsfEW_EA_EP().

◆ mSimulationPtr

WsfSimulation* WsfEW_EA_EP::mSimulationPtr
protected

◆ mTechniques

◆ mTechniquesInUse

WsfEW_Types::TechniqueIdVec WsfEW_EA_EP::mTechniquesInUse
protected

A collection of all the Techniques currently in use by Id.

Referenced by GetTechniquesInUse(), PrivateSetTechnique(), TechniqueIsInUse(), TechniquesAreInUse(), WsfEW_EA_EP(), and WsfEW_EA_EP().


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