|
WSF
|
#include <WsfCommMediumGuided.hpp>


Public Member Functions | |
| Guided (WsfScenario &aScenario) | |
| ~Guided () override=default | |
| const char * | GetScriptClassName () const override |
| TypeIdentifier | GetMediumIdentifier () const override |
| Guided * | Clone () const override |
| bool | ProcessInput (UtInput &aInput) override |
| std::unique_ptr< Mode > | CreateDefaultMode () 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) | |
| Medium & | operator= (Medium &aRhs) |
| const char * | GetScriptClassName () const override |
| bool | ProcessInput (UtInput &aInput) override |
| virtual bool | Initialize (double aSimTime) |
| void | SetSimulation (WsfSimulation *aSimPtr) |
| WsfSimulation * | GetSimulation () 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) |
| MessageStatus * | GetMessageStatus (const Message::Identifier &aIdentifier) |
| MessageStatus * | GetMessageStatusByIndex (size_t aIndex) |
| Mode * | GetMode (const std::string &aModeName) const |
| Mode * | GetMode (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 TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (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< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
| void | RemoveMessageStatus (const Message::Identifier &aIdentifier) |
| void | SetNumChannels (size_t aNumChannels) |
| Mode * | GetModeForTransmission (double aSimTime, Comm &aXmtr, Comm &aRcvr, Message &aMessage) |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
| std::unordered_map< Message::Identifier, MessageStatus > | mMessages {} |
| std::vector< ut::CloneablePtr< Mode > > | mModes {} |
| bool | mShared {false} |
| bool | mDebug {false} |
| Debug flag. | |
| std::shared_ptr< int > | mEventPtr {nullptr} |
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.
| wsf::comm::medium::Guided::Guided | ( | WsfScenario & | aScenario | ) |
References wsf::comm::medium::Medium::Medium(), and wsf::comm::medium::Medium::mModes.
Referenced by Clone(), RegisterFactory(), and wsf::comm::medium::Unguided::Unguided().
|
overridedefault |
|
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().
|
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.
|
finalvirtual |
Implements wsf::comm::medium::Medium.
References EndPropagation(), and wsf::comm::medium::Medium::GetMessageStatus().
Referenced by EndPropagation(), and PropagateMessage().
|
virtual |
Reimplemented in wsf::comm::medium::Unguided.
References wsf::comm::medium::MessageStatus::AbortDelivery(), wsf::comm::NetworkManager::GetComm(), WsfSimulation::GetCommNetworkManager(), wsf::comm::medium::MessageStatus::GetMessage(), wsf::comm::Message::Identifier::GetSerialNumber(), wsf::comm::medium::Medium::GetSimulation(), wsf::comm::medium::Medium::mDebug, and wsf::comm::medium::Medium::RemoveMessageStatus().
|
finalvirtual |
Implements wsf::comm::medium::Medium.
Reimplemented in wsf::comm::medium::Unguided.
References EndTransmission(), and wsf::comm::medium::Medium::GetMessageStatus().
Referenced by EndTransmission(), and TransmitMessage().
|
virtual |
Reimplemented in wsf::comm::medium::Unguided.
References wsf::comm::medium::MessageStatus::AbortDelivery(), wsf::comm::layer::cUP_ACK_SEND(), wsf::comm::layer::cUP_NACK_SEND(), wsf::comm::NetworkManager::GetComm(), wsf::comm::Layer::GetCommLayerImp(), WsfSimulation::GetCommNetworkManager(), wsf::comm::LayerImp::GetIndex(), wsf::comm::medium::MessageStatus::GetLayer(), wsf::comm::medium::MessageStatus::GetMessage(), wsf::comm::medium::Medium::GetSimulation(), wsf::comm::medium::MessageStatus::GetTimeLastXmtrStatusChange(), wsf::comm::Message::GetTraceRoute(), wsf::comm::medium::MessageStatus::IsStatusIssued(), PropagateMessage(), wsf::comm::LayerEvent::ScheduleCommLayerEvent(), wsf::comm::medium::MessageStatus::SetAbortDelivery(), wsf::comm::medium::MessageStatus::SetIsTransmitting(), and wsf::comm::medium::MessageStatus::SetStatusIssued().
|
inlineoverridevirtual |
Implements wsf::comm::medium::Medium.
Reimplemented in wsf::comm::medium::Unguided.
References wsf::comm::medium::cGUIDED.
|
inlineoverride |
|
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'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from WsfObject.
Reimplemented in wsf::comm::medium::Unguided.
References wsf::comm::medium::Medium::ProcessInput().
Referenced by wsf::comm::medium::Unguided::ProcessInput().
|
finalvirtual |
Implements wsf::comm::medium::Medium.
References wsf::comm::medium::Medium::GetMessageStatus(), and PropagateMessage().
Referenced by EndTransmission(), wsf::comm::medium::Unguided::EndTransmission(), and PropagateMessage().
| void wsf::comm::medium::Guided::PropagateMessage | ( | double | aSimTime, |
| MessageStatus & | aMessageStatus, | ||
| const Message::Identifier & | aIdentifier ) |
|
static |
References wsf::comm::medium::FactoryManager::AddFactory(), wsf::comm::medium::Types::GetManager(), and Guided().
Referenced by wsf::comm::medium::Types::Types().
|
overridevirtual |
Implements wsf::comm::medium::Medium.
Reimplemented in wsf::comm::medium::Unguided.
References WsfSimulation::AddEvent(), wsf::comm::medium::cFAILURE_CHANNEL_LIMIT_REACHED, wsf::comm::medium::cFAILURE_NONEXISTENT_RECEIVER, wsf::comm::medium::cSUCCESS, EndTransmission(), wsf::comm::Address::GetAddress(), wsf::comm::Comm::GetAddress(), WsfSimulation::GetCommNetworkManager(), wsf::comm::medium::Medium::GetCurrentTransmissions(), wsf::comm::Comm::GetFullName(), WsfPlatformPart::GetLastStatusChangeTime(), wsf::comm::medium::Medium::GetModeForTransmission(), wsf::comm::medium::Medium::GetModeIndex(), wsf::comm::medium::Medium::GetNumChannels(), wsf::comm::medium::Medium::GetSimulation(), wsf::comm::medium::Medium::mDebug, WsfObserver::MessageTransmitted(), wsf::comm::medium::Medium::mEventPtr, wsf::comm::medium::Medium::mMessages, wsf::comm::medium::MessageStatus::SetAbortDelivery(), wsf::comm::medium::MessageStatus::SetLayer(), wsf::comm::medium::MessageStatus::SetTimeDelivery(), wsf::comm::medium::MessageStatus::SetTimeLastXmtrStatusChange(), wsf::comm::medium::MessageStatus::SetTimeTransmissionEnd(), and wsf::comm::Message::SourceMessage().