12#ifndef WSFEW_EFFECT_HPP
13#define WSFEW_EFFECT_HPP
15#include "wsf_mil_export.h"
22#include "UtOptional.hpp"
23#include "UtRandom.hpp"
153 const ut::optional<WsfEM_Interaction>& aTgtToJammerInteraction,
171 const ut::optional<WsfEM_Interaction>& aTgtToJammerInteraction,
195 const ut::optional<WsfEM_Interaction>& aTgtToJammerInteraction,
212 void SetSystemFunctionMask(
const std::string& aSystemFunctionId);
216 void AddSystemFunctionMask(
const std::string& aSystemFunctionId);
241 static unsigned int ConvertCoherencyIdToMask(
WsfStringId aCoherencyId);
328 void Reset()
override;
340 WsfEW_Effect(
const WsfEW_Effect& aSrc);
346 virtual void PrintUpdateMessage(ut::log::MessageStream& aStream,
double aSimTime, WsfEW_Effect* aEW_EffectPtr =
nullptr);
348 void ResetProtectionTypeFlag(WsfEM_Xmtr* aXmtrPtr,
const WsfEM_Interaction& aTargetInteraction, WsfEW_Effects& aEW_Effects);
352 bool ProcessEffectDataBlock(UtInputBlock& aInputBlock,
WsfStringId aSystemTypeId);
353 virtual EffectData& GetEffectData(
WsfStringId aSystemTypeId);
355 bool EffectDataExists(
WsfStringId aSystemTypeId)
const;
362 virtual EffectData* PropagateEffectDataPtr(
WsfStringId aSystemTypeId);
393 using TargetAllowRejectSet = std::set<WsfStringId>;
398 TargetProtectionType mProtectionType{
400 TargetAllowRejectSet mAllowedTargetSet;
401 TargetAllowRejectSet mRejectedTargetSet;
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfEM_Interaction.hpp:68
Definition WsfEM_Rcvr.hpp:68
RcvrFunction
RcvrFunction defines the intended purpose of the receiver.
Definition WsfEM_Rcvr.hpp:80
Definition WsfEM_Xmtr.hpp:55
XmtrFunction
XmtrFunction defines the intended purpose of the transmitter.
Definition WsfEM_Xmtr.hpp:69
Definition WsfEW_EA_EP.hpp:38
Definition WsfEW_EA.hpp:37
Definition WsfEW_EP.hpp:36
Base effect data used to derive from in inheriting effect classes.
Definition WsfEW_Effect.hpp:317
bool Initialize(WsfSimulation &aSimulation) override
Definition WsfEW_Effect.cpp:702
void Reset() override
Definition WsfEW_Effect.cpp:708
WsfEW_Effect * GetEffectPtr()
Definition WsfEW_Effect.hpp:330
void SetEffectPtr(WsfEW_Effect *aEffectPtr)
Definition WsfEW_Effect.hpp:331
EffectData & operator=(const EffectData &)=delete
~EffectData() override=default
WsfEW_Technique * GetTechniquePtr() const
Definition WsfEW_Effect.hpp:290
void AddSystemFunctionMask(SystemFunction aSystemFunction)
Set the system type.
Definition WsfEW_Effect.hpp:215
void SetDebug(bool aDebug)
Definition WsfEW_Effect.hpp:262
std::map< WsfStringId, EffectData * > EffectDataMap
Definition WsfEW_Effect.hpp:387
ut::Random & GetRandom()
Definition WsfEW_Effect.hpp:312
TargetProtectionType
The target protection type this effect is limited to.
Definition WsfEW_Effect.hpp:106
@ cTP_SELF_PROTECT
Definition WsfEW_Effect.hpp:109
@ cTP_NON_SELF_PROTECT
Definition WsfEW_Effect.hpp:108
@ cTP_ALL
Definition WsfEW_Effect.hpp:107
Coherency
The signal coherency the EW effect exhibits on the affected system.
Definition WsfEW_Effect.hpp:74
@ cEC_NONCOHERENT_PULSE
Definition WsfEW_Effect.hpp:78
@ cEC_NONE
Definition WsfEW_Effect.hpp:75
@ cEC_COHERENT
Definition WsfEW_Effect.hpp:77
@ cEC_NONCOHERENT
Definition WsfEW_Effect.hpp:76
@ cEC_COHERENT_PULSE
Definition WsfEW_Effect.hpp:79
Behavior
The behavior the EW effect exhibits.
Definition WsfEW_Effect.hpp:49
@ cEB_FLOODED_MAINTAINED
System is flooded, either track or messages, but is mitigated.
Definition WsfEW_Effect.hpp:66
@ cEB_UNDEFINED
Definition WsfEW_Effect.hpp:50
@ cEB_NEXT_FREE_MASK
For use by derived classes to specify additional behavior masks.
Definition WsfEW_Effect.hpp:69
@ cEB_MAINTAIN_TRACK
Track is maintained.
Definition WsfEW_Effect.hpp:52
@ cEB_TRACK_ERROR
Track errors are applied.
Definition WsfEW_Effect.hpp:53
@ cEB_FALSE_TARGET_EFFECT
False target effect.
Definition WsfEW_Effect.hpp:60
@ cEB_SIGNAL_POWER_EFFECT
Signal power or receiver noise delta gain effect.
Definition WsfEW_Effect.hpp:58
@ cEB_JAM_STROBE_EFFECT
Jam strobe effects are applied.
Definition WsfEW_Effect.hpp:67
@ cEB_AGILITY_EFFECT
Agility effects are applied.
Definition WsfEW_Effect.hpp:62
@ cEB_REPEATER_EFFECT
Repeater jamming effects are applied.
Definition WsfEW_Effect.hpp:63
@ cEB_TARGET_REJECT_EFFECT
Reject target effect, used to zero jamming power when applied.
Definition WsfEW_Effect.hpp:68
@ cEB_REPEATER_UPDATE
Repeater logic is present and is updated.
Definition WsfEW_Effect.hpp:64
@ cEB_DROP_TRACK
Track is dropped.
Definition WsfEW_Effect.hpp:51
@ cEB_DROP_MESSAGE
Message is dropped.
Definition WsfEW_Effect.hpp:54
@ cEB_MAINTAIN_MESSAGE
Message is maintained.
Definition WsfEW_Effect.hpp:55
@ cEB_FLOODED_BLOCKED
System is flooded, either track or messages and is causing blockage.
Definition WsfEW_Effect.hpp:65
@ cEB_JAMMER_POWER_EFFECT
Jammer power gain effect.
Definition WsfEW_Effect.hpp:57
@ cEB_SLC_DEGRADE_EFFECT
Sidelobe canceler degrade effect.
Definition WsfEW_Effect.hpp:59
@ cEB_PULSE_EFFECT
Pulse jammer effect.
Definition WsfEW_Effect.hpp:61
@ cEB_MESSAGE_ERROR
Message error is applied.
Definition WsfEW_Effect.hpp:56
WsfStringId mCurrentTargetId
Current target Id.
Definition WsfEW_Effect.hpp:372
WsfStringId mEffectingSystemId
The type Id of the system doing the effecting, changes with each call to UpdateEffects(....
Definition WsfEW_Effect.hpp:382
WsfEW_Effect * Clone() const override=0
Behavior mBehavior
The behavior that this EW effect exhibits.
Definition WsfEW_Effect.hpp:367
int mCurrentXmtrUniqueId
Current transmitter unique Id.
Definition WsfEW_Effect.hpp:375
bool mUpdatingEffect
Variable to prevent infinite recursion in UpdateEffect.
Definition WsfEW_Effect.hpp:385
virtual void UpdateEffects(double aSimTime, const WsfEM_Interaction &aTargetInteraction, const WsfEM_Interaction &aJammerToTgtInteraction, const ut::optional< WsfEM_Interaction > &aTgtToJammerInteraction, WsfEW_Effects &aEW_Effects, WsfEW_Effect *aEW_EffectPtr=nullptr)
Definition WsfEW_Effect.cpp:374
WsfEW_Effect & operator=(const WsfEW_Effect &)=delete
virtual bool Initialize(WsfSimulation &aSimulation)
Definition WsfEW_Effect.cpp:69
bool DebugEnabled() const
Definition WsfEW_Effect.hpp:266
WsfEW_EA_EP * GetEA_EP_Ptr() const
Definition WsfEW_Effect.hpp:278
virtual double GetJammingPulseDensity(WsfEM_Xmtr *aXmtrPtr) const
Definition WsfEW_Effect.hpp:300
void AddCoherencyMask(Coherency aCoherency)
Definition WsfEW_Effect.hpp:235
void SetTechniquePtr(WsfEW_Technique *aPtr)
Definition WsfEW_Effect.hpp:294
unsigned int GetCoherencyMask() const
Definition WsfEW_Effect.hpp:239
int mCurrentRcvrUniqueId
Current receiver unique Id.
Definition WsfEW_Effect.hpp:376
virtual void ProcessMitigatedEffect(double aSimTime, const WsfEM_Interaction &aTargetInteraction, const WsfEM_Interaction &aJammerToTgtInteraction, const ut::optional< WsfEM_Interaction > &aTgtToJammerInteraction, WsfEW_Effects &aEW_Effects, WsfEW_Effect *aEW_EffectPtr=nullptr)
Definition WsfEW_Effect.cpp:239
WsfStringId mCurrentXmtrPlatformId
Current transmitting platform Id.
Definition WsfEW_Effect.hpp:373
unsigned int mSystemFunctionMask
The system type mask that this EW effect can affect.
Definition WsfEW_Effect.hpp:366
unsigned int GetSystemFunctionMask() const
Definition WsfEW_Effect.hpp:220
unsigned int mCoherencyMask
The coherency of this effect wrt to the affected system.
Definition WsfEW_Effect.hpp:368
ModulationType
Definition WsfEW_Effect.hpp:85
@ cEM_PHASECODE
Definition WsfEW_Effect.hpp:94
@ cEM_PHASEMOD
Definition WsfEW_Effect.hpp:93
@ cEM_PHASEKEY
Definition WsfEW_Effect.hpp:92
@ cEM_COHPULSE
Definition WsfEW_Effect.hpp:88
@ cEM_CW
Definition WsfEW_Effect.hpp:87
@ cEM_NONE
Definition WsfEW_Effect.hpp:86
@ cEM_BPSK
Definition WsfEW_Effect.hpp:98
@ cEM_DPSK
Definition WsfEW_Effect.hpp:100
@ cEM_NONCOHPULSE
Definition WsfEW_Effect.hpp:89
@ cEM_FSK
Definition WsfEW_Effect.hpp:96
@ cEM_QPSK
Definition WsfEW_Effect.hpp:99
@ cEM_QAM
Definition WsfEW_Effect.hpp:101
@ cEM_LINEARFM
Definition WsfEW_Effect.hpp:90
@ cEM_ASK
Definition WsfEW_Effect.hpp:95
@ cEM_PSK
Definition WsfEW_Effect.hpp:97
@ cEM_NONLINEARFM
Definition WsfEW_Effect.hpp:91
EffectDataMap mEffectDataMap
Map of the System Type Id to the data required for this effect.
Definition WsfEW_Effect.hpp:390
void SetEA_EP_Ptr(WsfEW_EA_EP *aPtr)
Definition WsfEW_Effect.hpp:274
virtual void ApplyUnmitigatedEffect(WsfEW_Effects &aEW_Effects) const =0
WsfStringId mCurrentRcvrPlatformId
Current receiving platform Id.
Definition WsfEW_Effect.hpp:374
virtual void ApplyMitigatedEffect(WsfEW_Effect *aEW_EffectPtr, WsfEW_Effects &aEW_Effects) const =0
virtual void ProcessUnmitigatedEffect(double aSimTime, const WsfEM_Interaction &aTargetInteraction, const WsfEM_Interaction &aJammerToTgtInteraction, const ut::optional< WsfEM_Interaction > &aTgtToJammerInteraction, WsfEW_Effects &aEW_Effects)
Definition WsfEW_Effect.cpp:207
void SetSystemFunctionMask(SystemFunction aSystemFunction)
Set the system type.
Definition WsfEW_Effect.hpp:211
void SetCoherencyMask(Coherency aCoherency)
Definition WsfEW_Effect.hpp:231
virtual void RemoveJammerXmtr(unsigned int aXmtrId)
Definition WsfEW_Effect.cpp:399
WsfStringId mEffectedSystemId
The type Id of the system being effected, changes with each call to UpdateEffects(....
Definition WsfEW_Effect.hpp:379
virtual double GetJammingPulseDensity() const
Definition WsfEW_Effect.hpp:299
Behavior GetBehavior() const
Definition WsfEW_Effect.hpp:254
virtual EffectData * NewEffectData()
Definition WsfEW_Effect.hpp:356
void ResetEffectData(WsfStringId aSystemTypeId)
Definition WsfEW_Effect.hpp:354
bool mDebug
The debug flag, 'true' for debug, false otherwise.
Definition WsfEW_Effect.hpp:369
void SetBehavior(Behavior aBehavior)
Definition WsfEW_Effect.hpp:250
SystemFunction
The type of system function types the EW effect can affect.
Definition WsfEW_Effect.hpp:114
@ cES_UNDEFINED
Definition WsfEW_Effect.hpp:115
@ cES_JAMMER
Effect is meant for jammer systems.
Definition WsfEW_Effect.hpp:118
@ cES_COMM
Effect is meant for comm systems.
Definition WsfEW_Effect.hpp:116
@ cES_SENSOR
Effect is meant for sensor systems.
Definition WsfEW_Effect.hpp:117
@ cES_NEXT_FREE_MASK
For use by derived classes to specify additional EW function masks.
Definition WsfEW_Effect.hpp:119
Definition WsfEW_Effects.hpp:41
Definition WsfEW_Technique.hpp:37
Definition WsfEW_Types.hpp:40
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
virtual WsfObject * Clone() const =0
virtual bool ProcessInput(UtInput &aInput)
Definition WsfObject.cpp:140
The main controller for a simulation.
Definition WsfSimulation.hpp:109