WSF
WsfEW_CommComponent.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// Updated by Infoscitex, a DCS Company
13// ****************************************************************************
14
15#ifndef WSFEW_COMMCOMPONENT_HPP
16#define WSFEW_COMMCOMPONENT_HPP
17
18#include "wsf_mil_export.h"
19
20#include "WsfCommComponent.hpp"
22class WsfScenario;
23
24namespace wsf
25{
26namespace comm
27{
28class Comm;
29}
30} // namespace wsf
31
33class WSF_MIL_EXPORT WsfEW_CommComponent : public wsf::comm::Component
34{
35public:
36 static void RegisterComponentFactory(WsfScenario& aScenario);
37 static WsfEW_CommComponent* Find(const wsf::comm::Comm& aParent);
39
40 ~WsfEW_CommComponent() override = default;
41
43
44 WsfComponent* CloneComponent() const override;
45 WsfStringId GetComponentName() const override;
46 const int* GetComponentRoles() const override;
47 void* QueryInterface(int aRole) override;
49
51
52 bool Initialize(double aSimTime) override;
53 bool Initialize2(double aSimTime) override;
54 bool ProcessInput(UtInput& aInput) override;
55 void AttemptToReceive(double aSimTime, wsf::comm::Result& aResult) override;
57
59
60 bool CanPerceiveJamming() const;
61 bool JammingPerceived();
62 double GetJammingFirstPerceived() const { return mJammingFirstPerceived; }
63 double GetJammingLastPerceived() const { return mJammingLastPerceived; }
65
66private:
67 bool PerceivesJamming(double aSimTime, wsf::comm::Result& aResult);
68
69 double mJammingFirstPerceived = -1.0;
70 double mJammingLastPerceived = -1.0;
71 double mJammingPerceptionResetTime = 0.0;
72
74 double mContJNR_PerceptionThreshold = 1.0E38;
75
77 double mPulsedJNR_PerceptionThreshold = 1.0E38;
78
80 double mCoherentJNR_PerceptionThreshold = 1.0E38;
81};
82
84
85#endif
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_EW_COMM
EW extension for WsfComm.
Definition WsfMilComponentRoles.hpp:28
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfComponent.hpp:39
virtual const int * GetComponentRoles() const =0
virtual WsfStringId GetComponentName() const =0
virtual WsfComponent * CloneComponent() const =0
virtual void * QueryInterface(int aRole)=0
The EW component that will be attached to all comm systems.
Definition WsfEW_CommComponent.hpp:34
double GetJammingLastPerceived() const
Definition WsfEW_CommComponent.hpp:63
double GetJammingFirstPerceived() const
Definition WsfEW_CommComponent.hpp:62
static void RegisterComponentFactory(WsfScenario &aScenario)
Register the component factory that handles input for this component.
Definition WsfEW_CommComponent.cpp:55
static WsfEW_CommComponent * FindOrCreate(wsf::comm::Comm &aParent)
Definition WsfEW_CommComponent.cpp:72
bool JammingPerceived()
Definition WsfEW_CommComponent.cpp:211
bool CanPerceiveJamming() const
Definition WsfEW_CommComponent.cpp:170
static WsfEW_CommComponent * Find(const wsf::comm::Comm &aParent)
Find the instance of this component attached to the specified processor.
Definition WsfEW_CommComponent.cpp:62
~WsfEW_CommComponent() override=default
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfComm.hpp:43
Definition WsfCommComponent.hpp:41
virtual bool Initialize(double aSimTime)
Definition WsfComponent.cpp:45
virtual bool Initialize2(double aSimTime)
Definition WsfComponent.cpp:63
virtual void AttemptToReceive(double aSimTime, Result &aResult)
Definition WsfCommComponent.hpp:80
virtual bool ProcessInput(UtInput &aInput)
Definition WsfComponent.cpp:100
Definition WsfCommResult.hpp:34
Definition WsfComm.cpp:34
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved