WSF
WsfXIO_CommComponent.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 WSFXIO_COMMCOMPONENT_HPP
13#define WSFXIO_COMMCOMPONENT_HPP
14
15#include "WsfCommComponent.hpp"
16
19
20namespace wsf
21{
22namespace xio
23{
24
27{
28public:
29 static CommComponent* Find(const wsf::comm::Comm& aParent);
31 WsfXIO_AutoDisMapping* aDisMappingPtr,
32 WsfXIO_Connection* aConnectionPtr);
33
34 CommComponent(WsfXIO_AutoDisMapping* aDisMappingPtr, WsfXIO_Connection* aConnectionPtr);
35 CommComponent(const CommComponent& aSrc) = default;
36 ~CommComponent() override = default;
37
39
40 WsfComponent* CloneComponent() const override;
41 WsfStringId GetComponentName() const override;
42 const int* GetComponentRoles() const override;
43 void* QueryInterface(int aRole) override;
45
47
48 bool Receive(double aSimTime, wsf::comm::Comm* aXmtrPtr, wsf::comm::Message& aMessage) override;
50
51private:
52 WsfXIO_AutoDisMapping* mDisMappingPtr;
53 WsfXIO_Connection* mConnectionPtr;
54};
55
56} // namespace xio
57} // namespace wsf
58
60
61#endif
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_COMM_XIO
Definition WsfComponentRoles.hpp:120
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfComponent.hpp:39
Overrides the creation of DIS platforms using type information received over XIO.
Definition WsfXIO_AutoDisMapping.hpp:48
Definition WsfXIO_Connection.hpp:37
Definition WsfComm.hpp:43
Definition WsfCommComponent.hpp:41
Definition WsfCommMessage.hpp:51
The hardware component that can be attached to all comm systems.
Definition WsfXIO_CommComponent.hpp:27
~CommComponent() override=default
CommComponent(WsfXIO_AutoDisMapping *aDisMappingPtr, WsfXIO_Connection *aConnectionPtr)
Definition WsfXIO_CommComponent.cpp:53
static CommComponent * FindOrCreate(wsf::comm::Comm &aParent, WsfXIO_AutoDisMapping *aDisMappingPtr, WsfXIO_Connection *aConnectionPtr)
Definition WsfXIO_CommComponent.cpp:39
WsfStringId GetComponentName() const override
Definition WsfXIO_CommComponent.cpp:67
bool Receive(double aSimTime, wsf::comm::Comm *aXmtrPtr, wsf::comm::Message &aMessage) override
Definition WsfXIO_CommComponent.cpp:94
CommComponent(const CommComponent &aSrc)=default
const int * GetComponentRoles() const override
Definition WsfXIO_CommComponent.cpp:73
WsfComponent * CloneComponent() const override
Definition WsfXIO_CommComponent.cpp:61
void * QueryInterface(int aRole) override
Definition WsfXIO_CommComponent.cpp:80
static CommComponent * Find(const wsf::comm::Comm &aParent)
Find the instance of this component attached to the specified processor.
Definition WsfXIO_CommComponent.cpp:29
Definition WsfXIO.hpp:22
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved