WSF
wsf::comm::DatalinkLayer Class Reference

#include <WsfCommDatalinkLayer.hpp>

Inheritance diagram for wsf::comm::DatalinkLayer:
Collaboration diagram for wsf::comm::DatalinkLayer:

Public Member Functions

 DatalinkLayer ()=default
 ~DatalinkLayer () override=default
Public Member Functions inherited from wsf::comm::LayerImp
virtual ~LayerImp ()=default
void SetUpperLayer (Layer *aLayerPtr)
LayerGetUpperLayer () const
void SetLowerLayer (Layer *aLayerPtr)
LayerGetLowerLayer () const
bool DebugEnabled () const
 Determine if debugging is enabled.
void SetDebugEnabled (bool aDebugEnabled)
virtual bool Initialize2 (double aSimTime)
CommParent () const
void SetParent (Comm *aParentCommPtr)
void SetIndex (size_t aIndex)
size_t GetIndex () const

Comm event methods.

Queue mQueue {}
double mPurgeInterval {0.0}
 The queue, where messages coming to this layer are placed.
size_t mMaximumTransmitAttempts {0}
 How long in seconds a message can sit in the queue before being dropped.
double mReTransmitDelay {0.0}
 How many transmissions attempts for each message.
size_t mCurTransmissions {0U}
 How long in seconds between retransmission attempts.
bool ProcessLayerMessage (double aSimTime, layer::Message aLayerMessage, Message *aCommMessagePtr) override
 DatalinkLayer (const DatalinkLayer &aSrc)
virtual bool AddToQueue (double aSimTime, Message &aMessage, size_t aPreviousAttempts=0)
virtual bool ReadyToTransmit (double aSimTime)
virtual bool TransmitComplete (double aSimTime, Message *aMessagePtr)
virtual bool TransmitFailed (double aSimTime, Message *aMessagePtr)
virtual bool PurgeQueue (double aSimTime)

Common infrastructure methods

LayerImpClone () const override
bool Initialize (double aSimTime) override
bool ProcessInput (UtInput &aInput) override

Send/Receive methods

bool Receive (double aSimTime, Comm *aXmtrPtr, Message &aMessage, bool &aNotifyNextLayer) override
bool Send (double aSimTime, size_t aLayerIndex, Message &aMessage, bool &aNotifyNextLayer) override

Constructor & Destructor Documentation

◆ DatalinkLayer() [1/2]

wsf::comm::DatalinkLayer::DatalinkLayer ( )
default

Referenced by Clone(), and DatalinkLayer().

◆ ~DatalinkLayer()

wsf::comm::DatalinkLayer::~DatalinkLayer ( )
overridedefault

References Clone().

◆ DatalinkLayer() [2/2]

wsf::comm::DatalinkLayer::DatalinkLayer ( const DatalinkLayer & aSrc)
protected

Member Function Documentation

◆ AddToQueue()

◆ Clone()

LayerImp * wsf::comm::DatalinkLayer::Clone ( ) const
overridevirtual

Implements wsf::comm::LayerImp.

References DatalinkLayer().

Referenced by ~DatalinkLayer().

◆ Initialize()

bool wsf::comm::DatalinkLayer::Initialize ( double aSimTime)
inlineoverridevirtual

Implements wsf::comm::LayerImp.

◆ ProcessInput()

bool wsf::comm::DatalinkLayer::ProcessInput ( UtInput & aInput)
overridevirtual

◆ ProcessLayerMessage()

bool wsf::comm::DatalinkLayer::ProcessLayerMessage ( double aSimTime,
layer::Message aLayerMessage,
Message * aCommMessagePtr )
overridevirtual

◆ PurgeQueue()

◆ ReadyToTransmit()

bool wsf::comm::DatalinkLayer::ReadyToTransmit ( double aSimTime)
protectedvirtual

◆ Receive()

bool wsf::comm::DatalinkLayer::Receive ( double aSimTime,
Comm * aXmtrPtr,
Message & aMessage,
bool & aNotifyNextLayer )
overridevirtual

Receive the message in this layer.

Parameters
aSimTime[input] The current simulation time.
aXmtrPtr[input] The comm device that sent the message.
aMessage[input] The communication message being received.
aNotifyNextLayer[output] True if the next layer above this one should immediately process this message.
Returns
'true' if layer successfully processed the message.

Implements wsf::comm::LayerImp.

References wsf::comm::LayerImp::GetIndex(), wsf::comm::Comm::GetSortedProtocols(), wsf::comm::LayerImp::Parent(), and success.

◆ Send()

bool wsf::comm::DatalinkLayer::Send ( double aSimTime,
size_t aLayerIndex,
Message & aMessage,
bool & aNotifyNextLayer )
overridevirtual

Send the message to this layer.

Parameters
aSimTime[input] The current simulation time.
aLayerIndex[input] The index in the protocol stack for this layer.
aMessage[input] The communication message being received.
aNotifyNextLayer[output] True if the next layer below this one should immediately process this message.
Returns
'true' if layer successfully processed the message.

Note: We don't check to notify the next layer here, as we always wait at this layer for potential delays.

Implements wsf::comm::LayerImp.

References AddToQueue(), wsf::comm::LayerImp::GetIndex(), wsf::comm::Comm::GetSortedProtocols(), wsf::comm::LayerImp::Parent(), and success.

◆ TransmitComplete()

◆ TransmitFailed()

Member Data Documentation

◆ mCurTransmissions

size_t wsf::comm::DatalinkLayer::mCurTransmissions {0U}
protected

How long in seconds between retransmission attempts.

Referenced by AddToQueue(), DatalinkLayer(), ReadyToTransmit(), TransmitComplete(), and TransmitFailed().

◆ mMaximumTransmitAttempts

size_t wsf::comm::DatalinkLayer::mMaximumTransmitAttempts {0}
protected

How long in seconds a message can sit in the queue before being dropped.

Referenced by DatalinkLayer(), ProcessInput(), and TransmitFailed().

◆ mPurgeInterval

double wsf::comm::DatalinkLayer::mPurgeInterval {0.0}
protected

The queue, where messages coming to this layer are placed.

Referenced by AddToQueue(), DatalinkLayer(), ProcessInput(), and PurgeQueue().

◆ mQueue

Queue wsf::comm::DatalinkLayer::mQueue {}
protected

◆ mReTransmitDelay

double wsf::comm::DatalinkLayer::mReTransmitDelay {0.0}
protected

How many transmissions attempts for each message.

Referenced by DatalinkLayer(), ProcessInput(), and TransmitFailed().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved