21 #include "ns3/trace-source-accessor.h"
22 #include "ns3/packet.h"
23 #include "ns3/simulator.h"
37 .AddConstructor<PointToPointChannel> ()
38 .AddAttribute (
"Delay",
"Transmission delay through the channel",
42 .AddTraceSource (
"TxRxPointToPoint",
43 "Trace source indicating transmission of packet from the PointToPointChannel, used by the Animation interface.",
55 m_delay (Seconds (0.)),
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
#define NS_LOG_FUNCTION(parameters)
bool IsInitialized(void) const
uint64_t GetUid(void) const
TracedCallback< Ptr< const Packet >, Ptr< NetDevice >, Ptr< NetDevice >, Time, Time > m_txrxPointToPoint
static TypeId GetTypeId(void)
#define NS_ASSERT(condition)
#define NS_LOG_COMPONENT_DEFINE(name)
Abstract Channel Base Class.
#define NS_LOG_FUNCTION_NOARGS()
virtual uint32_t GetNDevices(void) const
Get number of devices on this channel.
void Attach(Ptr< PointToPointNetDevice > device)
Attach a given netdevice to this channel.
PointToPointChannel()
Create a PointToPointChannel.
Ptr< PointToPointNetDevice > m_dst
hold objects of type ns3::Time
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
Time GetDelay(void) const
static void ScheduleWithContext(uint32_t context, Time const &time, MEM mem_ptr, OBJ obj)
#define NS_LOG_LOGIC(msg)
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
virtual Ptr< NetDevice > GetDevice(uint32_t i) const
#define NS_ASSERT_MSG(condition, message)
void Receive(Ptr< Packet > p)
static const int N_DEVICES
Ptr< PointToPointNetDevice > m_src
Ptr< PointToPointNetDevice > GetSource(uint32_t i) const
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range. Both limits are inclusive.
virtual bool TransmitStart(Ptr< Packet > p, Ptr< PointToPointNetDevice > src, Time txTime)
Transmit a packet over this channel.
Ptr< PointToPointNetDevice > GetDestination(uint32_t i) const
a unique identifier for an interface.
Ptr< PointToPointNetDevice > GetPointToPointDevice(uint32_t i) const
TypeId SetParent(TypeId tid)