A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
remote-channel-bundle-manager.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright 2013. Lawrence Livermore National Security, LLC.
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Steven Smith <smith84@llnl.gov>
19
*
20
*/
21
28
#ifndef NS3_REMOTE_CHANNEL_BUNDLE_MANAGER
29
#define NS3_REMOTE_CHANNEL_BUNDLE_MANAGER
30
31
#include <ns3/nstime.h>
32
#include <ns3/ptr.h>
33
#include <unordered_map>
34
35
namespace
ns3
{
36
37
class
RemoteChannelBundle;
38
46
class
RemoteChannelBundleManager
47
{
48
49
public
:
56
static
Ptr<RemoteChannelBundle>
Find
(uint32_t systemId);
57
66
static
Ptr<RemoteChannelBundle>
Add
(uint32_t systemId);
67
72
static
std::size_t
Size
(
void
);
73
78
static
void
InitializeNullMessageEvents
(
void
);
79
84
static
Time
GetSafeTime
(
void
);
85
87
static
void
Destroy
(
void
);
88
89
private
:
90
94
RemoteChannelBundleManager
()
95
{
96
}
97
101
~RemoteChannelBundleManager
()
102
{
103
}
104
109
typedef
std::unordered_map<uint32_t, Ptr<RemoteChannelBundle> >
RemoteChannelMap
;
111
static
RemoteChannelMap
g_remoteChannelBundles
;
112
117
static
bool
g_initialized
;
118
};
119
120
}
// namespace ns3
121
122
#endif
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::RemoteChannelBundleManager
Singleton for managing the RemoteChannelBundles for each process.
Definition:
remote-channel-bundle-manager.h:47
ns3::RemoteChannelBundleManager::Find
static Ptr< RemoteChannelBundle > Find(uint32_t systemId)
Get the bundle corresponding to a remote rank.
Definition:
remote-channel-bundle-manager.cc:41
ns3::RemoteChannelBundleManager::Size
static std::size_t Size(void)
Get the number of ns-3 channels in this bundle.
Definition:
remote-channel-bundle-manager.cc:69
ns3::RemoteChannelBundleManager::~RemoteChannelBundleManager
~RemoteChannelBundleManager()
Private dtor to prevent destruction outside of singleton pattern.
Definition:
remote-channel-bundle-manager.h:101
ns3::RemoteChannelBundleManager::g_remoteChannelBundles
static RemoteChannelMap g_remoteChannelBundles
The remote channel bundles.
Definition:
remote-channel-bundle-manager.h:111
ns3::RemoteChannelBundleManager::InitializeNullMessageEvents
static void InitializeNullMessageEvents(void)
Setup initial Null Message events for every RemoteChannelBundle.
Definition:
remote-channel-bundle-manager.cc:75
ns3::RemoteChannelBundleManager::Add
static Ptr< RemoteChannelBundle > Add(uint32_t systemId)
Add RemoteChannelBundle from this task to MPI task on other side of the link.
Definition:
remote-channel-bundle-manager.cc:56
ns3::RemoteChannelBundleManager::RemoteChannelMap
std::unordered_map< uint32_t, Ptr< RemoteChannelBundle > > RemoteChannelMap
Container for all remote channel bundles for this task.
Definition:
remote-channel-bundle-manager.h:109
ns3::RemoteChannelBundleManager::GetSafeTime
static Time GetSafeTime(void)
Get the safe time across all channels in this bundle.
Definition:
remote-channel-bundle-manager.cc:93
ns3::RemoteChannelBundleManager::Destroy
static void Destroy(void)
Destroy the singleton.
Definition:
remote-channel-bundle-manager.cc:110
ns3::RemoteChannelBundleManager::RemoteChannelBundleManager
RemoteChannelBundleManager()
Private ctor to prevent creation outside of singleton pattern.
Definition:
remote-channel-bundle-manager.h:94
ns3::RemoteChannelBundleManager::g_initialized
static bool g_initialized
Protect manager class from being initialized twice or incorrect ordering of method calls.
Definition:
remote-channel-bundle-manager.h:117
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:103
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mpi
model
remote-channel-bundle-manager.h
Generated on Tue Feb 6 2024 19:21:25 for ns-3 by
1.9.1