wifi: Add another function to test if a PSDU map contains a Trigger Frame

This commit is contained in:
Stefano Avallone
2023-03-18 19:05:10 +01:00
parent 877a438c74
commit 47b15c2ea2
2 changed files with 15 additions and 0 deletions

View File

@@ -54,6 +54,14 @@ IsTrigger(const WifiPsduMap& psduMap)
psduMap.cbegin()->second->GetHeader(0).IsTrigger();
}
bool
IsTrigger(const WifiConstPsduMap& psduMap)
{
return psduMap.size() == 1 && psduMap.cbegin()->first == SU_STA_ID &&
psduMap.cbegin()->second->GetNMpdus() == 1 &&
psduMap.cbegin()->second->GetHeader(0).IsTrigger();
}
TypeId
HeFrameExchangeManager::GetTypeId()
{

View File

@@ -51,6 +51,13 @@ typedef std::unordered_map<uint16_t /* staId */, Ptr<const WifiPsdu> /* PSDU */>
*/
bool IsTrigger(const WifiPsduMap& psduMap);
/**
* \param psduMap a PSDU map
* \return true if the given PSDU map contains a single PSDU including a single MPDU
* that carries a Trigger Frame
*/
bool IsTrigger(const WifiConstPsduMap& psduMap);
/**
* \ingroup wifi
*