22 #include "ns3/string.h" 23 #include "ns3/names.h" 28 #include "ns3/mpi-interface.h" 31 NS_LOG_COMPONENT_DEFINE(
"ndn.AppHelper");
38 m_factory.SetTypeId(app);
44 m_factory.Set(
"Prefix", StringValue(prefix));
50 m_factory.Set(
name, value);
56 ApplicationContainer apps;
57 Ptr<Application> app = InstallPriv(node);
67 Ptr<Node> node = Names::Find<Node>(nodeName);
74 ApplicationContainer apps;
75 for (NodeContainer::Iterator i = c.Begin(); i != c.End(); ++i) {
76 Ptr<Application> app = InstallPriv(*i);
85 AppHelper::InstallPriv(Ptr<Node> node)
88 if (MpiInterface::IsEnabled() && node->GetSystemId() != MpiInterface::GetSystemId()) {
94 Ptr<Application> app = m_factory.Create<Application>();
95 node->AddApplication(app);
110 ApplicationContainer apps;
111 auto app = CreateObject<FactoryCallbackApp>(factory);
112 node->AddApplication(app);
120 m_impl = m_factory();
FactoryCallbackApp(const FactoryCallback &factory)
Copyright (c) 2011-2015 Regents of the University of California.
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
AppHelper(const std::string &prefix)
Create an NdnAppHelper to make it easier to work with Ndn apps.
virtual void StopApplication()
ApplicationContainer Install(NodeContainer c)
Install an ns3::NdnConsumer on each node of the input container configured with all the attributes se...
Copyright (c) 2011-2015 Regents of the University of California.
static ApplicationContainer Install(Ptr< Node > node, const FactoryCallback &factory)
void SetPrefix(const std::string &prefix)
Set the prefix consumer will be requesting.
virtual void StartApplication()
std::function< shared_ptr< void >)> FactoryCallback