Helper class that adds Nix-vector routing to nodes. More...
#include "nix-vector-helper.h"
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 () const override |
Ptr< IpRoutingProtocol > | Create (Ptr< Node > node) const override |
NixVectorHelper & | operator= (const NixVectorHelper &)=delete |
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_t< IsIpv4, Ipv4, Ipv6 > |
Alias for Ipv4 and Ipv6 classes. More... | |
using | IpAddress = typename std::conditional_t< IsIpv4, Ipv4Address, Ipv6Address > |
Alias for Ipv4Address and Ipv6Address classes. More... | |
using | IpRoutingProtocol = typename std::conditional_t< IsIpv4, Ipv4RoutingProtocol, Ipv6RoutingProtocol > |
Alias for Ipv4RoutingProtocol and Ipv6RoutingProtocol classes. 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... | |
Static Private Attributes | |
static constexpr bool | IsIpv4 = std::is_same_v<Ipv4RoutingHelper, T> |
Alias for determining whether the parent is Ipv4RoutingHelper or Ipv6RoutingHelper. More... | |
Helper class that adds Nix-vector routing to nodes.
This class is expected to be used in conjunction with ns3::InternetStackHelper::SetRoutingHelper
Definition at line 50 of file nix-vector-helper.h.
|
private |
Alias for Ipv4 and Ipv6 classes.
Definition at line 57 of file nix-vector-helper.h.
|
private |
Alias for Ipv4Address and Ipv6Address classes.
Definition at line 59 of file nix-vector-helper.h.
|
private |
Alias for Ipv4RoutingProtocol and Ipv6RoutingProtocol classes.
Definition at line 61 of file nix-vector-helper.h.
ns3::NixVectorHelper< T >::NixVectorHelper |
Construct an NixVectorHelper to make life easier while adding Nix-vector routing to nodes.
Definition at line 34 of file nix-vector-helper.cc.
ns3::NixVectorHelper< T >::NixVectorHelper | ( | const NixVectorHelper< T > & | o | ) |
Construct an NixVectorHelper from another previously initialized instance (Copy Constructor).
o | object to copy |
Definition at line 50 of file nix-vector-helper.cc.
|
override |
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 60 of file nix-vector-helper.cc.
|
override |
node | the node on which the routing protocol will run |
This method will be called by ns3::InternetStackHelper::Install
Definition at line 67 of file nix-vector-helper.cc.
References ns3::Object::AggregateObject().
|
delete |
|
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.
source | the source node pointer to start traversing |
dest | the IP destination address |
stream | the output stream object to use |
unit | the 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 89 of file nix-vector-helper.cc.
References ns3::Object::GetObject(), and NS_ASSERT.
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.
printTime | the time at which the routing path is supposed to be printed. |
source | the source node pointer to start traversing |
dest | the IP destination address |
stream | the output stream object to use |
unit | the 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 78 of file nix-vector-helper.cc.
References ns3::Simulator::Schedule().
Referenced by NixVectorRoutingTest::DoRun().
|
staticconstexprprivate |
Alias for determining whether the parent is Ipv4RoutingHelper or Ipv6RoutingHelper.
Definition at line 55 of file nix-vector-helper.h.
|
private |
Object factory.
Definition at line 119 of file nix-vector-helper.h.