From bf42996137ea2f395fbd4f8476d1deb6695a8474 Mon Sep 17 00:00:00 2001 From: Greg Steinbrecher Date: Fri, 25 Sep 2020 13:20:45 -0700 Subject: [PATCH] network: (merges !424) Align error-model-test-suite with previous commit Default size of a DropTailQueue is "100p" and error-model-test-suite calls Send directly (rather than relying on flow control). Previously, the rest of the packets would be sent instantly, but previous commit fixes that bug, so this commit makes the buffer large enough to hold all packets --- src/network/test/error-model-test-suite.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/network/test/error-model-test-suite.cc b/src/network/test/error-model-test-suite.cc index ec2847a5a..749e6faf2 100644 --- a/src/network/test/error-model-test-suite.cc +++ b/src/network/test/error-model-test-suite.cc @@ -39,6 +39,7 @@ #include "ns3/double.h" #include "ns3/string.h" #include "ns3/rng-seed-manager.h" +#include "ns3/queue.h" using namespace ns3; @@ -54,6 +55,14 @@ static void SendPacket (int num, Ptr device, Address& addr) // Two nodes, two devices, one channel static void BuildSimpleTopology (Ptr a, Ptr b, Ptr input, Ptr output, Ptr channel) { + ObjectFactory queueFactory; + queueFactory.SetTypeId("ns3::DropTailQueue"); + queueFactory.Set("MaxSize", StringValue("100000p")); // Much larger than we need + Ptr > queueA = queueFactory.Create > (); + Ptr > queueB = queueFactory.Create > (); + + input->SetQueue(queueA); + output->SetQueue(queueB); a->AddDevice (input); b->AddDevice (output); input->SetAddress (Mac48Address::Allocate ());