11#include "ns3/config.h"
12#include "ns3/ht-frame-exchange-manager.h"
13#include "ns3/mobility-helper.h"
14#include "ns3/packet-socket-helper.h"
15#include "ns3/packet-socket-server.h"
16#include "ns3/rng-seed-manager.h"
17#include "ns3/wifi-mac-queue.h"
37 .AddConstructor<WifiTestAssocManager>()
38 .SetGroupName(
"Wifi");
55 const std::list<StaWifiMac::ApInfo::SetupLinksInfo>& setupLinks)
95 :
TestCase(name +
", " + (
std::ostringstream{} << baseParams).str()),
105 int64_t streamNumber = 30;
113 Ssid ssid(
"wifi-assoc-test");
115 mac.SetType(
"ns3::ApWifiMac",
"Ssid",
SsidValue(ssid));
121 auto install = [&](std::string channels,
Ptr<Node> node) {
124 for (std::size_t
id = 0;
id < strings.size(); ++id)
126 phy.Set(
id,
"ChannelSettings",
StringValue(strings[
id]));
129 phy.SetChannel(spectrumChannel);
130 devices.Add(wifi.Install(phy, mac, node));
136 mac.SetType(
"ns3::StaWifiMac",
"Ssid",
SsidValue(ssid));
147 positionAlloc->Add(Vector(0.0, 0.0, 0.0));
148 positionAlloc->Add(Vector(20.0, 0.0, 0.0));
149 positionAlloc->Add(Vector(10.0, 10.0, 0.0));
150 mobility.SetPositionAllocator(positionAlloc);
152 mobility.SetMobilityModel(
"ns3::ConstantPositionMobilityModel");
153 mobility.Install(
nodes);
160 for (
uint32_t i = 0; i < devices.GetN(); ++i)
163 for (uint8_t phyId = 0; phyId < dev->GetNPhys(); ++phyId)
165 dev->GetPhy(phyId)->TraceConnectWithoutContext(
185 server->SetLocal(srvAddr);
186 nodes.Get(i)->AddApplication(server);
187 server->SetStartTime(
Seconds(0));
209 m_staMac->TraceConnectWithoutContext(
212 m_staMac->TraceConnectWithoutContext(
216 m_ap1Mac->TraceConnectWithoutContext(
219 m_ap1Mac->TraceConnectWithoutContext(
223 m_ap2Mac->TraceConnectWithoutContext(
226 m_ap2Mac->TraceConnectWithoutContext(
238 auto linkId = mac->GetLinkForPhy(phyId);
241 for (
const auto& [aid, psdu] : psduMap)
243 std::stringstream ss;
244 ss << std::setprecision(10) <<
" Link ID " << +linkId.value() <<
" Phy ID " << +phyId
245 <<
" #MPDUs " << psdu->GetNMpdus();
246 for (
auto it = psdu->begin(); it != psdu->end(); ++it)
254 const auto psdu = psduMap.cbegin()->second;
255 const auto& hdr = psdu->GetHeader(0);
267 "Unexpected MAC header type for frame transmitted at time "
272 m_events.front().func(psdu, txVector, linkId.value());
284 uint8_t priority)
const
292 client->SetStartTime(
Time{0});
305 (
std::ostringstream{} << params).str(),
316 "Unexpected traffic direction: " <<
m_params.trafficDir);
331 std::list<StaWifiMac::ApInfo::SetupLinksInfo> setupLinks;
335 for (
const auto& [staLinkId, apLinkId] :
m_params.firstSetupLinks)
337 setupLinks.push_back(
338 {staLinkId, apLinkId,
m_ap1Mac->GetFrameExchangeManager(apLinkId)->GetAddress()});
341 assocManager->SetBestAp(
m_ap1Mac->GetFrameExchangeManager(
m_params.firstApLinkId)->GetAddress(),
345 for (std::size_t phyId = 0; phyId <
m_staMac->GetNLinks(); ++phyId)
349 for (std::size_t phyId = 0; phyId <
m_ap1Mac->GetNLinks(); ++phyId)
362 :
m_ap1Mac->GetLinkIdByAddress(bssid).has_value())
368 :
m_ap2Mac->GetLinkIdByAddress(bssid).has_value())
430 "AID of disassociated STA not found: " << aid);
436 "AID of disassociated STA still found: " << aid);
444 const auto when = std::string(
" after ") + (firstAssoc ?
"first" :
"second") +
" association";
446 const auto& setupLinks = (firstAssoc ?
m_params.firstSetupLinks :
m_params.secondSetupLinks);
448 const auto isMlSetup =
450 for (
linkId_t linkId = 0; linkId < apMac->GetNLinks(); ++linkId)
452 auto stationManager = apMac->GetWifiRemoteStationManager(linkId);
454 if (std::any_of(setupLinks.cbegin(), setupLinks.cend(), [=](
auto&& linkIds) {
455 return linkIds.second == linkId;
458 auto staLinkId = linkId;
462 auto it = std::find_if(setupLinks.cbegin(),
464 [linkId](
auto&& pair) { return pair.second == linkId; });
467 "AP link ID (" << +linkId
468 <<
") not found in given setup links");
469 staLinkId = it->first;
473 m_staMac->GetFrameExchangeManager(staLinkId)->GetAddress()),
475 "Expected STA to be associated with AP " << apId <<
" on link "
477 const auto staAddr = stationManager->GetAffiliatedStaAddress(
m_staMac->GetAddress());
480 "Unexpected value returned by GetAffiliatedStaAddress" << when);
481 if (staAddr.has_value())
484 m_staMac->GetFrameExchangeManager(linkId)->GetAddress(),
485 "Unexpected address returned by GetAffiliatedStaAddress"
497 for (
const auto staLinkId :
m_staMac->GetLinkIds())
499 const auto isAssociated = !isMlSetup && !
m_params.sendDisassoc && !firstAssoc &&
501 (staLinkId ==
m_params.firstSetupLinks.front().first) &&
505 stationManager->IsAssociated(
506 m_staMac->GetFrameExchangeManager(staLinkId)->GetAddress()),
508 "Expected STA " << (isAssociated ?
"" :
"not ") <<
"to be associated with AP "
509 << apId <<
" on link " << +linkId << when);
511 const auto staAddr = stationManager->GetAffiliatedStaAddress(
m_staMac->GetAddress());
514 "Unexpected value returned by GetAffiliatedStaAddress for link "
523 const auto when = std::string(
" after ") + (firstAssoc ?
"first" :
"second") +
" association";
525 const auto setupLinks =
m_staMac->GetSetupLinkIds();
527 const auto isMlSetup =
530 const auto& givenSetupLinks =
532 std::set<linkId_t> expectedSetupLinks;
533 for (
const auto& [staLinkId, apLinkId] : givenSetupLinks)
535 expectedSetupLinks.insert(isMlSetup ? apLinkId : staLinkId);
538 for (
const auto linkId :
m_staMac->GetLinkIds())
541 expectedSetupLinks.contains(linkId),
542 "Unexpected setup link (" << +linkId <<
")" << when);
545 for (
const auto staLinkId : setupLinks)
547 auto apLinkId = staLinkId;
551 auto it = std::find_if(givenSetupLinks.cbegin(),
552 givenSetupLinks.cend(),
553 [staLinkId](
auto&& pair) { return pair.first == staLinkId; });
556 "STA link ID (" << +staLinkId
557 <<
") not found in given setup links");
558 apLinkId = it->second;
561 apMac->GetFrameExchangeManager(apLinkId)->GetAddress(),
562 "Incorrect BSSID on link " << +staLinkId << when);
577 std::list<StaWifiMac::ApInfo::SetupLinksInfo> setupLinks;
581 for (
const auto& [staLinkId, apLinkId] :
m_params.secondSetupLinks)
583 setupLinks.push_back(
584 {staLinkId, apLinkId, apMac->GetFrameExchangeManager(apLinkId)->GetAddress()});
587 assocManager->SetBestAp(apMac->GetFrameExchangeManager(
m_params.secondApLinkId)->GetAddress(),
599 "Unexpected local MAC");
600 std::string context{(local ==
m_staMac ?
"STA: " :
"AP1: ")};
604 const auto localIsSender =
609 const auto wasMlSetup =
613 for (
const auto& [staLinkId, apLinkId] :
m_params.firstSetupLinks)
615 const auto localLinkId =
616 (wasMlSetup ? apLinkId : (local ==
m_staMac ? staLinkId : apLinkId));
617 const auto remoteLinkId =
618 (wasMlSetup ? apLinkId : (local ==
m_staMac ? apLinkId : staLinkId));
619 const auto linkAddr = remote->GetFrameExchangeManager(remoteLinkId)->GetAddress();
620 addr = (wasMlSetup ? remote->GetAddress() : linkAddr);
624 for (
const auto& queueId : std::initializer_list<WifiContainerQueueId>{
631 local->GetMacQueueScheduler()->GetQueueLinkMask(aci, queueId, localLinkId))
636 context <<
"Expected transmissions on link "
637 << +localLinkId <<
" to be blocked for queue "
649 context <<
"Unexpected number of QoS data frames queued");
657 context <<
"Expected STA in unassociated state");
663 context <<
"Expected STA in unassociated state");
670 const auto acBe = local->GetTxopQueue(
AC_BE);
671 const auto remoteBaLinkAddr = remote->GetFrameExchangeManager(
m_baLinkId)->GetAddress();
674 (
m_params.sendDisassoc || wasMlSetup ? 0 : 1),
675 context <<
"Expected BAR to be kept only if legacy association was performed and STA "
676 "did not notify disassociation to the AP");
682 ? local->GetBaAgreementEstablishedAsOriginator(addr, 0).has_value()
683 : local->GetBaAgreementEstablishedAsRecipient(addr, 0).has_value()),
685 context <<
"Unexpected Block Ack agreement state");
693 const auto isMlSetup =
697 auto checkQueuedBarBeforeDisassoc = [=,
this]() {
702 auto it = std::find_if(
m_params.firstSetupLinks.cbegin(),
704 [
this](
auto&& pair) { return pair.second == m_baLinkId; });
708 <<
") not found in given setup links");
709 staLinkId = it->first;
715 m_ap1Mac->GetLinkIdByAddress(mpdu->GetHeader().GetAddr1()).has_value(),
717 "Expected BAR to be addressed to an AP link address");
722 const auto staLinkId =
m_params.firstSetupLinks.front().first;
724 m_staMac->GetFrameExchangeManager(staLinkId)->GetAddress());
727 const auto nLinks =
m_staMac->GetSetupLinkIds().size();
733 for (std::size_t i = 0; i < nLinks - 1; ++i)
741 client->GetNode()->AddApplication(
750 client->GetNode()->AddApplication(
766 "Unexpected number of MPDUs in first A-MPDU");
772 {psdu->GetPayload(0)->GetUid(), psdu->GetPayload(1)->GetUid()});
781 txMac->GetFrameExchangeManager(linkId)->GetAddress(),
782 "Unexpected TA for first QoS data frames sent after first association");
785 "RA (" << psdu->GetAddr1()
786 <<
") does not belong to the expected device");
795 txMac->GetFrameExchangeManager(linkId)->GetAddress(),
796 "Unexpected TA for first BlockAck sent after first association");
805 const auto txDuration =
808 txMac->GetWifiPhy(linkId)->GetPhyBand());
828 checkQueuedBarBeforeDisassoc();
842 m_staMac->GetFrameExchangeManager(linkId)->GetAddress(),
843 "Unexpected TA for Disassociation frame");
846 checkQueuedBarBeforeDisassoc();
853 const auto txDuration =
856 m_ap1Mac->GetWifiPhy(linkId)->GetPhyBand());
880 const auto hasBlockAckReq =
893 m_ap1Mac->GetFrameExchangeManager(i)->GetAddress());
895 (
m_staMac->GetTxopQueue(
AC_BE)->PeekByQueueId(queueId) ==
nullptr),
897 "Expected" << (hasBlockAckReq ?
"" :
" no") <<
" BlockAckReq in queue "
926 "Unexpected number of MPDUs in first A-MPDU after roaming");
938 txMac->GetFrameExchangeManager(linkId)->GetAddress(),
939 "Unexpected TA for first QoS data frames sent after second association");
942 "RA (" << psdu->GetAddr1()
943 <<
") does not belong to the expected device");
959 std::size_t expectedAssocWithAp1Count{0};
960 std::size_t expectedAssocWithAp2Count{0};
961 std::size_t expectedAssocSeenByAp1Count{0};
962 std::size_t expectedAssocSeenByAp2Count{0};
969 ++expectedAssocWithAp1Count;
970 ++expectedAssocSeenByAp1Count;
973 ++expectedAssocWithAp2Count;
974 ++expectedAssocSeenByAp2Count;
982 expectedAssocWithAp1Count,
983 "Unexpected number of associations with AP 1 (seen by STA)");
985 expectedAssocWithAp2Count,
986 "Unexpected number of associations with AP 2 (seen by STA)");
988 expectedAssocSeenByAp1Count,
989 "Unexpected number of associations with AP 1 (seen by AP 1)");
991 expectedAssocSeenByAp2Count,
992 "Unexpected number of associations with AP 2 (seen by AP 2)");
1000 for (
const auto sendDisassoc : {
true,
false})
1002 using ParamsList = std::list<WifiDisassocAndReassocTest::Params>;
1007 {.ap1Channels =
"{0,40,BAND_5GHZ,0}",
1008 .ap2Channels =
"{0,40,BAND_5GHZ,0}",
1009 .staChannels =
"{0,40,BAND_5GHZ,0}"};
1010 const auto& params :
1014 .firstSetupLinks = {{0, 0}},
1016 .secondApLinkId = 0,
1017 .secondSetupLinks = {{0, 0}},
1018 .trafficDir = trafficDir,
1019 .sendDisassoc = sendDisassoc},
1023 .firstSetupLinks = {{0, 0}},
1025 .secondApLinkId = 0,
1026 .secondSetupLinks = {{0, 0}},
1027 .trafficDir = trafficDir,
1028 .sendDisassoc = sendDisassoc}})
1038 {.ap1Channels =
"{0,40,BAND_5GHZ,0};{0,40,BAND_6GHZ,0};{0,40,BAND_2_4GHZ,0}",
1039 .ap2Channels =
"{0,40,BAND_6GHZ,0};{0,40,BAND_2_4GHZ,0}",
1040 .staChannels =
"{0,40,BAND_2_4GHZ,0};{0,40,BAND_5GHZ,0};{0,40,BAND_6GHZ,0}"};
1041 const auto& params :
1045 .firstSetupLinks = {{1, 0}, {0, 2}},
1047 .secondApLinkId = 1,
1048 .secondSetupLinks = {{1, 1}},
1049 .trafficDir = trafficDir,
1050 .sendDisassoc = sendDisassoc},
1054 .firstSetupLinks = {{1, 0}, {0, 2}},
1056 .secondApLinkId = 0,
1057 .secondSetupLinks = {{1, 0}},
1058 .trafficDir = trafficDir,
1059 .sendDisassoc = sendDisassoc},
1063 .firstSetupLinks = {{1, 0}},
1065 .secondApLinkId = 1,
1066 .secondSetupLinks = {{2, 1}},
1067 .trafficDir = trafficDir,
1068 .sendDisassoc = sendDisassoc},
1072 .firstSetupLinks = {{1, 0}},
1074 .secondApLinkId = 1,
1075 .secondSetupLinks = {{0, 1}},
1076 .trafficDir = trafficDir,
1077 .sendDisassoc = sendDisassoc}})
virtual void DisassocSeenByAp(ApWifiMac *apMac, uint16_t aid, Mac48Address staAddress)
Callback invoked when the given AP detects that the given STA has disassociated.
void DoSetup() override
Implementation to do any local setup required for this TestCase.
virtual void DisassocSeenBySta(Mac48Address bssid)
Callback invoked when a STA transitions to unassociated state.
WifiAssociationTestBase(const std::string &name, const BaseParams &baseParams)
Constructor.
virtual void Transmit(Ptr< WifiMac > mac, uint8_t phyId, WifiConstPsduMap psduMap, WifiTxVector txVector, double txPowerW)
Callback invoked when a FEM passes PSDUs to the PHY.
Ptr< ApWifiMac > m_ap1Mac
AP 1 wifi MAC.
Ptr< StaWifiMac > m_staMac
STA wifi MAC.
virtual void AssocSeenBySta(Mac48Address bssid)
Callback invoked when a STA completes association with an AP.
std::string m_assocMgrTypeId
Association Manager type ID.
bool m_checkTxPsdus
whether TX PSDUs should be checked against the list of events
Ptr< PacketSocketClient > GetApplication(WifiDirection dir, std::size_t apId, std::size_t count, std::size_t pktSize, uint8_t priority=0) const
Ptr< ApWifiMac > m_ap2Mac
AP 2 wifi MAC.
BaseParams m_baseParams
configuration parameters
std::map< WifiDirection, PacketSocketAddress > m_ap1Sockets
packet socket addresses for DL/UL traffic from AP1
virtual void AssocSeenByAp(ApWifiMac *apMac, uint16_t aid, Mac48Address staAddress)
Callback invoked when the given AP detects that the given STA has completed association.
std::map< WifiDirection, PacketSocketAddress > m_ap2Sockets
packet socket addresses for DL/UL traffic from AP2
Time m_duration
simulation duration
std::list< Events > m_events
list of events for a test run
std::set< WifiMacType > m_framesToSkip
frames that must not be checked against the list of events
WifiAssociationTestSuite()
Test association, disassociation and reassociation in various scenarios.
void InsertEvents()
Insert elements in the list of expected events (transmitted frames).
Params m_params
parameters specific for this test
linkId_t m_baLinkId
ID of the link on which the BA is sent before roaming.
Ptr< ListErrorModel > m_ap1ErrorModel
error rate model to install on the first AP
void DoSetup() override
Implementation to do any local setup required for this TestCase.
void StartRoaming()
Take actions connected to roaming.
void AssocSeenByAp(ApWifiMac *apMac, uint16_t aid, Mac48Address staAddress) override
Callback invoked when the given AP detects that the given STA has completed association.
void DisassocSeenByAp(ApWifiMac *apMac, uint16_t aid, Mac48Address staAddress) override
Callback invoked when the given AP detects that the given STA has disassociated.
Time m_assocTime
time at which last association took place
std::size_t m_assocWithAp2Count
number of associations with AP 2 (seen by STA)
void CheckAfterDisassoc(Ptr< WifiMac > local)
Check that the expected operations are performed by the local device after disassociation.
std::size_t m_assocSeenByAp2Count
number of associations with AP 2 (seen by AP 2)
void CheckRemoteApInfo(bool firstAssoc)
Check that the STA stores the expected info about the AP it is expected to be associated with.
void AssocSeenBySta(Mac48Address bssid) override
Callback invoked when a STA completes association with an AP.
WifiDisassocAndReassocTest(const BaseParams &baseParams, const Params ¶ms)
Constructor.
std::size_t m_assocSeenByAp1Count
number of associations with AP 1 (seen by AP 1)
const std::size_t m_firstApId
the ID of the AP (possibly affiliated with an AP MLD) that is the recipient of the first Assoc Reques...
Ptr< ListErrorModel > m_staErrorModel
error rate model to install on the STA
const std::size_t m_nPackets
number of packets generated in a burst
void CheckRemoteStaInfo(bool firstAssoc)
Check that the AP which the STA is expected to be associated with stores the expected info about the ...
std::size_t m_assocWithAp1Count
number of associations with AP 1 (seen by STA)
void DoRun() override
Implementation to actually run this TestCase.
bool CanBeReturned(const StaWifiMac::ApInfo &apInfo) const override
Allow subclasses to choose whether the given ApInfo shall be returned or discarded when the STA wifi ...
void SetBestAp(Mac48Address bssid, const std::list< StaWifiMac::ApInfo::SetupLinksInfo > &setupLinks)
Set the best AP to associate with.
std::list< StaWifiMac::ApInfo::SetupLinksInfo > m_setupLinks
the list of links to setup
void NotifyChannelSwitched(linkId_t linkId) override
Notify that the given link has completed channel switching.
bool Compare(const StaWifiMac::ApInfo &lhs, const StaWifiMac::ApInfo &rhs) const override
Compare two ApInfo objects for the purpose of keeping a sorted list of ApInfo objects.
Mac48Address m_bestAp
the MAC address of the AP to associate with
static TypeId GetTypeId()
Get the type ID.
bool CanBeInserted(const StaWifiMac::ApInfo &apInfo) const override
Allow subclasses to choose whether the given ApInfo shall be considered and hence inserted in the sor...
void DoStartScanning() override
Start a scanning procedure.
std::optional< Mac48Address > GetMldOrLinkAddressByAid(uint16_t aid) const
Hold variables of type enum.
Provide a list of Packet uids to corrupt.
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.
an address for a packet socket
void SetProtocol(uint16_t protocol)
Set the protocol.
void SetPhysicalAddress(const Address address)
Set the destination address.
void SetSingleDevice(uint32_t device)
Set the address to match only a specified NetDevice.
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.
static void Destroy()
Execute the events scheduled with ScheduleDestroy().
static Time Now()
Return the current simulation virtual time.
static void Run()
Run the simulation.
static void Stop()
Tell the Simulator the calling event should be the last one executed.
Make it easy to create and manage PHY objects for the spectrum model.
The IEEE 802.11 SSID Information Element.
AttributeValue implementation for Ssid.
Hold variables of type string.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
TestCase(const TestCase &)=delete
Caller graph was not generated because of its size.
TestSuite(std::string name, Type type=Type::UNIT)
Construct a new test suite.
Simulation virtual time values and global simulation resolution.
Time TimeStep(uint64_t ts)
Scheduler interface.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
const SortedList & GetSortedList() const
std::list< StaWifiMac::ApInfo::SetupLinksInfo > & GetSetupLinks(const StaWifiMac::ApInfo &apInfo)
Get a reference to the list of the links to setup with the given AP.
void ScanningTimeout()
Extract the best AP to associate with from the sorted list and return it, if any, to the STA wifi MAC...
const WifiScanParams & GetScanParams() const
WifiAssocManager()
Constructor (protected as this is an abstract base class).
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 ...
create MAC layers for a ns3::WifiNetDevice.
Mac48Address GetAddress() const
@ DLT_IEEE802_11_RADIO
Include Radiotap link layer information.
static Time CalculateTxDuration(uint32_t size, const WifiTxVector &txVector, WifiPhyBand band, uint16_t staId=SU_STA_ID)
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
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...
void SetDefault(std::string name, const AttributeValue &value)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#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.
#define NS_TEST_EXPECT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report if not.
#define NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
Test that an actual and expected (limit) value are not equal and report and abort if not.
#define NS_TEST_ASSERT_MSG_GT_OR_EQ(actual, limit, msg)
Test that an actual value is greater than or equal to 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.
WifiContainerQueueId MakeWifiUnicastQueueId(WifiContainerQueueType type, Mac48Address addr1, std::optional< tid_t > tid=std::nullopt)
Helper function to create WifiContainerQueueId for unicast queues.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
U * PeekPointer(const Ptr< U > &p)
const Time MAX_PROPAGATION_DELAY
maximum propagation delay
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
StringVector SplitString(const std::string &str, const std::string &delim)
Split a string on a delimiter.
@ WIFI_MAC_MGT_ASSOCIATION_RESPONSE
@ WIFI_MAC_MGT_DISASSOCIATION
@ WIFI_MAC_MGT_ASSOCIATION_REQUEST
WifiDirection
Wifi direction.
Ptr< T1 > StaticCast(const Ptr< T2 > &p)
Cast a Ptr.
std::unordered_map< uint16_t, Ptr< const WifiPsdu > > WifiConstPsduMap
Map of const PSDUs indexed by STA-ID.
uint8_t linkId_t
IEEE 802.11be D7.0 Figure 9-207e—Link ID Info field format.
const std::map< AcIndex, WifiAc > wifiAcList
Map containing the four ACs in increasing order of priority (according to Table 10-1 "UP-to-AC Mappin...
Configuration parameters common to all subclasses.
Configuration parameters specific to this test.
Struct to hold information regarding observed AP through active/passive scanning.
Mac48Address m_bssid
BSSID.
static WifiAssociationTestSuite g_wifiAssociationTestSuite
the test suite