|
WSF
|
#include <WsfCommPhysicalLayer.hpp>


Public Member Functions | |
| PhysicalLayer ()=default | |
| ~PhysicalLayer () override=default | |
| Public Member Functions inherited from wsf::comm::LayerImp | |
| virtual | ~LayerImp ()=default |
| void | SetUpperLayer (Layer *aLayerPtr) |
| Layer * | GetUpperLayer () const |
| void | SetLowerLayer (Layer *aLayerPtr) |
| Layer * | GetLowerLayer () const |
| bool | DebugEnabled () const |
| Determine if debugging is enabled. | |
| void | SetDebugEnabled (bool aDebugEnabled) |
| virtual bool | Initialize2 (double aSimTime) |
| Comm * | Parent () 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 | |
| PhysicalLayer & | operator= (const PhysicalLayer &aRhs)=delete |
| Prevent use of operator= by declaring, but not defining. | |
Common infrastructure methods. | |
| LayerImp * | Clone () 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 |
|
default |
Referenced by Clone(), operator=(), and PhysicalLayer().
|
overridedefault |
References Clone().
|
protecteddefault |
References PhysicalLayer().
|
protectedvirtual |
References wsf::comm::ComponentHW::Find(), and wsf::comm::LayerImp::Parent().
Referenced by wsf::comm::PhysicalLayerJTIDS::Receive().
|
overridevirtual |
Implements wsf::comm::LayerImp.
Reimplemented in wsf::comm::PhysicalLayerJTIDS, and wsf::comm::PhysicalLayerLaser.
References PhysicalLayer().
Referenced by ~PhysicalLayer().
|
inlinevirtual |
Reimplemented in wsf::comm::PhysicalLayerLaser.
References mTransferRate.
|
inlineoverridevirtual |
Implements wsf::comm::LayerImp.
Reimplemented in wsf::comm::PhysicalLayerJTIDS, and wsf::comm::PhysicalLayerLaser.
|
protecteddelete |
Prevent use of operator= by declaring, but not defining.
References PhysicalLayer().
|
overridevirtual |
Implements wsf::comm::LayerImp.
Reimplemented in wsf::comm::PhysicalLayerJTIDS.
References WsfRandomVariable::cPOSITIVE, mTransferRate, and WsfRandomVariable::ProcessInput().
|
overridevirtual |
Process a layer event.
| aSimTime | [input] The current simulation time. |
| aLayerMessage | [input] The layer message. |
| aCommMessagePtr | [input] The message being processed. |
Implements wsf::comm::LayerImp.
Reimplemented in wsf::comm::PhysicalLayerJTIDS.
References wsf::comm::layer::cDOWN_ACK_RECEIVE(), wsf::comm::layer::cDOWN_ACK_SEND(), wsf::comm::layer::cDOWN_NACK_RECEIVE(), wsf::comm::layer::cDOWN_NACK_SEND(), wsf::comm::layer::cUP_ACK_RECEIVE(), wsf::comm::layer::cUP_ACK_SEND(), wsf::comm::layer::cUP_NACK_RECEIVE(), wsf::comm::layer::cUP_NACK_SEND(), wsf::comm::LayerImp::GetIndex(), wsf::comm::layer::Message::GetValue(), wsf::comm::LayerImp::Parent(), wsf::comm::LayerEvent::ScheduleCommLayerEvent(), Send(), and success.
|
overridevirtual |
Receive the message in this layer.
| 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. |
Implements wsf::comm::LayerImp.
Reimplemented in wsf::comm::PhysicalLayerJTIDS.
References wsf::comm::LayerImp::GetIndex(), wsf::comm::Comm::GetSortedProtocols(), wsf::comm::LayerImp::Parent(), and success.
|
overridevirtual |
Send the message to this layer.
| 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. |
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().
|
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().