WSF
wsf::comm::NetworkMeshLegacy Class Reference

#include <WsfCommNetworkMesh.hpp>

Inheritance diagram for wsf::comm::NetworkMeshLegacy:
Collaboration diagram for wsf::comm::NetworkMeshLegacy:

Public Member Functions

 NetworkMeshLegacy ()=default
 NetworkMeshLegacy (const std::string &aNetworkName, const Address &aAddress)
 ~NetworkMeshLegacy () override=default
NetworkMeshLegacyoperator= (const NetworkMeshLegacy &aRhs)=default
NetworkMeshLegacyClone () const override
const char * GetScriptClassName () const override
Public Member Functions inherited from wsf::comm::NetworkMesh
 NetworkMesh ()=default
 NetworkMesh (const std::string &aNetworkName, const Address &aAddress)
 ~NetworkMesh () override=default
NetworkMeshoperator= (const NetworkMesh &aRhs)=default
bool ProcessInput (UtInput &aInput) override
const char * GetScriptClassName () const override
Public Member Functions inherited from wsf::comm::Network
 Network ()=default
 ~Network () override=default
 Network (const std::string &aNetworkName, const Address &aAddress)
 Network (const Network &aSrc)=default
Networkoperator= (const Network &aRhs)=default
 Network (Network &&aSrc)=default
bool InitializeLinkage (WsfSimulation &aSimulation)
const char * GetScriptClassName () const override
virtual bool Initialize (WsfSimulation &aSim)
bool AddMember (const Address &aAddress, WsfSimulation &aSimulation, const Address &aOptionalAddress=Address())
bool RemoveMember (const Address &aAddress, WsfSimulation &aSimulation, const Address &aOptionalAddress=Address())
bool AddLink (const Address &aSourceAddress, const Address &aDestinationAddress, WsfSimulation &aSimulation, const Address &aOptionalAddress=Address())
bool RemoveLink (const Address &aSourceAddress, const Address &aDestinationAddress, WsfSimulation &aSimulation, const Address &aOptionalAddress=Address())
void SetAddress (const Address &aAddress)
void SetIsManaged (bool aManaged)
const AddressGetAddress () const
size_t GetHostsMax () const
bool IsManaged () const
const NamedListGetNamedMemberList () const
bool HasMember (const Address &aAddress) const
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)

Protected Member Functions

bool AddMemberP (const Address &aAddress, WsfSimulation &aSimulation, const Address &aOptionalAddress=Address()) override
Protected Member Functions inherited from wsf::comm::NetworkMesh
bool InitializeLinkageP (WsfSimulation &aSimulation) override
bool RemoveMemberP (const Address &aAddress, WsfSimulation &aSimulation, const Address &aOptionalAddress=Address()) override
virtual bool AddLinkP (const Address &aSourceAddress, const Address &aDestinationAddress, WsfSimulation &aSimulation, const Address &aOptionalAddress=Address())
virtual bool RemoveLinkP (const Address &aSourceAddress, const Address &aDestinationAddress, WsfSimulation &aSimulation, const Address &aOptionalAddress=Address())
virtual bool ProcessAddressListInput (UtInput &aInput)
virtual bool ProcessAddressLinkListInput (UtInput &aInput)
virtual bool ProcessNamedListInput (UtInput &aInput)
virtual bool ProcessNamedLinkListInput (UtInput &aInput)
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Additional Inherited Members

Public Types inherited from wsf::comm::Network
using AddressList = std::vector<Address>
using AddressLinkList = std::vector<std::pair<Address, Address>>
using NamedList = std::vector<NamedComm>
using NamedLinkList = std::vector<std::pair<NamedComm, NamedComm>>
Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
static Address GetAddressFromNamedComm (WsfStringId aPlatformName, WsfStringId aCommName, WsfSimulation &aSimulation)
Address mAddress {}
AddressList mAddressList {}
AddressList mInputAddressList {}
AddressLinkList mAddressLinkList {}
AddressLinkList mInputAddressLinkList {}
 Same case as "mInputAddressList" above, except with link definitions.
NamedList mNamedList {}
NamedLinkList mNamedLinkList {}
bool mManaged {false}
 True if this network is being managed by the simulation.

Detailed Description

A network implementation, defined as any number of comms with bi-directional linkage between all members. Linkage in this version is dependent on the members being able to "talk" to each other. This was the default network usage in legacy comms.

Constructor & Destructor Documentation

◆ NetworkMeshLegacy() [1/2]

wsf::comm::NetworkMeshLegacy::NetworkMeshLegacy ( )
default

References NetworkMeshLegacy().

Referenced by Clone(), NetworkMeshLegacy(), and operator=().

◆ NetworkMeshLegacy() [2/2]

wsf::comm::NetworkMeshLegacy::NetworkMeshLegacy ( const std::string & aNetworkName,
const Address & aAddress )

◆ ~NetworkMeshLegacy()

wsf::comm::NetworkMeshLegacy::~NetworkMeshLegacy ( )
overridedefault

Member Function Documentation

◆ AddMemberP()

bool wsf::comm::NetworkMeshLegacy::AddMemberP ( const Address & aAddress,
WsfSimulation & aSimulation,
const Address & aOptionalAddress = Address() )
overrideprotectedvirtual

If this is the first member, there isn't anybody to connect to. Just return.

Reimplemented from wsf::comm::NetworkMesh.

References WsfSimulation::GetCommNetworkManager(), WsfSimulation::GetSimTime(), wsf::comm::Network::mAddressList, ok, and simTime.

◆ Clone()

NetworkMeshLegacy * wsf::comm::NetworkMeshLegacy::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::NetworkMesh.

References NetworkMeshLegacy().

Referenced by operator=().

◆ GetScriptClassName()

const char * wsf::comm::NetworkMeshLegacy::GetScriptClassName ( ) const
inlineoverride

◆ operator=()

NetworkMeshLegacy & wsf::comm::NetworkMeshLegacy::operator= ( const NetworkMeshLegacy & aRhs)
default

References Clone(), and NetworkMeshLegacy().


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