WSF
WsfAirCombatEventPipe.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 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 WSFAIRCOMBATEVENTPIPE_HPP
13#define WSFAIRCOMBATEVENTPIPE_HPP
14
15#include "WsfAirCombatEventPipeClasses.hpp" // Note: This auto-generated file must come after WsfEventPipe.hpp
16#include "WsfEventPipe.hpp"
17#include "WsfEventPipeClasses.hpp"
18#include "WsfSA_Processor.hpp"
19
20namespace wsf
21{
22namespace AirCombat
23{
29{
30public:
38 explicit EventPipe(WsfEventPipeInterface* aEventPipeInterfacePtr);
39
45 static void RegisterEvents(WsfEventPipeExtension& aEventPipeExtension);
46
52 static void RegisterMessages(UtPackSerializer* aSerializerPtr);
53
60 void UpdateSubscriptions(const WsfEventPipeOptions& aNewCombinedOptions,
61 const WsfEventPipeOptions& aPreviousCombinedOptions) override;
62
63private:
69 void AirCombatSendFlightKinematicsData(double aSimTime, const WsfPlatform& aPlatform, const WsfSA_Processor& aProcessor);
70
76 void AirCombatSendFuelData(double aSimTime, const WsfPlatform& aPlatform, const WsfSA_Processor& aProcessor);
77
83 void AirCombatSendNavData(double aSimTime, const WsfPlatform& aPlatform, const WsfSA_Processor& aProcessor);
84
90 void AirCombatSendFlightControlsData(double aSimTime, const WsfPlatform& aPlatform, const WsfSA_Processor& aProcessor);
91
97 void AirCombatSendWeaponsData(double aSimTime, const WsfPlatform& aPlatform, const WsfSA_Processor& aProcessor);
98
104 void AirCombatSendTrackData(double aSimTime, const WsfPlatform& aPlatform, const WsfSA_Processor& aProcessor);
105
115 void AirCombatSendEngagementSummaryData(double aSimTime, const WsfPlatform& aPlatform, const WsfSA_Processor& aProcessor);
116
122 void AirCombatSendPerceivedAssetsData(double aSimTime, const WsfPlatform& aPlatform, const WsfSA_Processor& aProcessor);
123
130 void AirCombatSendPerceivedItemsData(double aSimTime, const WsfPlatform& aPlatform, const WsfSA_Processor& aProcessor);
131
138 void AirCombatSendPerceivedBogiesAndBanditsData(double aSimTime,
139 const WsfPlatform& aPlatform,
140 const WsfSA_Processor& aProcessor);
141
147 void AirCombatSendGroupsData(double aSimTime, const WsfPlatform& aPlatform, const WsfSA_Processor& aProcessor);
148
155 void AirCombatSendPrioritizedThreatsAndTargetsData(double aSimTime,
156 const WsfPlatform& aPlatform,
157 const WsfSA_Processor& aProcessor);
158
163 void Send(double aSimTime, std::unique_ptr<WsfEventPipe::MsgBase> aMessagePtr)
164 {
165 mEventPipePtr->SendImmediate(aSimTime, false, std::move(aMessagePtr));
166 }
167
172 void PopulateEntity(WsfEventPipe::SA_EntityPerception& aMessageEntity, const WsfSA_EntityPerception* aPerceivedEntity);
173
175 WsfSimulation* mSimulationPtr;
176
178 WsfEventPipeInterface* mEventPipePtr;
179
182 UtCallbackHolder mCallbacks;
183
185 int cAIRCOMBAT;
186};
187
190{
191public:
197 ~EventPipeInterface() override = default;
198
200 static EventPipeInterface& Get(const WsfSimulation& aSimulation);
201
207 void AddedToSimulation() override;
208
209private:
211 std::unique_ptr<EventPipe> mEventPipePtr;
212};
213} // namespace AirCombat
214} // namespace wsf
215
216#endif // !WSFAIRCOMBATEVENTPIPE_HPP
Definition UtPack.hpp:137
Scenario extension for event pipe. Reads the input file.
Definition WsfEventPipe.hpp:36
Definition WsfEventPipeInterface.hpp:87
Definition WsfEventPipeLogger.hpp:20
Definition WsfEventPipeOptions.hpp:23
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
Definition WsfSA_EntityPerception.hpp:37
Definition WsfSA_Processor.hpp:60
WsfSimulationExtension()
Definition WsfSimulationExtension.cpp:23
friend class WsfSimulation
Definition WsfSimulationExtension.hpp:43
The main controller for a simulation.
Definition WsfSimulation.hpp:109
EventPipeInterface()
The EventPipeInterface constructor.
Definition WsfAirCombatEventPipe.cpp:861
static EventPipeInterface & Get(const WsfSimulation &aSimulation)
Get the EventPipeInterface associated with aSimulation.
Definition WsfAirCombatEventPipe.cpp:867
~EventPipeInterface() override=default
void AddedToSimulation() override
Called when the extension is added to the simulation.
Definition WsfAirCombatEventPipe.cpp:875
EventPipe(WsfEventPipeInterface *aEventPipeInterfacePtr)
Event pipe constructor.
Definition WsfAirCombatEventPipe.cpp:37
void UpdateSubscriptions(const WsfEventPipeOptions &aNewCombinedOptions, const WsfEventPipeOptions &aPreviousCombinedOptions) override
This should be called whenever an event pipe option is changed.
Definition WsfAirCombatEventPipe.cpp:62
static void RegisterMessages(UtPackSerializer *aSerializerPtr)
Calls a function called UtPack_register_all_wsf_air_combat_events_types.
Definition WsfAirCombatEventPipe.cpp:55
static void RegisterEvents(WsfEventPipeExtension &aEventPipeExtension)
This registers the AIRCOMBAT option with aEventPipeExtension, adds its schema, adds EventPipe::Regist...
Definition WsfAirCombatEventPipe.cpp:46
Definition WsfAirCombatEventPipe.hpp:23
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved