WSF
WsfEW_EA.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_HPP
13#define WSFEW_EA_HPP
14
15#include "wsf_mil_export.h"
16
17#include <map>
18#include <vector>
19
20class UtInput;
21#include "WsfEM_Xmtr.hpp"
22#include "WsfEW_EA_EP.hpp"
23#include "WsfEW_Effect.hpp"
24#include "WsfEW_Technique.hpp"
25#include "WsfEW_Types.hpp"
26
35
36class WSF_MIL_EXPORT WsfEW_EA : public WsfEW_EA_EP
37{
38public:
39 static WsfEW_EA_EP* GetElectronicAttack(const WsfEM_Xmtr& aXmtr);
40 static void SetElectronicAttack(WsfEM_Xmtr& aXmtr, WsfEW_EA_EP* aElectronicAttackPtr);
41
42 WsfEW_EA();
43 WsfEW_EA& operator=(const WsfEW_EA&) = delete;
44 ~WsfEW_EA() override;
45
47
48 WsfEW_EA_EP* Clone() const override;
49 bool Initialize(WsfSimulation& aSimulation, WsfEM_XmtrRcvr* aXmtrRcvrPtr) override;
51
54 {
55 public:
56 EA_Technique() = default;
57 WsfEW_Technique* Clone() const override;
58 bool Initialize(WsfSimulation& aSimulation) override;
59 bool ProcessInput(UtInput& aInput) override;
60
61 WsfStringId GetMitigationClassId() const override { return mMitigationClassId; }
62
63 private:
65 WsfStringId mMitigationClassId{nullptr};
66 };
67
69
70
72 typedef std::map<WsfEW_Types::TechniqueId, EA_Technique*> TechniqueIdToPtrMap;
73 typedef std::map<WsfEW_Types::TechniqueId, EA_Technique*>::iterator TechniqueIdToPtrMapIter;
74 typedef std::map<WsfEW_Types::TechniqueId, EA_Technique*>::const_iterator TechniqueIdToPtrMapConstIter;
75
76 bool AddTechnique(WsfEW_Technique* aTechniquePtr) override;
77
78 WsfEW_Technique* GetTechnique(WsfEW_Types::TechniqueId aTechniqueId) const override;
79 WsfEW_Technique* GetTechnique(unsigned int aIndex) const override;
80
83 virtual bool SelectTechnique(unsigned int aIndex, WsfEW_Effect::SystemFunction aSystemFunction);
85 virtual bool DeselectTechnique(unsigned int aIndex, WsfEW_Effect::SystemFunction aSystemFunction);
87
88 bool SetDeltaGainTechnique(double aSimTime,
89 WsfStringId aTechniqueId,
90 bool aOnOff,
91 bool aDebug,
92 WsfStringId aEffectId,
93 double aJammingDeltaGain,
94 WsfStringId aSystemTypeId,
95 WsfStringId aSystemFunctionId) override;
97
98protected:
99 WsfEW_EA(const WsfEW_EA& aSrc);
100
101private:
103 TechniqueIdToPtrMap mTechniquePtrMap;
104};
105
106#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfEM_XmtrRcvr.hpp:42
Definition WsfEM_Xmtr.hpp:55
WsfEW_Technique * Clone() const override
Definition WsfEW_EA.cpp:505
bool Initialize(WsfSimulation &aSimulation) override
Definition WsfEW_EA.cpp:510
WsfStringId GetMitigationClassId() const override
Definition WsfEW_EA.hpp:61
bool ProcessInput(UtInput &aInput) override
Definition WsfEW_EA.cpp:515
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
virtual bool DeselectTechnique(unsigned int aIndex)
Definition WsfEW_EA_EP.cpp:374
virtual bool Initialize(WsfSimulation &aSimulation, WsfEM_XmtrRcvr *aXmtrRcvrPtr)
Definition WsfEW_EA_EP.cpp:53
WsfEW_EA_EP * Clone() const override=0
WsfEW_EA_EP()
Definition WsfEW_EA_EP.cpp:32
virtual bool SelectTechnique(unsigned int aIndex)
Definition WsfEW_EA_EP.cpp:283
virtual bool AddTechnique(WsfEW_Technique *aTechniquePtr)
Definition WsfEW_EA_EP.cpp:228
virtual WsfEW_Technique * GetTechnique(WsfEW_Types::TechniqueId aTechniqueId) const
Definition WsfEW_EA_EP.cpp:159
WsfEW_EA & operator=(const WsfEW_EA &)=delete
WsfEW_EA()
Definition WsfEW_EA.cpp:46
std::map< WsfEW_Types::TechniqueId, EA_Technique * >::const_iterator TechniqueIdToPtrMapConstIter
Definition WsfEW_EA.hpp:74
std::map< WsfEW_Types::TechniqueId, EA_Technique * >::iterator TechniqueIdToPtrMapIter
Definition WsfEW_EA.hpp:73
static WsfEW_EA_EP * GetElectronicAttack(const WsfEM_Xmtr &aXmtr)
Convenience method to get the electronic attack object for the specified transmitter.
Definition WsfEW_EA.cpp:30
std::map< WsfEW_Types::TechniqueId, EA_Technique * > TechniqueIdToPtrMap
Map the technique's ID to its location (pointer).
Definition WsfEW_EA.hpp:72
static void SetElectronicAttack(WsfEM_Xmtr &aXmtr, WsfEW_EA_EP *aElectronicAttackPtr)
Convenience method to set the electronic attack object for the specified transmitter.
Definition WsfEW_EA.cpp:39
SystemFunction
The type of system function types the EW effect can affect.
Definition WsfEW_Effect.hpp:114
Definition WsfEW_Technique.hpp:37
WsfEW_Technique()
Definition WsfEW_Technique.cpp:33
The main controller for a simulation.
Definition WsfSimulation.hpp:109
WsfStringId TechniqueId
Definition WsfEW_Types.hpp:26
Copyrights Multiple, All Rights Reserved