examples+helper+model: Allowing to disable NFD managers

Change-Id: I471023fc23ffabbe14d9668426b4c1b03e4932ab
Refs: #3328
diff --git a/helper/ndn-stack-helper.cpp b/helper/ndn-stack-helper.cpp
index b0f138c..7211639 100644
--- a/helper/ndn-stack-helper.cpp
+++ b/helper/ndn-stack-helper.cpp
@@ -42,6 +42,10 @@
 StackHelper::StackHelper()
   : m_needSetDefaultRoutes(false)
   , m_maxCsSize(100)
+  , m_isRibManagerDisabled(false)
+  , m_isFaceManagerDisabled(false)
+  , m_isStatusServerDisabled(false)
+  , m_isStrategyChoiceManagerDisabled(false)
 {
   setCustomNdnCxxClocks();
 
@@ -149,6 +153,23 @@
   }
 
   Ptr<L3Protocol> ndn = m_ndnFactory.Create<L3Protocol>();
+
+  if (m_isRibManagerDisabled) {
+    ndn->getConfig().put("ndnSIM.disable_rib_manager", true);
+  }
+
+  if (m_isFaceManagerDisabled) {
+    ndn->getConfig().put("ndnSIM.disable_face_manager", true);
+  }
+
+  if (m_isStatusServerDisabled) {
+    ndn->getConfig().put("ndnSIM.disable_status_server", true);
+  }
+
+  if (m_isStrategyChoiceManagerDisabled) {
+    ndn->getConfig().put("ndnSIM.disable_strategy_choice_manager", true);
+  }
+
   ndn->getConfig().put("tables.cs_max_packets", (m_maxCsSize == 0) ? 1 : m_maxCsSize);
 
   // Create and aggregate content store if NFD's contest store has been disabled
@@ -303,5 +324,29 @@
   return face;
 }
 
+void
+StackHelper::disableRibManager()
+{
+  m_isRibManagerDisabled = true;
+}
+
+void
+StackHelper::disableFaceManager()
+{
+  m_isFaceManagerDisabled = true;
+}
+
+void
+StackHelper::disableStrategyChoiceManager()
+{
+  m_isStrategyChoiceManagerDisabled = true;
+}
+
+void
+StackHelper::disableStatusServer()
+{
+  m_isStatusServerDisabled = true;
+}
+
 } // namespace ndn
 } // namespace ns3