WSF
WsfCuedLaserWeapon.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 WSFCUEDLASERWEAPON_HPP
13#define WSFCUEDLASERWEAPON_HPP
14
15#include "wsf_mil_export.h"
16
17#include "UtInputString.hpp"
18#include "UtOptional.hpp"
19#include "WsfBeamDirector.hpp"
20#include "WsfEvent.hpp"
22#include "WsfLaserWeapon.hpp"
23#include "WsfStringId.hpp"
24#include "WsfTrack.hpp"
25#include "WsfWeapon.hpp"
27
32class WSF_MIL_EXPORT WsfCuedLaserWeapon : public WsfLaserWeapon
33{
34public:
37 ~WsfCuedLaserWeapon() override = default;
38
39 WsfWeapon* Clone() const override;
40
41 bool ProcessInput(UtInput& aInput) override;
42 bool Initialize(double aSimTime) override;
43 bool Initialize2(double aSimTime) override;
44
45 void TurnOff(double aSimTime) override;
46
48
49 FireResult Fire(double aSimTime, const FireTarget& aTarget, const FireOptions& aSettings) override;
50
51 // Todo; pause/resume are not necessary; just call fire again after CeaseFire call.
52 void CeaseFire(double aSimTime) override;
53
54 virtual void PauseFire(double aSimTime);
55
56 virtual void ResumeFire(double aSimTime);
57
58 bool ProcessMessage(double aSimTime, const WsfMessage& aMessage) override;
59
60protected:
62
63 bool EndShot(double aSimTime) override;
64
65 bool HasCurrentEngagement() const;
66
67 // The laser system's aggregated objects:
69
70private:
71 void UpdateEngagement(double aSimTime);
72
73 WsfStringId mBeamDirectorName;
74 WsfTrack mBeamDirectorTrack; // The track from the beam director; this should not be confused with queued engagement tracks.
75 WsfTrack mCurrentTargetTrack;
76 std::string mBeamDirectorInputs;
77 ut::optional<std::string> mBeamDirector;
78};
79
80#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
A sensor meant to be used as a beam director (target tracker) for a High-Energy Laser (HEL).
Definition WsfBeamDirector.hpp:67
Definition WsfCuedLaserWeapon.hpp:33
WsfCuedLaserWeapon(WsfScenario &aScenario)
Definition WsfCuedLaserWeapon.cpp:33
WsfBeamDirector * GetBeamDirector() const
Definition WsfCuedLaserWeapon.hpp:47
WsfBeamDirector * mBeamDirectorPtr
Definition WsfCuedLaserWeapon.hpp:68
~WsfCuedLaserWeapon() override=default
WsfCuedLaserWeapon & operator=(const WsfCuedLaserWeapon &)=delete
virtual bool EndShot(double aSimTime)
Definition WsfLaserWeapon.cpp:581
WsfLaserWeapon(WsfScenario &aScenario)
Definition WsfLaserWeapon.cpp:42
bool ProcessInput(UtInput &aInput) override
Definition WsfLaserWeapon.cpp:234
void TurnOff(double aSimTime) override
Definition WsfLaserWeapon.cpp:355
void CeaseFire(double aSimTime) override
Definition WsfLaserWeapon.cpp:370
WsfWeapon * Clone() const override
Definition WsfLaserWeapon.cpp:117
bool Initialize(double aSimTime) override
Definition WsfLaserWeapon.cpp:172
FireResult Fire(double aSimTime, const FireTarget &aTarget, const FireOptions &aSettings) override
Definition WsfLaserWeapon.cpp:387
bool Initialize2(double aSimTime) override
Definition WsfLaserWeapon.cpp:204
A base class for messages sent among simulation communication objects, processors and sensors.
Definition WsfMessage.hpp:33
virtual bool ProcessMessage(double aSimTime, const WsfMessage &aMessage)
Definition WsfPlatformPart.cpp:442
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Definition WsfWeaponEngagement.hpp:43
Definition WsfWeapon.hpp:63
Copyrights Multiple, All Rights Reserved