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() override;
49
50 protected:
51 void DoDispose() override;
52 void DoSetWifiMac(Ptr<ApWifiMac> mac) override;
53
54 /**
55 * Store information about the MAC header of the MPDU being received on the given link.
56 *
57 * \param linkId the ID of the given link
58 * \param macHdr the MAC header of the MPDU being received
59 * \param txVector the TXVECTOR used to transmit the PSDU
60 * \param psduDuration the remaining duration of the PSDU
61 */
62 void ReceivedMacHdr(uint8_t linkId,
63 const WifiMacHeader& macHdr,
64 const WifiTxVector& txVector,
65 Time psduDuration);
66
67 private:
68 std::set<uint8_t>
69 m_blockedLinksOnMacHdrRx; //!< links that have been blocked upon receiving a MAC header
70 bool m_useNotifiedMacHdr; //!< whether to use the information about the MAC header of
71 //!< the MPDU being received (if notified by the PHY)
72 bool m_earlySwitchToListening; //!< Whether the AP MLD assumes that an EMLSR client is able to
73 //!< detect at the end of the MAC header that a PSDU is not
74 //!< addressed to it and immediately starts switching to
75 //!< listening mode
76 bool m_waitTransDelayOnPsduRxError; //!< Whether the AP MLD waits for a response timeout after a
77 //!< PSDU reception error before starting the transition
78 //!< delay
79 bool m_updateCwAfterFailedIcf; //!< Whether the AP MLD shall double the CW upon CTS timeout
80 //!< after an MU-RTS in case all the clients solicited by the
81 //!< MU-RTS are EMLSR clients that have sent a frame to the AP
82};
83
84} // namespace ns3
85
86#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.
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:48
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.