21 #include "ns3/trace-source-accessor.h"    22 #include "ns3/packet.h"    23 #include "ns3/simulator.h"    37     .SetGroupName (
"PointToPoint")
    39     .AddAttribute (
"Delay", 
"Propagation delay through the channel",
    43     .AddTraceSource (
"TxRxPointToPoint",
    44                      "Trace source indicating transmission of packet "    45                      "from the PointToPointChannel, used by the Animation "    48                      "ns3::PointToPointChannel::TxRxAnimationCallback")
 uint64_t GetUid(void) const
Returns the packet's Uid. 
Simulation virtual time values and global simulation resolution. 
Smart pointer class similar to boost::intrusive_ptr. 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
virtual bool TransmitStart(Ptr< const Packet > p, Ptr< PointToPointNetDevice > src, Time txTime)
Transmit a packet over this channel. 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
Ptr< PointToPointNetDevice > GetDestination(uint32_t i) const
Get the net-device destination. 
Link m_link[N_DEVICES]
Link model. 
TracedCallback< Ptr< const Packet >, Ptr< NetDevice >, Ptr< NetDevice >, Time, Time > m_txrxPointToPoint
The trace source for the packet transmission animation events that the device can fire...
static TypeId GetTypeId(void)
Get the TypeId. 
virtual Ptr< NetDevice > GetDevice(std::size_t i) const
Get NetDevice corresponding to index i on this channel. 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
Abstract Channel Base Class. 
WireState m_state
State of the link. 
Time GetDelay(void) const
Get the delay associated with this channel. 
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function. 
void Attach(Ptr< PointToPointNetDevice > device)
Attach a given netdevice to this channel. 
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source. 
Time m_delay
Propagation delay. 
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range. 
bool IsInitialized(void) const
Check to make sure the link is initialized. 
PointToPointChannel()
Create a PointToPointChannel. 
std::size_t m_nDevices
Devices of this channel. 
Ptr< PointToPointNetDevice > m_dst
Second NetDevice. 
  AttributeValue implementation for Time. 
Ptr< PointToPointNetDevice > GetPointToPointDevice(std::size_t i) const
Get PointToPointNetDevice corresponding to index i on this channel. 
static const std::size_t N_DEVICES
Each point to point link has exactly two net devices. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
Ptr< Packet > Copy(void) const
performs a COW copy of the packet. 
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
 Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
virtual std::size_t GetNDevices(void) const
Get number of devices on this channel. 
Ptr< PointToPointNetDevice > GetSource(uint32_t i) const
Get the net-device source. 
static void ScheduleWithContext(uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event with the given context. 
Simple Point To Point Channel. 
void Receive(Ptr< Packet > p)
Receive a packet from a connected PointToPointChannel. 
Time Seconds(double value)
Construct a Time in the indicated unit. 
Ptr< PointToPointNetDevice > m_src
First NetDevice. 
Idle state (no transmission from NetDevice) 
a unique identifier for an interface. 
TypeId SetParent(TypeId tid)
Set the parent TypeId.