A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wifi-dynamic-bw-op-test.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Universita' degli Studi di Napoli Federico II
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Stefano Avallone <stavallo@unina.it>
7 */
8
9#include "ns3/channel-access-manager.h"
10#include "ns3/config.h"
11#include "ns3/mobility-helper.h"
12#include "ns3/multi-model-spectrum-channel.h"
13#include "ns3/packet-socket-client.h"
14#include "ns3/packet-socket-helper.h"
15#include "ns3/packet-socket-server.h"
16#include "ns3/qos-txop.h"
17#include "ns3/rng-seed-manager.h"
18#include "ns3/spectrum-wifi-helper.h"
19#include "ns3/string.h"
20#include "ns3/test.h"
21#include "ns3/wifi-mac.h"
22#include "ns3/wifi-net-device.h"
23#include "ns3/wifi-psdu.h"
24
25using namespace ns3;
26
27NS_LOG_COMPONENT_DEFINE("WifiDynamicBwOpTestSuite");
28
29/**
30 * \ingroup wifi-test
31 * \ingroup tests
32 *
33 * Two BSSes, each with one AP and one non-AP STA, are configured to operate on
34 * different channels. Specifically, the operating channel of BSS 1 is the secondary<X>
35 * channel of BSS 0, where X is half the width of the channel used by BSS 0.
36 * This test demonstrates that, if a transmission is ongoing on BSS 1, we can have
37 * a transmission on BSS 0 on its primary<X> channel.
38 */
40{
41 public:
42 /**
43 * Constructor
44 *
45 * \param channelStr channel setting strings for BSS 0 and BSS 1
46 * \param bss0Width width of the transmission in BSS 0 started when BSS 1 is transmitting
47 */
48 WifiUseAvailBwTest(std::initializer_list<std::string> channelStr, MHz_u bss0Width);
49 ~WifiUseAvailBwTest() override;
50
51 /**
52 * Function to trace packets received by the server application in the given BSS
53 * \param bss the given BSS
54 * \param p the packet
55 * \param addr the address
56 */
57 void L7Receive(uint8_t bss, Ptr<const Packet> p, const Address& addr);
58 /**
59 * Callback invoked when a PHY receives a PSDU to transmit
60 * \param bss the BSS the PSDU belongs to
61 * \param psduMap the PSDU map
62 * \param txVector the TX vector
63 * \param txPowerW the tx power in Watts
64 */
65 void Transmit(uint8_t bss, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW);
66 /**
67 * Check correctness of transmitted frames
68 */
69 void CheckResults();
70
71 private:
72 void DoRun() override;
73
74 /// Information about transmitted frames
75 struct FrameInfo
76 {
77 Time txStart; ///< Frame start TX time
78 Time txDuration; ///< Frame TX duration
79 uint8_t bss; ///< BSS the frame belongs to
80 WifiMacHeader header; ///< Frame MAC header
81 std::size_t nMpdus; ///< number of MPDUs in the PSDU
82 WifiTxVector txVector; ///< TX vector used to transmit the frame
83 };
84
85 std::vector<std::string> m_channelStr; ///< channel setting strings
86 MHz_u m_bss0Width; ///< width of the transmission in BSS 0
87 ///< started when BSS 1 is transmitting
88 NetDeviceContainer m_staDevices; ///< container for stations' NetDevices
89 NetDeviceContainer m_apDevices; ///< container for AP's NetDevice
90 std::array<PacketSocketAddress, 2> m_sockets; ///< packet sockets for the two BSSes
91 std::vector<FrameInfo> m_txPsdus; ///< transmitted PSDUs
92 uint8_t m_txPkts; ///< TX packets per BSS (in addition to the two
93 ///< required to establish BA agreement)
94 std::array<uint8_t, 2> m_rcvPkts; ///< number of packets received by the stations
95};
96
97WifiUseAvailBwTest::WifiUseAvailBwTest(std::initializer_list<std::string> channelStr,
98 MHz_u bss0Width)
99 : TestCase("Check transmission on available bandwidth"),
100 m_channelStr(channelStr),
101 m_bss0Width(bss0Width),
102 m_txPkts(bss0Width / 10), // so that they all fit in an A-MPDU
103 m_rcvPkts({0, 0})
104{
105}
106
110
111void
113{
114 NS_LOG_INFO("Received " << p->GetSize() << " bytes in BSS " << +bss);
115 m_rcvPkts[bss]++;
116}
117
118void
120 WifiConstPsduMap psduMap,
121 WifiTxVector txVector,
122 double txPowerW)
123{
124 auto psdu = psduMap.begin()->second;
125 Time now = Simulator::Now();
126
127 // Log all frames that are not management frames (we are only interested in data
128 // frames and acknowledgments) and have been transmitted after 400ms (so as to
129 // skip association requests/responses)
130 if (!psdu->GetHeader(0).IsMgt() && now > MilliSeconds(400))
131 {
132 m_txPsdus.push_back({now,
134 bss,
135 psdu->GetHeader(0),
136 psdu->GetNMpdus(),
137 txVector});
138 }
139
140 NS_LOG_INFO(now << " BSS " << +bss << " " << psdu->GetHeader(0).GetTypeString() << " seq "
141 << psdu->GetHeader(0).GetSequenceNumber() << " to " << psdu->GetAddr1()
142 << " #MPDUs " << psdu->GetNMpdus() << " size " << psdu->GetSize()
143 << " TX duration "
144 << WifiPhy::CalculateTxDuration(psduMap, txVector, WIFI_PHY_BAND_5GHZ) << "\n"
145 << "TXVECTOR " << txVector << "\n");
146
147 // when AP of BSS 1 starts transmitting (after 1.5 s), we generate packets
148 // for the AP of BSS 0 to transmit
149 if (bss == 1 && psdu->GetNMpdus() == m_txPkts && now >= Seconds(1.5))
150 {
152 client->SetAttribute("PacketSize", UintegerValue(2000));
153 client->SetAttribute("MaxPackets", UintegerValue(m_txPkts));
154 client->SetAttribute("Interval", TimeValue(MicroSeconds(0)));
155 client->SetRemote(m_sockets[0]);
156 m_apDevices.Get(0)->GetNode()->AddApplication(client);
157 client->SetStartTime(Seconds(0)); // start now
158 client->SetStopTime(Seconds(1.0)); // stop in a second
159 client->Initialize();
160
161 // after 1us (to allow for propagation delay), the largest idle primary
162 // channel on the AP of BSS 0 should be the expected one
164 auto mac = StaticCast<WifiNetDevice>(m_apDevices.Get(0))->GetMac();
165 auto cam = mac->GetChannelAccessManager();
167 cam->GetLargestIdlePrimaryChannel(MicroSeconds(1), Simulator::Now()),
169 "Unexpected width of the largest idle primary channel");
170 });
171 }
172}
173
174void
176{
179 int64_t streamNumber = 100;
180
181 NodeContainer wifiApNodes(2);
182 NodeContainer wifiStaNodes(2);
183
184 auto spectrumChannel = CreateObject<MultiModelSpectrumChannel>();
186 spectrumChannel->AddPropagationLossModel(lossModel);
189 spectrumChannel->SetPropagationDelayModel(delayModel);
190
192 phy.SetChannel(spectrumChannel);
193
194 WifiHelper wifi;
195 wifi.SetStandard(WIFI_STANDARD_80211ax);
196 wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager",
197 "DataMode",
198 StringValue("HeMcs0"),
199 "ControlMode",
200 StringValue("OfdmRate6Mbps"));
201
202 WifiMacHelper apMac;
203 apMac.SetType("ns3::ApWifiMac", "Ssid", SsidValue(Ssid("dynamic-bw-op-ssid")));
204
205 WifiMacHelper staMac;
206 staMac.SetType("ns3::StaWifiMac", "Ssid", SsidValue(Ssid("dynamic-bw-op-ssid")));
207
208 // BSS 0
209 phy.Set("ChannelSettings", StringValue(m_channelStr.at(0)));
210
211 m_apDevices = wifi.Install(phy, apMac, wifiApNodes.Get(0));
212 m_staDevices = wifi.Install(phy, staMac, wifiStaNodes.Get(0));
213
214 // BSS 1
215 phy.Set("ChannelSettings", StringValue(m_channelStr.at(1)));
216
217 m_apDevices.Add(wifi.Install(phy, apMac, wifiApNodes.Get(1)));
218 m_staDevices.Add(wifi.Install(phy, staMac, wifiStaNodes.Get(1)));
219
220 // schedule association requests at different times
222
223 // Assign fixed streams to random variables in use
224 streamNumber += WifiHelper::AssignStreams(m_apDevices, streamNumber);
225 streamNumber += WifiHelper::AssignStreams(m_staDevices, streamNumber);
226
227 MobilityHelper mobility;
229
230 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
231 positionAlloc->Add(Vector(50.0, 0.0, 0.0));
232 positionAlloc->Add(Vector(0.0, 50.0, 0.0));
233 positionAlloc->Add(Vector(50.0, 50.0, 0.0));
234 mobility.SetPositionAllocator(positionAlloc);
235
236 mobility.SetMobilityModel("ns3::ConstantPositionMobilityModel");
237 mobility.Install(wifiApNodes);
238 mobility.Install(wifiStaNodes);
239
240 NS_LOG_INFO("Position of AP (BSS 0) = "
241 << wifiApNodes.Get(0)->GetObject<MobilityModel>()->GetPosition());
242 NS_LOG_INFO("Position of AP (BSS 1) = "
243 << wifiApNodes.Get(1)->GetObject<MobilityModel>()->GetPosition());
244 NS_LOG_INFO("Position of STA (BSS 0) = "
245 << wifiStaNodes.Get(0)->GetObject<MobilityModel>()->GetPosition());
246 NS_LOG_INFO("Position of STA (BSS 1) = "
247 << wifiStaNodes.Get(1)->GetObject<MobilityModel>()->GetPosition());
248
249 PacketSocketHelper packetSocket;
250 packetSocket.Install(wifiApNodes);
251 packetSocket.Install(wifiStaNodes);
252
253 // DL frames
254 for (uint8_t bss : {0, 1})
255 {
256 m_sockets[bss].SetSingleDevice(m_apDevices.Get(bss)->GetIfIndex());
257 m_sockets[bss].SetPhysicalAddress(m_staDevices.Get(bss)->GetAddress());
258 m_sockets[bss].SetProtocol(1);
259
260 // the first client application generates two packets in order
261 // to trigger the establishment of a Block Ack agreement
263 client1->SetAttribute("PacketSize", UintegerValue(500));
264 client1->SetAttribute("MaxPackets", UintegerValue(2));
265 client1->SetAttribute("Interval", TimeValue(MicroSeconds(0)));
266 client1->SetRemote(m_sockets[bss]);
267 wifiApNodes.Get(bss)->AddApplication(client1);
268 client1->SetStartTime(Seconds(0.5) + bss * MilliSeconds(500));
269 client1->SetStopTime(Seconds(2.0));
270
271 // At time 1.5, start a transmission in BSS 1
272 if (bss == 1)
273 {
275 client2->SetAttribute("PacketSize", UintegerValue(2000));
276 client2->SetAttribute("MaxPackets", UintegerValue(m_txPkts));
277 client2->SetAttribute("Interval", TimeValue(MicroSeconds(0)));
278 client2->SetRemote(m_sockets[bss]);
279 wifiApNodes.Get(bss)->AddApplication(client2);
280 client2->SetStartTime(Seconds(1.5));
281 client2->SetStopTime(Seconds(2.0));
282 }
283
285 server->SetLocal(m_sockets[bss]);
286 wifiStaNodes.Get(bss)->AddApplication(server);
287 server->SetStartTime(Seconds(0.0));
288 server->SetStopTime(Seconds(2.0));
289
290 // Trace received packets on non-AP STAs
291 Config::ConnectWithoutContext("/NodeList/" + std::to_string(2 + bss) +
292 "/ApplicationList/*/$ns3::PacketSocketServer/Rx",
294 // Trace PSDUs passed to the PHY of the AP
295 Config::ConnectWithoutContext("/NodeList/" + std::to_string(bss) +
296 "/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxPsduBegin",
298 // Trace PSDUs passed to the PHY of the non-AP STA
299 Config::ConnectWithoutContext("/NodeList/" + std::to_string(2 + bss) +
300 "/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxPsduBegin",
302 }
303
306
307 CheckResults();
308
310}
311
312void
314{
315 NS_TEST_ASSERT_MSG_EQ(m_txPsdus.size(), 12, "Expected 12 transmitted frames");
316
317 // first logged frames are Acks after ADDBA Request/Response frames
318 auto psduIt = m_txPsdus.begin();
319 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsAck(), true, "Expected Ack after ADDBA Request");
320 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 0, "Expected a transmission in BSS 0");
321 psduIt++;
322
323 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsAck(), true, "Expected Ack after ADDBA Response");
324 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 0, "Expected a transmission in BSS 0");
325 psduIt++;
326
327 // the first data frame is an A-MPDU sent by the AP of BSS 0 right after the
328 // establishment of the Block Ack agreement
329 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsQosData(), true, "Expected a QoS data frame");
330 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 0, "Expected a transmission in BSS 0");
331 NS_TEST_EXPECT_MSG_EQ(psduIt->nMpdus, 2, "Expected an A-MPDU of 2 MPDUs after Block Ack");
333 psduIt->txVector.GetChannelWidth(),
334 StaticCast<WifiNetDevice>(m_apDevices.Get(0))->GetPhy()->GetChannelWidth(),
335 "Expected a transmission on the whole channel width");
336 psduIt++;
337
338 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsBlockAck(), true, "Expected Block Ack after data frame");
339 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 0, "Expected a transmission in BSS 0");
340 psduIt++;
341
342 // same sequence for BSS 1
343 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsAck(), true, "Expected Ack after ADDBA Request");
344 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 1, "Expected a transmission in BSS 1");
345 psduIt++;
346
347 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsAck(), true, "Expected Ack after ADDBA Response");
348 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 1, "Expected a transmission in BSS 1");
349 psduIt++;
350
351 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsQosData(), true, "Expected a QoS data frame");
352 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 1, "Expected a transmission in BSS 1");
353 NS_TEST_EXPECT_MSG_EQ(psduIt->nMpdus, 2, "Expected an A-MPDU of 2 MPDUs after Block Ack");
355 psduIt->txVector.GetChannelWidth(),
356 StaticCast<WifiNetDevice>(m_apDevices.Get(1))->GetPhy()->GetChannelWidth(),
357 "Expected a transmission on the whole channel width");
358 psduIt++;
359
360 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsBlockAck(), true, "Expected Block Ack after data frame");
361 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 1, "Expected a transmission in BSS 1");
362 psduIt++;
363
364 // after some time, we have another A-MPDU transmitted in BSS 1
365 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsQosData(), true, "Expected a QoS data frame");
366 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 1, "Expected a transmission in BSS 1");
367 NS_TEST_EXPECT_MSG_EQ(psduIt->nMpdus,
368 +m_txPkts,
369 "Expected an A-MPDU of " << +m_txPkts << " MPDUs");
371 psduIt->txVector.GetChannelWidth(),
372 StaticCast<WifiNetDevice>(m_apDevices.Get(1))->GetPhy()->GetChannelWidth(),
373 "Expected a transmission on the whole channel width");
374 psduIt++;
375
376 // we expect that the AP of BSS 0 starts transmitting while the AP of BSS 1 is transmitting
377 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsQosData(), true, "Expected a QoS data frame");
378 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 0, "Expected a transmission in BSS 0");
379 NS_TEST_EXPECT_MSG_EQ(psduIt->nMpdus,
380 +m_txPkts,
381 "Expected an A-MPDU of " << +m_txPkts << " MPDUs");
382 NS_TEST_EXPECT_MSG_EQ(psduIt->txVector.GetChannelWidth(),
384 "Unexpected transmission width");
385 NS_TEST_EXPECT_MSG_LT(psduIt->txStart,
386 std::prev(psduIt)->txStart + std::prev(psduIt)->txDuration,
387 "AP 0 is expected to transmit before the end of transmission of AP 1");
388 psduIt++;
389
390 // receive a Block Ack in BSS 1 and then a Block Ack in BSS 0
391 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsBlockAck(), true, "Expected Block Ack after data frame");
392 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 1, "Expected a transmission in BSS 1");
393 psduIt++;
394
395 NS_TEST_EXPECT_MSG_EQ(psduIt->header.IsBlockAck(), true, "Expected Block Ack after data frame");
396 NS_TEST_EXPECT_MSG_EQ(+psduIt->bss, 0, "Expected a transmission in BSS 0");
397 psduIt++;
398
399 // each application server (on STAs) received 2 packets right after Block Ack
400 // agreement establishment and m_txPkts packets afterwards
402 2 + m_txPkts,
403 "Unexpected number of packets received by STA 0");
405 2 + m_txPkts,
406 "Unexpected number of packets received by STA 1");
407}
408
409/**
410 * \ingroup wifi-test
411 * \ingroup tests
412 *
413 * \brief wifi dynamic bandwidth operation Test Suite
414 */
416{
417 public:
419};
420
422 : TestSuite("wifi-dynamic-bw-op", Type::UNIT)
423{
424 /**
425 * primary20
426 * ┌────────┬────────┐
427 * BSS 0 │ 52 │ 56 │
428 * └────────┴────────┘
429 *
430 * ┌────────┐
431 * BSS 1 │ 52 │
432 * └────────┘
433 */
434 AddTestCase(new WifiUseAvailBwTest({"{54, 40, BAND_5GHZ, 1}", "{52, 20, BAND_5GHZ, 0}"}, 20),
435 TestCase::Duration::QUICK);
436 /**
437 * ─── primary 40 ───
438 * primary20
439 * ┌────────┬────────┬────────┬────────┐
440 * BSS 0 │ 52 │ 56 │ 60 │ 64 │
441 * └────────┴────────┴────────┴────────┘
442 *
443 * ┌────────┬────────┐
444 * BSS 1 │ 60 │ 64 │
445 * └────────┴────────┘
446 * primary20
447 */
448 AddTestCase(new WifiUseAvailBwTest({"{58, 80, BAND_5GHZ, 0}", "{62, 40, BAND_5GHZ, 1}"}, 40),
449 TestCase::Duration::QUICK);
450 /**
451 * ─────────── primary 80 ───────────
452 * primary20
453 * ┌────────┬────────┬────────┬────────┬───────┬────────┬────────┬────────┐
454 * BSS 0 │ 36 │ 40 │ 44 │ 48 │ 52 │ 56 │ 60 │ 64 │
455 * └────────┴────────┴────────┴────────┴───────┴────────┴────────┴────────┘
456 *
457 * ┌────────┬────────┬────────┬────────┐
458 * BSS 1 │ 36 │ 40 │ 44 │ 48 │
459 * └────────┴────────┴────────┴────────┘
460 * primary20
461 */
462 AddTestCase(new WifiUseAvailBwTest({"{50, 160, BAND_5GHZ, 5}", "{42, 80, BAND_5GHZ, 2}"}, 80),
463 TestCase::Duration::QUICK);
464}
465
wifi dynamic bandwidth operation Test Suite
Two BSSes, each with one AP and one non-AP STA, are configured to operate on different channels.
void Transmit(uint8_t bss, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
Callback invoked when a PHY receives a PSDU to transmit.
std::vector< std::string > m_channelStr
channel setting strings
std::array< uint8_t, 2 > m_rcvPkts
number of packets received by the stations
std::vector< FrameInfo > m_txPsdus
transmitted PSDUs
std::array< PacketSocketAddress, 2 > m_sockets
packet sockets for the two BSSes
void L7Receive(uint8_t bss, Ptr< const Packet > p, const Address &addr)
Function to trace packets received by the server application in the given BSS.
MHz_u m_bss0Width
width of the transmission in BSS 0 started when BSS 1 is transmitting
void DoRun() override
Implementation to actually run this TestCase.
uint8_t m_txPkts
TX packets per BSS (in addition to the two required to establish BA agreement)
void CheckResults()
Check correctness of transmitted frames.
NetDeviceContainer m_apDevices
container for AP's NetDevice
NetDeviceContainer m_staDevices
container for stations' NetDevices
WifiUseAvailBwTest(std::initializer_list< std::string > channelStr, MHz_u bss0Width)
Constructor.
a polymophic address class
Definition address.h:90
Helper class used to assign positions and mobility models to nodes.
Keep track of the current position and velocity of an object.
Vector GetPosition() const
holds a vector of ns3::NetDevice pointers
void Add(NetDeviceContainer other)
Append the contents of another NetDeviceContainer to the end of this container.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
keep track of a set of node pointers.
Ptr< Node > Get(uint32_t i) const
Get the Ptr<Node> stored in this container at a given index.
uint32_t AddApplication(Ptr< Application > application)
Associate an Application to this Node.
Definition node.cc:153
Ptr< T > GetObject() const
Get a pointer to the requested aggregated Object.
Definition object.h:511
Give ns3::PacketSocket powers to ns3::Node.
void Install(Ptr< Node > node) const
Aggregate an instance of a ns3::PacketSocketFactory onto the provided node.
Smart pointer class similar to boost::intrusive_ptr.
static void SetRun(uint64_t run)
Set the run number of simulation.
static void SetSeed(uint32_t seed)
Set the seed.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
Definition simulator.h:560
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
Definition simulator.cc:131
static Time Now()
Return the current simulation virtual time.
Definition simulator.cc:197
static void Run()
Run the simulation.
Definition simulator.cc:167
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Definition simulator.cc:175
Make it easy to create and manage PHY objects for the spectrum model.
The IEEE 802.11 SSID Information Element.
Definition ssid.h:25
Hold variables of type string.
Definition string.h:45
encapsulates test code
Definition test.h:1050
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Definition test.cc:292
A suite of tests to run.
Definition test.h:1267
Type
Type of test.
Definition test.h:1274
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Hold an unsigned integer type.
Definition uinteger.h:34
helps to create WifiNetDevice objects
static int64_t AssignStreams(NetDeviceContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by the PHY and MAC aspects ...
Implements the IEEE 802.11 MAC header.
create MAC layers for a ns3::WifiNetDevice.
void SetType(std::string type, Args &&... args)
static Time CalculateTxDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
Definition wifi-phy.cc:1572
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
void ConnectWithoutContext(std::string path, const CallbackBase &cb)
Definition config.cc:943
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition log.h:264
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
Definition object.h:619
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
Definition test.h:134
#define NS_TEST_EXPECT_MSG_LT(actual, limit, msg)
Test that an actual value is less than a limit and report if not.
Definition test.h:780
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
Definition test.h:241
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1332
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition nstime.h:1308
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Definition nstime.h:1320
@ WIFI_STANDARD_80211ax
@ WIFI_PHY_BAND_5GHZ
The 5 GHz band.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition callback.h:684
Ptr< T1 > StaticCast(const Ptr< T2 > &p)
Cast a Ptr.
Definition ptr.h:587
Information about transmitted frames.
uint8_t bss
BSS the frame belongs to.
std::size_t nMpdus
number of MPDUs in the PSDU
WifiTxVector txVector
TX vector used to transmit the frame.
WifiMacHeader header
Frame MAC header.
static WifiDynamicBwOpTestSuite g_wifiDynamicBwOpTestSuite
the test suite