Helper class that adds OLSR routing to nodes. More...
#include <olsr-helper.h>
Public Member Functions | |
OlsrHelper () | |
Create an OlsrHelper that makes life easier for people who want to install OLSR routing to nodes. More... | |
OlsrHelper (const OlsrHelper &) | |
Construct an OlsrHelper from another previously initialized instance (Copy Constructor). More... | |
int64_t | AssignStreams (NodeContainer c, int64_t stream) |
Assign a fixed random variable stream number to the random variables used by this model. More... | |
OlsrHelper * | Copy (void) const |
virtual Ptr< Ipv4RoutingProtocol > | Create (Ptr< Node > node) const |
void | ExcludeInterface (Ptr< Node > node, uint32_t interface) |
void | Set (std::string name, const AttributeValue &value) |
Public Member Functions inherited from ns3::Ipv4RoutingHelper | |
virtual | ~Ipv4RoutingHelper () |
void | PrintRoutingTableAllAt (Time printTime, Ptr< OutputStreamWrapper > stream) const |
prints the routing tables of all nodes at a particular time. More... | |
void | PrintRoutingTableAllEvery (Time printInterval, Ptr< OutputStreamWrapper > stream) const |
prints the routing tables of all nodes at regular intervals specified by user. More... | |
void | PrintRoutingTableAt (Time printTime, Ptr< Node > node, Ptr< OutputStreamWrapper > stream) const |
prints the routing tables of a node at a particular time. More... | |
void | PrintRoutingTableEvery (Time printInterval, Ptr< Node > node, Ptr< OutputStreamWrapper > stream) const |
prints the routing tables of a node at regular intervals specified by user. More... | |
Private Member Functions | |
OlsrHelper & | operator= (const OlsrHelper &o) |
Assignment operator declared private and not implemented to disallow assignment and prevent the compiler from happily inserting its own. More... | |
Private Attributes | |
ObjectFactory | m_agentFactory |
std::map< Ptr< Node > , std::set< uint32_t > > | m_interfaceExclusions |
Additional Inherited Members | |
Static Public Member Functions inherited from ns3::Ipv4RoutingHelper | |
template<class T > | |
static Ptr< T > | GetRouting (Ptr< Ipv4RoutingProtocol > protocol) |
Request a specified routing protocol <T> from Ipv4RoutingProtocol protocol. More... | |
Helper class that adds OLSR routing to nodes.
This class is expected to be used in conjunction with ns3::InternetStackHelper::SetRoutingHelper
Definition at line 38 of file olsr-helper.h.
ns3::OlsrHelper::OlsrHelper | ( | ) |
Create an OlsrHelper that makes life easier for people who want to install OLSR routing to nodes.
Definition at line 29 of file olsr-helper.cc.
References m_agentFactory, and ns3::ObjectFactory::SetTypeId().
Referenced by Copy().
ns3::OlsrHelper::OlsrHelper | ( | const OlsrHelper & | o | ) |
Construct an OlsrHelper from another previously initialized instance (Copy Constructor).
Definition at line 34 of file olsr-helper.cc.
References m_interfaceExclusions.
int64_t ns3::OlsrHelper::AssignStreams | ( | NodeContainer | c, |
int64_t | stream | ||
) |
Assign a fixed random variable stream number to the random variables used by this model.
Return the number of streams (possibly zero) that have been assigned. The Install() method of the InternetStackHelper should have previously been called by the user.
stream | first stream index to use |
c | NodeContainer of the set of nodes for which the OlsrRoutingProtocol should be modified to use a fixed stream |
Definition at line 87 of file olsr-helper.cc.
References ns3::NodeContainer::Begin(), ns3::NodeContainer::End(), ns3::Object::GetObject(), list, and NS_ASSERT_MSG.
Referenced by ns3::olsr::Bug780Test::CreateNodes(), ns3::olsr::HelloRegressionTest::CreateNodes(), and ns3::olsr::TcRegressionTest::CreateNodes().
|
virtual |
This method is mainly for internal use by the other helpers; clients are expected to free the dynamic memory allocated by this method
Implements ns3::Ipv4RoutingHelper.
Definition at line 41 of file olsr-helper.cc.
References OlsrHelper().
|
virtual |
node | the node on which the routing protocol will run |
This method will be called by ns3::InternetStackHelper::Install
Implements ns3::Ipv4RoutingHelper.
Definition at line 65 of file olsr-helper.cc.
References ns3::Object::AggregateObject(), ns3::ObjectFactory::Create(), m_agentFactory, and m_interfaceExclusions.
node | the node for which an exception is to be defined |
interface | an interface of node on which OLSR is not to be installed |
This method allows the user to specify an interface on which OLSR is not to be installed on
Definition at line 47 of file olsr-helper.cc.
References first::interfaces, and m_interfaceExclusions.
Referenced by main().
|
private |
Assignment operator declared private and not implemented to disallow assignment and prevent the compiler from happily inserting its own.
void ns3::OlsrHelper::Set | ( | std::string | name, |
const AttributeValue & | value | ||
) |
name | the name of the attribute to set |
value | the value of the attribute to set. |
This method controls the attributes of ns3::olsr::RoutingProtocol
Definition at line 81 of file olsr-helper.cc.
References m_agentFactory, and ns3::ObjectFactory::Set().
|
private |
Definition at line 106 of file olsr-helper.h.
Referenced by Create(), OlsrHelper(), and Set().
Definition at line 108 of file olsr-helper.h.
Referenced by Create(), ExcludeInterface(), and OlsrHelper().