A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
advanced-ap-emlsr-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Universita' di Napoli Federico II
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Stefano Avallone <stavallo@unina.it>
7 */
8
9#ifndef ADVANCED_AP_EMLSR_MANAGER_H
10#define ADVANCED_AP_EMLSR_MANAGER_H
11
13
14#include "ns3/nstime.h"
15
16#include <set>
17
18namespace ns3
19{
20
21class ApWifiMac;
22class WifiMacHeader;
23class WifiPsdu;
24class WifiTxVector;
25
26/**
27 * @ingroup wifi
28 *
29 * AdvancedApEmlsrManager is an advanced AP EMLSR manager.
30 */
32{
33 public:
34 /**
35 * @brief Get the type ID.
36 * @return the object TypeId
37 */
38 static TypeId GetTypeId();
39
41 ~AdvancedApEmlsrManager() override;
42
43 void NotifyPsduRxOk(uint8_t linkId, Ptr<const WifiPsdu> psdu) override;
44 void NotifyPsduRxError(uint8_t linkId, Ptr<const WifiPsdu> psdu) override;
46 const WifiTxVector& txVector,
47 WifiPhyBand band) override;
48 bool UpdateCwAfterFailedIcf() const override;
49 bool ReportFailedIcf() const override;
50
51 protected:
52 void DoDispose() override;
53 void DoSetWifiMac(Ptr<ApWifiMac> mac) override;
54
55 /**
56 * Store information about the MAC header of the MPDU being received on the given link.
57 *
58 * @param linkId the ID of the given link
59 * @param macHdr the MAC header of the MPDU being received
60 * @param txVector the TXVECTOR used to transmit the PSDU
61 * @param psduDuration the remaining duration of the PSDU
62 */
63 void ReceivedMacHdr(uint8_t linkId,
64 const WifiMacHeader& macHdr,
65 const WifiTxVector& txVector,
66 Time psduDuration);
67
68 private:
69 std::set<uint8_t>
70 m_blockedLinksOnMacHdrRx; //!< links that have been blocked upon receiving a MAC header
71 bool m_useNotifiedMacHdr; //!< whether to use the information about the MAC header of
72 //!< the MPDU being received (if notified by the PHY)
73 bool m_earlySwitchToListening; //!< Whether the AP MLD assumes that an EMLSR client is able to
74 //!< detect at the end of the MAC header that a PSDU is not
75 //!< addressed to it and immediately starts switching to
76 //!< listening mode
77 bool m_waitTransDelayOnPsduRxError; //!< Whether the AP MLD waits for a response timeout after a
78 //!< PSDU reception error before starting the transition
79 //!< delay
80 bool m_updateCwAfterFailedIcf; //!< Whether the AP MLD shall double the CW upon CTS timeout
81 //!< after an MU-RTS in case all the clients solicited by the
82 //!< MU-RTS are EMLSR clients that have sent a frame to the AP
83 bool m_reportFailedIcf; //!< Whether the AP MLD shall report an ICF failure to the remote
84 //!< station manager when all the clients solicited by the MU-RTS
85 //!< are EMLSR clients that have sent a frame to the AP
86};
87
88} // namespace ns3
89
90#endif /* ADVANCED_AP_EMLSR_MANAGER_H */
AdvancedApEmlsrManager is an advanced AP EMLSR manager.
bool m_updateCwAfterFailedIcf
Whether the AP MLD shall double the CW upon CTS timeout.
bool m_reportFailedIcf
Whether the AP MLD shall report an ICF failure to the remote station manager when all the clients sol...
void DoSetWifiMac(Ptr< ApWifiMac > mac) override
Allow subclasses to take actions when the MAC is set.
void ReceivedMacHdr(uint8_t linkId, const WifiMacHeader &macHdr, const WifiTxVector &txVector, Time psduDuration)
Store information about the MAC header of the MPDU being received on the given link.
bool m_useNotifiedMacHdr
whether to use the information about the MAC header of the MPDU being received (if notified by the PH...
bool m_waitTransDelayOnPsduRxError
Whether the AP MLD waits for a response timeout after a PSDU reception error before starting the tran...
Time GetDelayOnTxPsduNotForEmlsr(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, WifiPhyBand band) override
This method is intended to be called when the AP MLD starts transmitting an SU frame that is not addr...
std::set< uint8_t > m_blockedLinksOnMacHdrRx
links that have been blocked upon receiving a MAC header
void NotifyPsduRxError(uint8_t linkId, Ptr< const WifiPsdu > psdu) override
This method is called when the reception of a PSDU fails on the given link.
void NotifyPsduRxOk(uint8_t linkId, Ptr< const WifiPsdu > psdu) override
This method is called when the reception of a PSDU succeeds on the given link.
void DoDispose() override
Destructor implementation.
static TypeId GetTypeId()
Get the type ID.
bool m_earlySwitchToListening
Whether the AP MLD assumes that an EMLSR client is able to detect at the end of the MAC header that a...
DefaultApEmlsrManager is the default AP EMLSR manager.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:49
Implements the IEEE 802.11 MAC header.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiPhyBand
Identifies the PHY band.
Every class exported by the ns3 library is enclosed in the ns3 namespace.