Test transmission of broadcast and unicast frames with STAs in Power Save mode. More...
Classes | |
| struct | Events |
| Actions and checks to perform upon the transmission of each frame. More... | |
Public Member Functions | |
| WifiPowerSaveModeTest (WifiStandard standard) | |
| Constructor. | |
| void | NotifyMpduEnqueued (Ptr< const WifiMpdu > mpdu) |
| Notify that the given MPDU was enqueued at the AP. | |
| void | NotifyStateChange (uint32_t nodeId, uint8_t phyId, Time stateStart, Time stateDuration, WifiPhyState state) |
| Callback invoked when the PHY state helper reports a change in PHY state. | |
| void | Transmit (Ptr< WifiMac > mac, uint8_t phyId, WifiConstPsduMap psduMap, WifiTxVector txVector, Watt_u txPower) |
| Callback invoked when PHY receives a PSDU to transmit. | |
| Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| Caller graph was not generated because of its size. | |
| virtual | ~TestCase () |
| Destructor. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Protected Member Functions | |
| Ptr< PacketSocketClient > | GetApplication (const PacketSocketAddress &sockAddr, std::size_t count, std::size_t pktSize, Time delay=Time{0}, uint8_t priority=0) const |
| void | L7Receive (uint8_t nodeId, Ptr< const Packet > p, const Address &addr) |
| Function to trace packets received by the server application. | |
| void | SetEvents () |
| Set the list of events to expect in this test run. | |
| Protected Member Functions inherited from ns3::TestCase | |
| TestCase (std::string name) | |
| Constructor. | |
| void | AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK) |
| Add an individual child TestCase to this test suite. | |
| TestCase * | GetParent () const |
| Get the parent of this TestCase. | |
| bool | IsStatusFailure () const |
| Check if any tests failed. | |
| bool | IsStatusSuccess () const |
| Check if all tests passed. | |
| void | SetDataDir (std::string directory) |
| Set the data directory where reference trace files can be found. | |
| void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
| Log the failure of this TestCase. | |
| bool | MustAssertOnFailure () const |
| Check if this run should assert on failure. | |
| bool | MustContinueOnFailure () const |
| Check if this run should continue on failure. | |
| std::string | CreateDataDirFilename (std::string filename) |
| Construct the full path to a file in the data directory. | |
| std::string | CreateTempDirFilename (std::string filename) |
| Construct the full path to a file in a temporary directory. | |
Private Member Functions | |
| void | DoRun () override |
| Implementation to actually run this TestCase. | |
| void | DoSetup () override |
| Implementation to do any local setup required for this TestCase. | |
Private Attributes | |
| Ptr< ListErrorModel > | m_apErrorModel |
| error model to install on the AP MLD | |
| Ptr< ApWifiMac > | m_apMac |
| AP wifi MAC. | |
| Time | m_duration {Seconds(5)} |
| simulation duration | |
| std::list< Events > | m_events |
| list of events for a test run | |
| std::vector< double > | m_jitter {0.2, 0.6} |
| jitter for the initial Beacon frames on the links | |
| Ptr< ListErrorModel > | m_nonApMldErrorModel |
| error model to install on the non-AP MLD | |
| Ptr< ListErrorModel > | m_nonApStaErrorModel |
| error model to install on the non-AP STA | |
| std::size_t | m_processedEvents {0} |
| number of processed events | |
| std::array< std::size_t, 3 > | m_rxPkts {{0, 0, 0}} |
| number of packets received at application layer by each node (index is node ID) | |
| std::vector< Ptr< StaWifiMac > > | m_staMacs |
| STA wifi MACs. | |
| WifiStandard | m_standard |
| the wifi standard for AP and STA | |
Additional Inherited Members | |
| Public Types inherited from ns3::TestCase | |
| enum class | Duration { QUICK = 1 , EXTENSIVE = 2 , TAKES_FOREVER = 3 } |
| How long the test takes to execute. More... | |
Test transmission of broadcast and unicast frames with STAs in Power Save mode.
The test scenario comprises an AP MLD with two links, a non-AP STA (operating on link 0) and a non-AP MLD with two links. The non-AP MLD negotiates a TID-to-Link Mapping such that (both in DL and UL) TID 0 is mapped on both links and TID 2 is mapped on link 1 only. The sequence of events is depicted in the diagram below. Note that, for most of the time, the non-AP STA affiliated with the non-AP MLD and operating on link 0 is in active mode, while the non-AP STA affiliated with the non-AP MLD and operating on link 1 is in power save mode.
The standard supported by the non-AP STA is a parameter of this test, while the non-AP MLD supports the 802.11be standard.
(1) (2) (3) (4) non-AP STA
is set to go
┌──────┐ ┌──────┐ Broadcast ┌─────────┐ ┌──────┐to PS mode
│Beacon│ non-AP STA performs │Beacon│ frame queued │Broadcast│ │Beacon││ ┌───┐
[link 0] │ DTIM │ association │ TIM │ at AP │ │QoS Data │ │ DTIM ││ │Ack│
─────────┴──────┴───────────────────────┴──────┴───────────▼──┴─────────┴──┴──────┴▼┬────┬┴───┴─
│Not buffered │Data│
non-AP MLD performs │(no STA in PS mode) │Null│
┌──────┐ association and sends Data ┌──────┐ │ ┌─────────┐ ┌──────┐ └────┘
│Beacon│ Null for other non-AP STA │Beacon│ │ │Broadcast│ │Beacon│ ┌───┐
[link 1] │ DTIM │ to switch to active mode │ TIM │ │ │QoS Data │ │ DTIM │ │Ack│
─────────────┴──────┴────────────────────────────┴──────┴──▼──┴─────────┴──┴──────┴▲┬────┬┴───┴─
││Data│
││Null│
│└────┘
non-AP STA affiliated
with non-AP MLD on link 1
is set to go to PS mode
(CONTINUED)
(5) (6) (7) (8) (9)
QoS data frame with another broadcast frame 2 frames for non-AP
1 broadcast TID 4 queued for | |queued at AP STA are queued at
frame queued ┌──────┐ non-AP ┌──────┐ ┌─────────┐ ┌────────────────┐ AP and buffered
at AP │ │Beacon│ MLD │Beacon│ │Broadcast│ │ BA agreement + │ │
[link 0] │ │ TIM │ │ DTIM │ │QoS Data │ │unicast QoS Data│ │
───────────▼────────┴──────┴────────┴▼─────┴─┴▼────────┴─┴────────────────┴─▼───────────────────
│ │ │
non-AP STA -sleep--│ │------│ │ │ │----------------------------------------
non-AP STA │ │ │
affiliated ---sleep--------│ │------------------------│ │-
on link 1 │ No DTIM, │
│Buffered because frames still │
│STAs in PS mode buffered │
│ ┌──────┐ │ │ ┌──────┐ ┌─────────┐ ┌─────────┐
│ │Beacon│ │ │ │Beacon│ │Broadcast│ │Broadcast│
[link 1] │ │ TIM │ │ │ │ DTIM │ │QoS Data │ │QoS Data │
───────────▼────────────────┴──────┴─▼────────▼───────────────┴──────┴─┴─────────┴─┴─────────┴──
(CONTINUED)
(10) (11) (12) (13)
┌──────┐ ┌────────┐ ┌──────┐ ┌────────┐
│Beacon│ │QoS Data│ PS-Poll │Beacon│ │QoS Data│
[link 0] │ TIM │ │ to STA │ dropped │ DTIM │ │ to STA │
─────────┴──────┴─┬────┬┴────────┴┬───┬─┬────X───┬────X──────────┴──────┴─┬────┬┴────────┴┬───┬─
│ PS │ │ACK│ │ PS │...│ PS │ │ PS │ │ACK│
│Poll│ └───┘ │Poll│ │Poll│ │Poll│ └───┘
└────┘ └────┘ └────┘ └────┘
non-AP STA │--sleep-│ │-
non-AP STA
affiliated --------sleep-------------------------------│ │-------------------------------
on link 1
┌──────┐ drop broadcast
│Beacon│ frame queued for
[link 1] │ TIM │ TX on link 0
────────────────────────────────────────────────────────┴──────┴────────────────────────────────
(CONTINUED)
(14) (15) (16) (17)
2 QoS Data frames with 2 QoS Data frames
TID 0 for non-AP MLD with TID 2 for
are queued at AP but non-AP MLD are
not buffered as STA on ┌────────┬────────┐ queued and ┌──────┐
link 0 is in active mode │QoS Data│QoS Data│ buffered │Beacon│
[link 0] │ │ to MLD │ to MLD │ │ │ TIM │
───────────────────▼──────┴────────┴────────┴┬──┬────────┴──────┴───────────────────────────────
│ Block Ack │BA│ │
│ agreement └──┘ │
│ establishment │
non-AP STA ------------------sleep----------------------│ │------------------------------
non-AP STA │ │
affiliated │--------sleep-----------------------------------│
on link 1 │ │
┌──────┐ │ │ ┌──────┐ ┌────────┐
│Beacon│ │ │ │Beacon│ │QoS Data│
[link 1] │ DTIM │ │ │ │ TIM │ │ to MLD │
─────────┴──────┴──▼──────────────────────────────▼────────────────┴──────┴─┬────┬┴────────X────
│ PS │
│Poll│
└────┘
(CONTINUED)
(17) (18)
2 QoS Data frames
are queued at
non-AP STA ADDBA
│ ┌───┐Resp ┌───┐ ┌───┐
[link 0] │ │Ack│timer │Ack│ │Ack│
───────────────────────────────────────────────────────▼┬─────┬┴───┴────┬────┬┴───┴┬────┬┴───┴──
│ADDBA│ │QoS │ │QoS │
│ Req │ │Data│ │Data│
└─────┘ └────┘ └────┘
non-AP STA ------------------sleep---------------------│ │--│ │-
non-AP STA
affiliated │--------sleep---------------------------
on link 1
┌────────┐ ┌────────┐
│QoS Data│ │QoS Data│
[link 1] │ to MLD │ │ to MLD │
───────────┬────┬┴────────┴┬───┬──┬────┬┴────────┴┬───┬─────────────────────────────────────────
│ PS │ │ACK│ │ PS │ │ACK│
│Poll│ └───┘ │Poll│ └───┘
└────┘ └────┘
(CONTINUED)
(19) (20) (21)
2 QoS Data frames
┌──────┐ ┌─────┐ with TID 0 are queued ┌─────┐
│Beacon│ │ADDBA│ at non-AP MLD ┌───┐ │ADDBA│
[link 0] │ DTIM │ │Resp │ | │Ack│ │Resp │
─────────┴──────┴──┬────┬┴─────┴┬───┬▼───┬─────┬┴───┴────┴─────┴┬───┬───────────────────────────
│ PS │ │Ack│| │ADDBA│ │Ack│
│Poll│ └───┘| │ Req │ └───┘
└────┘ | └─────┘
non-AP STA │------------------sleep-----------------------------------
non-AP STA |
affiliated --------sleep-------------| backoff |------sleep-----| |--sleep--
on link 1 | can also
| occur on ┌──┐
[link 1] | link 0 │BA│
─────────────────────────────────────▼──────────────────────────────────┬────┬────┬┴──┴─────────
│QoS │QoS │
│Data│Data│
└────┴────┘
(CONTINUED)
(22) (23)
a QoS Data frame frame dropped a QoS Data frame with
with TID 0 for non-AP at AckTimeout, TID 0 for non-AP MLD
MLD is queued at AP non-AP STA on is queued and buffered
MLD but not ┌────┐ link 0 set to at AP ┌──────┐ ┌────┐
buffered | │QoS │ go to ┌───┐ MLD │Beacon│ ┌───┐ │QoS │
[link 0] | │Data│ PS mode│Ack│ |│ TIM │ │BAR│ │Data│
────────────▼─┴────X─────┬────┬┴───┴──────────▼┴──────┴──┬────┬┴───┴┬──┬──┬────┬┴────┴┬───┬─────
| │Data│ | │ PS │ │BA│ │ PS │ │Ack│
| │Null│ | │Poll│ └──┘ │Poll│ └───┘
| └────┘ | └────┘ └────┘
non-AP STA ------------sleep------------------| |----------------------------------------
non-AP STA | |
affiliated | |--sleep--| |----
on link 0 | |
non-AP STA | |
affiliated ---------------sleep------| |-------sleep-------------------------------------
on link 1 | ┌──────┐|
| │Beacon│|
[link 1] | │ DTIM │|
────────────▼─────────────────────────┴──────┴▼─────────────────────────────────────────────────
Definition at line 499 of file power-save-test.cc.
| WifiPowerSaveModeTest::WifiPowerSaveModeTest | ( | WifiStandard | standard | ) |
Constructor.
| standard | the standard supported by the non-AP STA |
Definition at line 612 of file power-save-test.cc.
References ns3::TestCase::TestCase(), ns3::CreateObject(), m_apErrorModel, m_nonApMldErrorModel, m_nonApStaErrorModel, and m_standard.
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 861 of file power-save-test.cc.
References ns3::Simulator::Destroy(), m_events, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Run(), ns3::Seconds(), and ns3::Simulator::Stop().
|
overrideprivatevirtual |
Implementation to do any local setup required for this TestCase.
Subclasses should override this method to perform any costly per-test setup before DoRun is invoked.
Reimplemented from ns3::TestCase.
Definition at line 641 of file power-save-test.cc.
References ns3::WifiHelper::AssignStreams(), ns3::NodeList::Begin(), ns3::Config::ConnectWithoutContext(), ns3::CreateObject(), ns3::WifiPhyHelper::DLT_IEEE802_11_RADIO, ns3::DynamicCast(), ns3::NodeList::End(), ns3::NodeList::GetNNodes(), ns3::PacketSocketHelper::Install(), L7Receive(), m_apErrorModel, m_apMac, m_duration, m_jitter, m_nonApMldErrorModel, m_nonApStaErrorModel, m_staMacs, m_standard, ns3::MakeCallback(), NotifyMpduEnqueued(), NotifyStateChange(), NS_TEST_ASSERT_MSG_NE, ns3::Seconds(), SetEvents(), ns3::PacketSocketAddress::SetProtocol(), ns3::RngSeedManager::SetRun(), ns3::RngSeedManager::SetSeed(), ns3::PacketSocketAddress::SetSingleDevice(), Transmit(), and ns3::WIFI_STANDARD_80211be.
|
protected |
| sockAddr | the packet socket address identifying local outgoing interface and remote address |
| count | the number of packets to generate |
| pktSize | the size of the packets to generate |
| delay | the delay with which traffic generation starts |
| priority | user priority for generated packets |
Definition at line 622 of file power-save-test.cc.
References ns3::CreateObject(), m_duration, ns3::MicroSeconds(), and ns3::Simulator::Now().
|
protected |
Function to trace packets received by the server application.
| nodeId | the ID of the node that received the packet |
| p | the packet |
| addr | the address |
Definition at line 854 of file power-save-test.cc.
References m_rxPkts, and NS_LOG_INFO.
Referenced by DoSetup().
Notify that the given MPDU was enqueued at the AP.
| mpdu | the given MPDU |
Definition at line 887 of file power-save-test.cc.
References NS_LOG_DEBUG.
Referenced by DoSetup().
| void WifiPowerSaveModeTest::NotifyStateChange | ( | uint32_t | nodeId, |
| uint8_t | phyId, | ||
| Time | stateStart, | ||
| Time | stateDuration, | ||
| WifiPhyState | state ) |
Callback invoked when the PHY state helper reports a change in PHY state.
| nodeId | the ID of the node |
| phyId | the ID of the PHY that changed state |
| stateStart | the start time of the period elapsed in the given PHY state |
| stateDuration | the duration of the period elapsed in the given PHY state |
| state | the given PHY state |
Definition at line 872 of file power-save-test.cc.
References ns3::Time::As(), NS_LOG_DEBUG, ns3::Time::S, and ns3::SLEEP.
Referenced by DoSetup().
|
protected |
Set the list of events to expect in this test run.
(1) The AP MLD sends a Beacon frame on each of its two links. Both Beacon frames contain a DTIM and the multicast pending bit is not set. After receiving these Beacon frames, the non-AP STA and the non-AP MLD start the association procedure.
(2) Frames (other than Beacon frames) exchanged before non-AP STA and non-AP MLD are considered associated by the AP MLD are ignored. The following frames are the Data Null/Ack exchange for the non-AP STA affiliated with the non-AP MLD to switch to active mode.
(3) After two other Beacon frames (each sent on a distinct link), a broadcast frame is queued at the AP MLD, which immediately transmits it on both links, given that no STA is in power save mode.
(4) After two other Beacon frames (each sent on a distinct link), the non-AP STA (operating on link 0) and the non-AP STA affiliated with the non-AP MLD and operating on link 1 switch to power save mode by sending a Data Null frame with the PM flag set to 1. After receiving the Ack response, the non-AP STAs put their PHYs to sleep. Also, after transmitting the last Ack response, a broadcast frame is queued at the AP MLD, but it is buffered because there are STAs in power save mode on both links.
(5) The next two Beacon frames (on the two links) do not contain a DTIM, thus the broadcast frames are still buffered. Check that all non-AP STAs operating on the link on which the Beacon frame is transmitted are awake to listen to the Beacon frame and that the non-AP STAs in power save mode return to sleep after the Beacon frame.
(6) The next Beacon frame includes a DTIM and the AID bits in the virtual bitmap corresponding to both AID 0 (buffered group addressed frames on the same link) and AID 1 (buffered group addressed frames on the other link) are both set. Therefore, after receiving the Beacon frame, the non-AP STAs operating on the link on which the Beacon frame was received stay awake to receive the broadcast frames. When the transmission of the Beacon frame starts, a QoS data frame with TID 4 for the non-AP MLD is queued at the AP MLD.
(7) After the Beacon frame including a DTIM, the broadcast frame is sent with the More Data flag set to 0, because at the time the frame is sent no other broadcast frame is queued. Right after starting its transmission, another broadcast frame is queued. The non-AP STA operating on the same link goes to sleep after the reception of the broadcast frame because the More Data flag is set to 0. Given that a broadcast frame with the More Data flag set to 0 is sent, the AP blocks the transmission of group addressed frames and transmits the unicast data frame for the non-AP MLD, which has an affiliated STA in active mode on link 0. The jitter between the initial Beacon frames sent on the two links has been set large enough to have these frames transmitted on the same link as the first Beacon frame before a Beacon frame is transmitted on the other link.
(8) Next, a Beacon frame is transmitted on the other link. It includes a DTIM and the AID bit in the virtual bitmap corresponding to AID 0 (buffered group addressed frames on the same link) and to AID 1 (buffered group addressed frames on the other link) are both set, because the second broadcast frame has not been transmitted on link 0. Again, after receiving the Beacon frame, the non-AP STAs operating on the link on which the Beacon frame was received stay awake to receive the broadcast frames. Also, two unicast frames addressed to the non-AP STA are queued at the AP MLD, but they are buffered because the non-AP STA is in power save mode.
(9) We check that the first broadcast frame has the More Data flag set to 1 and the non-AP STAs operating on the same link stay awake after its reception. The second broadcast frame has the More Data flag set to 0 and the non-AP STAs operating on the same link go to sleep after its reception.
(10) We assume that the Beacon frame on link 0 is sent first. This Beacon frame has the AID bit in the virtual bitmap corresponding to the AID of the non-AP STA set to 1. The non-AP STA is awake before the transmission of the Beacon frame and stays awake afterwards. The non-AP STA sends a PS Poll frame, receives a QoS data frame from the AP (having the More Data flag set to 1) and transmits an Ack. Then, it stays awake to send another PS Poll frame.
(11) The second PS Poll frame is discarded multiple times by the AP MLD for a post reception error. We configure the remote station manager on the non-AP STA to drop the PS Poll after the 5th unsuccessful transmission.
(12) The next transmitted frame is the Beacon frame on link 1. The non-AP STA turned to the sleep state after giving up sending the PS Poll frame (which was dropped) and is still in the sleep state. Drop the broadcast frame that is still buffered for transmission on link 0, so as to avoid a possible collision after the next Beacon frame including a DTIM sent on link 0 between the AP (trying to send the broadcast frame) and the non-AP STA (trying to send a PS-Poll frame)
(13) The next Beacon frame is sent again on link 0. This Beacon frame has again the AID bit in the virtual bitmap corresponding to the AID of the non-AP STA set to 1. The non-AP STA is awake before the transmission of the Beacon frame and stays awake afterwards. The non-AP STA sends a PS Poll frame, receives a QoS data frame from the AP (having the More Data flag set to 0) and transmits an Ack. Then, it goes to sleep because no other QoS data frame is expected to be received from the AP.
(14) The next Beacon frame is sent on link 1. Non-AP STAs operating on link 1 wake up to listen to the Beacon and go to sleep afterwards. After the transmission of the Beacon frame, two unicast data frames with TID 0 are queued at the AP MLD and addressed to the non-AP MLD. Given that TID 0 is mapped on both links and, specifically, is mapped onto link 0, on which an affiliated non-AP STA is operating in active mode, the unicast frames are not buffered and are transmitted on link 0 (aggregated in an A-MPDU) after the frame exchanges to establish the Block Ack agreement in the DL direction. These MPDUs have both the Power Management flag and the More Data flag not set, because the More Data flag is used by the AP MLD when transmitting frames to a non-AP STA in PS mode.
(15) The non-AP STA affiliated with the non-AP MLD and operating on link 0 transmits a BlockAck response. Afterwards, two unicast Data frames with TID 2 are queued at the AP MLD and addressed to the non-AP MLD. These frames are buffered because TID 2 is only mapped to link 1, on which an affiliated non-AP STA in PS mode is operating.
(16) The next frame is a Beacon sent on link 0. The AID bit in the virtual bitmap corresponding to the AID of the non-AP MLD is set to 1 because there are buffered units. The non-AP STA affiliated with the non-AP MLD and operating on link 0 is in active mode, hence it is not supposed to send a PS Poll frame.
(17) The next frame is thus a Beacon sent on link 1. The AID bit in the virtual bitmap corresponding to the AID of the non-AP MLD is still set to 1 because there are buffered units. The non-AP STA affiliated with the non-AP MLD and operating on link 1 in PS mode stays awake to send a PS Poll frame. The AP MLD sends the first buffered unit, which is corrupted at the receiver. After the timeout, the non-AP STA affiliated with the non-AP MLD and operating on link 1 sends again a PS Poll, receives a buffered unit and sends the Ack response (repeated twice because the two buffered units are sent one at a time). After the last Ack response, two QoS Data frames are queued at the non-AP STA and addressed to the AP MLD.
(18) Two QoS data frames have been queued at the non-AP STA, which is in sleep state. The non-AP STA does not wait until the next Beacon, but it is immediately awaken to start a TXOP. Actually, the queued frames trigger the establishment of a Block Ack agreement in the uplink direction; the non-AP STA sends an ADDBA Request, which is acknowledged by the AP. Then, the AP buffers the ADDBA Response, because the non-AP STA is in power save mode; the non-AP STA has blocked transmission of QoS data frames (while waiting for ADDBA Response) and thus releases the channel, generates backoff and restarts channel access. When the non-AP STA is granted channel access again, it still has nothing to transmit and this time it does not restart channel access and goes to sleep. When the ADDBA Response timer expires, the transmission of the QoS data frames is unblocked, the non-AP STA wakes up and transmits the two QoS data frames using normal acknowledgment; afterwards, the non-AP STA goes back to sleep.
(19) The next Beacon frame sent on link 0 indicates that the AP has a buffered unit (the ADDBA Response) for the non-AP STA, which sends a PS-Poll to request the AP to transmit it.
(20) Frames with TID 0 can be transmitted on both links, hence the non-AP MLD requests channel access on both links. This implies that the non-AP STA affiliated with the non-AP MLD and operating on link 1 awakens and generates a new backoff value. The backoff counter of the non-AP STA affiliated with the non-AP MLD and operating on link 0 has likely reached zero already, hence the management frames to establish the BA agreement are sent on link 0. During such frame exchange, the backoff counter on link 1 reaches zero, channel access is granted but no frame is available for transmission (queues are blocked while BA is being established), hence the non-AP STA affiliated with the non-AP MLD and operating on link 1 is put to sleep. When the non-AP MLD completes the transmission of the Ack in response to the ADDBA Response frame, transmissions are unblocked and channel access is requested on both links. Hence, the non-AP STA affiliated with the non-AP MLD and operating on link 1 awakens and generates a new backoff value.
(21) UL QoS Data frames can now be sent in an A-MPDU on either link 0 or 1 (depends on the generated backoff values)
(22) The AP MLD transmits the QoS data with TID 0 for the non-AP MLD on link 0, but we force a receive error at the non-AP MLD. The frame retry limit on the AP is set to 1, so that the QoS data frame is dropped when the Ack timeout occurs; consequently, a BlockAckReq is enqueued. The non-AP MLD is then configured to switch the affiliated non-AP STA operating on link 0, too, to powersave mode. The affiliated non-AP STA operating on link 0 is put to sleep after receiving the Ack in response to the sent Data Null frame.
(23) When the Beacon frame is sent on link 1, another QoS data with TID 0 for the non-AP MLD is queued at the AP MLD, which is now buffered because both STAs affiliated with the non-AP MLD are in powersave mode. The next Beacon frame, on link 0, indicates that frames are buffered for the non-AP MLD, which sends a two PS-Poll frames: the AP sends the BlockAckReq (ack'ed by a BlockAck frame) in response to the first PS-Poll and the QoS Data frame (ack'ed by a Normal Ack) in response to the second PS-Poll frame.
Definition at line 893 of file power-save-test.cc.
References ns3::Mac48Address::GetBroadcast(), m_apMac, m_events, m_processedEvents, m_staMacs, ns3::MAX_PROPAGATION_DELAY, ns3::MilliSeconds(), ns3::Simulator::Now(), NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, ns3::PeekPointer(), ns3::Simulator::Schedule(), ns3::PacketSocketAddress::SetPhysicalAddress(), ns3::PacketSocketAddress::SetProtocol(), ns3::PacketSocketAddress::SetSingleDevice(), ns3::SLEEP, ns3::WIFI_MAC_CTL_ACK, ns3::WIFI_MAC_DATA_NULL, ns3::WIFI_MAC_MGT_BEACON, ns3::WIFI_PM_ACTIVE, and ns3::WIFI_PM_POWERSAVE.
Referenced by DoSetup().
| void WifiPowerSaveModeTest::Transmit | ( | Ptr< WifiMac > | mac, |
| uint8_t | phyId, | ||
| WifiConstPsduMap | psduMap, | ||
| WifiTxVector | txVector, | ||
| Watt_u | txPower ) |
Callback invoked when PHY receives a PSDU to transmit.
| mac | the MAC transmitting the PSDUs |
| phyId | the ID of the PHY transmitting the PSDUs |
| psduMap | the PSDU map |
| txVector | the TX vector |
| txPower | the tx power |
Definition at line 796 of file power-save-test.cc.
References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiMacHeader::GetTypeString(), m_apMac, m_events, m_processedEvents, m_staMacs, ns3::Time::MS, ns3::Simulator::Now(), NS_LOG_INFO, NS_TEST_ASSERT_MSG_EQ, NS_TEST_EXPECT_MSG_EQ, and ns3::Time::US.
Referenced by DoSetup().
|
private |
error model to install on the AP MLD
Definition at line 607 of file power-save-test.cc.
Referenced by WifiPowerSaveModeTest(), and DoSetup().
AP wifi MAC.
Definition at line 599 of file power-save-test.cc.
Referenced by DoSetup(), SetEvents(), and Transmit().
simulation duration
Definition at line 603 of file power-save-test.cc.
Referenced by DoSetup(), and GetApplication().
|
private |
list of events for a test run
Definition at line 601 of file power-save-test.cc.
Referenced by DoRun(), SetEvents(), and Transmit().
|
private |
jitter for the initial Beacon frames on the links
Definition at line 606 of file power-save-test.cc.
Referenced by DoSetup().
|
private |
error model to install on the non-AP MLD
Definition at line 609 of file power-save-test.cc.
Referenced by WifiPowerSaveModeTest(), and DoSetup().
|
private |
error model to install on the non-AP STA
Definition at line 608 of file power-save-test.cc.
Referenced by WifiPowerSaveModeTest(), and DoSetup().
|
private |
number of processed events
Definition at line 602 of file power-save-test.cc.
Referenced by SetEvents(), and Transmit().
|
private |
number of packets received at application layer by each node (index is node ID)
Definition at line 604 of file power-save-test.cc.
Referenced by L7Receive().
|
private |
STA wifi MACs.
Definition at line 600 of file power-save-test.cc.
Referenced by DoSetup(), SetEvents(), and Transmit().
|
private |
the wifi standard for AP and STA
Definition at line 598 of file power-save-test.cc.
Referenced by WifiPowerSaveModeTest(), and DoSetup().