A Discrete-Event Network Simulator
API
ns3::RemoteChannelBundle Class Reference

Collection of ns-3 channels between local and remote nodes. More...

#include "remote-channel-bundle.h"

+ Inheritance diagram for ns3::RemoteChannelBundle:
+ Collaboration diagram for ns3::RemoteChannelBundle:

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< ObjectGetObject () 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< ObjectGetObject (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...
 
SimpleRefCountoperator= (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...
 

Detailed Description

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.

Member Typedef Documentation

◆ ChannelMap

typedef std::unordered_map<uint32_t, Ptr<Channel> > ns3::RemoteChannelBundle::ChannelMap
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.

Constructor & Destructor Documentation

◆ RemoteChannelBundle() [1/2]

ns3::RemoteChannelBundle::RemoteChannelBundle ( )

Default constructor.

Definition at line 47 of file remote-channel-bundle.cc.

◆ RemoteChannelBundle() [2/2]

ns3::RemoteChannelBundle::RemoteChannelBundle ( const uint32_t  remoteSystemId)

Construct and assign system Id.

Parameters
[in]remoteSystemIdThe system id.

Definition at line 54 of file remote-channel-bundle.cc.

◆ ~RemoteChannelBundle()

ns3::RemoteChannelBundle::~RemoteChannelBundle ( )
inlineoverride

Destructor.

Definition at line 70 of file remote-channel-bundle.h.

Member Function Documentation

◆ AddChannel()

void ns3::RemoteChannelBundle::AddChannel ( Ptr< Channel channel,
Time  delay 
)

Add a channel to this bundle.

Parameters
channelto add to the bundle
delaytime 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().

+ Here is the call graph for this function:

◆ GetDelay()

Time ns3::RemoteChannelBundle::GetDelay ( ) const

Get the minimum delay along any channel in this bundle.

Returns
The minimum delay.

Definition at line 89 of file remote-channel-bundle.cc.

References m_delay.

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

+ Here is the caller graph for this function:

◆ GetEventId()

EventId ns3::RemoteChannelBundle::GetEventId ( ) const

Get the event ID of the Null Message send event for this bundle.

Returns
The null message event id.

Definition at line 101 of file remote-channel-bundle.cc.

References m_nullEventId.

◆ GetGuaranteeTime()

Time ns3::RemoteChannelBundle::GetGuaranteeTime ( ) const

Get the current guarantee time for this bundle.

Returns
guarantee time

Definition at line 75 of file remote-channel-bundle.cc.

References m_guaranteeTime.

◆ GetSize()

std::size_t ns3::RemoteChannelBundle::GetSize ( void  ) const

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

Returns
The number of channels.

Definition at line 107 of file remote-channel-bundle.cc.

References m_channels.

◆ GetSystemId()

uint32_t ns3::RemoteChannelBundle::GetSystemId ( ) const

Get the system Id for this side.

Returns
SystemID for remote side of this bundle

Definition at line 69 of file remote-channel-bundle.cc.

References m_remoteSystemId.

◆ GetTypeId()

TypeId ns3::RemoteChannelBundle::GetTypeId ( void  )
static

Register this type.

Returns
The object TypeId.

Definition at line 38 of file remote-channel-bundle.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ Send()

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.

Parameters
timeThe delay from now when the null message should be received.

Definition at line 113 of file remote-channel-bundle.cc.

References ns3::NullMessageMpiInterface::SendNullMessage().

+ Here is the call graph for this function:

◆ SetEventId()

void ns3::RemoteChannelBundle::SetEventId ( EventId  id)

Set the event ID of the Null Message send event currently scheduled for this channel.

Parameters
[in]idThe null message event id.

Definition at line 95 of file remote-channel-bundle.cc.

References m_nullEventId.

◆ SetGuaranteeTime()

void ns3::RemoteChannelBundle::SetGuaranteeTime ( Time  time)

Set the guarantee time for the bundle.

This should be called after a packet or Null Message received.

Parameters
timeThe guarantee time.

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

References m_guaranteeTime, ns3::Simulator::Now(), and NS_ASSERT.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
ns3::RemoteChannelBundle bundle 
)
friend

Output for debugging purposes.

Parameters
[in,out]outThe stream.
[in]bundleThe bundle to print.
Returns
The stream.

Definition at line 118 of file remote-channel-bundle.cc.

Member Data Documentation

◆ m_channels

ChannelMap ns3::RemoteChannelBundle::m_channels
private

ChannelId to Channel map.

Definition at line 154 of file remote-channel-bundle.h.

Referenced by AddChannel(), and GetSize().

◆ m_delay

Time ns3::RemoteChannelBundle::m_delay
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().

◆ m_guaranteeTime

Time ns3::RemoteChannelBundle::m_guaranteeTime
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().

◆ m_nullEventId

EventId ns3::RemoteChannelBundle::m_nullEventId
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().

◆ m_remoteSystemId

uint32_t ns3::RemoteChannelBundle::m_remoteSystemId
private

Remote rank.

Definition at line 147 of file remote-channel-bundle.h.

Referenced by GetSystemId().


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