A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::WifiStaticSetupHelper Class Reference

Helper to statically setup wifi devices without actually exchanging management frames over the air: More...

#include "wifi-static-setup-helper.h"

Static Public Member Functions

static void AlignApViewOfStaPmMode (Ptr< ApWifiMac > apMac, Ptr< StaWifiMac > clientMac)
 Align the knowledge that the AP has about the PM mode of the STAs affiliated with the client device to their actual PM modes.
static MgtAssocRequestHeader GetAssocReq (Ptr< StaWifiMac > staMac, linkId_t staLinkId, bool isMldAssoc)
 Get Association Request for input STA link address.
static MgtAssocResponseHeader GetAssocResp (Mac48Address staLinkAddr, Ptr< ApWifiMac > apMac, linkId_t apLinkId, bool isMldAssoc)
 Get Association Response for input STA link address from AP MAC including Multi-link Element if MLD Association.
static WifiMacHeader GetAssocRespMacHdr (Mac48Address staLinkAddr, Ptr< ApWifiMac > apMac, linkId_t apLinkId)
 Get Association Response MAC Header for input STA link address from AP MAC including Multi-link Element if MLD Association.
static Mac48Address GetBaOriginatorAddr (Ptr< WifiMac > originatorMac, Ptr< WifiMac > recipientMac)
 Get Block ACK originator address based on devices MAC config.
static Mac48Address GetBaRecipientAddr (Ptr< WifiMac > originatorMac, Ptr< WifiMac > recipientMac)
 Get Block ACK recipient address based on devices MAC config.
static std::map< linkId_t, linkId_tGetLinkIdMap (Ptr< ApWifiMac > apMac, Ptr< StaWifiMac > staMac)
 Construct non-AP MLD link ID to AP MLD link ID mapping based on PHY channel settings It is required that for each STA affiliated with the non-AP MLD there exists an AP affiliated with the AP MLD that operates on a channel having the same primary20 as the channel on which the STA operates.
static std::map< linkId_t, linkId_tGetLinkIdMap (Ptr< WifiNetDevice > apDev, Ptr< WifiNetDevice > clientDev)
 Construct non-AP MLD link ID to AP MLD link ID mapping based on PHY channel settings.
static void SetStaticAssociation (Ptr< WifiNetDevice > bssDev, const NetDeviceContainer &clientDevs)
 Bypass static capabilities exchange for input devices.
static void SetStaticAssociation (Ptr< WifiNetDevice > bssDev, Ptr< WifiNetDevice > clientDev)
 Bypass static capabilities exchange for input devices.
static void SetStaticAssocPostInit (Ptr< ApWifiMac > apMac, Ptr< StaWifiMac > clientMac)
 Perform static Association Request/Response exchange for input devices post initialization at runtime begin.
static void SetStaticAssocPostInit (Ptr< WifiNetDevice > bssDev, Ptr< WifiNetDevice > clientDev)
 Perform static Association Request/Response exchange for input devices post initialization at runtime begin.
static void SetStaticBlockAck (Ptr< WifiNetDevice > apDev, const NetDeviceContainer &clientDevs, const std::set< tid_t > &tids, std::optional< Mac48Address > gcrGroupAddr=std::nullopt)
 Bypass ADDBA Request-Response exchange sequence between AP and STAs for given TIDs.
static void SetStaticBlockAck (Ptr< WifiNetDevice > originatorDev, Ptr< WifiNetDevice > recipientDev, tid_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt)
 Bypass ADDBA Request-Response exchange sequence between input devices for given TID.
static void SetStaticBlockAckPostInit (Ptr< WifiNetDevice > originatorDev, Ptr< WifiNetDevice > recipientDev, tid_t tid, std::optional< Mac48Address > gcrGroupAddr=std::nullopt)
 Perform ADDBA Request-Response exchange sequence between input devices for given TID post initialization at runtime begin.
static void SetStaticEmlsr (Ptr< WifiNetDevice > apDev, const NetDeviceContainer &clientDevs)
 Bypass EML Operating Mode Notification exchange sequence between AP MLD and input non-AP devices.
static void SetStaticEmlsr (Ptr< WifiNetDevice > apDev, Ptr< WifiNetDevice > clientDev)
 Bypass EML Operating Mode Notification exchange sequence between AP MLD and non-AP MLD to enable EMLSR mode on the links specified via the EmlsrManager::EmlsrLinkSet attribute.
static void SetStaticEmlsrPostInit (Ptr< WifiNetDevice > apDev, Ptr< WifiNetDevice > clientDev)
 Perform EML Operating Mode Notification exchange sequence between AP MLD and non-AP MLD to enable EMLSR mode on the links specified via the EmlsrManager::EmlsrLinkSet attribute post initialization at runtime begin.

Detailed Description

Helper to statically setup wifi devices without actually exchanging management frames over the air:

  • association/ML setup (note that scanning is disabled for this purpose)
  • block ack agreement(s)
  • enabling EMLSR mode on EMLSR client links

Definition at line 37 of file wifi-static-setup-helper.h.

Member Function Documentation

◆ AlignApViewOfStaPmMode()

void ns3::WifiStaticSetupHelper::AlignApViewOfStaPmMode ( Ptr< ApWifiMac > apMac,
Ptr< StaWifiMac > clientMac )
static

Align the knowledge that the AP has about the PM mode of the STAs affiliated with the client device to their actual PM modes.

Parameters
apMacthe AP MAC
clientMacthe client MAC

Definition at line 319 of file wifi-static-setup-helper.cc.

References ns3::WIFI_PM_ACTIVE.

Referenced by SetStaticAssocPostInit(), and SetStaticEmlsrPostInit().

Here is the caller graph for this function:

◆ GetAssocReq()

MgtAssocRequestHeader ns3::WifiStaticSetupHelper::GetAssocReq ( Ptr< StaWifiMac > staMac,
linkId_t staLinkId,
bool isMldAssoc )
static

Get Association Request for input STA link address.

Parameters
staMacSTA MAC
staLinkIdID of link used for Assoc request
isMldAssoctrue if MLD association, false otherwise
Returns
association request

Definition at line 292 of file wifi-static-setup-helper.cc.

References NS_ASSERT_MSG.

Referenced by SetStaticAssocPostInit().

Here is the caller graph for this function:

◆ GetAssocResp()

MgtAssocResponseHeader ns3::WifiStaticSetupHelper::GetAssocResp ( Mac48Address staLinkAddr,
Ptr< ApWifiMac > apMac,
linkId_t apLinkId,
bool isMldAssoc )
static

Get Association Response for input STA link address from AP MAC including Multi-link Element if MLD Association.

Parameters
staLinkAddrSTA link MAC address
apMacAP MAC
apLinkIdID of link used for Assoc response
isMldAssoctrue if MLD association, false otherwise
Returns
association response

Definition at line 275 of file wifi-static-setup-helper.cc.

References ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE.

Referenced by SetStaticAssocPostInit().

Here is the caller graph for this function:

◆ GetAssocRespMacHdr()

WifiMacHeader ns3::WifiStaticSetupHelper::GetAssocRespMacHdr ( Mac48Address staLinkAddr,
Ptr< ApWifiMac > apMac,
linkId_t apLinkId )
static

Get Association Response MAC Header for input STA link address from AP MAC including Multi-link Element if MLD Association.

Parameters
staLinkAddrSTA link MAC address
apMacAP MAC
apLinkIdLink ID of link used for Assoc response
Returns
MAC header

Definition at line 262 of file wifi-static-setup-helper.cc.

References ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), and ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE.

Referenced by SetStaticAssocPostInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBaOriginatorAddr()

Mac48Address ns3::WifiStaticSetupHelper::GetBaOriginatorAddr ( Ptr< WifiMac > originatorMac,
Ptr< WifiMac > recipientMac )
static

Get Block ACK originator address based on devices MAC config.

Parameters
originatorMacoriginator MAC
recipientMacrecipient MAC
Returns
the Block Ack originator address

Definition at line 462 of file wifi-static-setup-helper.cc.

References ns3::DynamicCast(), and NS_ASSERT_MSG.

Referenced by GetBaRecipientAddr(), and SetStaticBlockAckPostInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBaRecipientAddr()

Mac48Address ns3::WifiStaticSetupHelper::GetBaRecipientAddr ( Ptr< WifiMac > originatorMac,
Ptr< WifiMac > recipientMac )
static

Get Block ACK recipient address based on devices MAC config.

Parameters
originatorMacoriginator MAC
recipientMacrecipient MAC
Returns
the Block Ack recipient address

Definition at line 514 of file wifi-static-setup-helper.cc.

References GetBaOriginatorAddr().

Referenced by SetStaticBlockAckPostInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLinkIdMap() [1/2]

std::map< linkId_t, linkId_t > ns3::WifiStaticSetupHelper::GetLinkIdMap ( Ptr< ApWifiMac > apMac,
Ptr< StaWifiMac > staMac )
static

Construct non-AP MLD link ID to AP MLD link ID mapping based on PHY channel settings It is required that for each STA affiliated with the non-AP MLD there exists an AP affiliated with the AP MLD that operates on a channel having the same primary20 as the channel on which the STA operates.

Parameters
apMacAP MAC
staMacSTA MAC
Returns
link ID mapping

Definition at line 216 of file wifi-static-setup-helper.cc.

References NS_ASSERT, NS_ASSERT_MSG, and NS_LOG_DEBUG.

◆ GetLinkIdMap() [2/2]

std::map< linkId_t, linkId_t > ns3::WifiStaticSetupHelper::GetLinkIdMap ( Ptr< WifiNetDevice > apDev,
Ptr< WifiNetDevice > clientDev )
static

Construct non-AP MLD link ID to AP MLD link ID mapping based on PHY channel settings.

It is required that for each STA affiliated with the non-AP MLD there exists an AP affiliated with the AP MLD that operates on a channel having the same primary20 as the channel on which the STA operates.

Parameters
apDevAP NetDevice
clientDevSTA NetDevice
Returns
link ID mapping

Definition at line 206 of file wifi-static-setup-helper.cc.

References ns3::DynamicCast(), GetLinkIdMap(), and NS_ASSERT_MSG.

Referenced by WifiStaticEmlsrTest::DoSetup(), WifiStaticInfraBssTest::DoSetup(), GetLinkIdMap(), and SetStaticAssocPostInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetStaticAssociation() [1/2]

void ns3::WifiStaticSetupHelper::SetStaticAssociation ( Ptr< WifiNetDevice > bssDev,
const NetDeviceContainer & clientDevs )
static

Bypass static capabilities exchange for input devices.

Parameters
bssDevBSS advertising device (AP)
clientDevsclient devices

Definition at line 36 of file wifi-static-setup-helper.cc.

References ns3::NetDeviceContainer::Begin(), ns3::DynamicCast(), ns3::NetDeviceContainer::End(), NS_ASSERT_MSG, NS_LOG_FUNCTION_NOARGS, and SetStaticAssociation().

Referenced by WifiPsModeAttributesTest::DoSetup(), WifiStaticEmlsrTest::DoSetup(), WifiStaticInfraBssTest::DoSetup(), and SetStaticAssociation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetStaticAssociation() [2/2]

void ns3::WifiStaticSetupHelper::SetStaticAssociation ( Ptr< WifiNetDevice > bssDev,
Ptr< WifiNetDevice > clientDev )
static

Bypass static capabilities exchange for input devices.

Parameters
bssDevBSS advertising device (AP)
clientDevclient device

Definition at line 50 of file wifi-static-setup-helper.cc.

References NS_LOG_FUNCTION_NOARGS, ns3::Simulator::ScheduleNow(), and SetStaticAssocPostInit().

Here is the call graph for this function:

◆ SetStaticAssocPostInit() [1/2]

void ns3::WifiStaticSetupHelper::SetStaticAssocPostInit ( Ptr< ApWifiMac > apMac,
Ptr< StaWifiMac > clientMac )
static

Perform static Association Request/Response exchange for input devices post initialization at runtime begin.

Parameters
apMacAP MAC
clientMacclient MAC

Definition at line 72 of file wifi-static-setup-helper.cc.

References AlignApViewOfStaPmMode(), ns3::Create(), ns3::DOWNLINK, GetAssocReq(), GetAssocResp(), GetAssocRespMacHdr(), ns3::Simulator::GetDelayLeft(), GetLinkIdMap(), ns3::Simulator::Now(), NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION_NOARGS, ns3::WifiMacHeader::SetAddr2(), ns3::UPLINK, ns3::StaWifiMac::WAIT_ASSOC_RESP, ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST, and ns3::WIFI_MAC_MGT_BEACON.

Here is the call graph for this function:

◆ SetStaticAssocPostInit() [2/2]

void ns3::WifiStaticSetupHelper::SetStaticAssocPostInit ( Ptr< WifiNetDevice > bssDev,
Ptr< WifiNetDevice > clientDev )
static

Perform static Association Request/Response exchange for input devices post initialization at runtime begin.

Parameters
bssDevBSS advertising device (AP)
clientDevclient device

Definition at line 59 of file wifi-static-setup-helper.cc.

References ns3::DynamicCast(), NS_ABORT_MSG_IF, NS_LOG_FUNCTION_NOARGS, and SetStaticAssocPostInit().

Referenced by SetStaticAssociation(), and SetStaticAssocPostInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetStaticBlockAck() [1/2]

void ns3::WifiStaticSetupHelper::SetStaticBlockAck ( Ptr< WifiNetDevice > apDev,
const NetDeviceContainer & clientDevs,
const std::set< tid_t > & tids,
std::optional< Mac48Address > gcrGroupAddr = std::nullopt )
static

Bypass ADDBA Request-Response exchange sequence between AP and STAs for given TIDs.

Static setup will be performed in both uplink and downlink.

Parameters
apDevAP device
clientDevsSTA devices
tidsthe set of TIDs corresponding to Block ACK agreements
gcrGroupAddrMAC address of the GCR group (GCR Group Address)

Definition at line 336 of file wifi-static-setup-helper.cc.

References ns3::NetDeviceContainer::Begin(), ns3::DynamicCast(), ns3::NetDeviceContainer::End(), NS_ASSERT_MSG, NS_LOG_FUNCTION_NOARGS, and SetStaticBlockAck().

Referenced by WifiStaticInfraBssTest::DoSetup(), and SetStaticBlockAck().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetStaticBlockAck() [2/2]

void ns3::WifiStaticSetupHelper::SetStaticBlockAck ( Ptr< WifiNetDevice > originatorDev,
Ptr< WifiNetDevice > recipientDev,
tid_t tid,
std::optional< Mac48Address > gcrGroupAddr = std::nullopt )
static

Bypass ADDBA Request-Response exchange sequence between input devices for given TID.

Parameters
originatorDevoriginator device of Block ACK agreement
recipientDevrecipient device of Block ACK agreement
tidTID corresponding to Block ACK agreement
gcrGroupAddrMAC address of the GCR group (GCR Group Address)

Definition at line 361 of file wifi-static-setup-helper.cc.

References NS_LOG_FUNCTION_NOARGS, ns3::Simulator::ScheduleNow(), and SetStaticBlockAckPostInit().

Here is the call graph for this function:

◆ SetStaticBlockAckPostInit()

void ns3::WifiStaticSetupHelper::SetStaticBlockAckPostInit ( Ptr< WifiNetDevice > originatorDev,
Ptr< WifiNetDevice > recipientDev,
tid_t tid,
std::optional< Mac48Address > gcrGroupAddr = std::nullopt )
static

Perform ADDBA Request-Response exchange sequence between input devices for given TID post initialization at runtime begin.

Parameters
originatorDevoriginator device of Block ACK agreement
recipientDevrecipient device of Block ACK agreement
tidTID corresponding to Block ACK agreement
gcrGroupAddrMAC address of the GCR group (GCR Group Address)

Definition at line 376 of file wifi-static-setup-helper.cc.

References ns3::DynamicCast(), GetBaOriginatorAddr(), GetBaRecipientAddr(), ns3::MgtAddBaRequestHeader::GetBufferSize(), ns3::MgtAddBaRequestHeader::GetGcrGroupAddress(), ns3::MgtAddBaRequestHeader::GetStartingSequence(), NS_ASSERT_MSG, NS_LOG_FUNCTION_NOARGS, ns3::MgtAddBaRequestHeader::SetAmsduSupport(), ns3::MgtAddBaResponseHeader::SetAmsduSupport(), ns3::MgtAddBaRequestHeader::SetBufferSize(), ns3::MgtAddBaResponseHeader::SetBufferSize(), ns3::MgtAddBaRequestHeader::SetGcrGroupAddress(), ns3::MgtAddBaResponseHeader::SetGcrGroupAddress(), ns3::MgtAddBaRequestHeader::SetImmediateBlockAck(), ns3::MgtAddBaResponseHeader::SetImmediateBlockAck(), ns3::MgtAddBaRequestHeader::SetStartingSequence(), ns3::MgtAddBaResponseHeader::SetStatusCode(), ns3::StatusCode::SetSuccess(), ns3::MgtAddBaRequestHeader::SetTid(), ns3::MgtAddBaResponseHeader::SetTid(), ns3::MgtAddBaRequestHeader::SetTimeout(), and ns3::MgtAddBaResponseHeader::SetTimeout().

Referenced by WifiPsModeAttributesTest::InsertEvents(), and SetStaticBlockAck().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetStaticEmlsr() [1/2]

void ns3::WifiStaticSetupHelper::SetStaticEmlsr ( Ptr< WifiNetDevice > apDev,
const NetDeviceContainer & clientDevs )
static

Bypass EML Operating Mode Notification exchange sequence between AP MLD and input non-AP devices.

Parameters
apDevAP MLD
clientDevsNon-AP devices

Definition at line 584 of file wifi-static-setup-helper.cc.

References ns3::NetDeviceContainer::Begin(), ns3::DynamicCast(), ns3::NetDeviceContainer::End(), NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION_NOARGS, and SetStaticEmlsr().

Referenced by WifiPsModeAttributesTest::DoSetup(), WifiStaticEmlsrTest::DoSetup(), and SetStaticEmlsr().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetStaticEmlsr() [2/2]

void ns3::WifiStaticSetupHelper::SetStaticEmlsr ( Ptr< WifiNetDevice > apDev,
Ptr< WifiNetDevice > clientDev )
static

Bypass EML Operating Mode Notification exchange sequence between AP MLD and non-AP MLD to enable EMLSR mode on the links specified via the EmlsrManager::EmlsrLinkSet attribute.

Parameters
apDevAP MLD
clientDevNon-AP MLD

Definition at line 520 of file wifi-static-setup-helper.cc.

References NS_LOG_FUNCTION_NOARGS, ns3::Simulator::ScheduleNow(), and SetStaticEmlsrPostInit().

Here is the call graph for this function:

◆ SetStaticEmlsrPostInit()

void ns3::WifiStaticSetupHelper::SetStaticEmlsrPostInit ( Ptr< WifiNetDevice > apDev,
Ptr< WifiNetDevice > clientDev )
static

Perform EML Operating Mode Notification exchange sequence between AP MLD and non-AP MLD to enable EMLSR mode on the links specified via the EmlsrManager::EmlsrLinkSet attribute post initialization at runtime begin.

Parameters
apDevAP MLD
clientDevNon-AP MLD

Definition at line 528 of file wifi-static-setup-helper.cc.

References AlignApViewOfStaPmMode(), ns3::DynamicCast(), NS_ASSERT_MSG, NS_LOG_DEBUG, and NS_LOG_FUNCTION_NOARGS.

Referenced by SetStaticEmlsr().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: