WSF
WsfTargetTypeReporting.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 WSFTARGETTYPEREPORTING_HPP
13#define WSFTARGETTYPEREPORTING_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 AddTargetReportState(double aSimTime, WsfPlatform* aTargetPtr);
43
45
46 void RemoveTargetReportState(size_t aPlatformIndex);
47
48 void UpdateReportedTargetType(double aSimTime,
49 bool aSensorReportsType,
50 WsfSensorResult& aResult,
51 WsfPlatform* aTargetPtr,
52 WsfTrack* aTrackPtr);
53
55 using ConfidenceList = std::vector<std::pair<double, WsfStringId>>;
56 using EmitterList = std::vector<std::pair<std::list<WsfStringId>, WsfStringId>>;
57
59 {
67
68 double DrawForType(ut::Random& aRandom, WsfStringId& aReportedTargetType);
69 double DrawForType(std::list<WsfStringId>& aEmitterList, WsfStringId& aReportedTargetType);
70
76 };
77
78 using ReportingRulesRef = std::shared_ptr<ReportingRules>;
79 using ReportingRulesMap = std::map<WsfStringId, ReportingRulesRef>;
80
90
91private:
92 using ReportStateMap = std::map<size_t, ReportState>;
93
94 // void ProcessTargetReportTypes(UtInput& aInput);
95 // void ProcessTruthTypeInput(UtInput& aInput);
96
97 void AddTargetReportTypes(UtInput& aInput,
98 ReportingRulesRef aReportingRules,
99 bool aIsDefault,
100 std::list<WsfStringId>& aTypeList);
101
102 ReportingRulesRef FindReportingRules(const WsfObject& aTargetType);
103
104 ReportingRulesRef NewReportingRules();
105
106 ReportingRulesMap mTargetReportingRules;
107 ReportingRulesRef mDefaultTargetRules;
108 double mDefaultTimeToDeclare;
109 double mDefaultTimeToReevaluate;
110 bool mReportingRulesSupplied;
111 ReportStateMap mTargetReportState;
112};
113
114#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
Definition WsfObject.hpp:40
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Definition WsfSensorResult.hpp:27
std::vector< std::pair< double, WsfStringId > > ConfidenceList
Type definition for the confidence list for reporting detection confidences.
Definition WsfTargetTypeReporting.hpp:55
std::vector< std::pair< std::list< WsfStringId >, WsfStringId > > EmitterList
Definition WsfTargetTypeReporting.hpp:56
bool ProcessInput(UtInput &aInput)
Definition WsfTargetTypeReporting.cpp:49
std::map< WsfStringId, ReportingRulesRef > ReportingRulesMap
Definition WsfTargetTypeReporting.hpp:79
std::shared_ptr< ReportingRules > ReportingRulesRef
Definition WsfTargetTypeReporting.hpp:78
~WsfTargetTypeReporting()=default
void RemoveAllTargetReportStates()
Definition WsfTargetTypeReporting.cpp:250
WsfTargetTypeReporting & operator=(const WsfTargetTypeReporting &aSrc)=delete
void AddTargetReportState(double aSimTime, WsfPlatform *aTargetPtr)
Create an emitter report state for the specified transmitter if it doesn't already exist.
Definition WsfTargetTypeReporting.cpp:232
void UpdateReportedTargetType(double aSimTime, bool aSensorReportsType, WsfSensorResult &aResult, WsfPlatform *aTargetPtr, WsfTrack *aTrackPtr)
Definition WsfTargetTypeReporting.cpp:266
void RemoveTargetReportState(size_t aPlatformIndex)
Definition WsfTargetTypeReporting.cpp:256
WsfTargetTypeReporting()
Definition WsfTargetTypeReporting.cpp:27
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Definition WsfTargetTypeReporting.hpp:82
ReportingRulesRef mRules
Definition WsfTargetTypeReporting.hpp:88
WsfStringId mTruthId
Definition WsfTargetTypeReporting.hpp:85
double mNextTimeToEvaluate
Definition WsfTargetTypeReporting.hpp:87
unsigned int mUniqueId
Definition WsfTargetTypeReporting.hpp:83
WsfStringId mTargetDerivedId
Definition WsfTargetTypeReporting.hpp:86
double mReportConfidence
Definition WsfTargetTypeReporting.hpp:84
Definition WsfTargetTypeReporting.hpp:59
EmitterList mEmitterTable
Definition WsfTargetTypeReporting.hpp:74
double mTimeToReevaluate
Definition WsfTargetTypeReporting.hpp:72
ReportingType
Definition WsfTargetTypeReporting.hpp:61
@ cTRUTH
Definition WsfTargetTypeReporting.hpp:64
@ cEMITTERS
Definition WsfTargetTypeReporting.hpp:62
@ cTABLE
Definition WsfTargetTypeReporting.hpp:63
@ cNOTHING
Definition WsfTargetTypeReporting.hpp:65
ReportingType mReportingType
Definition WsfTargetTypeReporting.hpp:75
double mTimeToDeclare
Definition WsfTargetTypeReporting.hpp:71
ConfidenceList mConfidenceTable
Definition WsfTargetTypeReporting.hpp:73
Copyrights Multiple, All Rights Reserved