WSF
WsfUCI_MessageBaseType.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 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 WSFUCI_MESSAGEBASETYPE_HPP
13#define WSFUCI_MESSAGEBASETYPE_HPP
14
15#include "wsf_oms_uci_export.h"
16
17#include "uci/type/HeaderType.h"
18
19#include "WsfMessage.hpp"
20class WsfSimulation;
21
22namespace wsf
23{
24
25class UCI_Interface;
26
27class WSF_OMS_UCI_EXPORT UCI_MessageBaseType: public WsfMessage
28{
29 public:
31 UCI_Interface& aInterface)
32 : WsfMessage(aSimulation),
33 mInterfacePtr(&aInterface)
34 {
35 }
37 ~UCI_MessageBaseType() override = default;
38
40 virtual const uci::type::HeaderType* GetHeader() const = 0;
41
43 UCI_Interface& GetInterface() const { return *mInterfacePtr; }
44
46 virtual void Send(const uci::type::DateTimeTypeValue& aSimTime) const = 0;
47
48 private:
49
50 UCI_Interface* mInterfacePtr { nullptr };
51};
52
53} // namespace wsf
54
55#endif
WsfMessage(WsfStringId aType)
Constructor for XIO (de)serialization.
Definition WsfMessage.cpp:25
The main controller for a simulation.
Definition WsfSimulation.hpp:109
The OMS / UCI Interface Object to the UCI middleware.
Definition WsfUCI_Interface.hpp:118
virtual const uci::type::HeaderType * GetHeader() const =0
Return this message as a uci::type::MessageType (common base class).
~UCI_MessageBaseType() override=default
UCI_MessageBaseType(WsfSimulation &aSimulation, UCI_Interface &aInterface)
Definition WsfUCI_MessageBaseType.hpp:30
UCI_Interface & GetInterface() const
Get the underlying UCI type.
Definition WsfUCI_MessageBaseType.hpp:43
virtual void Send(const uci::type::DateTimeTypeValue &aSimTime) const =0
Send this message using the writer.
UCI_MessageBaseType(const UCI_MessageBaseType &aSrc)=default
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved