WSF
WsfRF_Repeater.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 WSFRF_REPEATER_HPP
13#define WSFRF_REPEATER_HPP
14
15#include "wsf_mil_export.h"
16
17#include "UtCallbackHolder.hpp"
18class UtInput;
20class WsfEM_Xmtr;
21#include "WsfSensor.hpp"
22#include "WsfTrack.hpp"
23class WsfTrackId;
24#include "WsfWeapon.hpp"
25
29class WSF_MIL_EXPORT WsfRF_Repeater
30{
31public:
39
43
46 WsfRF_Repeater(const WsfRF_Repeater& aSrc);
47
49
50 ~WsfRF_Repeater() = default;
51
53 WsfRF_Repeater* Clone() const;
54
57 bool Initialize(double aSimTime, WsfWeapon* aWeaponPtr);
58
61 bool ProcessInput(UtInput& aInput);
62
64 bool ProcessInputBlock(UtInput& aInput);
65
66 void Reset(double aSimTime);
67
68 OperatingMode GetOperatingMode() const { return mOperatingMode; }
69 bool IsSignalFollowing() const { return mSignalFollowing; }
70
71 void RegisterTrack(const WsfTrack* aTrackPtr);
72 void RegisterTrackId(WsfTrackId aTrackId, size_t aTargetIndex);
73 void RemoveTrackId(WsfTrackId aTrackId, size_t aTargetIndex);
74 WsfTrackId MergedTrackId(WsfTrackId aProcessedTrackId);
75
89 bool CheckDetectAndUpdate(double aSimTime,
90 WsfEM_Xmtr* aXmtrPtr,
91 WsfSensorResult& aResult,
92 const WsfEM_Interaction& aTargetInteraction);
93
98 void SensorTrackDropped(double aSimTime, WsfTrackId aTrackId, size_t aTargetIndex);
99
103 void SensorTrackInitiated(double aSimTime, const WsfTrack* aTrackPtr);
104
108 void SensorTrackUpdated(double aSimTime, const WsfTrack* aTrackPtr);
109
110private:
111 // Monitor track signal changes and make jamming changes as required.
112 using TrackIdtoSignalMap = std::map<WsfTrackId, std::vector<WsfTrack::Signal>>;
113
114 using TrackIdToTrackIdMap = std::map<WsfTrackId, WsfTrackId>;
115
116 using TargetIndexToSensorNameId = std::map<size_t, WsfStringId>;
117 using TargetIndexToTrackIdMap = std::map<size_t, WsfTrackId>;
118
119 void AddUpdateSignalList(const WsfTrack* aTrackPtr);
120
121 bool MergeTrack(const WsfTrack* aDetectedTrackPtr);
122
123 void UpdateTrack(const WsfTrack* aTrackPtr);
124
125 WsfWeapon* mWeaponPtr;
126
127 OperatingMode mOperatingMode;
128 bool mSignalFollowing;
129 bool mDebug;
130
131 TrackIdtoSignalMap mTrackIdToSignalMap;
132 TargetIndexToSensorNameId mTargetIndexToSensorNameId;
133
134 TrackIdToTrackIdMap mMergedTrackIdMap; // processed to raw track mappings
135 TrackIdToTrackIdMap mReverseMergedTrackIdMap; // raw to processed track mappings
136};
137
138#endif
Definition WsfEM_Interaction.hpp:68
Definition WsfEM_Xmtr.hpp:55
Definition WsfRF_Repeater.hpp:30
bool IsSignalFollowing() const
Definition WsfRF_Repeater.hpp:69
bool ProcessInputBlock(UtInput &aInput)
A convenience method to check for and process a 'repeater/end_repeater' block.
Definition WsfRF_Repeater.cpp:123
bool ProcessInput(UtInput &aInput)
Definition WsfRF_Repeater.cpp:81
WsfRF_Repeater & operator=(const WsfRF_Repeater &)=delete
WsfRF_Repeater * Clone() const
Creates and returns a pointer to a clone of this object.
Definition WsfRF_Repeater.cpp:61
WsfRF_Repeater()
Definition WsfRF_Repeater.cpp:33
OperatingMode
The operating mode of the repeater.
Definition WsfRF_Repeater.hpp:34
@ cOM_AUTO
Automatically starts and stops assignments based on ESM/RWR. Requires a linked ESM/RWR.
Definition WsfRF_Repeater.hpp:37
@ cOM_SEMIAUTO
Manually starting of assignments with automatic stopping based on ESM/RWR . Requires a linked ESM/RWR...
Definition WsfRF_Repeater.hpp:36
@ cOM_MANUAL
Waits for assignments to be made manually.
Definition WsfRF_Repeater.hpp:35
~WsfRF_Repeater()=default
OperatingMode GetOperatingMode() const
Definition WsfRF_Repeater.hpp:68
void Reset(double aSimTime)
Definition WsfRF_Repeater.cpp:146
bool Initialize(double aSimTime, WsfWeapon *aWeaponPtr)
Definition WsfRF_Repeater.cpp:67
Definition WsfSensorResult.hpp:27
Definition WsfTrackId.hpp:33
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Definition WsfWeapon.hpp:63
Copyrights Multiple, All Rights Reserved