Collection of ns-3 channels between local and remote nodes. More...
#include "remote-channel-bundle.h"
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< Object > | GetObject () 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< Object > | GetObject (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. | |
SimpleRefCount & | operator= (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. | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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.
|
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.
ns3::RemoteChannelBundle::RemoteChannelBundle | ( | ) |
Default constructor.
Definition at line 36 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 43 of file remote-channel-bundle.cc.
|
inlineoverride |
Destructor.
Definition at line 59 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 51 of file remote-channel-bundle.cc.
References 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 78 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 90 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 64 of file remote-channel-bundle.cc.
References m_guaranteeTime.
std::size_t ns3::RemoteChannelBundle::GetSize | ( | ) | const |
Get the number of ns-3 channels in this bundle.
Definition at line 96 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 58 of file remote-channel-bundle.cc.
References m_remoteSystemId.
|
static |
Register this type.
Definition at line 27 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 102 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 84 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 70 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 107 of file remote-channel-bundle.cc.
|
private |
ChannelId to Channel map.
Definition at line 143 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 157 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 151 of file remote-channel-bundle.h.
Referenced by GetGuaranteeTime(), and SetGuaranteeTime().
|
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().
|
private |