56 MakeCallback (&AsciiTrace::LogDevRx, this)); |
56 MakeCallback (&AsciiTrace::LogDevRx, this)); |
57 } |
57 } |
58 |
58 |
59 void |
59 void |
60 AsciiTrace::LogDevQueueEnqueue (TraceContext const &context, |
60 AsciiTrace::LogDevQueueEnqueue (TraceContext const &context, |
61 Packet const &packet) |
61 Ptr<const Packet> packet) |
62 { |
62 { |
63 m_os << "+ "; |
63 m_os << "+ "; |
64 m_os << Simulator::Now ().GetSeconds () << " "; |
64 m_os << Simulator::Now ().GetSeconds () << " "; |
65 context.Print (m_os); |
65 context.Print (m_os); |
66 m_os << " pkt-uid=" << packet.GetUid () << " "; |
66 m_os << " pkt-uid=" << packet->GetUid () << " "; |
67 packet.Print (m_os); |
67 packet->Print (m_os); |
68 m_os << std::endl; |
68 m_os << std::endl; |
69 } |
69 } |
70 |
70 |
71 void |
71 void |
72 AsciiTrace::LogDevQueueDequeue (TraceContext const &context, |
72 AsciiTrace::LogDevQueueDequeue (TraceContext const &context, |
73 Packet const &packet) |
73 Ptr<const Packet> packet) |
74 { |
74 { |
75 m_os << "- "; |
75 m_os << "- "; |
76 m_os << Simulator::Now ().GetSeconds () << " "; |
76 m_os << Simulator::Now ().GetSeconds () << " "; |
77 context.Print (m_os); |
77 context.Print (m_os); |
78 m_os << " pkt-uid=" << packet.GetUid () << " "; |
78 m_os << " pkt-uid=" << packet->GetUid () << " "; |
79 packet.Print (m_os); |
79 packet->Print (m_os); |
80 m_os << std::endl; |
80 m_os << std::endl; |
81 } |
81 } |
82 |
82 |
83 void |
83 void |
84 AsciiTrace::LogDevQueueDrop (TraceContext const &context, |
84 AsciiTrace::LogDevQueueDrop (TraceContext const &context, |
85 Packet const &packet) |
85 Ptr<const Packet> packet) |
86 { |
86 { |
87 m_os << "d "; |
87 m_os << "d "; |
88 m_os << Simulator::Now ().GetSeconds () << " "; |
88 m_os << Simulator::Now ().GetSeconds () << " "; |
89 context.Print (m_os); |
89 context.Print (m_os); |
90 m_os << " pkt-uid=" << packet.GetUid () << " "; |
90 m_os << " pkt-uid=" << packet->GetUid () << " "; |
91 packet.Print (m_os); |
91 packet->Print (m_os); |
92 m_os << std::endl; |
92 m_os << std::endl; |
93 } |
93 } |
94 void |
94 void |
95 AsciiTrace::LogDevRx (TraceContext const &context, const Packet &p) |
95 AsciiTrace::LogDevRx (TraceContext const &context, Ptr<const Packet> p) |
96 { |
96 { |
97 m_os << "r " << Simulator::Now ().GetSeconds () << " "; |
97 m_os << "r " << Simulator::Now ().GetSeconds () << " "; |
98 context.Print (m_os); |
98 context.Print (m_os); |
99 m_os << " pkt-uid=" << p.GetUid () << " "; |
99 m_os << " pkt-uid=" << p->GetUid () << " "; |
100 p.Print (m_os); |
100 p->Print (m_os); |
101 m_os << std::endl; |
101 m_os << std::endl; |
102 } |
102 } |
103 |
103 |
104 }//namespace ns3 |
104 }//namespace ns3 |