Collection of ns-3 channels between local and remote nodes. More...
#include "remote-channel-bundle.h"
Public Member Functions | |
RemoteChannelBundle () | |
Default constructor. More... | |
RemoteChannelBundle (const uint32_t remoteSystemId) | |
Construct and assign system Id. More... | |
~RemoteChannelBundle () override | |
Destructor. More... | |
void | AddChannel (Ptr< Channel > channel, Time delay) |
Add a channel to this bundle. More... | |
Time | GetDelay () const |
Get the minimum delay along any channel in this bundle. More... | |
EventId | GetEventId () const |
Get the event ID of the Null Message send event for this bundle. More... | |
Time | GetGuaranteeTime () const |
Get the current guarantee time for this bundle. More... | |
std::size_t | GetSize () const |
Get the number of ns-3 channels in this bundle. More... | |
uint32_t | GetSystemId () const |
Get the system Id for this side. More... | |
void | Send (Time time) |
Send Null Message to the remote task associated with this bundle. More... | |
void | SetEventId (EventId id) |
Set the event ID of the Null Message send event currently scheduled for this channel. More... | |
void | SetGuaranteeTime (Time time) |
Set the guarantee time for the bundle. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
~Object () override | |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose () |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. More... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized () const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Private Types | |
typedef std::unordered_map< uint32_t, Ptr< Channel > > | ChannelMap |
Container of channels that are connected from nodes in this MPI task to nodes in a remote rank. More... | |
Private Attributes | |
ChannelMap | m_channels |
ChannelId to Channel map. More... | |
Time | m_delay |
Delay for this Channel bundle, which is the min link delay over all incoming channels;. More... | |
Time | m_guaranteeTime |
Guarantee time for the incoming Channels from MPI task remote_rank. More... | |
EventId | m_nullEventId |
Event scheduled to send Null Message for this bundle. More... | |
uint32_t | m_remoteSystemId |
Remote rank. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, ns3::RemoteChannelBundle &bundle) |
Output for debugging purposes. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoDispose () |
Destructor implementation. More... | |
virtual void | DoInitialize () |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Collection of ns-3 channels between local and remote nodes.
An instance exists for each remote system that the local system is in communication with. These are created and managed by the RemoteChannelBundleManager class. Stores time information for each bundle.
Definition at line 51 of file remote-channel-bundle.h.
|
private |
Container of channels that are connected from nodes in this MPI task to nodes in a remote rank.
Definition at line 153 of file remote-channel-bundle.h.
ns3::RemoteChannelBundle::RemoteChannelBundle | ( | ) |
Default constructor.
Definition at line 47 of file remote-channel-bundle.cc.
ns3::RemoteChannelBundle::RemoteChannelBundle | ( | const uint32_t | remoteSystemId | ) |
Construct and assign system Id.
[in] | remoteSystemId | The system id. |
Definition at line 54 of file remote-channel-bundle.cc.
|
inlineoverride |
Destructor.
Definition at line 70 of file remote-channel-bundle.h.
Add a channel to this bundle.
channel | to add to the bundle |
delay | time for the channel (usually the latency) |
Definition at line 62 of file remote-channel-bundle.cc.
References third::channel, m_channels, m_delay, and ns3::Min().
Time ns3::RemoteChannelBundle::GetDelay | ( | ) | const |
Get the minimum delay along any channel in this bundle.
Definition at line 89 of file remote-channel-bundle.cc.
References m_delay.
Referenced by ns3::NullMessageSimulatorImpl::NullMessageEventHandler().
EventId ns3::RemoteChannelBundle::GetEventId | ( | ) | const |
Get the event ID of the Null Message send event for this bundle.
Definition at line 101 of file remote-channel-bundle.cc.
References m_nullEventId.
Time ns3::RemoteChannelBundle::GetGuaranteeTime | ( | ) | const |
Get the current guarantee time for this bundle.
Definition at line 75 of file remote-channel-bundle.cc.
References m_guaranteeTime.
std::size_t ns3::RemoteChannelBundle::GetSize | ( | void | ) | const |
Get the number of ns-3 channels in this bundle.
Definition at line 107 of file remote-channel-bundle.cc.
References m_channels.
uint32_t ns3::RemoteChannelBundle::GetSystemId | ( | ) | const |
Get the system Id for this side.
Definition at line 69 of file remote-channel-bundle.cc.
References m_remoteSystemId.
|
static |
Register this type.
Definition at line 38 of file remote-channel-bundle.cc.
References ns3::TypeId::SetParent().
void ns3::RemoteChannelBundle::Send | ( | Time | time | ) |
Send Null Message to the remote task associated with this bundle.
Message will be delivered at current simulation time + the time passed in.
time | The delay from now when the null message should be received. |
Definition at line 113 of file remote-channel-bundle.cc.
References ns3::NullMessageMpiInterface::SendNullMessage().
void ns3::RemoteChannelBundle::SetEventId | ( | EventId | id | ) |
Set the event ID of the Null Message send event currently scheduled for this channel.
[in] | id | The null message event id. |
Definition at line 95 of file remote-channel-bundle.cc.
References m_nullEventId.
void ns3::RemoteChannelBundle::SetGuaranteeTime | ( | Time | time | ) |
Set the guarantee time for the bundle.
This should be called after a packet or Null Message received.
time | The guarantee time. |
Definition at line 81 of file remote-channel-bundle.cc.
References m_guaranteeTime, ns3::Simulator::Now(), and NS_ASSERT.
|
friend |
Output for debugging purposes.
[in,out] | out | The stream. |
[in] | bundle | The bundle to print. |
Definition at line 118 of file remote-channel-bundle.cc.
|
private |
ChannelId to Channel map.
Definition at line 154 of file remote-channel-bundle.h.
Referenced by AddChannel(), and GetSize().
|
private |
Delay for this Channel bundle, which is the min link delay over all incoming channels;.
Definition at line 168 of file remote-channel-bundle.h.
Referenced by AddChannel(), and GetDelay().
|
private |
Guarantee time for the incoming Channels from MPI task remote_rank.
No PacketMessage will ever arrive on any incoming channel in this bundle with a ReceiveTime less than this. Initialized to StartTime.
Definition at line 162 of file remote-channel-bundle.h.
Referenced by GetGuaranteeTime(), and SetGuaranteeTime().
|
private |
Event scheduled to send Null Message for this bundle.
Definition at line 171 of file remote-channel-bundle.h.
Referenced by GetEventId(), and SetEventId().
|
private |