A Discrete-Event Network Simulator
API
ns3::NixVectorHelper< T > Class Template Reference

Helper class that adds Nix-vector routing to nodes. More...

#include "nix-vector-helper.h"

+ Inheritance diagram for ns3::NixVectorHelper< T >:
+ Collaboration diagram for ns3::NixVectorHelper< T >:

Public Member Functions

 NixVectorHelper ()
 Construct an NixVectorHelper to make life easier while adding Nix-vector routing to nodes. More...
 
 NixVectorHelper (const NixVectorHelper< T > &o)
 Construct an NixVectorHelper from another previously initialized instance (Copy Constructor). More...
 
NixVectorHelper< T > * Copy (void) const
 
virtual Ptr< IpRoutingProtocolCreate (Ptr< Node > node) const
 
void PrintRoutingPathAt (Time printTime, Ptr< Node > source, IpAddress dest, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the routing path for a source and destination at a particular time. More...
 

Private Types

using Ip = typename std::conditional< IsIpv4::value, Ipv4, Ipv6 >::type
 Alias for Ipv4 and Ipv6 classes. More...
 
using IpAddress = typename std::conditional< IsIpv4::value, Ipv4Address, Ipv6Address >::type
 Alias for Ipv4Address and Ipv6Address classes. More...
 
using IpRoutingProtocol = typename std::conditional< IsIpv4::value, Ipv4RoutingProtocol, Ipv6RoutingProtocol >::type
 Alias for Ipv4RoutingProtocol and Ipv6RoutingProtocol classes. More...
 
using IsIpv4 = std::is_same< Ipv4RoutingHelper, T >
 Alias for determining whether the parent is Ipv4RoutingHelper or Ipv6RoutingHelper. More...
 

Private Member Functions

NixVectorHelperoperator= (const NixVectorHelper &)
 Assignment operator declared private and not implemented to disallow assignment and prevent the compiler from happily inserting its own. More...
 

Static Private Member Functions

static void PrintRoute (Ptr< Node > source, IpAddress dest, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
 prints the routing path for the source and destination. More...
 

Private Attributes

ObjectFactory m_agentFactory
 Object factory. More...
 

Detailed Description

template<typename T>
class ns3::NixVectorHelper< T >

Helper class that adds Nix-vector routing to nodes.

This class is expected to be used in conjunction with ns3::InternetStackHelper::SetRoutingHelper

Internal:
Since this class is meant to be specialized only by Ipv4RoutingHelper or Ipv6RoutingHelper the implementation of this class doesn't need to be exposed here; it is in nix-vector-helper.cc.

Definition at line 50 of file nix-vector-helper.h.

Member Typedef Documentation

◆ Ip

template<typename T >
using ns3::NixVectorHelper< T >::Ip = typename std::conditional <IsIpv4::value, Ipv4, Ipv6>::type
private

Alias for Ipv4 and Ipv6 classes.

Definition at line 55 of file nix-vector-helper.h.

◆ IpAddress

template<typename T >
using ns3::NixVectorHelper< T >::IpAddress = typename std::conditional<IsIpv4::value, Ipv4Address, Ipv6Address>::type
private

Alias for Ipv4Address and Ipv6Address classes.

Definition at line 57 of file nix-vector-helper.h.

◆ IpRoutingProtocol

template<typename T >
using ns3::NixVectorHelper< T >::IpRoutingProtocol = typename std::conditional<IsIpv4::value, Ipv4RoutingProtocol, Ipv6RoutingProtocol>::type
private

Alias for Ipv4RoutingProtocol and Ipv6RoutingProtocol classes.

Definition at line 59 of file nix-vector-helper.h.

◆ IsIpv4

template<typename T >
using ns3::NixVectorHelper< T >::IsIpv4 = std::is_same <Ipv4RoutingHelper, T>
private

Alias for determining whether the parent is Ipv4RoutingHelper or Ipv6RoutingHelper.

Definition at line 53 of file nix-vector-helper.h.

Constructor & Destructor Documentation

◆ NixVectorHelper() [1/2]

template<typename T >
ns3::NixVectorHelper< T >::NixVectorHelper

Construct an NixVectorHelper to make life easier while adding Nix-vector routing to nodes.

Definition at line 33 of file nix-vector-helper.cc.

◆ NixVectorHelper() [2/2]

template<typename T >
ns3::NixVectorHelper< T >::NixVectorHelper ( const NixVectorHelper< T > &  o)

Construct an NixVectorHelper from another previously initialized instance (Copy Constructor).

Parameters
oobject to copy

Definition at line 40 of file nix-vector-helper.cc.

References NS_ASSERT_MSG.

Member Function Documentation

◆ Copy()

template<typename T >
NixVectorHelper< T > * ns3::NixVectorHelper< T >::Copy ( void  ) const
Returns
pointer to clone of this NixVectorHelper

This method is mainly for internal use by the other helpers; clients are expected to free the dynamic memory allocated by this method

Definition at line 50 of file nix-vector-helper.cc.

◆ Create()

template<typename T >
Ptr< typename NixVectorHelper< T >::IpRoutingProtocol > ns3::NixVectorHelper< T >::Create ( Ptr< Node node) const
virtual
Parameters
nodethe node on which the routing protocol will run
Returns
a newly-created routing protocol

This method will be called by ns3::InternetStackHelper::Install

Definition at line 57 of file nix-vector-helper.cc.

References ns3::Object::AggregateObject().

+ Here is the call graph for this function:

◆ operator=()

template<typename T >
NixVectorHelper& ns3::NixVectorHelper< T >::operator= ( const NixVectorHelper< T > &  )
private

Assignment operator declared private and not implemented to disallow assignment and prevent the compiler from happily inserting its own.

Returns
Nothing useful.

◆ PrintRoute()

template<typename T >
void ns3::NixVectorHelper< T >::PrintRoute ( Ptr< Node source,
IpAddress  dest,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)
staticprivate

prints the routing path for the source and destination.

If the routing path does not exist, it prints that the path does not exist between the nodes in the ostream.

Parameters
sourcethe source node pointer to start traversing
destthe IP destination address
streamthe output stream object to use
unitthe time unit to be used in the report

This method calls the PrintRoutingPath() method of the NixVectorRouting for the source and destination to provide the routing path.

Definition at line 74 of file nix-vector-helper.cc.

References ns3::Object::GetObject(), and NS_ASSERT.

+ Here is the call graph for this function:

◆ PrintRoutingPathAt()

template<typename T >
void ns3::NixVectorHelper< T >::PrintRoutingPathAt ( Time  printTime,
Ptr< Node source,
IpAddress  dest,
Ptr< OutputStreamWrapper stream,
Time::Unit  unit = Time::S 
)

prints the routing path for a source and destination at a particular time.

If the routing path does not exist, it prints that the path does not exist between the nodes in the ostream.

Parameters
printTimethe time at which the routing path is supposed to be printed.
sourcethe source node pointer to start traversing
destthe IP destination address
streamthe output stream object to use
unitthe time unit to be used in the report

This method calls the PrintRoutingPath() method of the NixVectorRouting for the source and destination to provide the routing path at the specified time.

Definition at line 67 of file nix-vector-helper.cc.

References ns3::Simulator::Schedule().

Referenced by NixVectorRoutingTest::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_agentFactory

template<typename T >
ObjectFactory ns3::NixVectorHelper< T >::m_agentFactory
private

Object factory.

Definition at line 115 of file nix-vector-helper.h.


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