WSF
WsfSixDOF_EventPipe.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 WSFSIXDOFEVENTPIPE_HPP
13#define WSFSIXDOFEVENTPIPE_HPP
14
15#include "WsfEventPipe.hpp"
17
18namespace wsf
19{
20namespace six_dof
21{
22class Mover;
23
25{
26public:
30 static void RegisterEvents(WsfEventPipeExtension& aEventPipeExtension);
31
35 static void RegisterMessages(UtPackSerializer* aSerializerPtr);
36
37 explicit EventPipe(WsfEventPipeInterface* aEventPipeInterfacePtr);
38
43 void UpdateSubscriptions(const WsfEventPipeOptions& aNewCombinedOptions,
44 const WsfEventPipeOptions& aPreviousCombinedOptions) override;
45
46private:
53 void SixDOF_SendMessage(double aSimTime, const WsfPlatform& aPlatform, Mover& aMover, const std::string& aMsgType);
54
59 void Send(double aSimTime, const WsfPlatform& aPlatform, std::unique_ptr<WsfEventPipe::MsgBase> aMessagePtr)
60 {
61 mEventPipePtr->SendDependent(aSimTime, aPlatform, std::move(aMessagePtr));
62 }
63
64 WsfSimulation* mSimulationPtr;
65 WsfEventPipeInterface* mEventPipePtr;
66 UtCallbackHolder mSixDOF_Callback;
67 int cSixDOF;
68};
69
71{
72public:
73 static EventPipeInterface& Get(const WsfSimulation& aSimulation);
76
78 void AddedToSimulation() override;
79
80private:
81 std::unique_ptr<EventPipe> mEventPipePtr;
82};
83} // namespace six_dof
84} // namespace wsf
85#endif
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
WsfSimulationExtension()
Definition WsfSimulationExtension.cpp:23
friend class WsfSimulation
Definition WsfSimulationExtension.hpp:43
The main controller for a simulation.
Definition WsfSimulation.hpp:109
EventPipeInterface()
Definition WsfSixDOF_EventPipe.cpp:214
static EventPipeInterface & Get(const WsfSimulation &aSimulation)
Return a reference to the simulation extension.
Definition WsfSixDOF_EventPipe.cpp:208
void AddedToSimulation() override
Calls to make when this interface is added to the simulation.
Definition WsfSixDOF_EventPipe.cpp:220
static void RegisterEvents(WsfEventPipeExtension &aEventPipeExtension)
Register the event pipe events for SixDOF data.
Definition WsfSixDOF_EventPipe.cpp:28
void UpdateSubscriptions(const WsfEventPipeOptions &aNewCombinedOptions, const WsfEventPipeOptions &aPreviousCombinedOptions) override
Update callback subscriptions.
Definition WsfSixDOF_EventPipe.cpp:52
EventPipe(WsfEventPipeInterface *aEventPipeInterfacePtr)
Definition WsfSixDOF_EventPipe.cpp:44
static void RegisterMessages(UtPackSerializer *aSerializerPtr)
Register the messages for the serializer.
Definition WsfSixDOF_EventPipe.cpp:39
This is a base class for detailed air movers. This umbrella can cover RB6 or PM6 models.
Definition WsfSixDOF_Mover.hpp:58
Definition WsfSA_Processor.hpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved