27 #include "ns3/drop-tail-queue.h"
29 #include "ns3/net-device-queue-interface.h"
30 #include "ns3/packet.h"
31 #include "ns3/satellite-const-variables.h"
32 #include "ns3/satellite-point-to-point-isl-channel.h"
33 #include "ns3/string.h"
35 NS_LOG_COMPONENT_DEFINE(
"PointToPointIslHelper");
40 NS_OBJECT_ENSURE_REGISTERED(PointToPointIslHelper);
46 TypeId(
"ns3::PointToPointIslHelper")
48 .AddConstructor<PointToPointIslHelper>()
49 .AddAttribute(
"IslDataRate",
50 "Data rate of ISL links",
51 DataRateValue(DataRate(
"1Gb/s")),
53 MakeDataRateChecker())
54 .AddAttribute(
"QueueMaxPackets",
55 "The maximum number of packets accepted by ISL queues.",
58 MakeUintegerChecker<uint32_t>())
59 .AddAttribute(
"QueueMaxBytes",
60 "The maximum number of bytes accepted by ISL queues.",
61 UintegerValue(100 * 65535),
63 MakeUintegerChecker<uint32_t>());
77 NS_LOG_FUNCTION(
this << a << b);
79 NetDeviceContainer container;
83 devA->SetDestinationNode(b);
89 queueA->SetAttribute(
"MaxSize",
90 QueueSizeValue(QueueSize(QueueSizeUnit::PACKETS,
m_maxPackets)));
91 devA->SetQueue(queueA);
95 devB->SetDestinationNode(a);
101 queueB->SetAttribute(
"MaxSize",
102 QueueSizeValue(QueueSize(QueueSizeUnit::PACKETS,
m_maxPackets)));
103 devB->SetQueue(queueB);
106 Ptr<NetDeviceQueueInterface> ndqiA = CreateObject<NetDeviceQueueInterface>();
107 ndqiA->GetTxQueue(0)->ConnectQueueTraces(queueA);
108 devA->AggregateObject(ndqiA);
109 Ptr<NetDeviceQueueInterface> ndqiB = CreateObject<NetDeviceQueueInterface>();
110 ndqiB->GetTxQueue(0)->ConnectQueueTraces(queueB);
111 devB->AggregateObject(ndqiB);
116 devB->Attach(channel);
Point to Point ISL Channel.
void Attach(Ptr< PointToPointIslNetDevice > device)
Attach a given netdevice to this channel.
uint32_t m_maxBytes
The maximum number of bytes accepted by ISL queues.
ObjectFactory m_deviceFactory
Device Factory.
ObjectFactory m_channelFactory
Channel Factory.
ObjectFactory m_queueFactory
Queue Factory.
DataRate m_dataRate
Data rate of ISL link.
NetDeviceContainer Install(Ptr< Node > a, Ptr< Node > b)
static TypeId GetTypeId(void)
Get the type ID.
uint32_t m_maxPackets
The maximum number of packets accepted by ISL queues.
virtual void SetAddress(Address address)
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.