wifi: Introduce the VHT Frame Exchange Manager
This commit is contained in:
@@ -1006,6 +1006,7 @@ WifiHelper::EnableLogComponents (void)
|
||||
LogComponentEnable ("ThresholdPreambleDetectionModel", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("Txop", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("VhtConfiguration", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("VhtFrameExchangeManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiAckManager", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiAckPolicySelector", LOG_LEVEL_ALL);
|
||||
LogComponentEnable ("WifiDefaultAckManager", LOG_LEVEL_ALL);
|
||||
|
||||
61
src/wifi/model/vht-frame-exchange-manager.cc
Normal file
61
src/wifi/model/vht-frame-exchange-manager.cc
Normal file
@@ -0,0 +1,61 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2020 Universita' degli Studi di Napoli Federico II
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Stefano Avallone <stavallo@unina.it>
|
||||
*/
|
||||
|
||||
#include "ns3/log.h"
|
||||
#include "ns3/abort.h"
|
||||
#include "vht-frame-exchange-manager.h"
|
||||
|
||||
#undef NS_LOG_APPEND_CONTEXT
|
||||
#define NS_LOG_APPEND_CONTEXT std::clog << "[mac=" << m_self << "] "
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("VhtFrameExchangeManager");
|
||||
|
||||
NS_OBJECT_ENSURE_REGISTERED (VhtFrameExchangeManager);
|
||||
|
||||
TypeId
|
||||
VhtFrameExchangeManager::GetTypeId (void)
|
||||
{
|
||||
static TypeId tid = TypeId ("ns3::VhtFrameExchangeManager")
|
||||
.SetParent<HtFrameExchangeManager> ()
|
||||
.AddConstructor<VhtFrameExchangeManager> ()
|
||||
.SetGroupName ("Wifi")
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
VhtFrameExchangeManager::VhtFrameExchangeManager ()
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
}
|
||||
|
||||
VhtFrameExchangeManager::~VhtFrameExchangeManager ()
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS ();
|
||||
}
|
||||
|
||||
Ptr<WifiPsdu>
|
||||
VhtFrameExchangeManager::GetWifiPsdu (Ptr<WifiMacQueueItem> mpdu, const WifiTxVector& txVector) const
|
||||
{
|
||||
return Create<WifiPsdu> (mpdu, txVector.GetModulationClass () >= WIFI_MOD_CLASS_VHT);
|
||||
}
|
||||
|
||||
} //namespace ns3
|
||||
52
src/wifi/model/vht-frame-exchange-manager.h
Normal file
52
src/wifi/model/vht-frame-exchange-manager.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2020 Universita' degli Studi di Napoli Federico II
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation;
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Author: Stefano Avallone <stavallo@unina.it>
|
||||
*/
|
||||
|
||||
#ifndef VHT_FRAME_EXCHANGE_MANAGER_H
|
||||
#define VHT_FRAME_EXCHANGE_MANAGER_H
|
||||
|
||||
#include "ht-frame-exchange-manager.h"
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
/**
|
||||
* \ingroup wifi
|
||||
*
|
||||
* VhtFrameExchangeManager handles the frame exchange sequences
|
||||
* for VHT stations.
|
||||
*/
|
||||
class VhtFrameExchangeManager : public HtFrameExchangeManager
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* \brief Get the type ID.
|
||||
* \return the object TypeId
|
||||
*/
|
||||
static TypeId GetTypeId (void);
|
||||
VhtFrameExchangeManager ();
|
||||
virtual ~VhtFrameExchangeManager ();
|
||||
|
||||
protected:
|
||||
// Overridden from HtFrameExchangeManager
|
||||
virtual Ptr<WifiPsdu> GetWifiPsdu (Ptr<WifiMacQueueItem> mpdu, const WifiTxVector& txVector) const override;
|
||||
};
|
||||
|
||||
} //namespace ns3
|
||||
|
||||
#endif /* VHT_FRAME_EXCHANGE_MANAGER_H */
|
||||
@@ -35,6 +35,7 @@ def build(bld):
|
||||
'model/frame-exchange-manager.cc',
|
||||
'model/qos-frame-exchange-manager.cc',
|
||||
'model/ht-frame-exchange-manager.cc',
|
||||
'model/vht-frame-exchange-manager.cc',
|
||||
'model/mac-low.cc',
|
||||
'model/mac-low-transmission-parameters.cc',
|
||||
'model/wifi-mac-queue.cc',
|
||||
@@ -219,6 +220,7 @@ def build(bld):
|
||||
'model/frame-exchange-manager.h',
|
||||
'model/qos-frame-exchange-manager.h',
|
||||
'model/ht-frame-exchange-manager.h',
|
||||
'model/vht-frame-exchange-manager.h',
|
||||
'model/mac-low.h',
|
||||
'model/mac-low-transmission-parameters.h',
|
||||
'model/originator-block-ack-agreement.h',
|
||||
|
||||
Reference in New Issue
Block a user