WSF
WsfEmitterTypeReporting.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 WSFEMITTERTYPEREPORTING_HPP
13#define WSFEMITTERTYPEREPORTING_HPP
14
15#include "wsf_export.h"
16
17#include <list>
18#include <map>
19#include <memory>
20#include <string>
21#include <vector>
22
23class UtInput;
24#include "UtRandom.hpp"
25class WsfEM_Xmtr;
26class WsfObject;
27class WsfPlatform;
28#include "WsfSensor.hpp"
29#include "WsfStringId.hpp"
30class WsfTrack;
31
33{
34public:
39
40 bool ProcessInput(UtInput& aInput);
41
42 void AddEmitterReportState(double aSimTime, WsfEM_Xmtr* aXmtrPtr);
43
45
46 void RemoveEmitterReportState(size_t aPlatformIndex, unsigned int aUniqueXmtrPartId);
47
48 void UpdateReportedEmitterType(double aSimTime,
49 bool aSensorReportsType,
50 WsfSensorResult& aResult,
51 WsfPlatform* aTarget,
52 WsfTrack* aTrackPtr);
53
55 using ConfidenceList = std::vector<std::pair<double, WsfStringId>>;
56
58 {
65
66 double DrawForType(ut::Random& aRandom, WsfStringId& aReportedEmitterType);
67
72 };
73
74 using ReportingRulesRef = std::shared_ptr<ReportingRules>;
75 using ReportingRulesMap = std::map<WsfStringId, ReportingRulesRef>;
76
86
87private:
88 using TargetEmitterPair = std::pair<size_t, unsigned int>;
89 using ReportStateMap = std::map<TargetEmitterPair, ReportState>;
90
91 void ProcessEmitterReportTypes(UtInput& aInput);
92 void ProcessTruthTypeInput(UtInput& aInput);
93
94 void AddEmitterReportTypes(UtInput& aInput,
95 ReportingRulesRef aReportingRules,
96 bool aIsDefault,
97 std::list<WsfStringId>& aTypeList);
98
99 ReportingRulesRef FindReportingRules(const WsfObject& aEmitterType);
100
101 ReportingRulesRef NewReportingRules();
102
103 ReportingRulesMap mEmitterReportingRules;
104 ReportingRulesRef mDefaultEmitterRules;
105 double mDefaultTimeToDeclare;
106 double mDefaultTimeToReevaluate;
107 bool mReportingRulesSupplied;
108
109 ReportStateMap mEmitterReportState;
110};
111
112#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfEM_Xmtr.hpp:55
std::vector< std::pair< double, WsfStringId > > ConfidenceList
Type definition for the confidence list for reporting detection confidences.
Definition WsfEmitterTypeReporting.hpp:55
void UpdateReportedEmitterType(double aSimTime, bool aSensorReportsType, WsfSensorResult &aResult, WsfPlatform *aTarget, WsfTrack *aTrackPtr)
Definition WsfEmitterTypeReporting.cpp:252
WsfEmitterTypeReporting()
Definition WsfEmitterTypeReporting.cpp:26
void RemoveAllEmitterReportStates()
Definition WsfEmitterTypeReporting.cpp:233
std::map< WsfStringId, ReportingRulesRef > ReportingRulesMap
Definition WsfEmitterTypeReporting.hpp:75
void AddEmitterReportState(double aSimTime, WsfEM_Xmtr *aXmtrPtr)
Create an emitter report state for the specified transmitter if it doesn't already exist.
Definition WsfEmitterTypeReporting.cpp:213
bool ProcessInput(UtInput &aInput)
Definition WsfEmitterTypeReporting.cpp:64
~WsfEmitterTypeReporting()=default
WsfEmitterTypeReporting & operator=(const WsfEmitterTypeReporting &aRhs)
Definition WsfEmitterTypeReporting.cpp:48
void RemoveEmitterReportState(size_t aPlatformIndex, unsigned int aUniqueXmtrPartId)
Definition WsfEmitterTypeReporting.cpp:239
std::shared_ptr< ReportingRules > ReportingRulesRef
Definition WsfEmitterTypeReporting.hpp:74
Definition WsfObject.hpp:40
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Definition WsfSensorResult.hpp:27
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Definition WsfEmitterTypeReporting.hpp:78
ReportingRulesRef mRules
Definition WsfEmitterTypeReporting.hpp:84
WsfStringId mTruthId
Definition WsfEmitterTypeReporting.hpp:81
WsfStringId mEmitterDerivedId
Definition WsfEmitterTypeReporting.hpp:82
double mReportConfidence
Definition WsfEmitterTypeReporting.hpp:80
unsigned int mUniqueXmtrPartId
Definition WsfEmitterTypeReporting.hpp:79
double mNextTimeToEvaluate
Definition WsfEmitterTypeReporting.hpp:83
Definition WsfEmitterTypeReporting.hpp:58
ConfidenceList mConfidenceTable
Definition WsfEmitterTypeReporting.hpp:70
double mTimeToReevaluate
Definition WsfEmitterTypeReporting.hpp:69
ReportingType mReportingType
Definition WsfEmitterTypeReporting.hpp:71
ReportingType
Definition WsfEmitterTypeReporting.hpp:60
@ cTABLE
Definition WsfEmitterTypeReporting.hpp:61
@ cTRUTH
Definition WsfEmitterTypeReporting.hpp:62
@ cNOTHING
Definition WsfEmitterTypeReporting.hpp:63
double mTimeToDeclare
Definition WsfEmitterTypeReporting.hpp:68
Copyrights Multiple, All Rights Reserved