WSF
WsfCorrelationStrategy.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 WSFCORRELATIONSTRATEGY_HPP
13#define WSFCORRELATIONSTRATEGY_HPP
14
15#include "wsf_export.h"
16
17#include <map>
18
19class UtInput;
20#include "UtScriptBasicTypes.hpp"
21#include "WsfException.hpp"
22#include "WsfObject.hpp"
23#include "WsfObjectTypeList.hpp"
25class WsfTrack;
26#include "WsfTrackId.hpp"
27#include "WsfTrackListFwd.hpp"
28class WsfPlatform;
29class WsfSimulation;
30#include "WsfStringId.hpp"
31class WsfTrack;
32class WsfTrackManager;
33
51{
52public:
53 ~WsfCorrelationStrategy() override = default;
54
56 WsfCorrelationStrategy* Clone() const override = 0; // pure virtual
57
59 bool ProcessInput(UtInput& aInput) override { return false; }
60
62 virtual bool Initialize(WsfTrackManager* aTrackManagerPtr)
63 {
64 mTrackManagerPtr = aTrackManagerPtr;
65 return true;
66 };
67
68 void NewTrackCorrelation(const WsfTrack& aRawTrack, const WsfLocalTrack& aLocalTrack);
69
72 WsfLocalTrack* Correlate(double aSimTime, const WsfTrack& aNonLocalTrack, WsfLocalTrackList& aTrackList);
73
74 const WsfTrackId& GetCorrelatedTrackId(const WsfTrackId& aRawTrackId) const;
75
76 virtual void Decorrelate(const WsfTrackId& aRawTrackId);
77
78 void NotifyOfLocalTrackCorrelation(double aSimTime, const WsfLocalTrack& aLocalTrack, const WsfTrackId& aRawTrackId);
79
81
83 WsfTrackManager& GetTrackManager() { return *mTrackManagerPtr; }
84
85 void SetTrackManager(WsfTrackManager* aTrackManagerPtr) { mTrackManagerPtr = aTrackManagerPtr; }
86 WsfSimulation* GetSimulation() const;
87
88 bool TestCorrelation(const WsfTrack& aTrack1, const WsfTrack& aTrack2);
89
90protected:
94
97 virtual WsfLocalTrack* CorrelateImpl(double aSimTime, const WsfTrack& aNonLocalTrack, WsfLocalTrackList& aTrackList) = 0;
98
99 std::map<WsfTrackId, WsfTrackId> mCorrelationMap;
100
101private:
102 WsfTrackManager* mTrackManagerPtr;
103};
104
107{
108public:
109 WsfScriptCorrelationClass(const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
110
111 UT_DECLARE_SCRIPT_METHOD(TestCorrelation); // NO_DOC | FOR_TEST_ONLY
112 UT_DECLARE_SCRIPT_METHOD(Correlate); // NO_DOC | FOR_TEST_ONLY
113};
114
115#endif
WsfTrackListT< WsfLocalTrack > WsfLocalTrackList
Definition WsfTrackList.hpp:89
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfCorrelationStrategy.hpp:51
bool ProcessInput(UtInput &aInput) override
Process input from a common source.
Definition WsfCorrelationStrategy.hpp:59
WsfCorrelationStrategy * Clone() const override=0
Create a clone of "this" object.
WsfCorrelationStrategy()
Definition WsfCorrelationStrategy.cpp:21
~WsfCorrelationStrategy() override=default
virtual WsfLocalTrack * CorrelateImpl(double aSimTime, const WsfTrack &aNonLocalTrack, WsfLocalTrackList &aTrackList)=0
WsfTrackManager & GetTrackManager()
Return a reference to the track manager being accessed internally by this object.
Definition WsfCorrelationStrategy.hpp:83
std::map< WsfTrackId, WsfTrackId > mCorrelationMap
Definition WsfCorrelationStrategy.hpp:99
void SetTrackManager(WsfTrackManager *aTrackManagerPtr)
Definition WsfCorrelationStrategy.hpp:85
WsfObjectTypeList< WsfCorrelationStrategy > CorrelationStrategyTypes
Definition WsfCorrelationStrategy.hpp:80
virtual bool Initialize(WsfTrackManager *aTrackManagerPtr)
Perform any necessary initialization.
Definition WsfCorrelationStrategy.hpp:62
Definition WsfLocalTrack.hpp:32
Definition WsfObjectTypeList.hpp:42
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
WsfObject & operator=(const WsfObject &aRhs)
Assignment operator.
Definition WsfObject.cpp:258
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
UT_DECLARE_SCRIPT_METHOD(Correlate)
WsfScriptCorrelationClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfCorrelationStrategy.cpp:125
UT_DECLARE_SCRIPT_METHOD(TestCorrelation)
WsfScriptObjectClass(const std::string &aClassName, UtScriptTypes *aTypesPtr)
Definition WsfScriptObjectClass.cpp:24
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfTrackId.hpp:33
Definition WsfTrackManager.hpp:62
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Copyrights Multiple, All Rights Reserved