WSF
WsfEclipseEventManager.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 2018 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 WSFECLIPSEEVENTMANAGER_HPP
13#define WSFECLIPSEEVENTMANAGER_HPP
14
15#include "wsf_space_export.h"
16
17#include <map>
18
19#include "UtCallbackHolder.hpp"
20#include "WsfEvent.hpp"
24#include "WsfStringId.hpp"
25
26class WsfOrbitalEvent;
27class WsfPlatform;
28class WsfSimuluation;
29
38class WSF_SPACE_EXPORT WsfEclipseEventManager : public WsfSimulationExtension
39{
40public:
42
43 bool Initialize() override;
44
45 bool IsEnabled() const { return mIsEnabled; }
46
47 void Enable(double aSimTime);
48 void Disable();
49
50private:
51 class EclipseEvent : public WsfEvent
52 {
53 public:
54 enum Type
55 {
56 cENTRY,
57 cEXIT,
58 cEVALUATE
59 };
60
61 EclipseEvent(Type aType, size_t aId, WsfEclipseEventManager& aEclipseManager, WsfSpaceMoverBase* aSpaceMoverPtr);
62
63 void SetType(Type aType) { mType = aType; }
64 WsfEvent::EventDisposition Execute() override;
65
66 private:
67 Type mType;
68 size_t mId;
69 WsfEclipseEventManager& mEclipseManager;
70 WsfSpaceMoverBase* mSpaceMoverPtr;
71 size_t mPlatformIndex;
72 };
73
74 void InitiateEclipseEvent(double aSimTime, size_t aId, WsfSpaceMoverBase& aSpaceMover);
75
76 void InitiateMonitoring(double aSimTime, WsfPlatform* aPlatformPtr);
77
78 void UpdateMonitoring(double aSimTime, WsfSpaceMoverBase* aSpaceMoverPtr, const WsfOrbitalEvent& aManeuver);
79
80 void CeaseMonitoring(double aSimTime, WsfPlatform* aPlatformPtr);
81
82 bool mIsEnabled;
83 UtCallbackHolder mCallbacks;
84 std::map<WsfStringId, size_t> mPlatformToCurrentEventIdMap;
85};
86
89{
90public:
91 void SimulationCreated(WsfSimulation& aSimulation) override;
92};
93#endif
The scenario extension used to configure the Eclipse reports object.
Definition WsfEclipseEventManager.hpp:89
void SimulationCreated(WsfSimulation &aSimulation) override
Definition WsfEclipseEventManager.cpp:163
WsfEclipseEventManager()
Definition WsfEclipseEventManager.cpp:24
bool IsEnabled() const
Definition WsfEclipseEventManager.hpp:45
Definition WsfEvent.hpp:29
EventDisposition
Definition WsfEvent.hpp:37
Definition WsfOrbitalEvent.hpp:50
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
WsfScenarioExtension()
Definition WsfScenarioExtension.cpp:21
WsfSimulationExtension()
Definition WsfSimulationExtension.cpp:23
virtual bool Initialize()
Definition WsfSimulationExtension.cpp:49
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfSpaceMoverBase.hpp:70
Type
Definition P6DofVehicleData.hpp:182
Copyrights Multiple, All Rights Reserved