WSF
WsfSolarIlluminationComponent.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 2020 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 WSF_SOLAR_ILLUMINATION_COMPONENT_HPP
13#define WSF_SOLAR_ILLUMINATION_COMPONENT_HPP
14
15#include "wsf_export.h"
16
17#include "WsfComponentRoles.hpp"
18#include "WsfSensor.hpp"
20
24{
25public:
26 static void RegisterComponentFactory(WsfScenario& aScenario);
27 static WsfSolarIlluminationComponent* Find(const WsfSensor& aParent);
29
31
32 bool Initialize(double aSimTime) override;
33 bool ProcessModeInput(UtInput& aInput, WsfSensorMode& aSensorMode) override;
34
35 void PostAttemptToDetect(double aSimTime, WsfPlatform* aTargetPtr, WsfSensorResult& aResult) override;
37
39
40 WsfComponent* CloneComponent() const override;
41 WsfStringId GetComponentName() const override;
42 const int* GetComponentRoles() const override;
43 void* QueryInterface(int aRole) override;
45
48 {
49 public:
50 double GetMin() const { return mMinAngle; }
51 double GetMax() const { return mMaxAngle; }
52 void SetBounds(double aMinAngle, double aMaxAngle);
53 bool IsEnabled() const { return mEnabled; }
54
55 private:
56 double mMinAngle{0.0};
57 double mMaxAngle{0.0};
58 bool mEnabled{false};
59 };
60
61private:
62 IlluminationMode& GetOrCreateIlluminationMode(const WsfSensorMode& aSensorMode);
63
64 std::vector<IlluminationMode> mModes;
65 IlluminationMode mTemplate;
66};
67
69
70#endif
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_SOLAR_ILLUMINATION
Solar Illumination command sensor component.
Definition WsfComponentRoles.hpp:150
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
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
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 WsfSensorComponent.hpp:36
virtual void PostAttemptToDetect(double aSimTime, WsfPlatform *aTargetPtr, WsfSensorResult &aResult)
Definition WsfSensorComponent.hpp:85
virtual bool Initialize(double aSimTime)
Definition WsfComponent.cpp:45
virtual bool ProcessModeInput(UtInput &aInput, WsfSensorMode &aSensorMode)
Definition WsfSensorComponent.hpp:61
Definition WsfSensorMode.hpp:36
Definition WsfSensorResult.hpp:27
Definition WsfSensor.hpp:92
Class that stores the defined solar illumination bounds for each individual mode.
Definition WsfSolarIlluminationComponent.hpp:48
double GetMax() const
Definition WsfSolarIlluminationComponent.hpp:51
double GetMin() const
Definition WsfSolarIlluminationComponent.hpp:50
bool IsEnabled() const
Definition WsfSolarIlluminationComponent.hpp:53
Definition WsfSolarIlluminationComponent.hpp:24
static WsfSolarIlluminationComponent * Find(const WsfSensor &aParent)
Definition WsfSolarIlluminationComponent.cpp:50
static WsfSolarIlluminationComponent * FindOrCreate(WsfSensor &aParent)
Definition WsfSolarIlluminationComponent.cpp:59
static void RegisterComponentFactory(WsfScenario &aScenario)
Called by WsfScenario::CreateTypeLists on initialization.
Definition WsfSolarIlluminationComponent.cpp:43
Copyrights Multiple, All Rights Reserved