12#include "ns3/fcfs-wifi-queue-scheduler.h"
13#include "ns3/frame-exchange-manager.h"
14#include "ns3/mesh-point-device.h"
15#include "ns3/mesh-wifi-interface-mac.h"
16#include "ns3/minstrel-wifi-manager.h"
17#include "ns3/pointer.h"
18#include "ns3/simulator.h"
19#include "ns3/string.h"
20#include "ns3/wifi-default-ack-manager.h"
21#include "ns3/wifi-default-protection-manager.h"
22#include "ns3/wifi-helper.h"
23#include "ns3/wifi-net-device.h"
29 m_spreadChannelPolicy(ZERO_CHANNEL),
57 for (
auto i =
c.Begin();
i !=
c.End(); ++
i)
73 channel = 100 +
i * 5;
76 mp->AddInterface(iface);
92 helper.SetRemoteStationManager(
"ns3::ArfWifiManager");
114 for (
const std::string ac : {
"BE",
"BK",
"VI",
"VO"})
120 std::vector<Ptr<WifiPhy>>
phys =
phyHelper.Create(node, device);
122 node->AddDevice(device);
124 device->SetPhy(
phys[0]);
127 mac->SetSsid(
Ssid());
128 mac->SetDevice(device);
131 device->SetRemoteStationManager(
manager);
139 mac->SetFrameExchangeManagers({
fem});
140 fem->SetAddress(mac->GetAddress());
159 std::vector<Ptr<NetDevice>>
ifaces =
mp->GetInterfaces();
163 os <<
"</MeshPointDevice>\n";
180 for (
auto i =
c.Begin();
i !=
c.End(); ++
i)
190 std::vector<Ptr<NetDevice>>
ifaces =
mpd->GetInterfaces();
210 mac->GetAttribute(
"Txop", ptr);
214 mac->GetAttribute(
"VO_Txop", ptr);
218 mac->GetAttribute(
"VI_Txop", ptr);
222 mac->GetAttribute(
"BE_Txop", ptr);
226 mac->GetAttribute(
"BK_Txop", ptr);
AttributeValue implementation for Boolean.
FrameExchangeManager is a base class handling the basic frame exchange sequences for non-QoS stations...
static Mac48Address ConvertFrom(const Address &address)
static Mac48Address Allocate()
Allocate a new Mac48Address.
Helper to create IEEE 802.11s mesh networks.
void SetStandard(WifiStandard standard)
Set standard.
Ptr< WifiNetDevice > CreateInterface(const WifiPhyHelper &phyHelper, Ptr< Node > node, uint16_t channelId) const
Ptr< MeshStack > m_stack
stack
~MeshHelper()
Destroy a MeshHelper.
uint32_t m_nInterfaces
number of interfaces
ObjectFactory m_stationManager
the station manager
void SetSpreadInterfaceChannels(ChannelPolicy policy)
set the channel policy
ObjectFactory m_mac
the MAC
ChannelPolicy m_spreadChannelPolicy
spread channel policy
static void EnableLogComponents()
Helper to enable all MeshPointDevice log components with one statement.
MeshHelper()
Construct a MeshHelper used to make life easier when creating 802.11s networks.
int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
static MeshHelper Default()
Set the helper to the default values for the MAC type, remote station manager and channel policy.
void SetMacType(Ts &&... args)
Set the Mac Attributes.
NetDeviceContainer Install(const WifiPhyHelper &phyHelper, NodeContainer c) const
Install 802.11s mesh device & protocols on given node list.
ChannelPolicy
Spread/not spread frequency channels of MP interfaces.
WifiStandard m_standard
standard
void ResetStats(const ns3::Ptr< ns3::NetDevice > &device)
Reset statistics.
void Report(const ns3::Ptr< ns3::NetDevice > &device, std::ostream &os)
Print statistics.
void SetNumberOfInterfaces(uint32_t nInterfaces)
Set a number of interfaces in a mesh network.
Virtual net device modeling mesh point.
Basic MAC of mesh point Wi-Fi interface.
holds a vector of ns3::NetDevice pointers
keep track of a set of node pointers.
Instantiate subclasses of ns3::Object.
Ptr< Object > Create() const
Create an Object instance of the configured TypeId.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
Handles the packet queue and stores DCF/EDCA access parameters (one Txop per AC).
static Time Now()
Return the current simulation virtual time.
The IEEE 802.11 SSID Information Element.
Hold variables of type string.
double GetSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
Handles the packet queue and stores DCF/EDCA access parameters (one Txop per AC).
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
static void EnableLogComponents(LogLevel logLevel=LOG_LEVEL_ALL)
Helper to enable all WifiNetDevice log components with one statement.
hold a list of per-remote-station state.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_ABORT_IF(cond)
Abnormal program termination if a condition is true.
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void LogComponentEnable(const std::string &name, LogLevel level)
Enable the logging output associated with that log component.
std::string GetFrameExchangeManagerTypeIdName(WifiStandard standard, bool qosSupported)
Get the TypeId name for the FrameExchangeManager corresponding to the given standard.
@ LOG_LEVEL_ALL
Print everything.