19 #ifndef POINT_TO_POINT_CHANNEL_H
20 #define POINT_TO_POINT_CHANNEL_H
23 #include "ns3/channel.h"
25 #include "ns3/nstime.h"
26 #include "ns3/data-rate.h"
27 #include "ns3/traced-callback.h"
31 class PointToPointNetDevice;
144 const Time duration,
const Time lastBitTime);
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
Transmitting state (data being transmitted from NetDevice.
int32_t m_nDevices
Devices of this channel.
bool IsInitialized(void) const
Check to make sure the link is initialized.
Forward calls to a chain of Callback.
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.
Idle state (no transmission from NetDevice)
Abstract Channel Base Class.
WireState m_state
State of the link.
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.
Time m_delay
Propagation delay.
PointToPointChannel()
Create a PointToPointChannel.
Ptr< PointToPointNetDevice > m_dst
Second NetDevice.
Time GetDelay(void) const
Get the delay associated with this channel.
void(* TxRxAnimationCallback)(const Ptr< const Packet > packet, const Ptr< const NetDevice > txDevice, const Ptr< const NetDevice > rxDevice, const Time duration, const Time lastBitTime)
TracedCallback signature for packet transmission animation events.
Propagating state (data is being propagated in the channel.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual Ptr< NetDevice > GetDevice(uint32_t i) const
Get NetDevice corresponding to index i on this channel.
Link()
Create the link, it will be in INITIALIZING state.
Simple Point To Point Channel.
static const int N_DEVICES
Each point to point link has exactly two net devices.
Ptr< PointToPointNetDevice > m_src
First NetDevice.
Ptr< PointToPointNetDevice > GetSource(uint32_t i) const
Get the net-device source.
virtual bool TransmitStart(Ptr< Packet > p, Ptr< PointToPointNetDevice > src, Time txTime)
Transmit a packet over this channel.
Ptr< PointToPointNetDevice > GetDestination(uint32_t i) const
Get the net-device destination.
a unique identifier for an interface.
Ptr< PointToPointNetDevice > GetPointToPointDevice(uint32_t i) const
Get PointToPointNetDevice corresponding to index i on this channel.
Wire model for the PointToPointChannel.