[aodv] Fix aodv.cc example & helpers

This commit is contained in:
Pavel Boyko
2009-10-08 15:47:59 +04:00
parent 848e8d0123
commit af9bc5595a
6 changed files with 33 additions and 3 deletions

View File

@@ -44,3 +44,7 @@ def build(bld):
obj = bld.create_ns3_program('simple-routing-ping6',
['csma', 'internet-stack'])
obj.source = 'simple-routing-ping6.cc'
obj = bld.create_ns3_program('aodv',
['wifi', 'internet-stack', 'aodv'])
obj.source = 'aodv.cc'

View File

@@ -31,6 +31,12 @@ AodvHelper::AodvHelper() : Ipv4RoutingHelper ()
m_agentFactory.SetTypeId ("ns3::aodv::RoutingProtocol");
}
AodvHelper*
AodvHelper::Copy (void) const
{
return new AodvHelper (*this);
}
Ptr<Ipv4RoutingProtocol>
AodvHelper::Create (Ptr<Node> node) const
{

View File

@@ -35,17 +35,25 @@ class AodvHelper : public Ipv4RoutingHelper
{
public:
AodvHelper();
/**
* \internal
* \returns pointer to clone of this OlsrHelper
*
* This method is mainly for internal use by the other helpers;
* clients are expected to free the dynamic memory allocated by this method
*/
AodvHelper* Copy (void) const;
/**
* \param node the node on which the routing protocol will run
* \return a newly-created routing protocol
* \returns a newly-created routing protocol
*
* This method will be called by ns3::InternetStackHelper::Install
*
* TODO: support installing AODV on the subset of all available IP interfaces
*/
virtual Ptr<Ipv4RoutingProtocol> Create (Ptr<Node> node) const;
/**
* \param name the name of the attribute to set
* \param value the value of the attribute to set.

View File

@@ -30,6 +30,12 @@ V4PingHelper::V4PingHelper (Ipv4Address remote)
m_factory.Set ("Remote", Ipv4AddressValue (remote));
}
void
V4PingHelper::SetAttribute (std::string name, const AttributeValue &value)
{
m_factory.Set (name, value);
}
ApplicationContainer
V4PingHelper::Install (Ptr<Node> node) const
{

View File

@@ -55,6 +55,12 @@ public:
*/
ApplicationContainer Install (std::string nodeName) const;
/**
* \brief Configure ping applications attribute
* \param name attribute's name
* \param value attribute's value
*/
void SetAttribute (std::string name, const AttributeValue &value);
private:
/**
* \internal