WSF
wsf::comm::PhysicalLayer Class Reference

#include <WsfCommPhysicalLayer.hpp>

Inheritance diagram for wsf::comm::PhysicalLayer:
Collaboration diagram for wsf::comm::PhysicalLayer:

Public Member Functions

 PhysicalLayer ()=default
 ~PhysicalLayer () 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.

WsfRandomVariable mTransferRate {0.0, WsfRandomVariable::cPOSITIVE}
bool ProcessLayerMessage (double aSimTime, layer::Message aLayerMessage, Message *aCommMessagePtr) override
virtual double GetTransferRate () const
virtual bool CanReceiveFrom (double aSimTime, Comm &aXmtr, Result &aResult)
 PhysicalLayer (const PhysicalLayer &aSrc)=default
PhysicalLayeroperator= (const PhysicalLayer &aRhs)=delete
 Prevent use of operator= by declaring, but not defining.

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

◆ PhysicalLayer() [1/2]

wsf::comm::PhysicalLayer::PhysicalLayer ( )
default

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

◆ ~PhysicalLayer()

wsf::comm::PhysicalLayer::~PhysicalLayer ( )
overridedefault

References Clone().

◆ PhysicalLayer() [2/2]

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

References PhysicalLayer().

Member Function Documentation

◆ CanReceiveFrom()

bool wsf::comm::PhysicalLayer::CanReceiveFrom ( double aSimTime,
Comm & aXmtr,
Result & aResult )
protectedvirtual

◆ Clone()

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

◆ GetTransferRate()

virtual double wsf::comm::PhysicalLayer::GetTransferRate ( ) const
inlinevirtual

Reimplemented in wsf::comm::PhysicalLayerLaser.

References mTransferRate.

◆ Initialize()

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

◆ operator=()

PhysicalLayer & wsf::comm::PhysicalLayer::operator= ( const PhysicalLayer & aRhs)
protecteddelete

Prevent use of operator= by declaring, but not defining.

References PhysicalLayer().

◆ ProcessInput()

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

◆ ProcessLayerMessage()

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

◆ Receive()

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

Reimplemented in wsf::comm::PhysicalLayerJTIDS.

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

◆ Send()

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

Implements wsf::comm::LayerImp.

Reimplemented in wsf::comm::PhysicalLayerJTIDS.

References wsf::comm::medium::cSUCCESS, wsf::comm::layer::cUP_NACK_SEND(), wsf::comm::LayerImp::DebugEnabled(), wsf::comm::medium::ContainerComponent< PARENT >::Find(), WsfSimulation::GetCommNetworkManager(), wsf::comm::Comm::GetFullName(), wsf::comm::LayerImp::GetIndex(), wsf::comm::Comm::GetRouter(), WsfPlatformPart::GetSimulation(), wsf::comm::Comm::GetSortedProtocols(), wsf::comm::LayerImp::Parent(), wsf::comm::LayerEvent::ScheduleCommLayerEvent(), wsf::comm::Message::SourceMessage(), and wsf::comm::medium::Medium::TransmitMessage().

Referenced by ProcessLayerMessage().

Member Data Documentation

◆ mTransferRate

WsfRandomVariable wsf::comm::PhysicalLayer::mTransferRate {0.0, WsfRandomVariable::cPOSITIVE}
mutableprotected

Transfer rate cap for the owning comm model. Any transmission will not exceed this transfer rate, even if the utilized medium allows a greater transfer rate. In legacy use cases, this value is always the limiting factor for transmission rate. Value is represented in bits/second.

Referenced by GetTransferRate(), and ProcessInput().


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