WSF
Simulation.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
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 SIMULATION_HPP
16#define SIMULATION_HPP
17
18#include <vector>
19
20#include "Constants.hpp"
21#include "Task.hpp"
23
24namespace engage
25{
26
27class Platform;
28
34{
35public:
36 Simulation(WsfScenario& aScenario, Task& aTask);
37 ~Simulation() override;
38
39 Task& GetTask() const { return mTask; }
40 Phase GetPhase() const { return mPhase; }
41
42 void SetPhase(Phase aPhase, double aSimTime);
43
44 double GetPhaseStartTime() const { return mPhaseStartTime[mPhase]; }
45 double GetPhaseStartTime(Phase aPhase) const { return mPhaseStartTime[aPhase]; }
46
47 //@name Standard 'known' platforms.
49 void SetTarget(Platform* aTargetPtr) { mTargetPtr = aTargetPtr; }
50 void SetTracker(Platform* aTrackerPtr) { mTrackerPtr = aTrackerPtr; }
51 void SetLauncher(Platform* aLauncherPtr) { mLauncherPtr = aLauncherPtr; }
52 void SetWeapon(Platform* aWeaponPtr) { mWeaponPtr = aWeaponPtr; }
53
54 Platform* GetTarget() const { return mTargetPtr; }
55 Platform* GetTracker() const { return mTrackerPtr; }
56 Platform* GetLauncher() const { return mLauncherPtr; }
57 Platform* GetWeapon() const { return mWeaponPtr; }
59
60private:
61 Task& mTask;
62
64 Phase mPhase;
65 std::vector<double> mPhaseStartTime;
66
67 Platform* mTargetPtr;
68 Platform* mTrackerPtr;
69 Platform* mLauncherPtr;
70 Platform* mWeaponPtr;
71};
72
73} // namespace engage
74
75#endif
WsfFrameStepSimulation(WsfScenario &aScenario, unsigned int aRunNumber)
Definition WsfFrameStepSimulation.cpp:60
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
This class in the interface between WSF platforms and ENGAGE players.
Definition engage/source/Platform.hpp:33
Task & GetTask() const
Definition Simulation.hpp:39
Platform * GetWeapon() const
Definition Simulation.hpp:57
void SetTarget(Platform *aTargetPtr)
Definition Simulation.hpp:49
Platform * GetTarget() const
Definition Simulation.hpp:54
Phase GetPhase() const
Definition Simulation.hpp:40
~Simulation() override
Definition Simulation.cpp:39
Platform * GetTracker() const
Definition Simulation.hpp:55
void SetLauncher(Platform *aLauncherPtr)
Definition Simulation.hpp:51
Simulation(WsfScenario &aScenario, Task &aTask)
Definition Simulation.cpp:25
Platform * GetLauncher() const
Definition Simulation.hpp:56
void SetPhase(Phase aPhase, double aSimTime)
Definition Simulation.cpp:48
double GetPhaseStartTime(Phase aPhase) const
Definition Simulation.hpp:45
double GetPhaseStartTime() const
Definition Simulation.hpp:44
void SetTracker(Platform *aTrackerPtr)
Definition Simulation.hpp:50
void SetWeapon(Platform *aWeaponPtr)
Definition Simulation.hpp:52
Definition Task.hpp:47
Definition ApplicationExtension.cpp:26
Phase
An enumeration that defines the current phase of the simulation, or the applicable phase of an output...
Definition Constants.hpp:23
Copyrights Multiple, All Rights Reserved