WSF
WsfCommProtocolLegacy.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 2018 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 WSFCOMMPROTOCOLLEGACY_HPP
13#define WSFCOMMPROTOCOLLEGACY_HPP
14
15#include "wsf_export.h"
16
17#include "UtScriptBasicTypes.hpp"
18#include "WsfCommGraph.hpp"
20#include "WsfCommRouter.hpp"
22
23namespace wsf
24{
25namespace comm
26{
27namespace router
28{
29
31{
32public:
33 static ProtocolLegacy* Find(const Router& aParent);
34 static ProtocolLegacy* FindOrCreate(Router& aParent);
35
36 ProtocolLegacy() = default;
37 ~ProtocolLegacy() override = default;
38
40
41 WsfComponent* CloneComponent() const override;
42 const int* GetComponentRoles() const override;
43 void* QueryInterface(int aRole) override;
44 int GetPriority() const override;
45 ProtocolLegacy* Clone() const override;
46
47 bool Send(double aSimTime, Router::SendData& aData) override;
48
49 std::vector<Address> Routing(double aSimTime,
50 const Address& aSendingInterface,
51 size_t& aHopNumber,
52 double& aCost,
53 const Message& aMessage) override;
54
55 const char* GetScriptClassName() const override { return "WsfCommProtocolLegacy"; }
57
58 void Setup() override;
59
66
67 bool ShouldPropagateTruth() const override { return false; }
68 graph::Graph* GetGraph() const override { return mGraph; }
70
71 bool Initialize(double aSimTime) override;
72
73private:
74 graph::Graph* mGraph{nullptr};
75};
76
79{
80public:
81 ScriptProtocolClassLegacy(const std::string& aClassName, UtScriptTypes* aTypesPtr);
82
83 ~ScriptProtocolClassLegacy() override = default;
84};
85
86} // namespace router
87} // namespace comm
88} // namespace wsf
89
91
92#endif
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_COMM_ROUTER_PROTOCOL_LEGACY
Definition WsfComponentRoles.hpp:124
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfComponent.hpp:39
Definition WsfCommAddress.hpp:57
Definition WsfCommMessage.hpp:51
Definition WsfCommGraph.hpp:150
Definition WsfCommProtocolLegacy.hpp:31
graph::Graph * GetGraph() const override
Definition WsfCommProtocolLegacy.hpp:68
const char * GetScriptClassName() const override
Definition WsfCommProtocolLegacy.hpp:55
static ProtocolLegacy * FindOrCreate(Router &aParent)
Definition WsfCommProtocolLegacy.cpp:36
int GetPriority() const override
Definition WsfCommProtocolLegacy.cpp:87
bool Send(double aSimTime, Router::SendData &aData) override
Definition WsfCommProtocolLegacy.cpp:111
std::vector< Address > Routing(double aSimTime, const Address &aSendingInterface, size_t &aHopNumber, double &aCost, const Message &aMessage) override
Definition WsfCommProtocolLegacy.cpp:132
ProtocolLegacy * Clone() const override
Definition WsfCommProtocolLegacy.cpp:66
void * QueryInterface(int aRole) override
Definition WsfCommProtocolLegacy.cpp:72
bool ShouldPropagateTruth() const override
Definition WsfCommProtocolLegacy.hpp:67
WsfComponent * CloneComponent() const override
Definition WsfCommProtocolLegacy.cpp:50
const int * GetComponentRoles() const override
Definition WsfCommProtocolLegacy.cpp:56
~ProtocolLegacy() override=default
static ProtocolLegacy * Find(const Router &aParent)
Definition WsfCommProtocolLegacy.cpp:29
Definition WsfCommRouter.hpp:60
Definition WsfCommRouter.hpp:55
ScriptProtocolClassLegacy(const std::string &aClassName, UtScriptTypes *aTypesPtr)
Definition WsfCommProtocolLegacy.cpp:177
ScriptRouterProtocolClass(const std::string &aClassName, UtScriptTypes *aTypesPtr)
Definition WsfCommRouterProtocolInterface.cpp:22
Definition WsfComm.hpp:36
Definition WsfComm.cpp:34
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved