WSF
wsf::comm::medium::Guided Class Reference

#include <WsfCommMediumGuided.hpp>

Inheritance diagram for wsf::comm::medium::Guided:
Collaboration diagram for wsf::comm::medium::Guided:

Public Member Functions

 Guided (WsfScenario &aScenario)
 ~Guided () override=default
const char * GetScriptClassName () const override
TypeIdentifier GetMediumIdentifier () const override
GuidedClone () const override
bool ProcessInput (UtInput &aInput) override
std::unique_ptr< ModeCreateDefaultMode () const override
TransmissionResult TransmitMessage (double aSimTime, Layer *aLayerPtr, Message &aMessage, Comm &aXmtr) override
void EndTransmission (double aSimTime, const Message::Identifier &aIdentifier) final
virtual void EndTransmission (double aSimTime, MessageStatus &aMessageStatus, const Message::Identifier &aIdentifier)
void PropagateMessage (double aSimTime, const Message::Identifier &aIdentifier) final
void PropagateMessage (double aSimTime, MessageStatus &aMessageStatus, const Message::Identifier &aIdentifier)
void EndPropagation (double aSimTime, const Message::Identifier &aIdentifier) final
virtual void EndPropagation (double aSimTime, MessageStatus &aMessageStatus, const Message::Identifier &aIdentifier)
Public Member Functions inherited from wsf::comm::medium::Medium
 Medium (WsfScenario &aScenario)
 ~Medium () override=default
 Medium (const Medium &aSrc)
Mediumoperator= (Medium &aRhs)
const char * GetScriptClassName () const override
bool ProcessInput (UtInput &aInput) override
virtual bool Initialize (double aSimTime)
void SetSimulation (WsfSimulation *aSimPtr)
WsfSimulationGetSimulation () const
size_t GetNumModes () const
size_t GetCurrentModeIndex () const
std::pair< size_t, bool > GetModeIndex (const std::string &aModeName) const
size_t GetNumChannels () const
const std::string & GetActiveModeName () const
bool IsMediumShared () const
bool UserDirectedSharing () const
size_t GetCurrentTransmissions () const
size_t GetNumMessageStatuses () const
bool SetActiveMode (const std::string &aModeName)
bool SetActiveMode (size_t aIndex)
void SetActiveModeDelayed (const std::string &aModeName)
void SetActiveModeDelayed (size_t aIndex)
void SetIsShared (bool aIsShared)
MessageStatusGetMessageStatus (const Message::Identifier &aIdentifier)
MessageStatusGetMessageStatusByIndex (size_t aIndex)
ModeGetMode (const std::string &aModeName) const
ModeGetMode (size_t aModeIndex) const
std::string ExecuteModeOnTransmit (double aSimTime, const Message &aMessage, const Comm &aXmtr, const Comm &aRcvr)
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Static Public Member Functions

static void RegisterFactory (Types &aTypes)

Additional Inherited Members

Public Types inherited from wsf::comm::medium::Medium
using ModeIt = std::vector<std::unique_ptr<Mode>>::iterator
using const_ModeIt = std::vector<std::unique_ptr<Mode>>::const_iterator
Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
void RemoveMessageStatus (const Message::Identifier &aIdentifier)
void SetNumChannels (size_t aNumChannels)
ModeGetModeForTransmission (double aSimTime, Comm &aXmtr, Comm &aRcvr, Message &aMessage)
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).
std::unordered_map< Message::Identifier, MessageStatusmMessages {}
std::vector< ut::CloneablePtr< Mode > > mModes {}
bool mShared {false}
bool mDebug {false}
 Debug flag.
std::shared_ptr< int > mEventPtr {nullptr}

Detailed Description

This medium provides legacy capabilities for usage in AFSIM. It is intended to provide the functionality available in previous iterations without the need to modify existing user input. As the legacy guided medium model, it provides only basic functionality that is applicable to all objects that utilize mediums within the AFSIM core.

Constructor & Destructor Documentation

◆ Guided()

◆ ~Guided()

wsf::comm::medium::Guided::~Guided ( )
overridedefault

Member Function Documentation

◆ Clone()

Guided * wsf::comm::medium::Guided::Clone ( ) const
overridevirtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Implements wsf::comm::medium::Medium.

Reimplemented in wsf::comm::medium::Unguided.

References Guided().

◆ CreateDefaultMode()

std::unique_ptr< Mode > wsf::comm::medium::Guided::CreateDefaultMode ( ) const
inlineoverridevirtual

Returns a default constructed mode of the type associated with this medium implementation.

Implements wsf::comm::medium::Medium.

Reimplemented in wsf::comm::medium::Unguided.

◆ EndPropagation() [1/2]

void wsf::comm::medium::Guided::EndPropagation ( double aSimTime,
const Message::Identifier & aIdentifier )
finalvirtual

◆ EndPropagation() [2/2]

◆ EndTransmission() [1/2]

void wsf::comm::medium::Guided::EndTransmission ( double aSimTime,
const Message::Identifier & aIdentifier )
finalvirtual

◆ EndTransmission() [2/2]

◆ GetMediumIdentifier()

TypeIdentifier wsf::comm::medium::Guided::GetMediumIdentifier ( ) const
inlineoverridevirtual

◆ GetScriptClassName()

const char * wsf::comm::medium::Guided::GetScriptClassName ( ) const
inlineoverride

◆ ProcessInput()

bool wsf::comm::medium::Guided::ProcessInput ( UtInput & aInput)
overridevirtual

Process input from a generic source.

Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

Reimplemented from WsfObject.

Reimplemented in wsf::comm::medium::Unguided.

References wsf::comm::medium::Medium::ProcessInput().

Referenced by wsf::comm::medium::Unguided::ProcessInput().

◆ PropagateMessage() [1/2]

void wsf::comm::medium::Guided::PropagateMessage ( double aSimTime,
const Message::Identifier & aIdentifier )
finalvirtual

◆ PropagateMessage() [2/2]

◆ RegisterFactory()

void wsf::comm::medium::Guided::RegisterFactory ( Types & aTypes)
static

◆ TransmitMessage()


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