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;
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
virtual bool TransmitStart(Ptr< const 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.
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.
virtual Ptr< NetDevice > GetDevice(std::size_t i) const
Get NetDevice corresponding to index i on this channel.
Abstract Channel Base Class.
WireState m_state
State of the link.
Time GetDelay(void) const
Get the delay associated with this channel.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
void Attach(Ptr< PointToPointNetDevice > device)
Attach a given netdevice to this channel.
Propagating state (data is being propagated in the channel.
Time m_delay
Propagation delay.
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.
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.
Transmitting state (data being transmitted from NetDevice.
virtual std::size_t GetNDevices(void) const
Get number of devices on this channel.
Link()
Create the link, it will be in INITIALIZING state.
Ptr< PointToPointNetDevice > GetSource(uint32_t i) const
Get the net-device source.
Simple Point To Point Channel.
Ptr< PointToPointNetDevice > m_src
First NetDevice.
Idle state (no transmission from NetDevice)
void(* TxRxAnimationCallback)(Ptr< const Packet > packet, Ptr< NetDevice > txDevice, Ptr< NetDevice > rxDevice, Time duration, Time lastBitTime)
TracedCallback signature for packet transmission animation events.
a unique identifier for an interface.
Wire model for the PointToPointChannel.