|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #include "ns3/string.h"
23 #include "ns3/uinteger.h"
24 #include "ns3/boolean.h"
25 #include "ns3/double.h"
27 #include "ns3/packet-sink.h"
28 #include "ns3/yans-wifi-helper.h"
29 #include "ns3/mobility-helper.h"
30 #include "ns3/internet-stack-helper.h"
31 #include "ns3/ipv4-address-helper.h"
32 #include "ns3/packet-sink-helper.h"
33 #include "ns3/on-off-helper.h"
47 virtual void DoRun (
void);
54 :
TestCase (
"MsduAggregator throughput test"),
55 m_writeResults (false)
73 std::string phyMode (
"DsssRate1Mbps");
75 wifi.SetRemoteStationManager (
"ns3::ConstantRateWifiManager",
83 wifiMac.
SetType (
"ns3::ApWifiMac",
95 wifiMac.
SetType (
"ns3::StaWifiMac",
103 mobility.SetMobilityModel (
"ns3::ConstantPositionMobilityModel");
104 mobility.SetPositionAllocator (
"ns3::GridPositionAllocator",
120 address.SetBase (
"192.168.0.0",
"255.255.255.0");
122 staNodeInterface =
address.Assign (staDev);
123 apNodeInterface =
address.Assign (apDev);
128 uint16_t udpPort = 50000;
163 Simulator::Stop (
Seconds (10.0));
165 Simulator::Destroy ();
170 uint32_t totalOctetsThrough =
171 DynamicCast<PacketSink>(sinkApp.
Get (0))->GetTotalRx ();
186 "A-MSDU test fails for low throughput of "
187 << totalOctetsThrough <<
" octets");
208 :
TestSuite (
"wifi-msdu-aggregator", SYSTEM)
holds a vector of ns3::NetDevice pointers
Ptr< Application > Get(uint32_t i) const
Get the Ptr<Application> stored in this container at a given index.
Make it easy to create and manage PHY objects for the YANS model.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
AttributeValue implementation for Boolean.
Throughput test for MsduAggregator.
void EnablePcap(std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false)
Enable pcap output the indicated net device.
virtual void DoRun(void)
Implementation to actually run this TestCase.
uint32_t GetId(void) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void Stop(Time stop)
Arrange for all of the Applications in this container to Stop() at the Time given as a parameter.
helps to create WifiNetDevice objects
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
WifiMsduAggregatorThroughputTest()
void SetChannel(Ptr< YansWifiChannel > channel)
This class can be used to hold variables of floating point type such as 'double' or 'float'.
void Create(uint32_t n)
Create n nodes and append pointers to them to the end of this NodeContainer.
AttributeValue implementation for Ssid.
The IEEE 802.11 SSID Information Element.
void SetConstantRate(DataRate dataRate, uint32_t packetSize=512)
Helper function to set a constant rate source.
Class for representing data rates.
Ptr< YansWifiChannel > Create(void) const
A helper to make it easier to instantiate an ns3::OnOffApplication on a set of nodes.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
WifiMsduAggregatorTestSuite()
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
Hold variables of type string.
A helper to make it easier to instantiate an ns3::PacketSinkApplication on a set of nodes.
MsduAggregator Test Suite.
ApplicationContainer Install(NodeContainer c) const
Install an ns3::OnOffApplication on each node of the input container configured with all the attribut...
void SetPcapDataLinkType(SupportedPcapDataLinkTypes dlt)
Set the data link type of PCAP traces to be used.
void Start(Time start)
Arrange for all of the Applications in this container to Start() at the Time given as a parameter.
Time Seconds(double value)
Construct a Time in the indicated unit.
#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.
holds a vector of ns3::Application pointers.
bool m_writeResults
flag whether to generate pcap
AttributeValue implementation for Time.
keep track of a set of node pointers.
void SetType(std::string type, Args &&... args)
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Hold an unsigned integer type.
manage and create wifi channel objects for the YANS model.
create MAC layers for a ns3::WifiNetDevice.
static WifiMsduAggregatorTestSuite wifiMsduAggregatorTestSuite
aggregate IP/TCP/UDP functionality to existing Nodes.
Helper class used to assign positions and mobility models to nodes.
ApplicationContainer Install(NodeContainer c) const
Install an ns3::PacketSinkApplication on each node of the input container configured with all the att...