A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
 RemoteChannelBundle (const uint32_t remoteSystemId)
 Construct and assign system Id.
 
 ~RemoteChannelBundle () override
 Destructor.
 
void AddChannel (Ptr< Channel > channel, Time delay)
 Add a channel to this bundle.
 
Time GetDelay () const
 Get the minimum delay along any channel in this bundle.
 
EventId GetEventId () const
 Get the event ID of the Null Message send event for this bundle.
 
Time GetGuaranteeTime () const
 Get the current guarantee time for this bundle.
 
std::size_t GetSize () const
 Get the number of ns-3 channels in this bundle.
 
uint32_t GetSystemId () const
 Get the system Id for this side.
 
void Send (Time time)
 Send Null Message to the remote task associated with this bundle.
 
void SetEventId (EventId id)
 Set the event ID of the Null Message send event currently scheduled for this channel.
 
void SetGuaranteeTime (Time time)
 Set the guarantee time for the bundle.
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

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.
 

Private Attributes

ChannelMap m_channels
 ChannelId to Channel map.
 
Time m_delay
 Delay for this Channel bundle, which is the min link delay over all incoming channels;.
 
Time m_guaranteeTime
 Guarantee time for the incoming Channels from MPI task remote_rank.
 
EventId m_nullEventId
 Event scheduled to send Null Message for this bundle.
 
uint32_t m_remoteSystemId
 Remote rank.
 

Friends

std::ostream & operator<< (std::ostream &out, ns3::RemoteChannelBundle &bundle)
 Output for debugging purposes.
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

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 40 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 142 of file remote-channel-bundle.h.

Constructor & Destructor Documentation

◆ RemoteChannelBundle() [1/2]

ns3::RemoteChannelBundle::RemoteChannelBundle ( )

Default constructor.

Definition at line 36 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 43 of file remote-channel-bundle.cc.

◆ ~RemoteChannelBundle()

ns3::RemoteChannelBundle::~RemoteChannelBundle ( )
inlineoverride

Destructor.

Definition at line 59 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 51 of file remote-channel-bundle.cc.

References 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 78 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 90 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 64 of file remote-channel-bundle.cc.

References m_guaranteeTime.

◆ GetSize()

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

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

Returns
The number of channels.

Definition at line 96 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 58 of file remote-channel-bundle.cc.

References m_remoteSystemId.

◆ GetTypeId()

TypeId ns3::RemoteChannelBundle::GetTypeId ( )
static

Register this type.

Returns
The object TypeId.

Definition at line 27 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 102 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 84 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 70 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 Symbol 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 107 of file remote-channel-bundle.cc.

Member Data Documentation

◆ m_channels

ChannelMap ns3::RemoteChannelBundle::m_channels
private

ChannelId to Channel map.

Definition at line 143 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 157 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 151 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 160 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 136 of file remote-channel-bundle.h.

Referenced by GetSystemId().


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