WSF
wsf::comm::medium::Unguided Class Reference

#include <WsfCommMediumUnguided.hpp>

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

Public Member Functions

 Unguided (WsfScenario &aScenario)
 ~Unguided () override=default
const char * GetScriptClassName () const override
TypeIdentifier GetMediumIdentifier () const override
UnguidedClone () 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, MessageStatus &aMessageStatus, const Message::Identifier &aIdentifier) override
void EndPropagation (double aSimTime, MessageStatus &aMessageStatus, const Message::Identifier &aIdentifier) override
void EndTransmission (double aSimTime, const Message::Identifier &aIdentifier) final
Public Member Functions inherited from wsf::comm::medium::Guided
 Guided (WsfScenario &aScenario)
 ~Guided () override=default
const char * GetScriptClassName () const override
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
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
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)
Static Public Member Functions inherited from wsf::comm::medium::Guided
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 extends the base guided medium capabilities to support comm models utilizing unguided mediums. This only provides a baseline for the API expected for legacy support. This should serve as a base for those objects utilizing mediums of this nature that require support for legacy input.

Constructor & Destructor Documentation

◆ Unguided()

wsf::comm::medium::Unguided::Unguided ( WsfScenario & aScenario)

◆ ~Unguided()

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

Member Function Documentation

◆ Clone()

Unguided * wsf::comm::medium::Unguided::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.

Reimplemented from wsf::comm::medium::Guided.

References Unguided().

◆ CreateDefaultMode()

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

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

Reimplemented from wsf::comm::medium::Guided.

◆ EndPropagation()

◆ EndTransmission() [1/2]

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

◆ EndTransmission() [2/2]

◆ GetMediumIdentifier()

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

◆ GetScriptClassName()

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

◆ ProcessInput()

bool wsf::comm::medium::Unguided::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 wsf::comm::medium::Guided.

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

◆ RegisterFactory()

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

◆ TransmitMessage()

TransmissionResult wsf::comm::medium::Unguided::TransmitMessage ( double aSimTime,
Layer * aLayerPtr,
Message & aMessage,
Comm & aXmtr )
overridevirtual

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