A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::RemoteChannelBundleManager Class Reference

Singleton for managing the RemoteChannelBundles for each process. More...

#include "remote-channel-bundle-manager.h"

+ Collaboration diagram for ns3::RemoteChannelBundleManager:

Static Public Member Functions

static Ptr< RemoteChannelBundleAdd (uint32_t systemId)
 Add RemoteChannelBundle from this task to MPI task on other side of the link.
 
static void Destroy ()
 Destroy the singleton.
 
static Ptr< RemoteChannelBundleFind (uint32_t systemId)
 Get the bundle corresponding to a remote rank.
 
static Time GetSafeTime ()
 Get the safe time across all channels in this bundle.
 
static void InitializeNullMessageEvents ()
 Setup initial Null Message events for every RemoteChannelBundle.
 
static std::size_t Size ()
 Get the number of ns-3 channels in this bundle.
 

Private Types

typedef std::unordered_map< uint32_t, Ptr< RemoteChannelBundle > > RemoteChannelMap
 Container for all remote channel bundles for this task.
 

Private Member Functions

 RemoteChannelBundleManager ()
 Private ctor to prevent creation outside of singleton pattern.
 
 ~RemoteChannelBundleManager ()
 Private dtor to prevent destruction outside of singleton pattern.
 

Static Private Attributes

static bool g_initialized = false
 Protect manager class from being initialized twice or incorrect ordering of method calls.
 
static RemoteChannelMap g_remoteChannelBundles
 The remote channel bundles.
 

Detailed Description

Singleton for managing the RemoteChannelBundles for each process.

Manages collective tasks associated with the bundle collection.

Definition at line 36 of file remote-channel-bundle-manager.h.

Member Typedef Documentation

◆ RemoteChannelMap

Container for all remote channel bundles for this task.

Definition at line 97 of file remote-channel-bundle-manager.h.

Constructor & Destructor Documentation

◆ RemoteChannelBundleManager()

ns3::RemoteChannelBundleManager::RemoteChannelBundleManager ( )
inlineprivate

Private ctor to prevent creation outside of singleton pattern.

Definition at line 82 of file remote-channel-bundle-manager.h.

◆ ~RemoteChannelBundleManager()

ns3::RemoteChannelBundleManager::~RemoteChannelBundleManager ( )
inlineprivate

Private dtor to prevent destruction outside of singleton pattern.

Definition at line 89 of file remote-channel-bundle-manager.h.

Member Function Documentation

◆ Add()

Ptr< RemoteChannelBundle > ns3::RemoteChannelBundleManager::Add ( uint32_t systemId)
static

Add RemoteChannelBundle from this task to MPI task on other side of the link.

Can not be invoked after InitializeNullMessageEvents has been invoked.

Parameters
[in]systemIdThe remote system id.
Returns
The newly added bundle.

Definition at line 46 of file remote-channel-bundle-manager.cc.

References ns3::Create(), g_initialized, g_remoteChannelBundles, and NS_ASSERT.

Referenced by ns3::NullMessageSimulatorImpl::CalculateLookAhead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Destroy()

void ns3::RemoteChannelBundleManager::Destroy ( )
static

Destroy the singleton.

Definition at line 96 of file remote-channel-bundle-manager.cc.

References g_initialized, g_remoteChannelBundles, and NS_ASSERT.

Referenced by ns3::NullMessageSimulatorImpl::Destroy().

+ Here is the caller graph for this function:

◆ Find()

Ptr< RemoteChannelBundle > ns3::RemoteChannelBundleManager::Find ( uint32_t systemId)
static

Get the bundle corresponding to a remote rank.

Parameters
[in]systemIdThe remote system id.
Returns
The bundle for the specified system id.

Definition at line 31 of file remote-channel-bundle-manager.cc.

References g_remoteChannelBundles.

Referenced by ns3::NullMessageSimulatorImpl::CalculateGuaranteeTime(), ns3::NullMessageSimulatorImpl::CalculateLookAhead(), ns3::NullMessageMpiInterface::InitializeSendReceiveBuffers(), ns3::NullMessageMpiInterface::ReceiveMessages(), and ns3::NullMessageSimulatorImpl::RescheduleNullMessageEvent().

+ Here is the caller graph for this function:

◆ GetSafeTime()

Time ns3::RemoteChannelBundleManager::GetSafeTime ( )
static

Get the safe time across all channels in this bundle.

Returns
The safe time.

Definition at line 81 of file remote-channel-bundle-manager.cc.

References g_initialized, g_remoteChannelBundles, ns3::Simulator::GetMaximumSimulationTime(), Min, and NS_ASSERT.

Referenced by ns3::NullMessageSimulatorImpl::CalculateSafeTime().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitializeNullMessageEvents()

void ns3::RemoteChannelBundleManager::InitializeNullMessageEvents ( )
static

Setup initial Null Message events for every RemoteChannelBundle.

All RemoteChannelBundles should be added before this method is invoked.

Definition at line 65 of file remote-channel-bundle-manager.cc.

References g_initialized, g_remoteChannelBundles, ns3::NullMessageSimulatorImpl::GetInstance(), NS_ASSERT, and ns3::NullMessageSimulatorImpl::ScheduleNullMessageEvent().

Referenced by ns3::NullMessageSimulatorImpl::Run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Size()

std::size_t ns3::RemoteChannelBundleManager::Size ( )
static

Get the number of ns-3 channels in this bundle.

Returns
The number of channels.

Definition at line 59 of file remote-channel-bundle-manager.cc.

References g_remoteChannelBundles.

Referenced by ns3::NullMessageMpiInterface::InitializeSendReceiveBuffers().

+ Here is the caller graph for this function:

Member Data Documentation

◆ g_initialized

bool ns3::RemoteChannelBundleManager::g_initialized = false
staticprivate

Protect manager class from being initialized twice or incorrect ordering of method calls.

Definition at line 105 of file remote-channel-bundle-manager.h.

Referenced by Add(), Destroy(), GetSafeTime(), and InitializeNullMessageEvents().

◆ g_remoteChannelBundles

ns3::RemoteChannelBundleManager::RemoteChannelMap ns3::RemoteChannelBundleManager::g_remoteChannelBundles
staticprivate

The remote channel bundles.

Definition at line 99 of file remote-channel-bundle-manager.h.

Referenced by Add(), Destroy(), Find(), GetSafeTime(), InitializeNullMessageEvents(), and Size().


The documentation for this class was generated from the following files: