Change the LOG type of CcnxConsumer and CcnxProducer
diff --git a/apps/ccnx-consumer.cc b/apps/ccnx-consumer.cc
index ae56040..cf5d131 100644
--- a/apps/ccnx-consumer.cc
+++ b/apps/ccnx-consumer.cc
@@ -315,7 +315,7 @@
interestHeader.SetMinSuffixComponents (m_minSuffixComponents);
// NS_LOG_INFO ("Requesting Interest: \n" << interestHeader);
- NS_LOG_INFO ("> Interest for " << seq);
+ NS_LOG_DEBUG ("node("<< GetNode()->GetId() <<") sending Interest for sequence " << seq);
Ptr<Packet> packet = Create<Packet> ();
packet->AddHeader (interestHeader);
@@ -354,7 +354,7 @@
// NS_LOG_INFO ("Received content object: " << boost::cref(*contentObject));
uint32_t seq = boost::lexical_cast<uint32_t> (contentObject->GetName ().GetComponents ().back ());
- NS_LOG_INFO ("< DATA for " << seq);
+ NS_LOG_INFO ("node("<< GetNode()->GetId() <<") get DATA for sequence " << seq);
boost::mutex::scoped_lock (m_seqTimeoutsGuard);
@@ -384,7 +384,7 @@
// NS_LOG_INFO ("Received NACK: " << boost::cref(*interest));
uint32_t seq = boost::lexical_cast<uint32_t> (interest->GetName ().GetComponents ().back ());
- NS_LOG_INFO ("< NACK for " << seq);
+ NS_LOG_DEBUG ("node("<< GetNode()->GetId() <<") < NACK for " << seq);
// put in the queue of interests to be retransmitted
NS_LOG_INFO ("Before: " << m_retxSeqs.size ());
diff --git a/apps/ccnx-producer.cc b/apps/ccnx-producer.cc
index 3a37efd..9a41c82 100644
--- a/apps/ccnx-producer.cc
+++ b/apps/ccnx-producer.cc
@@ -101,7 +101,7 @@
Ptr<CcnxContentObjectHeader> header = Create<CcnxContentObjectHeader> ();
header->SetName (Create<CcnxNameComponents> (interest->GetName ()));
- NS_LOG_INFO ("Respodning with ContentObject:\n" << boost::cref(*header));
+ NS_LOG_INFO ("node("<< GetNode()->GetId() <<") respodning with ContentObject:\n" << boost::cref(*header));
Ptr<Packet> packet = Create<Packet> (m_virtualPayloadSize);
diff --git a/examples/car2car-wifi.cc b/examples/car2car-wifi.cc
index fd14266..2ef9f5e 100644
--- a/examples/car2car-wifi.cc
+++ b/examples/car2car-wifi.cc
@@ -17,8 +17,8 @@
cmd.Parse (argc,argv);
NodeContainer producerNode;
producerNode.Create (1);
- NodeContainer consumerNode;
- consumerNode.Create(1);
+ NodeContainer consumerNodes;
+ consumerNodes.Create(2);
YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
phy.SetChannel (channel.Create ());
@@ -36,23 +36,21 @@
"Ssid", SsidValue (ssid));
*/
NetDeviceContainer consumerDevices;
- consumerDevices = wifi.Install (phy, mac, consumerNode);
+ consumerDevices = wifi.Install (phy, mac, consumerNodes);
MobilityHelper mobility;
- mobility.SetPositionAllocator ("ns3::GridPositionAllocator",
- "MinX", DoubleValue (0.0),
- "MinY", DoubleValue (0.0),
- "DeltaX", DoubleValue (300.0),
- "DeltaY", DoubleValue (10.0),
- "GridWidth", UintegerValue (3),
- "LayoutType", StringValue ("RowFirst"));
+ mobility.SetPositionAllocator ("ns3::HighwayPositionAllocator",
+ "Start", VectorValue(Vector(0.0, 0.0, 0.0)),
+ "Direction", DoubleValue(0.0),
+ "Length", DoubleValue(1000.0));
+
mobility.SetMobilityModel("ns3::ConstantVelocityMobilityModel",
"ConstantVelocity", VectorValue(Vector(26.8224, 0, 0)));
mobility.Install (producerNode);
mobility.SetMobilityModel("ns3::ConstantVelocityMobilityModel",
- "ConstantVelocity", VectorValue(Vector(-26.8224, 0, 0)));
- mobility.Install (consumerNode);
+ "ConstantVelocity", VectorValue(Vector(26.8224, 0, 0)));
+ mobility.Install (consumerNodes);
// 1. Set RoutingHelper to support prefix
@@ -91,7 +89,7 @@
CcnxAppHelper consumerHelper ("ns3::CcnxConsumer");
consumerHelper.SetPrefix (prefix.str ());
consumerHelper.SetAttribute ("MeanRate", StringValue ("1Mbps"));
- ApplicationContainer consumers = consumerHelper.Install (consumerNode);
+ ApplicationContainer consumers = consumerHelper.Install (consumerNodes);
// consumers.Start (Seconds (0.0));
// consumers.Stop (finishTime);