A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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 AP_EMLSR_MANAGER_H
10#define AP_EMLSR_MANAGER_H
11
12#include "ns3/object.h"
13#include "ns3/wifi-phy-band.h"
14
15namespace ns3
16{
17
18class ApWifiMac;
19class EhtFrameExchangeManager;
20class Time;
21class WifiPsdu;
22class WifiTxVector;
23
24/**
25 * \ingroup wifi
26 *
27 * ApEmlsrManager is an abstract base class defining the API that EHT AP MLDs with
28 * EMLSR activated can use to handle the operations on the EMLSR links of EMLSR clients
29 */
30class ApEmlsrManager : public Object
31{
32 public:
33 /**
34 * \brief Get the type ID.
35 * \return the object TypeId
36 */
37 static TypeId GetTypeId();
39 ~ApEmlsrManager() override;
40
41 /**
42 * Set the wifi MAC. Note that it must be the MAC of an EHT AP MLD.
43 *
44 * \param mac the wifi MAC
45 */
46 void SetWifiMac(Ptr<ApWifiMac> mac);
47
48 /**
49 * This method is called when the reception of a PSDU succeeds on the given link.
50 *
51 * \param linkId the ID of the given link
52 * \param psdu the PSDU whose reception succeeded
53 */
54 virtual void NotifyPsduRxOk(uint8_t linkId, Ptr<const WifiPsdu> psdu);
55
56 /**
57 * This method is called when the reception of a PSDU fails on the given link.
58 *
59 * \param linkId the ID of the given link
60 * \param psdu the PSDU whose reception failed
61 */
62 virtual void NotifyPsduRxError(uint8_t linkId, Ptr<const WifiPsdu> psdu);
63
64 /**
65 * This method is intended to be called when the AP MLD starts transmitting an SU frame that
66 * is not addressed to EMLSR clients that were previously involved in the ongoing DL TXOP.
67 *
68 * \param psdu the PSDU being transmitted
69 * \param txVector the TXVECTOR used to transmit the PSDU
70 * \param band the PHY band in which the PSDU is being transmitted
71 * \return the delay after which the AP MLD starts the transition delay for the EMLSR client
72 */
74 const WifiTxVector& txVector,
75 WifiPhyBand band) = 0;
76
77 /**
78 * \return whether the AP MLD shall double the CW upon CTS timeout after an MU-RTS in case
79 * all the clients solicited by the MU-RTS are EMLSR clients that have sent (or
80 * are sending) a frame to the AP
81 */
82 virtual bool UpdateCwAfterFailedIcf() = 0;
83
84 protected:
85 void DoDispose() override;
86
87 /**
88 * Allow subclasses to take actions when the MAC is set.
89 *
90 * \param mac the wifi MAC
91 */
92 virtual void DoSetWifiMac(Ptr<ApWifiMac> mac);
93
94 /**
95 * \return the MAC of the AP MLD managed by this AP EMLSR Manager.
96 */
98
99 /**
100 * \param linkId the ID of the given link
101 * \return the EHT FrameExchangeManager attached to the AP operating on the given link
102 */
103 Ptr<EhtFrameExchangeManager> GetEhtFem(uint8_t linkId) const;
104
105 private:
106 Ptr<ApWifiMac> m_apMac; //!< the MAC of the managed AP MLD
107};
108
109} // namespace ns3
110
111#endif /* AP_EMLSR_MANAGER_H */
ApEmlsrManager is an abstract base class defining the API that EHT AP MLDs with EMLSR activated can u...
virtual Time GetDelayOnTxPsduNotForEmlsr(Ptr< const WifiPsdu > psdu, const WifiTxVector &txVector, WifiPhyBand band)=0
This method is intended to be called when the AP MLD starts transmitting an SU frame that is not addr...
virtual void DoSetWifiMac(Ptr< ApWifiMac > mac)
Allow subclasses to take actions when the MAC is set.
virtual void NotifyPsduRxError(uint8_t linkId, Ptr< const WifiPsdu > psdu)
This method is called when the reception of a PSDU fails on the given link.
virtual void NotifyPsduRxOk(uint8_t linkId, Ptr< const WifiPsdu > psdu)
This method is called when the reception of a PSDU succeeds on the given link.
Ptr< ApWifiMac > GetApMac() const
static TypeId GetTypeId()
Get the type ID.
Ptr< ApWifiMac > m_apMac
the MAC of the managed AP MLD
Ptr< EhtFrameExchangeManager > GetEhtFem(uint8_t linkId) const
void DoDispose() override
Destructor implementation.
void SetWifiMac(Ptr< ApWifiMac > mac)
Set the wifi MAC.
virtual bool UpdateCwAfterFailedIcf()=0
A base class which provides memory management and object aggregation.
Definition object.h:78
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
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.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition nstime.h:828
Every class exported by the ns3 library is enclosed in the ns3 namespace.