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;
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() const = 0;
83
84 /**
85 * @return whether the AP MLD shall report an ICF failure to the remote station manager when
86 * all the clients solicited by the MU-RTS are EMLSR clients that have sent (or are
87 * sending) a frame to the AP
88 */
89 virtual bool ReportFailedIcf() const = 0;
90
91 protected:
92 void DoDispose() override;
93
94 /**
95 * Allow subclasses to take actions when the MAC is set.
96 *
97 * @param mac the wifi MAC
98 */
99 virtual void DoSetWifiMac(Ptr<ApWifiMac> mac);
100
101 /**
102 * @return the MAC of the AP MLD managed by this AP EMLSR Manager.
103 */
104 Ptr<ApWifiMac> GetApMac() const;
105
106 /**
107 * @param linkId the ID of the given link
108 * @return the EHT FrameExchangeManager attached to the AP operating on the given link
109 */
110 Ptr<EhtFrameExchangeManager> GetEhtFem(uint8_t linkId) const;
111
112 private:
113 Ptr<ApWifiMac> m_apMac; //!< the MAC of the managed AP MLD
114};
115
116} // namespace ns3
117
118#endif /* AP_EMLSR_MANAGER_H */
virtual bool UpdateCwAfterFailedIcf() const =0
virtual bool ReportFailedIcf() const =0
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.
Wi-Fi AP state machine.
Definition ap-wifi-mac.h:60
EhtFrameExchangeManager handles the frame exchange sequences for EHT stations.
Object()
Constructor.
Definition object.cc:96
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:66
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:49
WifiPsdu stores an MPDU, S-MPDU or A-MPDU, by keeping header(s) and payload(s) separate for each cons...
Definition wifi-psdu.h:33
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.