DefaultPowerSaveManager is the default power save manager. More...
#include "default-power-save-manager.h"
Public Member Functions | |
| DefaultPowerSaveManager () | |
| ~DefaultPowerSaveManager () override | |
| Public Member Functions inherited from ns3::PowerSaveManager | |
| ~PowerSaveManager () override | |
| uint32_t | GetListenInterval () const |
| std::optional< Time > | GetTimeUntilNextTbtt (linkId_t linkId) const |
| void | NotifyAssocCompleted () |
| Notify that the non-AP STA/MLD has completed association with an AP. | |
| 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 Beacon frame advertised by the AP this device is going to associate with. | |
| void | NotifyChannelReleased (Ptr< Txop > txop, linkId_t linkId) |
| Notify that the given TXOP has released the channel on the given link. | |
| void | NotifyDisassociation () |
| Notify that the non-AP STA/MLD has disassociated. | |
| 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. | |
| 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 | 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 | NotifyReceivedGroupcast (Ptr< const WifiMpdu > mpdu, linkId_t linkId) |
| Notify the reception of a groupcast frame (possibly after a DTIM) 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. | |
| void | SetPowerSaveMode (const std::map< linkId_t, bool > &linkIdEnableMap) |
| Enable or disable Power Save mode on a given set of links. | |
| void | SetWifiMac (Ptr< StaWifiMac > mac) |
| Set the MAC which is using this Power Save Manager. | |
| void | TxDropped (WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu) |
| Notify that the given MPDU has been discarded for the given reason. | |
| Public Member Functions inherited from ns3::Object | |
| Object () | |
| Caller graph was not generated because of its size. | |
| ~Object () override | |
| Destructor. | |
| void | AggregateObject (Ptr< Object > other) |
| Aggregate two Objects together. | |
| void | Dispose () |
| Dispose of this Object. | |
| AggregateIterator | GetAggregateIterator () const |
| Get an iterator to the Objects aggregated to this one. | |
| TypeId | GetInstanceTypeId () const final |
| Get the most derived TypeId for this Object. | |
| template<> | |
| Ptr< Object > | GetObject () const |
| Specialization of () for objects of type ns3::Object. | |
| template<typename T> | |
| Ptr< T > | GetObject () const |
| Get a pointer to the requested aggregated Object. | |
| template<> | |
| Ptr< Object > | GetObject (TypeId tid) const |
| Specialization of (TypeId tid) for objects of type ns3::Object. | |
| template<typename T> | |
| Ptr< T > | GetObject (TypeId tid) const |
| Get a pointer to the requested aggregated Object by TypeId. | |
| void | Initialize () |
| Invoke DoInitialize on all Objects aggregated to this one. | |
| bool | IsInitialized () const |
| Check if the object has been initialized. | |
| void | UnidirectionalAggregateObject (Ptr< Object > other) |
| Aggregate an Object to another Object. | |
| Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| Default constructor. | |
| uint32_t | GetReferenceCount () const |
| Get the reference count of the object. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment operator. | |
| void | Ref () const |
| Increment the reference count. | |
| void | Unref () const |
| Decrement the reference count. | |
| Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () |
| Virtual destructor. | |
| void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
| Get the value of an attribute, raising fatal errors if unsuccessful. | |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
| Get the value of an attribute without raising errors. | |
| void | SetAttribute (std::string name, const AttributeValue &value) |
| Set a single attribute, raising fatal errors if unsuccessful. | |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
| Set a single attribute without raising errors. | |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
| Connect a TraceSource to a Callback with a context. | |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
| Connect a TraceSource to a Callback without a context. | |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
| Disconnect from a TraceSource a Callback previously connected with a context. | |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
| Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
| Static Public Member Functions inherited from ns3::PowerSaveManager | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
| Static Public Member Functions inherited from ns3::Object | |
| static TypeId | GetTypeId () |
| Register this type. | |
| Static Public Member Functions inherited from ns3::ObjectBase | |
| static TypeId | GetTypeId () |
| Get the type ID. | |
Protected Member Functions | |
| void | DoNotifyAssocCompleted () override |
| Notify subclasses that the non-AP STA/MLD has completed association with an AP. | |
| void | DoNotifyChannelReleased (Ptr< Txop > txop, linkId_t linkId) override |
| Notify subclasses that the given TXOP is releasing the channel on the given link. | |
| void | DoNotifyDisassociation () override |
| Notify subclasses that the non-AP STA/MLD has disassociated. | |
| void | DoNotifyPmModeChanged (WifiPowerManagementMode pmMode, linkId_t linkId) override |
| Notify subclasses that the Power Management mode of the non-AP STA operating on the given link has changed. | |
| void | DoNotifyReceivedBeacon (const MgtBeaconHeader &beacon, linkId_t linkId) override |
| Notify subclasses that a Beacon frame has been received from the associated AP on the given link. | |
| void | DoNotifyReceivedFrameAfterPsPoll (Ptr< const WifiMpdu > mpdu, linkId_t linkId) override |
| Notify subclasses of the reception of a frame in response to a PS-Poll frame on the given link. | |
| void | DoNotifyReceivedGroupcast (Ptr< const WifiMpdu > mpdu, linkId_t linkId) override |
| Notify subclasses of the reception of a groupcast frame (possibly after a DTIM) on the given link. | |
| void | DoNotifyRequestAccess (Ptr< Txop > txop, linkId_t linkId) override |
| Notify subclasses that the given TXOP is requesting channel access on the given link. | |
| void | DoTxDropped (WifiMacDropReason reason, Ptr< const WifiMpdu > mpdu) override |
| Notify subclasses that the given MPDU has been discarded for the given reason. | |
| void | GoToSleepIfPossible (linkId_t linkId) |
| Put the PHY operating on the given link to sleep, if no reason to stay awake. | |
| Protected Member Functions inherited from ns3::PowerSaveManager | |
| void | DoDispose () override |
| Destructor implementation. | |
| void | DoInitialize () override |
| Initialize() implementation. | |
| StaInfo & | GetStaInfo (linkId_t linkId) |
| Get the information about the STA operating on the given link. | |
| Ptr< StaWifiMac > | GetStaMac () const |
| bool | HasRequestedOrGainedChannel (linkId_t linkId) const |
| Get whether any Access Category has requested (or gained) the channel on the given link. | |
| Protected Member Functions inherited from ns3::Object | |
| Object (const Object &o) | |
| Copy an Object. | |
| virtual void | NotifyNewAggregate () |
| Notify all Objects aggregated to this one of a new Object being aggregated. | |
| Protected Member Functions inherited from ns3::ObjectBase | |
| void | ConstructSelf (const AttributeConstructionList &attributes) |
| Complete construction of ObjectBase; invoked by derived classes. | |
| virtual void | NotifyConstructionCompleted () |
| Notifier called once the ObjectBase is fully constructed. | |
Protected Attributes | |
| Time | m_listenAdvance |
| the amount of time the STA wakes up in advance prior to the TBTT | |
| Time | m_psmTimeout |
| the extra time during which the PHY is kept in active state before being put to sleep state | |
| std::map< linkId_t, EventId > | m_sleepEvents |
| events scheduled to set PHYs to sleep | |
| std::map< linkId_t, EventId > | m_wakeUpEvents |
| events scheduled to wake up PHYs | |
Additional Inherited Members | |
| Related Symbols inherited from ns3::ObjectBase | |
| static TypeId | GetObjectIid () |
| Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
DefaultPowerSaveManager is the default power save manager.
ns3::DefaultPowerSaveManager is accessible through the following paths with Config::Set and Config::Connect:
Time +0ns:+9.22337e+18ns Time +0ns:+9.22337e+18ns ns3::Ptr<N3ns39PairValueINS_13UintegerValueENS_12BooleanValueEEE> No TraceSources are defined for this type
Group: Wifi
Size of this type is 304 bytes (on a 64-bit architecture).
Definition at line 22 of file default-power-save-manager.h.
| ns3::DefaultPowerSaveManager::DefaultPowerSaveManager | ( | ) |
Definition at line 51 of file default-power-save-manager.cc.
References NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
override |
Definition at line 56 of file default-power-save-manager.cc.
References NS_LOG_FUNCTION_NOARGS.
|
overrideprotectedvirtual |
Notify subclasses that the non-AP STA/MLD has completed association with an AP.
Implements ns3::PowerSaveManager.
Definition at line 146 of file default-power-save-manager.cc.
References ns3::PowerSaveManager::GetStaMac(), GoToSleepIfPossible(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WIFI_PM_POWERSAVE.
|
overrideprotectedvirtual |
Notify subclasses that the given TXOP is releasing the channel on the given link.
| txop | the DCF/EDCAF releasing the channel |
| linkId | the ID of the given link |
Implements ns3::PowerSaveManager.
Definition at line 261 of file default-power-save-manager.cc.
References GoToSleepIfPossible(), and NS_LOG_FUNCTION.
|
overrideprotectedvirtual |
Notify subclasses that the non-AP STA/MLD has disassociated.
Implements ns3::PowerSaveManager.
Definition at line 162 of file default-power-save-manager.cc.
References m_sleepEvents, m_wakeUpEvents, and NS_LOG_FUNCTION.
|
overrideprotectedvirtual |
Notify subclasses that the Power Management mode of the non-AP STA operating on the given link has changed.
| pmMode | the new PM mode |
| linkId | the ID of the given link |
Implements ns3::PowerSaveManager.
Definition at line 178 of file default-power-save-manager.cc.
References m_sleepEvents, m_wakeUpEvents, NS_LOG_FUNCTION, and ns3::WIFI_PM_ACTIVE.
|
overrideprotectedvirtual |
Notify subclasses that a Beacon frame has been received from the associated AP on the given link.
| beacon | the Beacon frame |
| linkId | the ID of the given link |
Implements ns3::PowerSaveManager.
Definition at line 197 of file default-power-save-manager.cc.
References ns3::PowerSaveManager::GetStaInfo(), ns3::PowerSaveManager::GetStaMac(), GoToSleepIfPossible(), NS_LOG_FUNCTION, and ns3::WIFI_PM_POWERSAVE.
|
overrideprotectedvirtual |
Notify subclasses of the reception of a frame in response to a PS-Poll frame on the given link.
The notification is sent a SIFS after the reception of the frame.
| mpdu | the received MPDU |
| linkId | the ID of the given link |
Implements ns3::PowerSaveManager.
Definition at line 217 of file default-power-save-manager.cc.
References ns3::PowerSaveManager::GetStaInfo(), ns3::PowerSaveManager::GetStaMac(), GoToSleepIfPossible(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.
|
overrideprotectedvirtual |
Notify subclasses of the reception of a groupcast frame (possibly after a DTIM) on the given link.
| mpdu | the received MPDU |
| linkId | the ID of the given link |
Implements ns3::PowerSaveManager.
Definition at line 233 of file default-power-save-manager.cc.
References GoToSleepIfPossible(), and NS_LOG_FUNCTION.
|
overrideprotectedvirtual |
Notify subclasses that the given TXOP is requesting channel access on the given link.
| txop | the DCF/EDCAF requesting channel access |
| linkId | the ID of the given link |
Implements ns3::PowerSaveManager.
Definition at line 241 of file default-power-save-manager.cc.
References ns3::PowerSaveManager::GetStaMac(), m_sleepEvents, m_wakeUpEvents, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
|
overrideprotectedvirtual |
Notify subclasses that the given MPDU has been discarded for the given reason.
| reason | the reason why the MPDU was dropped |
| mpdu | the dropped MPDU |
Implements ns3::PowerSaveManager.
Definition at line 269 of file default-power-save-manager.cc.
References ns3::PowerSaveManager::GetStaInfo(), ns3::PowerSaveManager::GetStaMac(), GoToSleepIfPossible(), NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::PowerSaveManager::StaInfo::pendingUnicast.
|
static |
Get the type ID.
Definition at line 26 of file default-power-save-manager.cc.
References DefaultPowerSaveManager(), m_listenAdvance, m_psmTimeout, ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), and ns3::TypeId::SetParent().
|
protected |
Put the PHY operating on the given link to sleep, if no reason to stay awake.
| linkId | the ID of the given link |
Definition at line 62 of file default-power-save-manager.cc.
References ns3::PowerSaveManager::GetListenInterval(), ns3::PowerSaveManager::GetStaInfo(), ns3::PowerSaveManager::GetStaMac(), ns3::PowerSaveManager::HasRequestedOrGainedChannel(), m_listenAdvance, m_psmTimeout, m_sleepEvents, m_wakeUpEvents, Max, ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::WifiPhy::ResumeFromSleep(), ns3::Simulator::Schedule(), ns3::Time::US, and ns3::WIFI_PM_ACTIVE.
Referenced by DoNotifyAssocCompleted(), DoNotifyChannelReleased(), DoNotifyReceivedBeacon(), DoNotifyReceivedFrameAfterPsPoll(), DoNotifyReceivedGroupcast(), and DoTxDropped().
|
protected |
the amount of time the STA wakes up in advance prior to the TBTT
Definition at line 56 of file default-power-save-manager.h.
Referenced by GetTypeId(), and GoToSleepIfPossible().
|
protected |
the extra time during which the PHY is kept in active state before being put to sleep state
Definition at line 54 of file default-power-save-manager.h.
Referenced by GetTypeId(), and GoToSleepIfPossible().
events scheduled to set PHYs to sleep
Definition at line 53 of file default-power-save-manager.h.
Referenced by DoNotifyDisassociation(), DoNotifyPmModeChanged(), DoNotifyRequestAccess(), and GoToSleepIfPossible().
events scheduled to wake up PHYs
Definition at line 52 of file default-power-save-manager.h.
Referenced by DoNotifyDisassociation(), DoNotifyPmModeChanged(), DoNotifyRequestAccess(), and GoToSleepIfPossible().