29#include "ns3/boolean.h"
30#include "ns3/command-line.h"
31#include "ns3/config.h"
32#include "ns3/double.h"
33#include "ns3/internet-stack-helper.h"
34#include "ns3/ipv4-address-helper.h"
36#include "ns3/mobility-helper.h"
37#include "ns3/mobility-model.h"
39#include "ns3/neighbor-cache-helper.h"
40#include "ns3/on-off-helper.h"
41#include "ns3/packet-sink-helper.h"
43#include "ns3/string.h"
44#include "ns3/uinteger.h"
45#include "ns3/wifi-co-trace-helper.h"
46#include "ns3/wifi-phy-rx-trace-helper.h"
47#include "ns3/yans-wifi-channel.h"
48#include "ns3/yans-wifi-helper.h"
70 cmd.AddValue(
"useDifferentAc",
71 "Uses VO AC on 2 STAs and BE on rest if true. Uses BE AC on all 4 STAs if false.",
73 cmd.AddValue(
"duration",
"Duration of data transfer", duration);
88 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
103 wifiChannel.AddPropagationLoss(
"ns3::FriisPropagationLossModel");
108 wifi.SetRemoteStationManager(
"ns3::ConstantRateWifiManager",
117 wifiMac.SetType(
"ns3::ApWifiMac",
127 wifiMac.SetType(
"ns3::StaWifiMac",
145 ipv4.SetBase(
"10.1.1.0",
"255.255.255.0");
149 std::vector<uint8_t>
tosValues = {0x70, 0x28, 0xb8, 0xc0};
195 std::cout <<
"*** Print statistics for all nodes using built-in print method:" << std::endl;
198 std::cout <<
"*** Print the statistics in your own way. Here, just sum the STAs total TX time:"
208 const auto it2 =
it.m_linkStateDurations.at(0).find(WifiPhyState::TX);
209 if (
it2 !=
it.m_linkStateDurations.at(0).end())
holds a vector of ns3::Application pointers.
AttributeValue implementation for Boolean.
Parse command-line arguments.
AttributeValue implementation for DataRate.
aggregate IP/TCP/UDP functionality to existing Nodes.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
Access to the IPv4 forwarding table, interfaces, and configuration.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Helper class used to assign positions and mobility models to nodes.
static void Add(std::string name, Ptr< Object > object)
Add the association between the string "name" and the Ptr<Object> obj.
A helper class to populate neighbor cache.
void PopulateNeighborCache()
Populate neighbor ARP and NDISC caches for all devices.
holds a vector of ns3::NetDevice pointers
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
keep track of a set of node pointers.
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.
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static void Run()
Run the simulation.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
The IEEE 802.11 SSID Information Element.
AttributeValue implementation for Ssid.
Hold variables of type string.
Simulation virtual time values and global simulation resolution.
TimeWithUnit As(const Unit unit=Time::AUTO) const
Attach a unit to a Time, to facilitate output in a specific unit.
AttributeValue implementation for Time.
Hold an unsigned integer type.
Track channel occupancy durations for WifiNetDevice.
helps to create WifiNetDevice objects
create MAC layers for a ns3::WifiNetDevice.
manage and create wifi channel objects for the YANS model.
void SetPropagationDelay(std::string name, Ts &&... args)
Make it easy to create and manage PHY objects for the YANS model.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void PopulateNeighborCache()