WSF
WsfP6DOF_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 2019 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 WSFP6DOF_EVENTPIPE_HPP
13#define WSFP6DOF_EVENTPIPE_HPP
14
15#include "WsfEventPipe.hpp"
16
17class WsfP6DOF_Mover;
19
20namespace wsf
21{
22namespace p6dof
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 P6DofSendMessage(double aSimTime, const WsfPlatform& aPlatform, WsfP6DOF_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 mP6dofCallback;
67 int cP6DOF;
68};
69
71{
72public:
73 static EventPipeInterface& Get(const WsfSimulation& aSimulation);
75 ~EventPipeInterface() override = default;
76
78 void AddedToSimulation() override;
79
80private:
81 std::unique_ptr<EventPipe> mEventPipePtr;
82};
83} // namespace p6dof
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
Definition WsfP6DOF_Mover.hpp:51
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
static EventPipeInterface & Get(const WsfSimulation &aSimulation)
Return a reference to the simulation extension.
Definition WsfP6DOF_EventPipe.cpp:239
EventPipeInterface()
Definition WsfP6DOF_EventPipe.cpp:245
void AddedToSimulation() override
Calls to make when this interface is added to the simulation.
Definition WsfP6DOF_EventPipe.cpp:251
~EventPipeInterface() override=default
static void RegisterEvents(WsfEventPipeExtension &aEventPipeExtension)
Register the event pipe events for P6dof data.
Definition WsfP6DOF_EventPipe.cpp:27
EventPipe(WsfEventPipeInterface *aEventPipeInterfacePtr)
Definition WsfP6DOF_EventPipe.cpp:43
void UpdateSubscriptions(const WsfEventPipeOptions &aNewCombinedOptions, const WsfEventPipeOptions &aPreviousCombinedOptions) override
Update callback subscriptions.
Definition WsfP6DOF_EventPipe.cpp:51
static void RegisterMessages(UtPackSerializer *aSerializerPtr)
Register the messages for the serializer.
Definition WsfP6DOF_EventPipe.cpp:38
Definition WsfP6DOF_EventPipe.hpp:23
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved