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.
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.
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.
Propagating state (data is being propagated in the 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.
Transmitting state (data being transmitted from NetDevice.
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.
Idle state (no transmission from NetDevice)
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.
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.
Ptr< PointToPointNetDevice > GetPointToPointDevice(uint32_t i) const
Get PointToPointNetDevice corresponding to index i on this channel.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Wire model for the PointToPointChannel.