WSF
WsfExtEmission.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 WSFEXTEMISSION_HPP
13#define WSFEXTEMISSION_HPP
14
15#include "wsf_export.h"
16
17#include <cstdint>
18#include <map>
19
20class UtInput;
21
23class WsfEM_Xmtr;
24class WsfEM_XmtrRcvr;
25class WsfPlatform;
26class WsfPlatformPart;
27class WsfScenario;
28class WsfSensor;
29#include "WsfStringId.hpp"
30
32{
33public:
34 enum
35 {
36 cLEVEL_ONE_DEBUG = 0x00000001,
37 cLEVEL_TWO_DEBUG = 0x00000002
38 };
39
41 {
42 public:
43 BeamKey() = default;
44 BeamKey(WsfStringId aId, WsfStringId aMode, int aBeamNumber);
45 virtual ~BeamKey() = default;
46
47 bool operator<(const BeamKey& aRhs) const;
48 bool operator==(const BeamKey& aRhs) const;
49 bool operator!=(const BeamKey& aRhs) const;
50
54 };
55
56 WsfExtEmission(WsfScenario& aScenario);
57
58 bool ProcessInput(UtInput& aInput);
59 void ProcessBeamFunction(UtInput& aInput);
60 void ProcessBeamType(UtInput& aInput);
61 void ProcessEmitterFunction(UtInput& aInput);
62 void ProcessEmitterType(UtInput& aInput);
63 int GetDebugMask() { return sDebugMask; }
64 void SetDebugMask(int aMask) { sDebugMask = aMask; }
65
66 uint8_t GetBeamFunction(WsfStringId aPartTypeId, WsfStringId aModeNameId, int aBeamNumber);
67 uint16_t GetBeamType(WsfStringId aPartTypeId, WsfStringId aModeNameId, int aBeamNumber);
68
69 uint16_t GetEmitterType(WsfStringId aPartTypeId);
70 uint8_t GetEmitterFunction(WsfStringId aPartTypeId);
71 WsfStringId GetPartTypeId(uint16_t aEmitterType);
72
73 void UpdateBeamLimits(WsfEM_XmtrRcvr& aXmtrRcvr, double& aMinAz, double& aMaxAz, double& aMinEl, double& aMaxEl);
74
75 WsfSensor* GetSensor(WsfPlatform* aPlatformPtr,
76 WsfStringId aSensorTypeId,
77 unsigned int aEmitterNameDIS,
78 unsigned int aEmitterIdNumberDIS);
79 WsfSensor* GetSensor(WsfStringId aSensorTypeId, unsigned int aEmitterNameDIS, unsigned int aEmitterIdNumberDIS);
80
81 WsfSensor* AddSensor(double aSimTime,
82 WsfPlatform* aPlatformPtr,
83 WsfStringId aSensorTypeId,
84 unsigned int aEmitterNameDIS,
85 unsigned int aEmitterIdNumberDIS);
86
87 WsfScenario& GetScenario() const { return *mScenarioPtr; }
88
89protected:
91
93 unsigned int sDebugMask{0};
94
96 std::map<BeamKey, uint8_t> sBeamKeyToBeamFunction;
97
99 std::map<BeamKey, uint16_t> sBeamKeyToBeamType;
100
102 std::map<WsfStringId, uint8_t> sPartTypeToEmitterFunction;
103
105 std::map<WsfStringId, uint16_t> sPartTypeToEmitterType;
106 std::map<uint16_t, WsfStringId> sEmitterTypeToPartType;
107};
108
109#endif
bool operator!=(int aId, const WsfStringInt &aRhs)
Not equal relational operator for the case of an integer on the LHS and a StringId on the RHS.
Definition WsfStringId.hpp:75
bool operator==(int aId, const WsfStringInt &aRhs)
Equal relational operator for the case of an integer on the LHS and a StringId on the RHS.
Definition WsfStringId.hpp:69
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfArticulatedPart.hpp:36
Definition WsfEM_XmtrRcvr.hpp:42
Definition WsfEM_Xmtr.hpp:55
int mBeamNumber
Definition WsfExtEmission.hpp:53
virtual ~BeamKey()=default
bool operator<(const BeamKey &aRhs) const
Definition WsfExtEmission.cpp:506
WsfStringId mId
Definition WsfExtEmission.hpp:51
WsfStringId mMode
Definition WsfExtEmission.hpp:52
Definition WsfExtEmission.hpp:32
unsigned int sDebugMask
A bit mask for turning on debug levels.
Definition WsfExtEmission.hpp:93
std::map< BeamKey, uint8_t > sBeamKeyToBeamFunction
The following maps a beam-key (sensor-type, mode-name, beam-index) to a DIS Beam Function.
Definition WsfExtEmission.hpp:96
@ cLEVEL_TWO_DEBUG
Debug beam data.
Definition WsfExtEmission.hpp:37
@ cLEVEL_ONE_DEBUG
General debug.
Definition WsfExtEmission.hpp:36
std::map< WsfStringId, uint8_t > sPartTypeToEmitterFunction
The following maps a WSF comm/sensor type to DIS emitter function.
Definition WsfExtEmission.hpp:102
std::map< BeamKey, uint16_t > sBeamKeyToBeamType
The following maps a beam-key (sensor-type, mode-name, beam-index) to a DIS Beam Parameter Index.
Definition WsfExtEmission.hpp:99
void SetDebugMask(int aMask)
Definition WsfExtEmission.hpp:64
int GetDebugMask()
Definition WsfExtEmission.hpp:63
WsfScenario & GetScenario() const
Definition WsfExtEmission.hpp:87
std::map< uint16_t, WsfStringId > sEmitterTypeToPartType
Definition WsfExtEmission.hpp:106
WsfScenario * mScenarioPtr
Definition WsfExtEmission.hpp:90
WsfExtEmission(WsfScenario &aScenario)
Definition WsfExtEmission.cpp:493
std::map< WsfStringId, uint16_t > sPartTypeToEmitterType
The following maps a WSF comm/sensor type id to DIS emitter type.
Definition WsfExtEmission.hpp:105
Definition WsfPlatformPart.hpp:61
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfSensor.hpp:92
Copyrights Multiple, All Rights Reserved