WSF
WsfSensorDetector.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 2016 Infoscitex, a DCS 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 WSFSENSORDETECTOR_HPP
13#define WSFSENSORDETECTOR_HPP
14
15#include "wsf_export.h"
16
17#include <list>
18#include <memory>
19#include <string>
20
21class UtInput;
22
23class UtInput;
24#include "UtMath.hpp"
25class WsfSensorMode;
26
32namespace wsf
33{
34
36{
37public:
39 virtual ~SensorDetector() = default;
40
41 virtual SensorDetector* Clone() const = 0;
42
43 virtual double ComputeProbabilityOfDetection(double aSignalToNoise,
44 double aDetectionThreshold = UtMath::LinearToDB(3.0)) = 0;
45
46 virtual bool Initialize(double aSimTime, WsfSensorMode* aModePtr, size_t aBeamIndex = 0);
47
48 virtual bool ProcessInput(UtInput& aInput);
49
51 void SetDebugEnabled(bool aDebugEnabled) { mDebugEnabled = aDebugEnabled; }
53 bool DebugEnabled() const { return mDebugEnabled; }
54
55
56protected:
59};
60
62{
63public:
64 typedef SensorDetector* (*FactoryPtr)(const std::string&);
65 typedef std::list<FactoryPtr> ObjectFactoryList;
66
69 virtual ~SensorDetectorTypes() = default;
70
71 static bool LoadInstance(UtInput& aInput, std::unique_ptr<SensorDetector>& aSensorDetectorPtr);
72 static void AddObjectFactory(FactoryPtr aFactoryPtr);
73
74private:
75 static SensorDetector* CreateInstance(const std::string& aTypeName);
76
78 static ObjectFactoryList mObjectFactoryList;
79};
80
81} // namespace wsf
82#endif
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfSensorMode.hpp:36
static void AddObjectFactory(FactoryPtr aFactoryPtr)
Definition WsfSensorDetector.cpp:98
SensorDetector *(* FactoryPtr)(const std::string &)
Definition WsfSensorDetector.hpp:64
SensorDetectorTypes & operator=(const SensorDetectorTypes &aRhs)=default
SensorDetectorTypes(const SensorDetectorTypes &aSrc)=default
std::list< FactoryPtr > ObjectFactoryList
Definition WsfSensorDetector.hpp:65
virtual ~SensorDetectorTypes()=default
static bool LoadInstance(UtInput &aInput, std::unique_ptr< SensorDetector > &aSensorDetectorPtr)
Definition WsfSensorDetector.cpp:56
Definition WsfSensorDetector.hpp:36
virtual SensorDetector * Clone() const =0
bool mDebugEnabled
'true' if 'debug_detector' was specified.
Definition WsfSensorDetector.hpp:58
virtual double ComputeProbabilityOfDetection(double aSignalToNoise, double aDetectionThreshold=UtMath::LinearToDB(3.0))=0
virtual bool Initialize(double aSimTime, WsfSensorMode *aModePtr, size_t aBeamIndex=0)
Definition WsfSensorDetector.cpp:31
void SetDebugEnabled(bool aDebugEnabled)
Set the debug flag for the detector.
Definition WsfSensorDetector.hpp:51
virtual bool ProcessInput(UtInput &aInput)
Definition WsfSensorDetector.cpp:38
SensorDetector()
Definition WsfSensorDetector.cpp:24
virtual ~SensorDetector()=default
bool DebugEnabled() const
Returns 'true' if debugging is enabled for the detector.
Definition WsfSensorDetector.hpp:53
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved