9#ifndef POWER_SAVE_MANAGER_H
10#define POWER_SAVE_MANAGER_H
16#include "ns3/nstime.h"
17#include "ns3/object.h"
18#include "ns3/traced-callback.h"
78 const Time& timestamp,
266 std::map<linkId_t, bool>
Object()
Caller graph was not generated because of its size.
PowerSaveManager is an abstract base class.
void NotifyPmModeChanged(WifiPowerManagementMode pmMode, linkId_t linkId)
Notify that the Power Management mode of the non-AP STA operating on the given link has changed.
Ptr< StaWifiMac > m_staMac
MAC which is using this Power Save Manager.
Ptr< StaWifiMac > GetStaMac() const
void DoDispose() override
Destructor implementation.
TracedCallback< linkId_t, WifiPowerManagementMode > m_pmModeLogger
link ID-indexed power management mode logger
virtual void DoNotifyRequestAccess(Ptr< Txop > txop, linkId_t linkId)=0
Notify subclasses that the given TXOP is requesting channel access on the given link.
~PowerSaveManager() override
uint32_t GetListenInterval() const
virtual void DoNotifyDisassociation()=0
Notify subclasses that the non-AP STA/MLD has disassociated.
StaInfo & GetStaInfo(linkId_t linkId)
Get the information about the STA operating on the given link.
std::map< linkId_t, bool > m_linkIdEnableMap
a link ID-indexed map indicating whether to enable or not power save mode on the link with the given ...
virtual void DoNotifyReceivedFrameAfterPsPoll(Ptr< const WifiMpdu > mpdu, linkId_t linkId)=0
Notify subclasses of the reception of a frame in response to a PS-Poll frame on the given link.
void NotifyAssocCompleted()
Notify that the non-AP STA/MLD has completed association with an AP.
void NotifyReceivedFrameAfterPsPoll(Ptr< const WifiMpdu > mpdu, linkId_t linkId)
Notify the reception of a frame in response to a PS-Poll frame on the given link.
void DoInitialize() override
Initialize() implementation.
virtual void DoNotifyPmModeChanged(WifiPowerManagementMode pmMode, linkId_t linkId)=0
Notify subclasses that the Power Management mode of the non-AP STA operating on the given link has ch...
bool HasRequestedOrGainedChannel(linkId_t linkId) const
Get whether any Access Category has requested (or gained) the channel on the given link.
void TxDropped(WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)
Notify that the given MPDU has been discarded for the given reason.
void NotifyReceivedGroupcast(Ptr< const WifiMpdu > mpdu, linkId_t linkId)
Notify the reception of a groupcast frame (possibly after a DTIM) on the given link.
void SetPowerSaveMode(const std::map< linkId_t, bool > &linkIdEnableMap)
Enable or disable Power Save mode on a given set of links.
void NotifyChannelReleased(Ptr< Txop > txop, linkId_t linkId)
Notify that the given TXOP has released the channel on the given link.
void NotifyRequestAccess(Ptr< Txop > txop, linkId_t linkId)
Notify that the given TXOP is requesting channel access on the given link.
uint32_t m_listenInterval
beacon listen interval
std::optional< Time > GetTimeUntilNextTbtt(linkId_t linkId) const
static TypeId GetTypeId()
Get the type ID.
virtual void DoNotifyAssocCompleted()=0
Notify subclasses that the non-AP STA/MLD has completed association with an AP.
virtual void DoNotifyReceivedBeacon(const MgtBeaconHeader &beacon, linkId_t linkId)=0
Notify subclasses that a Beacon frame has been received from the associated AP on the given link.
std::map< linkId_t, StaInfo > m_staInfo
link ID-indexed map of STA infos
virtual void DoTxDropped(WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu)=0
Notify subclasses that the given MPDU has been discarded for the given reason.
virtual void DoNotifyChannelReleased(Ptr< Txop > txop, linkId_t linkId)=0
Notify subclasses that the given TXOP is releasing the channel on the given link.
virtual void DoNotifyReceivedGroupcast(Ptr< const WifiMpdu > mpdu, linkId_t linkId)=0
Notify subclasses of the reception of a groupcast frame (possibly after a DTIM) on the given link.
void NotifyBeaconIntervalAndTimestamp(const Time &beaconInterval, const Time ×tamp, linkId_t linkId)
This function is normally used to notify the Beacon interval and timestamp included in the last Beaco...
void(*)(linkId_t, WifiPowerManagementMode) PmModeChangeCallback
TracedCallback signature for power management mode change events.
void SetWifiMac(Ptr< StaWifiMac > mac)
Set the MAC which is using this Power Save Manager.
void NotifyReceivedBeacon(Ptr< const WifiMpdu > mpdu, linkId_t linkId)
Notify that a Beacon frame has been received from the associated AP on the given link.
void NotifyDisassociation()
Notify that the non-AP STA/MLD has disassociated.
Smart pointer class similar to boost::intrusive_ptr.
The Wifi MAC high model for a non-AP STA in a BSS.
Simulation virtual time values and global simulation resolution.
Forward calls to a chain of Callback.
a unique identifier for an interface.
WifiMpdu stores a (const) packet along with a MAC header.
WifiMacDropReason
The reason why an MPDU was dropped.
WifiPowerManagementMode
Enumeration for power management modes.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t linkId_t
IEEE 802.11be D7.0 Figure 9-207e—Link ID Info field format.
Information about each STA operating on a given link.
bool pendingUnicast
AP has buffered unicast frame(s) (set from last TIM and updated as frames are received from the AP).
Time beaconInterval
Beacon interval advertised by the AP.
bool pendingGroupcast
AP has buffered groupcast frame(s) (set from last TIM and updated as frames are received from the AP)...
Time lastBeaconTimestamp
last time a Beacon was received from the AP