37 static TypeId tid =
TypeId (
"ns3::WifiDefaultProtectionManager")
39 .SetGroupName (
"Wifi")
55 std::unique_ptr<WifiProtection>
73 std::unique_ptr<WifiProtection> protection;
86 std::unique_ptr<WifiProtection>
103 std::unique_ptr<WifiProtection> protection;
117 std::unique_ptr<WifiProtection>
130 if (
m_mac->GetWifiRemoteStationManager ()->NeedRts (hdr, size))
136 return std::unique_ptr<WifiProtection> (protection);
140 if (
m_mac->GetWifiRemoteStationManager ()->GetUseNonErpProtection ()
141 &&
m_mac->GetWifiRemoteStationManager ()->NeedCtsToSelf (txVector))
144 protection->
ctsTxVector =
m_mac->GetWifiRemoteStationManager ()->GetCtsToSelfTxVector ();
145 return std::unique_ptr<WifiProtection> (protection);
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
WifiDefaultProtectionManager is the default protection manager, which selects the protection method f...
virtual std::unique_ptr< WifiProtection > TryAggregateMsdu(Ptr< const WifiMacQueueItem > msdu, const WifiTxParameters &txParams) override
Determine the protection method to use if the given MSDU is aggregated to the current frame.
static TypeId GetTypeId(void)
Get the type ID.
WifiDefaultProtectionManager()
virtual std::unique_ptr< WifiProtection > TryAddMpdu(Ptr< const WifiMacQueueItem > mpdu, const WifiTxParameters &txParams) override
Determine the protection method to use if the given MPDU is added to the current frame.
virtual std::unique_ptr< WifiProtection > GetPsduProtection(const WifiMacHeader &hdr, uint32_t size, const WifiTxVector &txVector) const
Select the protection method for a single PSDU.
virtual ~WifiDefaultProtectionManager()
WifiProtectionManager is an abstract base class.
Ptr< RegularWifiMac > m_mac
MAC which is using this Protection Manager.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
std::pair< uint32_t, uint32_t > GetSizeIfAggregateMsdu(Ptr< const WifiMacQueueItem > msdu) const
Get the size in bytes of the frame in case the given MSDU is aggregated.
std::unique_ptr< WifiProtection > m_protection
protection method
uint32_t GetSizeIfAddMpdu(Ptr< const WifiMacQueueItem > mpdu) const
Get the size in bytes of the frame in case the given MPDU is added.
WifiTxVector m_txVector
TXVECTOR of the frame being prepared.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
WifiMode GetMode(uint16_t staId=SU_STA_ID) const
If this TX vector is associated with an SU PPDU, return the selected payload transmission mode.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiCtsToSelfProtection specifies that CTS-to-self protection method is used.
WifiTxVector ctsTxVector
CTS TXVECTOR.
WifiNoProtection specifies that no protection method is used.
WifiRtsCtsProtection specifies that RTS/CTS protection method is used.
WifiTxVector ctsTxVector
CTS TXVECTOR.
WifiTxVector rtsTxVector
RTS TXVECTOR.