blob: f327f6afa9400ac5d4da8937499755ff64f8efe9 [file] [log] [blame]
Alexander Afanasyev864522f2012-05-31 13:33:57 -07001From 9ed23508a72afd3780b041b2fd00a50e1ff91b4c Mon Sep 17 00:00:00 2001
2From: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
3Date: Mon, 23 Apr 2012 13:49:37 -0700
4Subject: [PATCH] point-to-point, netanim: Adding ChannelID to
5 PointToPointChannel trace
6
7---
8 src/netanim/model/animation-interface.cc | 4 +++-
9 src/netanim/model/animation-interface.h | 3 ++-
10 src/point-to-point/model/point-to-point-channel.cc | 2 +-
11 src/point-to-point/model/point-to-point-channel.h | 3 ++-
12 4 files changed, 8 insertions(+), 4 deletions(-)
13
14diff --git a/src/netanim/model/animation-interface.cc b/src/netanim/model/animation-interface.cc
15index d6a3551..9215abf 100644
16--- a/src/netanim/model/animation-interface.cc
17+++ b/src/netanim/model/animation-interface.cc
18@@ -676,7 +676,9 @@ void AnimationInterface::WriteDummyPacket ()
19
20
21 }
22-void AnimationInterface::DevTxTrace (std::string context, Ptr<const Packet> p,
23+void AnimationInterface::DevTxTrace (std::string context,
24+ uint32_t, // channel
25+ Ptr<const Packet> p,
26 Ptr<NetDevice> tx, Ptr<NetDevice> rx,
27 Time txTime, Time rxTime)
28 {
29diff --git a/src/netanim/model/animation-interface.h b/src/netanim/model/animation-interface.h
30index 4a3ffb9..db58d89 100644
31--- a/src/netanim/model/animation-interface.h
32+++ b/src/netanim/model/animation-interface.h
33@@ -288,7 +288,8 @@ private:
34 bool ServerPortSet;
35
36 void DevTxTrace (std::string context,
37- Ptr<const Packet> p,
38+ uint32_t,
39+ Ptr<const Packet> p,
40 Ptr<NetDevice> tx,
41 Ptr<NetDevice> rx,
42 Time txTime,
43diff --git a/src/point-to-point/model/point-to-point-channel.cc b/src/point-to-point/model/point-to-point-channel.cc
44index d6a6938..5bc4c9c 100644
45--- a/src/point-to-point/model/point-to-point-channel.cc
46+++ b/src/point-to-point/model/point-to-point-channel.cc
47@@ -98,7 +98,7 @@ PointToPointChannel::TransmitStart (
48 m_link[wire].m_dst, p);
49
50 // Call the tx anim callback on the net device
51- m_txrxPointToPoint (p, src, m_link[wire].m_dst, txTime, txTime + m_delay);
52+ m_txrxPointToPoint (GetId (), p, src, m_link[wire].m_dst, txTime, txTime + m_delay);
53 return true;
54 }
55
56diff --git a/src/point-to-point/model/point-to-point-channel.h b/src/point-to-point/model/point-to-point-channel.h
57index 4b0b777..a364ab9 100644
58--- a/src/point-to-point/model/point-to-point-channel.h
59+++ b/src/point-to-point/model/point-to-point-channel.h
60@@ -137,7 +137,8 @@ private:
61 *
62 * @see class CallBackTraceSource
63 */
64- TracedCallback<Ptr<const Packet>, // Packet being transmitted
65+ TracedCallback<uint32_t, // channel ID
66+ Ptr<const Packet>, // Packet being transmitted
67 Ptr<NetDevice>, // Transmitting NetDevice
68 Ptr<NetDevice>, // Receiving NetDevice
69 Time, // Amount of time to transmit the pkt
70--
711.7.10.2
72