Helper class to install NDN stack and configure its parameters. More...
#include <ndn-stack-helper.hpp>


Public Types | |
| typedef Callback< shared_ptr < NetDeviceFace >, Ptr< Node > , Ptr< L3Protocol >, Ptr < NetDevice > > | NetDeviceFaceCreateCallback |
Public Member Functions | |
| StackHelper () | |
| Create a new NdnStackHelper with a default NDN_FLOODING forwarding stategy. More... | |
| virtual | ~StackHelper () |
| Destroy the NdnStackHelper. More... | |
| 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. More... | |
| void | setCsSize (size_t maxSize) |
| Set maximum size for NFD's Content Store (in number of packets) More... | |
| 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. More... | |
| void | AddNetDeviceFaceCreateCallback (TypeId netDeviceType, NetDeviceFaceCreateCallback callback) |
| Add callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice> More... | |
| void | UpdateNetDeviceFaceCreateCallback (TypeId netDeviceType, NetDeviceFaceCreateCallback callback) |
| Update callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice> More... | |
| void | RemoveNetDeviceFaceCreateCallback (TypeId netDeviceType, NetDeviceFaceCreateCallback callback) |
| Remove callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice> More... | |
| Ptr< FaceContainer > | Install (const std::string &nodeName) const |
| Install Ndn stack on the node. More... | |
| Ptr< FaceContainer > | Install (Ptr< Node > node) const |
| Install Ndn stack on the node. More... | |
| Ptr< FaceContainer > | Install (const NodeContainer &c) const |
| Install Ndn stack on each node in the input container. More... | |
| Ptr< FaceContainer > | InstallAll () const |
| Install Ndn stack on all nodes in the simulation. More... | |
| void | SetDefaultRoutes (bool needSet) |
| Set flag indicating necessity to install default routes in FIB. More... | |
| void | setCustomNdnCxxClocks () |
Static Public Member Functions | |
| static KeyChain & | getKeyChain () |
Helper class to install NDN stack and configure its parameters.
Definition at line 51 of file ndn-stack-helper.hpp.
| typedef Callback<shared_ptr<NetDeviceFace>, Ptr<Node>, Ptr<L3Protocol>, Ptr<NetDevice> > ns3::ndn::StackHelper::NetDeviceFaceCreateCallback |
Definition at line 92 of file ndn-stack-helper.hpp.
| ns3::ndn::StackHelper::StackHelper | ( | ) |
Create a new NdnStackHelper with a default NDN_FLOODING forwarding stategy.
Definition at line 42 of file ndn-stack-helper.cpp.
References setCustomNdnCxxClocks().
|
virtual |
Destroy the NdnStackHelper.
Definition at line 57 of file ndn-stack-helper.cpp.
| void ns3::ndn::StackHelper::AddNetDeviceFaceCreateCallback | ( | TypeId | netDeviceType, |
| StackHelper::NetDeviceFaceCreateCallback | callback | ||
| ) |
Add callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice>
It is possible to set up several callbacks for different NetDevice types.
If none of the callbacks fit the TypeId of NetDevice, a default callback is used (DefaultNetDeviceCallback)
Definition at line 200 of file ndn-stack-helper.cpp.
|
static |
Definition at line 62 of file ndn-stack-helper.cpp.
| Ptr< FaceContainer > ns3::ndn::StackHelper::Install | ( | const std::string & | nodeName | ) | const |
Install Ndn stack on the node.
This method will assert if called on a node that already has Ndn object installed on it
| nodeName | The name of the node on which to install the stack. |
Definition at line 258 of file ndn-stack-helper.cpp.
Referenced by Install(), and InstallAll().
| Ptr< FaceContainer > ns3::ndn::StackHelper::Install | ( | Ptr< Node > | node | ) | const |
Install Ndn stack on the node.
This method will assert if called on a node that already has Ndn object installed on it
| node | The node on which to install the stack. |
Definition at line 141 of file ndn-stack-helper.cpp.
References ns3::ndn::FibHelper::AddRoute(), and ns3::ndn::L3Protocol::getConfig().
| Ptr< FaceContainer > ns3::ndn::StackHelper::Install | ( | const NodeContainer & | c | ) | const |
Install Ndn stack on each node in the input container.
The program will assert if this method is called on a container with a node that already has an ndn object aggregated to it.
| c | NodeContainer that holds the set of nodes on which to install the new stacks. |
Definition at line 125 of file ndn-stack-helper.cpp.
References Install().
| Ptr< FaceContainer > ns3::ndn::StackHelper::InstallAll | ( | ) | const |
Install Ndn stack on all nodes in the simulation.
Definition at line 135 of file ndn-stack-helper.cpp.
References Install().
| void ns3::ndn::StackHelper::RemoveNetDeviceFaceCreateCallback | ( | TypeId | netDeviceType, |
| NetDeviceFaceCreateCallback | callback | ||
| ) |
Remove callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice>
Definition at line 219 of file ndn-stack-helper.cpp.
| void ns3::ndn::StackHelper::setCsSize | ( | size_t | maxSize | ) |
Set maximum size for NFD's Content Store (in number of packets)
Definition at line 119 of file ndn-stack-helper.cpp.
| void ns3::ndn::StackHelper::setCustomNdnCxxClocks | ( | ) |
Definition at line 69 of file ndn-stack-helper.cpp.
Referenced by StackHelper().
| void ns3::ndn::StackHelper::SetDefaultRoutes | ( | bool | needSet | ) |
Set flag indicating necessity to install default routes in FIB.
Definition at line 76 of file ndn-stack-helper.cpp.
| void ns3::ndn::StackHelper::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.
| contentStoreClass | string, representing class of the content store |
Definition at line 99 of file ndn-stack-helper.cpp.
| void ns3::ndn::StackHelper::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.
Definition at line 83 of file ndn-stack-helper.cpp.
| void ns3::ndn::StackHelper::UpdateNetDeviceFaceCreateCallback | ( | TypeId | netDeviceType, |
| NetDeviceFaceCreateCallback | callback | ||
| ) |
Update callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice>
It is possible to set up several callbacks for different NetDevice types.
Using this method, it is possible to override Face creation for PointToPointNetDevices
Definition at line 207 of file ndn-stack-helper.cpp.