WSF
wsf::comm::TransportLayer Class Reference

#include <WsfCommTransportLayer.hpp>

Inheritance diagram for wsf::comm::TransportLayer:
Collaboration diagram for wsf::comm::TransportLayer:

Public Types

enum  {
  cRELIABLE_TRANSPORT = 0x00000001 , cORDERED_DELIVERY = 0x00000002 , cCHECKSUM = 0x00000004 , cMTU = 0x00000008 ,
  cFLOW_CONTROL = 0x00000010 , cCONGESTION_CONTROL = 0x00000020 , cNAGLE_ALGORITHM = 0x00000040
}

Public Member Functions

 TransportLayer ()=default
 ~TransportLayer () override=default
TransportLayeroperator= (const TransportLayer &aRhs)=delete
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.

bool ProcessLayerMessage (double aSimTime, layer::Message aLayerMessage, Message *aCommMessagePtr) override
 Process a layer event.
unsigned int GetTransportFeatures () const
 Returns the mask variable regarding which features the transport layer supports.
 TransportLayer (const TransportLayer &aSrc)=default

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

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

The bit mask values indicate the presence of certain capabilities usually attributed to a type of protocol as defined in the transport layer. The mask is stored via mTransportFeature. Presence of the bit value indicates the protocol incorporates a specific feature, as described below. Note that at this time, not all of these values are used but are provided for future or extended capabilities. NOTE: Most of the below are specific to the mechanics of packet based delivery. AFSIM comms are message based, and therefore do not split messages into packets. However, this mode of operation is possible given user extension of layer mechanics, and some of these features have implications that can be simulated in general simulation use. For example, reliable transport, can generally be applied to the message reception itself (such as if a packet went missing during a TCP transmission), to indicate message transmission failure that can be modeled with a general transmit failure.

Enumerator
cRELIABLE_TRANSPORT 
cORDERED_DELIVERY 

ACK/NACK or other confirmation of reception.

cCHECKSUM 

Correct ordering, usually via segment numbering.

cMTU 

A checksum value in included, which infers error checking and/or correction.

cFLOW_CONTROL 

A maximum transmission unit is defined.

cCONGESTION_CONTROL 

Flow control mechanism, to avoid overwhelming a receiver.

cNAGLE_ALGORITHM 

Like flow control, except based on network state (congestion).

Constructor & Destructor Documentation

◆ TransportLayer() [1/2]

wsf::comm::TransportLayer::TransportLayer ( )
default

Referenced by Clone(), operator=(), and TransportLayer().

◆ ~TransportLayer()

wsf::comm::TransportLayer::~TransportLayer ( )
overridedefault

◆ TransportLayer() [2/2]

wsf::comm::TransportLayer::TransportLayer ( const TransportLayer & aSrc)
protecteddefault

References TransportLayer().

Member Function Documentation

◆ Clone()

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

Implements wsf::comm::LayerImp.

References TransportLayer().

Referenced by operator=().

◆ GetTransportFeatures()

unsigned int wsf::comm::TransportLayer::GetTransportFeatures ( ) const
inline

Returns the mask variable regarding which features the transport layer supports.

◆ Initialize()

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

Implements wsf::comm::LayerImp.

◆ operator=()

TransportLayer & wsf::comm::TransportLayer::operator= ( const TransportLayer & aRhs)
delete

References Clone(), and TransportLayer().

◆ ProcessInput()

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

Process Input for this layer.

Parameters
aInput[input] The UtInput object.
Returns
'true' if input belongs to this layer.

Implements wsf::comm::LayerImp.

◆ ProcessLayerMessage()

◆ Receive()

bool wsf::comm::TransportLayer::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::TransportLayer::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.

Indicate the transport features utilized with this message, for processing by other layers. In the future, this should probably be ported to a protocol implementation with more robust capabilities.

Implements wsf::comm::LayerImp.

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


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