add ns2's stupid prefix on each ascii line output.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 31 Mar 2008 14:09:46 -0700
changeset 2822 b7fc97e2f256
parent 2821 8e1f6f923c51
child 2823 a743c59882a0
add ns2's stupid prefix on each ascii line output.
src/helper/wifi-helper.cc
--- a/src/helper/wifi-helper.cc	Mon Mar 31 14:00:40 2008 -0700
+++ b/src/helper/wifi-helper.cc	Mon Mar 31 14:09:46 2008 -0700
@@ -12,6 +12,7 @@
 #include "ns3/wifi-mode.h"
 #include "ns3/wifi-preamble.h"
 #include "ns3/config.h"
+#include "ns3/simulator.h"
 
 
 
@@ -38,14 +39,14 @@
 			     WifiMode mode, WifiPreamble preamble, 
 			     uint8_t txLevel)
 {
-  *os << context << " " << *packet << std::endl;
+  *os << "+ " << Simulator::Now () << " " << context << " " << *packet << std::endl;
 }
 
 static void AsciiPhyRxOkEvent (std::ostream *os, std::string context, 
 			       Ptr<const Packet> packet, double snr, WifiMode mode, 
 			       enum WifiPreamble preamble)
 {
-  *os << context << " " << *packet << std::endl;
+  *os << "r " << Simulator::Now () << " " << context << " " << *packet << std::endl;
 }