20 #include "ns3/boolean.h"
21 #include "ns3/double.h"
22 #include "ns3/internet-stack-helper.h"
23 #include "ns3/ipv4-address-helper.h"
24 #include "ns3/mobility-helper.h"
25 #include "ns3/on-off-helper.h"
26 #include "ns3/packet-sink-helper.h"
27 #include "ns3/packet-sink.h"
29 #include "ns3/string.h"
31 #include "ns3/uinteger.h"
32 #include "ns3/yans-wifi-helper.h"
46 void DoRun()
override;
53 :
TestCase(
"MsduAggregator throughput test"),
72 std::string phyMode(
"DsssRate1Mbps");
74 wifi.SetRemoteStationManager(
"ns3::ConstantRateWifiManager",
84 wifiMac.
SetType(
"ns3::ApWifiMac",
101 wifiMac.
SetType(
"ns3::StaWifiMac",
112 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
113 mobility.SetPositionAllocator(
"ns3::GridPositionAllocator",
135 address.SetBase(
"192.168.0.0",
"255.255.255.0");
138 staNodeInterface =
address.Assign(staDev);
139 apNodeInterface =
address.Assign(apDev);
144 uint16_t udpPort = 50000;
177 Simulator::Stop(
Seconds(10.0));
179 Simulator::Destroy();
184 uint32_t totalOctetsThrough = DynamicCast<PacketSink>(sinkApp.
Get(0))->GetTotalRx();
200 "A-MSDU test fails for low throughput of " << totalOctetsThrough
221 :
TestSuite(
"wifi-msdu-aggregator", SYSTEM)
MsduAggregator Test Suite.
WifiMsduAggregatorTestSuite()
Throughput test for MsduAggregator.
void DoRun() override
Implementation to actually run this TestCase.
WifiMsduAggregatorThroughputTest()
bool m_writeResults
flag whether to generate pcap
holds a vector of ns3::Application pointers.
void Start(Time start) const
Start all of the Applications in this container at the start time given as a parameter.
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
void Stop(Time stop) const
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Helper class used to assign positions and mobility models to nodes.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...
void EnablePcap(std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false)
Enable pcap output the indicated net device.
The IEEE 802.11 SSID Information Element.
Hold variables of type string.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Hold an unsigned integer type.
helps to create WifiNetDevice objects
create MAC layers for a ns3::WifiNetDevice.
void SetType(std::string type, Args &&... args)
void SetPcapDataLinkType(SupportedPcapDataLinkTypes dlt)
Set the data link type of PCAP traces to be used.
manage and create wifi channel objects for the YANS model.
Ptr< YansWifiChannel > Create() const
Make it easy to create and manage PHY objects for the YANS model.
void SetChannel(Ptr< YansWifiChannel > channel)
void(* DataRate)(DataRate oldValue, DataRate newValue)
TracedValue callback signature for DataRate.
#define NS_TEST_ASSERT_MSG_GT(actual, limit, msg)
Test that an actual value is greater than a limit and report and abort if not.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static WifiMsduAggregatorTestSuite wifiMsduAggregatorTestSuite