NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ndn-app-helper.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDN_APP_HELPER_H
21 #define NDN_APP_HELPER_H
22 
23 #include "ns3/ndnSIM/model/ndn-common.hpp"
24 
25 #include "ns3/object-factory.h"
26 #include "ns3/attribute.h"
27 #include "ns3/node-container.h"
28 #include "ns3/application-container.h"
29 #include "ns3/ptr.h"
30 
31 namespace ns3 {
32 namespace ndn {
33 
39 class AppHelper {
40 public:
46  AppHelper(const std::string& prefix);
47 
51  void
52  SetPrefix(const std::string& prefix);
53 
60  void
61  SetAttribute(std::string name, const AttributeValue& value);
62 
71  ApplicationContainer
72  Install(NodeContainer c);
73 
81  ApplicationContainer
82  Install(Ptr<Node> node);
83 
91  ApplicationContainer
92  Install(std::string nodeName);
93 
94 private:
103  Ptr<Application>
104  InstallPriv(Ptr<Node> node);
105  ObjectFactory m_factory;
106 };
107 
108 } // namespace ndn
109 } // namespace ns3
110 
111 #endif // NDN_APP_HELPER_H
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.
ApplicationContainer Install(NodeContainer c)
Install an ns3::NdnConsumer on each node of the input container configured with all the attributes se...
void SetPrefix(const std::string &prefix)
Set the prefix consumer will be requesting.
A helper to make it easier to instantiate an ns3::ndn::App applications on a set of nodes...