20 #ifndef NDNSIM_HELPER_NDN_STACK_HELPER_HPP 21 #define NDNSIM_HELPER_NDN_STACK_HELPER_HPP 23 #include "ns3/ndnSIM/model/ndn-common.hpp" 26 #include "ns3/object-factory.h" 28 #include "ns3/node-container.h" 72 const std::string& attr2 =
"",
const std::string& value2 =
"",
73 const std::string& attr3 =
"",
const std::string& value3 =
"",
74 const std::string& attr4 =
"",
const std::string& value4 =
"");
95 SetOldContentStore(
const std::string& contentStoreClass,
const std::string& attr1 =
"",
96 const std::string& value1 =
"",
const std::string& attr2 =
"",
97 const std::string& value2 =
"",
const std::string& attr3 =
"",
98 const std::string& value3 =
"",
const std::string& attr4 =
"",
99 const std::string& value4 =
"");
101 typedef Callback<shared_ptr<Face>, Ptr<Node>, Ptr<L3Protocol>, Ptr<NetDevice>>
146 Install(
const std::string& nodeName)
const;
175 Install(
const NodeContainer& c)
const;
209 Update(
const NodeContainer& c);
217 Update(
const std::string& nodeName);
248 doInstall(Ptr<Node> node)
const;
252 DefaultNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol>
ndn, Ptr<NetDevice> netDevice)
const;
255 PointToPointNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol>
ndn,
256 Ptr<NetDevice> netDevice)
const;
258 createAndRegisterFace(Ptr<Node> node, Ptr<L3Protocol>
ndn, Ptr<NetDevice> device)
const;
260 bool m_isForwarderStatusManagerDisabled;
261 bool m_isStrategyChoiceManagerDisabled;
268 ObjectFactory m_ndnFactory;
269 ObjectFactory m_contentStoreFactory;
271 bool m_needSetDefaultRoutes;
274 typedef std::function<std::unique_ptr<nfd::cs::Policy>()> PolicyCreationCallback;
275 PolicyCreationCallback m_csPolicyCreationFunc;
277 std::map<std::string, PolicyCreationCallback> m_csPolicies;
279 typedef std::list<std::pair<TypeId, FaceCreateCallback>> NetDeviceCallbackList;
280 NetDeviceCallbackList m_netDeviceCallbacks;
286 #endif // NDNSIM_HELPER_NDN_STACK_HELPER_HPP virtual ~StackHelper()
Destroy the NdnStackHelper.
Copyright (c) 2011-2015 Regents of the University of California.
void setPolicy(const std::string &policy)
Set the cache replacement policy for NFD's Content Store.
StackHelper()
Create a new NdnStackHelper with a default NDN_FLOODING forwarding stategy.
static void ProcessWarmupEvents()
void RemoveFaceCreateCallback(TypeId netDeviceType, FaceCreateCallback callback)
Remove callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<Net...
void setCsSize(size_t maxSize)
Set maximum size for NFD's Content Store (in number of packets)
void SetDefaultRoutes(bool needSet)
Set flag indicating necessity to install default routes in FIB.
static void SetLinkDelayAsFaceMetric()
Set face metric of all faces connected through PointToPoint channel to channel latency.
void SetStackAttributes(const std::string &attr1="", const std::string &value1="", const std::string &attr2="", const std::string &value2="", const std::string &attr3="", const std::string &value3="", const std::string &attr4="", const std::string &value4="")
Set parameters of NdnL3Protocol.
void InstallAll() const
Install Ndn stack on all nodes in the simulation.
void disableForwarderStatusManager()
Disable Forwarder Status Manager.
void setCustomNdnCxxClocks()
Copyright (c) 2011-2015 Regents of the University of California.
Callback< shared_ptr< Face >, Ptr< Node >, Ptr< L3Protocol >, Ptr< NetDevice > > FaceCreateCallback
void Install(const std::string &nodeName) const
Install Ndn stack on the node.
Helper class to install NDN stack and configure its parameters.
Copyright (c) 2011-2015 Regents of the University of California.
void AddFaceCreateCallback(TypeId netDeviceType, FaceCreateCallback callback)
Add callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDev...
ndn L3Protocol
Copyright (c) 2011-2015 Regents of the University of California.
void SetOldContentStore(const std::string &contentStoreClass, const std::string &attr1="", const std::string &value1="", const std::string &attr2="", const std::string &value2="", const std::string &attr3="", const std::string &value3="", const std::string &attr4="", const std::string &value4="")
Set ndnSIM 1.0 content store implementation and its attributes.
void UpdateAll()
Update Ndn stack on all the nodes (Add faces for new devices)
static KeyChain & getKeyChain()
void UpdateFaceCreateCallback(TypeId netDeviceType, FaceCreateCallback callback)
Update callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<Net...
void Update(Ptr< Node > node)
Update Ndn stack on a given node (Add faces for new devices)
void disableStrategyChoiceManager()
Disable Strategy Choice Manager.