merge with HEAD

This commit is contained in:
Mathieu Lacage
2009-09-29 16:30:51 +02:00
5 changed files with 23 additions and 23 deletions

View File

@@ -141,7 +141,7 @@ void AnimationInterface::StartAnimation ()
}
// Connect the callback for packet tx events
Config::Connect ("/NodeList/*/DeviceList/*/TxRxPointToPoint",
Config::Connect ("/ChannelList/*/TxRxPointToPoint",
MakeCallback (&AnimationInterface::DevTxTrace, this));
}

View File

@@ -18,6 +18,7 @@
#include "point-to-point-channel.h"
#include "point-to-point-net-device.h"
#include "ns3/trace-source-accessor.h"
#include "ns3/packet.h"
#include "ns3/simulator.h"
#include "ns3/log.h"
@@ -38,6 +39,9 @@ PointToPointChannel::GetTypeId (void)
TimeValue (Seconds (0)),
MakeTimeAccessor (&PointToPointChannel::m_delay),
MakeTimeChecker ())
.AddTraceSource ("TxRxPointToPoint",
"Trace source indicating transmission of packet from the PointToPointChannel, used by the Animation interface.",
MakeTraceSourceAccessor (&PointToPointChannel::m_txrxPointToPoint))
;
return tid;
}
@@ -93,7 +97,7 @@ PointToPointChannel::TransmitStart(
m_link[wire].m_dst, p);
// Call the tx anim callback on the net device
src->m_txrxPointToPoint (p, src, m_link[wire].m_dst, txTime, txTime + m_delay);
m_txrxPointToPoint (p, src, m_link[wire].m_dst, txTime, txTime + m_delay);
return true;
}

View File

@@ -24,6 +24,7 @@
#include "ns3/ptr.h"
#include "ns3/nstime.h"
#include "ns3/data-rate.h"
#include "ns3/traced-callback.h"
namespace ns3 {
@@ -97,6 +98,22 @@ private:
Time m_delay;
int32_t m_nDevices;
/**
* The trace source for the packet transmission animation events that the
* device can fire.
* Arguments to the callback are the packet, transmitting
* net device, receiving net device, transmittion time and
* packet receipt time.
*
* @see class CallBackTraceSource
*/
TracedCallback<Ptr<const Packet>, // Packet being transmitted
Ptr<NetDevice>, // Transmitting NetDevice
Ptr<NetDevice>, // Receiving NetDevice
Time, // Amount of time to transmit the pkt
Time // Last bit receive time (relative to now)
> m_txrxPointToPoint;
enum WireState
{
INITIALIZING,

View File

@@ -82,9 +82,6 @@ PointToPointNetDevice::GetTypeId (void)
// Trace sources at the "top" of the net device, where packets transition
// to/from higher layers.
//
.AddTraceSource ("TxRxPointToPoint",
"Trace source indicating transmission of packet from the PointToPointChannel, used by the Animation interface.",
MakeTraceSourceAccessor (&PointToPointNetDevice::m_txrxPointToPoint))
.AddTraceSource ("MacTx",
"Trace source indicating a packet has arrived for transmission by this device",
MakeTraceSourceAccessor (&PointToPointNetDevice::m_macTxTrace))

View File

@@ -386,24 +386,6 @@ private:
*/
Ptr<ErrorModel> m_receiveErrorModel;
/**
* The trace source for the packet transmission animation events that the
* device can fire.
* Arguments to the callback are the packet, transmitting
* net device, receiving net device, transmittion time and
* packet receipt time.
*
* @see class CallBackTraceSource
*/
friend class PointToPointChannel; // Allow the channel to call the callback
TracedCallback<Ptr<const Packet>, // Packet being transmitted
Ptr<NetDevice>, // Transmitting NetDevice
Ptr<NetDevice>, // Receiving NetDevice
Time, // Amount of time to transmit the pkt
Time // Last bit receive time (relative to now)
> m_txrxPointToPoint;
/**
* The trace source fired when packets come into the "top" of the device
* at the L3/L2 transition, before being queued for transmission.