CcnxInterestSender and its helper fixes
diff --git a/helper/ccnx-interest-sender-helper.cc b/helper/ccnx-interest-sender-helper.cc
index ca0b9f0..c182207 100644
--- a/helper/ccnx-interest-sender-helper.cc
+++ b/helper/ccnx-interest-sender-helper.cc
@@ -40,20 +40,20 @@
}
ApplicationContainer
-CcnxInterestSenderHelper::Install (Ptr<Node> node) const
+CcnxInterestSenderHelper::Install (Ptr<Node> node)
{
return ApplicationContainer (InstallPriv (node));
}
ApplicationContainer
-CcnxInterestSenderHelper::Install (std::string nodeName) const
+CcnxInterestSenderHelper::Install (std::string nodeName)
{
Ptr<Node> node = Names::Find<Node> (nodeName);
return ApplicationContainer (InstallPriv (node));
}
ApplicationContainer
-CcnxInterestSenderHelper::Install (NodeContainer c) const
+CcnxInterestSenderHelper::Install (NodeContainer c)
{
ApplicationContainer apps;
for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i)
@@ -65,8 +65,13 @@
}
Ptr<Application>
-CcnxInterestSenderHelper::InstallPriv (Ptr<Node> node) const
+CcnxInterestSenderHelper::InstallPriv (Ptr<Node> node)
{
+ Ptr<CcnxLocalFace> localFace = Create<CcnxLocalFace> ();
+ localFace->SetNode(node);
+ localFace->SetUp();
+ m_factory.Set ("Face", PointerValue (localFace));
+
Ptr<Application> app = m_factory.Create<Application> ();
node->AddApplication (app);
diff --git a/helper/ccnx-interest-sender-helper.h b/helper/ccnx-interest-sender-helper.h
index 58af8ff..2ff46cc 100644
--- a/helper/ccnx-interest-sender-helper.h
+++ b/helper/ccnx-interest-sender-helper.h
@@ -31,6 +31,7 @@
#include "ns3/application-container.h"
#include "ns3/name-components.h"
#include "ns3/pointer.h"
+#include "ns3/ccnx-local-face.h"
namespace ns3
{
@@ -65,7 +66,7 @@
* will be installed.
* \returns Container of Ptr to the applications installed.
*/
- ApplicationContainer Install (NodeContainer c) const;
+ ApplicationContainer Install (NodeContainer c);
/**
* Install an ns3::CcnxInterestSender on the node configured with all the
@@ -74,7 +75,7 @@
* \param node The node on which an CcnxInterestSender will be installed.
* \returns Container of Ptr to the applications installed.
*/
- ApplicationContainer Install (Ptr<Node> node) const;
+ ApplicationContainer Install (Ptr<Node> node);
/**
* Install an ns3::CcnxInterestSender on the node configured with all the
@@ -83,7 +84,7 @@
* \param nodeName The node on which an CcnxInterestSender will be installed.
* \returns Container of Ptr to the applications installed.
*/
- ApplicationContainer Install (std::string nodeName) const;
+ ApplicationContainer Install (std::string nodeName);
private:
/**
@@ -94,7 +95,7 @@
* \param node The node on which an CcnxInterestSender will be installed.
* \returns Ptr to the application installed.
*/
- Ptr<Application> InstallPriv (Ptr<Node> node) const;
+ Ptr<Application> InstallPriv (Ptr<Node> node);
ObjectFactory m_factory;
};
}