WSF
WsfEW_EA_EP.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFEW_EA_EP_HPP
13#define WSFEW_EA_EP_HPP
14
15#include "wsf_mil_export.h"
16
17#include <map>
18#include <vector>
19
20class UtInput;
21class WsfEM_XmtrRcvr;
22#include "WsfEW_Effect.hpp"
23#include "WsfEW_Technique.hpp"
24#include "WsfEW_Types.hpp"
25#include "WsfObject.hpp"
26
36
37class WSF_MIL_EXPORT WsfEW_EA_EP : public WsfObject
38{
39public:
42 ~WsfEW_EA_EP() override = default;
43
45
46
48 WsfEW_EA_EP* Clone() const override = 0;
49
50 virtual bool Initialize(WsfSimulation& aSimulation, WsfEM_XmtrRcvr* aXmtrRcvrPtr);
51 bool ProcessInput(UtInput& aInput) override;
53
55 virtual bool DebugEnabled() const { return mDebug; }
56
58
61
63
64 virtual void RemoveJammerXmtr(unsigned int aXmtrId);
65 virtual void RemoveJammerXmtr(WsfEM_Xmtr* aXmtrPtr);
67
69
70 virtual bool SetDeltaGainTechnique(double aSimTime,
71 WsfStringId aTechniqueId,
72 bool aOnOff,
73 bool aDebug,
74 WsfStringId aEffectId,
75 double aJammingDeltaGain,
76 WsfStringId aSystemTypeId,
77 WsfStringId aSystemFunctionId)
78 {
79 return false;
80 }
81
82
84
85 virtual WsfEW_Technique::EffectPtrVec GetMitigatingEffects(const WsfEW_Effect* aEA_EffectPtr,
86 WsfEW_Effect::SystemFunction aAffectingSystemFunction,
87 WsfEW_Effect::SystemFunction aAffectedSystemFunction);
89
91
92 virtual bool AddTechnique(WsfEW_Technique* aTechniquePtr);
93
95 bool TechniquesAreAvailable() const { return !mTechniques.empty(); }
96
98 bool TechniquesAreInUse() const { return !mTechniquesInUse.empty(); }
99
100 bool TechniqueIsAvailable(WsfEW_Types::TechniqueId aId) const;
101
102 bool TechniqueIsInUse(WsfEW_Types::TechniqueId aId) const;
103
104 bool TechniqueIsExternallyControlled(WsfEW_Types::TechniqueId aId) const;
105
108
111
112 void SetTechnique(WsfEW_Types::TechniqueId aTechniqueId, bool aOnOff);
113
114 virtual WsfEW_Technique* GetTechnique(WsfEW_Types::TechniqueId aTechniqueId) const;
115 virtual WsfEW_Technique* GetTechnique(unsigned int aIndex) const;
116
117 void ResetTechniquesInUseList();
118
119 virtual bool SelectTechnique(unsigned int aIndex);
120 virtual bool SelectTechnique(WsfEW_Types::TechniqueId aId);
121 virtual bool DeselectTechnique(unsigned int aIndex);
122 virtual bool DeselectTechnique(WsfEW_Types::TechniqueId aId);
123
124 virtual bool CanApplyTechnique(WsfEW_Types::TechniqueId aId, WsfEW_Effect::SystemFunction aSystemFunction) const;
125
128
130
131 bool HasFrequencyAgilityEffect() const;
132
133 bool EffectIsAvailable(WsfStringId aEffectNameId) const;
134 bool EffectIsAvailable(WsfEW_Types::TechniqueId aTechId, WsfStringId aEffectNameId) const;
135
136 virtual WsfEW_Effect* GetEffect(WsfEW_Types::TechniqueId aTechId, unsigned int aIndex) const;
137 virtual WsfEW_Effect* GetEffect(WsfEW_Types::TechniqueId aTechId, WsfStringId aEffectId) const;
138
139 virtual const WsfEW_Technique::EffectPtrVec& GetEffects(WsfEW_Types::TechniqueId aId) const;
141
142 WsfSimulation* GetSimulation() const;
143
144protected:
145 WsfEW_EA_EP(const WsfEW_EA_EP& aSrc);
146
147 bool PrivateSetTechnique(WsfEW_Types::TechniqueId aTechnique, bool aOnOff);
148
152 bool mDebug;
154};
155
156#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfEM_XmtrRcvr.hpp:42
Definition WsfEM_Xmtr.hpp:55
Definition WsfEW_EA_EP.hpp:38
WsfSimulation * mSimulationPtr
Definition WsfEW_EA_EP.hpp:149
bool TechniquesAreInUse() const
Return true if there are techniques in use, 0 otherwise.
Definition WsfEW_EA_EP.hpp:98
~WsfEW_EA_EP() override=default
virtual bool SetDeltaGainTechnique(double aSimTime, WsfStringId aTechniqueId, bool aOnOff, bool aDebug, WsfStringId aEffectId, double aJammingDeltaGain, WsfStringId aSystemTypeId, WsfStringId aSystemFunctionId)
Definition WsfEW_EA_EP.hpp:70
WsfEW_Types::TechniqueIdVec mTechniques
A collection/list of all the Techniques by Id.
Definition WsfEW_EA_EP.hpp:150
WsfEW_EA_EP & operator=(const WsfEW_EA_EP &)=delete
virtual WsfEM_XmtrRcvr & GetLinkedXmtrRcvr() const
Definition WsfEW_EA_EP.hpp:59
bool TechniquesAreAvailable() const
Return true if there are techniques available, 0 otherwise.
Definition WsfEW_EA_EP.hpp:95
virtual bool Initialize(WsfSimulation &aSimulation, WsfEM_XmtrRcvr *aXmtrRcvrPtr)
Definition WsfEW_EA_EP.cpp:53
bool mDebug
Debug flag 'true' if debug is enabled, 'false' otherwise.
Definition WsfEW_EA_EP.hpp:152
WsfEW_EA_EP * Clone() const override=0
WsfEW_EA_EP()
Definition WsfEW_EA_EP.cpp:32
virtual WsfEW_Types::TechniqueIdVec * GetMitigatedTechniques()
Definition WsfEW_EA_EP.hpp:126
WsfEM_XmtrRcvr * mLinkedXmtrRcvrPtr
The transmitter/receiver to which this EA/EP is linked to.
Definition WsfEW_EA_EP.hpp:153
WsfEW_Types::TechniqueIdVec mTechniquesInUse
A collection of all the Techniques currently in use by Id.
Definition WsfEW_EA_EP.hpp:151
virtual bool DebugEnabled() const
Determines if debugging is enabled.
Definition WsfEW_EA_EP.hpp:55
const WsfEW_Types::TechniqueIdVec & GetTechniquesInUse() const
Return a list of all the technique Ids that are currently in use.
Definition WsfEW_EA_EP.hpp:110
const WsfEW_Types::TechniqueIdVec & GetTechniquesAvailable() const
Return a list of all the technique Ids that are currently available.
Definition WsfEW_EA_EP.hpp:107
Definition WsfEW_Effect.hpp:45
SystemFunction
The type of system function types the EW effect can affect.
Definition WsfEW_Effect.hpp:114
Definition WsfEW_Technique.hpp:37
std::vector< WsfEW_Effect * > EffectPtrVec
A vector type to hold list of effects.
Definition WsfEW_Technique.hpp:40
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
virtual bool ProcessInput(UtInput &aInput)
Definition WsfObject.cpp:140
The main controller for a simulation.
Definition WsfSimulation.hpp:109
std::vector< TechniqueId > TechniqueIdVec
A type definition for a collection of EP or EA techniques.
Definition WsfEW_Types.hpp:29
WsfStringId TechniqueId
Definition WsfEW_Types.hpp:26
Copyrights Multiple, All Rights Reserved