More debug
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc
index 992fae5..65ec4ee 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-interest-visitor.cc
@@ -34,6 +34,10 @@
#include <boost/foreach.hpp>
+#include "ns3/log.h"
+
+NS_LOG_COMPONENT_DEFINE ("CcnbParserInterestVisitor");
+
namespace ns3 {
namespace CcnbParser {
@@ -50,10 +54,12 @@
static NonceVisitor nonceVisitor;
CcnxInterestHeader &interest = *(boost::any_cast<CcnxInterestHeader*> (param));
-
+
switch (n.m_dtag)
{
case CCN_DTAG_Interest:
+ NS_LOG_DEBUG ("Interest");
+
// process nested blocks
BOOST_FOREACH (Ptr<Block> block, n.m_nestedTags)
{
@@ -62,6 +68,8 @@
break;
case CCN_DTAG_Name:
{
+ NS_LOG_DEBUG ("Name");
+
// process name components
Ptr<CcnxNameComponents> name = Create<CcnxNameComponents> ();
@@ -73,6 +81,7 @@
break;
}
case CCN_DTAG_MinSuffixComponents:
+ NS_LOG_DEBUG ("MinSuffixComponents");
if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
throw CcnbDecodingException ();
interest.SetMinSuffixComponents (
@@ -82,6 +91,7 @@
)));
break;
case CCN_DTAG_MaxSuffixComponents:
+ NS_LOG_DEBUG ("MaxSuffixComponents");
if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
throw CcnbDecodingException ();
interest.SetMaxSuffixComponents (
@@ -92,6 +102,7 @@
break;
case CCN_DTAG_Exclude:
{
+ NS_LOG_DEBUG ("Exclude");
// process exclude components
Ptr<CcnxNameComponents> exclude = Create<CcnxNameComponents> ();
@@ -103,6 +114,7 @@
break;
}
case CCN_DTAG_ChildSelector:
+ NS_LOG_DEBUG ("ChildSelector");
if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
throw CcnbDecodingException ();
@@ -113,6 +125,7 @@
)));
break;
case CCN_DTAG_AnswerOriginKind:
+ NS_LOG_DEBUG ("AnswerOriginKind");
if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
throw CcnbDecodingException ();
interest.SetAnswerOriginKind (
@@ -122,6 +135,7 @@
)));
break;
case CCN_DTAG_Scope:
+ NS_LOG_DEBUG ("Scope");
if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
throw CcnbDecodingException ();
interest.SetScope (
@@ -131,16 +145,18 @@
)));
break;
case CCN_DTAG_InterestLifetime:
+ NS_LOG_DEBUG ("InterestLifetime");
if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
throw CcnbDecodingException ();
interest.SetInterestLifetime (
boost::any_cast<Time> (
- (*n.m_nestedTags.begin())->accept(
- timestampVisitor
- )));
+ (*n.m_nestedTags.begin())->accept(
+ timestampVisitor
+ )));
break;
case CCN_DTAG_Nonce:
+ NS_LOG_DEBUG ("Nonce");
if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
throw CcnbDecodingException ();
@@ -153,6 +169,7 @@
case NDN_DTAG_Nack:
+ NS_LOG_DEBUG ("Nack");
if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
throw CcnbDecodingException ();
@@ -162,6 +179,7 @@
break;
case NDN_DTAG_Congested:
+ NS_LOG_DEBUG ("Congested");
if (n.m_nestedTags.size()!=1) // should be exactly one UDATA inside this tag
throw CcnbDecodingException ();
diff --git a/helper/ccnb-parser/visitors/ccnb-parser-timestamp-visitor.cc b/helper/ccnb-parser/visitors/ccnb-parser-timestamp-visitor.cc
index 22965aa..ea4ab00 100644
--- a/helper/ccnb-parser/visitors/ccnb-parser-timestamp-visitor.cc
+++ b/helper/ccnb-parser/visitors/ccnb-parser-timestamp-visitor.cc
@@ -44,7 +44,6 @@
}
uint8_t combo = start[n.m_blobSize-2]; // 4 most significant bits hold 4 least significant bits of number of seconds
seconds = (seconds << 4) | (combo >> 4);
- std::cout << std::hex << (int) start[n.m_blobSize-2] << "\n";
nanoseconds = combo & 0x0F; /*00001111*/ // 4 least significant bits hold 4 most significant bits of number of
nanoseconds = (nanoseconds << 8) | start[n.m_blobSize-1];