wifi: Track Power Management mode in WifiRemoteStationManager
This commit is contained in:
committed by
Stefano Avallone
parent
f2abc59733
commit
e345ad196b
@@ -552,6 +552,18 @@ WifiRemoteStationManager::GetStaId(Mac48Address address, const WifiTxVector& txV
|
||||
return staId;
|
||||
}
|
||||
|
||||
bool
|
||||
WifiRemoteStationManager::IsInPsMode(const Mac48Address& address) const
|
||||
{
|
||||
return LookupState(address)->m_isInPsMode;
|
||||
}
|
||||
|
||||
void
|
||||
WifiRemoteStationManager::SetPsMode(const Mac48Address& address, bool isInPsMode)
|
||||
{
|
||||
LookupState(address)->m_isInPsMode = isInPsMode;
|
||||
}
|
||||
|
||||
void
|
||||
WifiRemoteStationManager::SetMldAddress(const Mac48Address& address, const Mac48Address& mldAddress)
|
||||
{
|
||||
@@ -1381,6 +1393,7 @@ WifiRemoteStationManager::LookupState(Mac48Address address) const
|
||||
state->m_ness = 0;
|
||||
state->m_aggregation = false;
|
||||
state->m_qosSupported = false;
|
||||
state->m_isInPsMode = false;
|
||||
const_cast<WifiRemoteStationManager*>(this)->m_states.insert({address, state});
|
||||
NS_LOG_DEBUG("WifiRemoteStationManager::LookupState returning new state");
|
||||
return state;
|
||||
|
||||
@@ -122,6 +122,7 @@ struct WifiRemoteStationState
|
||||
bool m_shortPreamble; //!< Flag if short PHY preamble is supported by the remote station
|
||||
bool m_shortSlotTime; //!< Flag if short ERP slot time is supported by the remote station
|
||||
bool m_qosSupported; //!< Flag if QoS is supported by the station
|
||||
bool m_isInPsMode; //!< Flag if the STA is currently in PS mode
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -733,6 +734,22 @@ class WifiRemoteStationManager : public Object
|
||||
*/
|
||||
void RecordAssocRefused(Mac48Address address);
|
||||
|
||||
/**
|
||||
* Return whether the STA is currently in Power Save mode.
|
||||
*
|
||||
* \param address the address of the station
|
||||
*
|
||||
* \return true if the station is in Power Save mode, false otherwise
|
||||
*/
|
||||
bool IsInPsMode(const Mac48Address& address) const;
|
||||
/**
|
||||
* Register whether the STA is in Power Save mode or not.
|
||||
*
|
||||
* \param address the address of the station
|
||||
* \param isInPsMode whether the STA is in PS mode or not
|
||||
*/
|
||||
void SetPsMode(const Mac48Address& address, bool isInPsMode);
|
||||
|
||||
/**
|
||||
* Set the address of the MLD the given station is affiliated with.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user