Adding face metric (along with the total prefix/interface cost) information when printing CcnxFibEntries
diff --git a/apps/ccnx-consumer.cc b/apps/ccnx-consumer.cc
index 0f3ed01..af71758 100644
--- a/apps/ccnx-consumer.cc
+++ b/apps/ccnx-consumer.cc
@@ -40,6 +40,8 @@
#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
+#include "ns3/names.h"
+
namespace ll = boost::lambda;
NS_LOG_COMPONENT_DEFINE ("CcnxConsumer");
@@ -284,8 +286,9 @@
if (tag != 0)
{
// Notify trace about path weights vector (e.g., for path-stretch calculation)
- m_pathWeightsTrace (GetNode (), tag->GetSourceNode (), seq, tag->GetTotalWeight ());
- // std::cout << Simulator::Now () << "\t" << boost::cref(*tag) << "\n";
+ m_pathWeightsTrace (GetNode (), tag->GetSourceNode (), seq, tag->GetTotalWeight ());
+ // if (Names::FindName (GetNode ()) == "36")// || Names::FindName (GetNode ()) == "40"|| Names::FindName (GetNode ()) == "5")
+ // std::cout << Simulator::Now () << "\t" << boost::cref(*tag) << " = " << tag->GetTotalWeight () << "\n";
}
}
diff --git a/model/ccnx-fib.cc b/model/ccnx-fib.cc
index 24f236f..b068954 100644
--- a/model/ccnx-fib.cc
+++ b/model/ccnx-fib.cc
@@ -289,7 +289,7 @@
{
static const std::string statusString[] = {"","g","y","r"};
- os << *metric.m_face << "(" << metric.m_routingCost << ","<< statusString [metric.m_status] << ")";
+ os << *metric.m_face << "(" << metric.m_routingCost << ","<< statusString [metric.m_status] << "," << metric.m_face->GetMetric () << ")";
return os;
}