|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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);
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
WifiNoProtection specifies that no protection method is used.
WifiRtsCtsProtection specifies that RTS/CTS protection method is used.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
WifiTxVector ctsTxVector
CTS TXVECTOR.
WifiDefaultProtectionManager()
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
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.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
TypeId SetParent(TypeId tid)
Set the parent TypeId.
std::unique_ptr< WifiProtection > m_protection
protection method
Smart pointer class similar to boost::intrusive_ptr.
WifiTxVector ctsTxVector
CTS TXVECTOR.
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.
uint32_t GetSizeIfAddMpdu(Ptr< const WifiMacQueueItem > mpdu) const
Get the size in bytes of the frame in case the given MPDU is added.
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.
static TypeId GetTypeId(void)
Get the type ID.
WifiTxVector rtsTxVector
RTS TXVECTOR.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
WifiTxVector m_txVector
TXVECTOR of the frame being prepared.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
virtual ~WifiDefaultProtectionManager()
WifiDefaultProtectionManager is the default protection manager, which selects the protection method f...
Ptr< RegularWifiMac > m_mac
MAC which is using this Protection Manager.
WifiProtectionManager is an abstract base class.
WifiCtsToSelfProtection specifies that CTS-to-self protection method is used.
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.
virtual std::unique_ptr< WifiProtection > GetPsduProtection(const WifiMacHeader &hdr, uint32_t size, const WifiTxVector &txVector) const
Select the protection method for a single PSDU.