12#ifndef WSFCOMMLAYER_HPP
13#define WSFCOMMLAYER_HPP
15#include "wsf_export.h"
62 virtual Layer* Clone()
const;
63 virtual bool Initialize(
double aSimTime);
64 virtual bool Initialize2(
double aSimTime);
65 virtual bool ProcessInput(UtInput& aInput);
70 virtual bool Receive(
double aSimTime,
Comm* aXmtrPtr,
Message& aMessage);
71 virtual bool Send(
double aSimTime,
Message& aMessage);
76 virtual bool ProcessLayerMessage(
double aSimTime,
layer::Message aLayerMessage,
Message* aCommMessagePtr);
82 void SetParent(
Comm* aParentCommPtr);
85 void SetDebugEnabled(
bool aDebugEnabled);
96 void SetUpperLayer(
Layer* aLayerPtr);
97 void SetLowerLayer(
Layer* aLayerPtr);
98 void SetIndex(
size_t aIndex);
117 LayerType mCommLayerType;
118 size_t mCommLayerIndex;
120 Layer* mUpperCommLayerPtr;
121 Layer* mLowerCommLayerPtr;
145 virtual bool Receive(
double aSimTime,
Comm* aXmtrPtr,
Message& aMessage,
bool& aNotifyNextLayer) = 0;
153 virtual bool Send(
double aSimTime,
size_t aLayerIndex,
Message& aMessage,
bool& aNotifyNextLayer) = 0;
188 Comm* mParentCommPtr{
nullptr};
189 bool mDebugEnabled{
false};
191 Layer* mUpperCommLayerPtr{
nullptr};
192 Layer* mLowerCommLayerPtr{
nullptr};
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
The main controller for a simulation.
Definition WsfSimulation.hpp:109
WsfUniqueId()
Construtor initializes the unique identifier to 0.
Definition WsfUniqueId.hpp:38
Definition WsfComm.hpp:43
A base class defining the interface for the implementation classes. (Implementor).
Definition WsfCommLayer.hpp:127
virtual bool Initialize(double aSimTime)=0
void SetIndex(size_t aIndex)
Definition WsfCommLayer.hpp:169
void SetDebugEnabled(bool aDebugEnabled)
Definition WsfCommLayer.hpp:184
virtual bool Receive(double aSimTime, Comm *aXmtrPtr, Message &aMessage, bool &aNotifyNextLayer)=0
Comm * Parent() const
Definition WsfCommLayer.cpp:193
virtual bool Initialize2(double aSimTime)
Definition WsfCommLayer.hpp:135
void SetParent(Comm *aParentCommPtr)
Definition WsfCommLayer.cpp:199
virtual ~LayerImp()=default
virtual bool ProcessLayerMessage(double aSimTime, layer::Message aLayerMessage, Message *aCommMessagePtr)=0
Layer * GetLowerLayer() const
Definition WsfCommLayer.hpp:177
virtual bool ProcessInput(UtInput &aInput)=0
void SetLowerLayer(Layer *aLayerPtr)
Definition WsfCommLayer.hpp:176
virtual bool Send(double aSimTime, size_t aLayerIndex, Message &aMessage, bool &aNotifyNextLayer)=0
bool DebugEnabled() const
Determine if debugging is enabled.
Definition WsfCommLayer.hpp:180
virtual LayerImp * Clone() const =0
void SetUpperLayer(Layer *aLayerPtr)
Definition WsfCommLayer.hpp:174
Layer * GetUpperLayer() const
Definition WsfCommLayer.hpp:175
size_t GetIndex() const
Definition WsfCommLayer.hpp:170
Definition WsfCommLayer.hpp:40
LayerType GetLayerType() const
Definition WsfCommLayer.hpp:87
Layer * GetUpperLayer() const
Definition WsfCommLayer.hpp:99
Layer * GetLowerLayer() const
Definition WsfCommLayer.hpp:100
Layer(Layer::LayerType aCommLayerType, LayerImp *aCommLayerImpPtr)
Definition WsfCommLayer.cpp:29
LayerType
Definition WsfCommLayer.hpp:45
Definition WsfCommMessage.hpp:51
Definition WsfCommLayerMessage.hpp:36
Definition WsfComm.cpp:34
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32