|
WSF
|
#include <WsfCommLayer.hpp>


Public Types | |
| enum class | LayerType : size_t { cPHYSICAL , cDATALINK , cNETWORK , cTRANSPORT , cSESSION , cPRESENTATION , cAPPLICATION , cNONE } |
Public Member Functions | |
| Layer (Layer::LayerType aCommLayerType, LayerImp *aCommLayerImpPtr) | |
| virtual | ~Layer () |
| Public Member Functions inherited from WsfUniqueId | |
| WsfUniqueId () | |
| Construtor initializes the unique identifier to 0. | |
| WsfUniqueId (const WsfUniqueId &) | |
| Copy constructor initializes the unique identifier to 0. | |
| WsfUniqueId & | operator= (const WsfUniqueId &) |
| unsigned int | GetUniqueId () const |
| Get the unique identifier assigned to this object. | |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| For XIO (de)serialization. | |
Runtime assignment of unique id. | |
Wrapper for WsfUniqueId::AssignUniqueId for public usage. | |
| void | SetID (WsfSimulation &aSim) |
| void | SetUpperLayer (Layer *aLayerPtr) |
| void | SetLowerLayer (Layer *aLayerPtr) |
| void | SetIndex (size_t aIndex) |
| Layer * | GetUpperLayer () const |
| Layer * | GetLowerLayer () const |
| LayerImp * | GetCommLayerImp () |
| Layer (const Layer &aSrc) | |
| Copy constructor (for Clone()). | |
Common infrastructure methods. | |
| virtual Layer * | Clone () const |
| virtual bool | Initialize (double aSimTime) |
| virtual bool | Initialize2 (double aSimTime) |
| virtual bool | ProcessInput (UtInput &aInput) |
Send/Receive methods | |
| virtual bool | Receive (double aSimTime, Comm *aXmtrPtr, Message &aMessage) |
| virtual bool | Send (double aSimTime, Message &aMessage) |
Comm event methods. | |
| virtual bool | ProcessLayerMessage (double aSimTime, layer::Message aLayerMessage, Message *aCommMessagePtr) |
| Process a layer event. | |
Methods to access the owning communication device. | |
| Comm * | Parent () const |
| void | SetParent (Comm *aParentCommPtr) |
| void | SetDebugEnabled (bool aDebugEnabled) |
| LayerType | GetLayerType () const |
Additional Inherited Members | |
| Protected Member Functions inherited from WsfUniqueId | |
| void | AssignUniqueId (WsfSimulation *aSimulationPtr) |
A base class for layers in the communication stack. It uses a bridge pattern to decouple the integration with the AFSIM simulation from the detailed implementation in a layer. Each layer has a unique ID assigned at initialization for potential runtime management of layers.
|
strong |
| wsf::comm::Layer::Layer | ( | Layer::LayerType | aCommLayerType, |
| LayerImp * | aCommLayerImpPtr ) |
Referenced by Clone(), GetLowerLayer(), GetUpperLayer(), Layer(), SetLowerLayer(), and SetUpperLayer().
|
virtual |
|
protected |
Copy constructor (for Clone()).
References Clone(), GetCommLayerImp(), Layer(), Parent(), and wsf::comm::LayerImp::SetParent().
| LayerImp * wsf::comm::Layer::GetCommLayerImp | ( | ) |
Referenced by wsf::comm::medium::Unguided::EndPropagation(), wsf::comm::medium::Guided::EndTransmission(), wsf::comm::medium::Unguided::EndTransmission(), wsf::comm::medium::Unguided::EndTransmission(), wsf::comm::medium::ModeUnguided::GetTransmissionTime(), Initialize(), Initialize2(), Layer(), ProcessInput(), ProcessLayerMessage(), Receive(), Send(), SetDebugEnabled(), SetIndex(), and SetParent().
|
inline |
|
virtual |
References WsfUniqueId::AssignUniqueId(), GetCommLayerImp(), wsf::comm::LayerImp::Initialize(), and Parent().
|
virtual |
References GetCommLayerImp(), and wsf::comm::LayerImp::Initialize2().
| Comm * wsf::comm::Layer::Parent | ( | ) | const |
Referenced by Initialize(), and Layer().
|
virtual |
References GetCommLayerImp(), and wsf::comm::LayerImp::ProcessInput().
|
virtual |
Process a layer event.
References GetCommLayerImp(), and wsf::comm::LayerImp::ProcessLayerMessage().
Receive a message. It is the responsibility of the receiver to actually determine if the message can be received (i.e. line-of-sight, enough power, etc).
| aSimTime | The current simulation time. |
| aXmtrPtr | The comm device that sent the message. |
| aMessage | The received message. |
References GetCommLayerImp(), wsf::comm::LayerImp::Receive(), and success.
|
virtual |
Send a message to a specific platform.
| aSimTime | The current simulation time. |
| aMessage | The message to be sent. |
References GetCommLayerImp(), wsf::comm::LayerImp::Send(), and success.
| void wsf::comm::Layer::SetDebugEnabled | ( | bool | aDebugEnabled | ) |
References GetCommLayerImp(), and wsf::comm::LayerImp::SetDebugEnabled().
| void wsf::comm::Layer::SetID | ( | WsfSimulation & | aSim | ) |
References WsfUniqueId::AssignUniqueId().
| void wsf::comm::Layer::SetIndex | ( | size_t | aIndex | ) |
References GetCommLayerImp(), and wsf::comm::LayerImp::SetIndex().
Referenced by wsf::comm::ProtocolStack::AddLayer().
| void wsf::comm::Layer::SetParent | ( | Comm * | aParentCommPtr | ) |
References GetCommLayerImp(), and wsf::comm::LayerImp::SetParent().
| void wsf::comm::Layer::SetUpperLayer | ( | Layer * | aLayerPtr | ) |
Methods to inform a layer of its neighbors and location in the protocol stack. These methods also propagate such data to the implementation for more complicated layer implementation that may need to know this data at runtime.
References Layer().