9#ifndef WIFI_TX_PARAMETERS_H
10#define WIFI_TX_PARAMETERS_H
15#include "ns3/nstime.h"
27struct WifiAcknowledgment;
168 void Print(std::ostream& os)
const;
174 std::optional<PsduInfoMap::iterator>
Smart pointer class similar to boost::intrusive_ptr.
This class stores the TX parameters (TX vector, protection mechanism, acknowledgment mechanism,...
uint32_t GetSizeIfAddMpdu(Ptr< const WifiMpdu > mpdu) const
Get the size in bytes of the frame in case the given MPDU is added.
std::optional< Time > m_txDuration
TX duration of the frame.
const PsduInfoMap & GetPsduInfoMap() const
Get a const reference to the map containing information about PSDUs.
PsduInfo m_undoInfo
information needed to undo the addition of an MPDU
WifiTxParameters & operator=(WifiTxParameters &&txParams)=default
Move assignment operator.
std::unique_ptr< WifiProtection > m_protection
protection method
WifiTxParameters & operator=(const WifiTxParameters &txParams)
Copy assignment operator.
uint32_t GetSizeIfAggregateMsdu(Ptr< const WifiMpdu > msdu) const
Get the size in bytes of the frame in case the given MSDU is aggregated.
uint32_t GetSize(Mac48Address receiver) const
Get the size in bytes of the (A-)MPDU addressed to the given receiver.
std::unique_ptr< WifiAcknowledgment > m_acknowledgment
acknowledgment method
const PsduInfo * GetPsduInfo(Mac48Address receiver) const
Get a pointer to the information about the PSDU addressed to the given receiver, if present,...
void UndoAddMpdu()
Undo the addition of the last MPDU added by calling AddMpdu().
WifiTxParameters(WifiTxParameters &&txParams)=default
Move constructor.
bool LastAddedIsFirstMpdu(Mac48Address receiver) const
Check if the last added MPDU is the first MPDU for the given receiver.
WifiTxVector m_txVector
TXVECTOR of the frame being prepared.
PsduInfoMap m_info
information about the frame being prepared.
void AggregateMsdu(Ptr< const WifiMpdu > msdu)
Record that an MSDU is being aggregated to the last MPDU added to the frame that hase the same receiv...
void Print(std::ostream &os) const
Print the object contents.
void AddMpdu(Ptr< const WifiMpdu > mpdu)
Record that an MPDU is being added to the current frame.
void Clear()
Reset the TX parameters.
std::map< Mac48Address, PsduInfo > PsduInfoMap
Map containing information about the PSDUs addressed to every receiver.
std::optional< PsduInfoMap::iterator > m_lastInfoIt
iterator pointing to the entry in the m_info map that was created/modified by the last added MPDU
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
information about the frame being prepared for a specific receiver
std::map< uint8_t, std::set< uint16_t > > seqNumbers
set of the sequence numbers of the MPDUs added for each TID
uint32_t ampduSize
the size in bytes of the A-MPDU if multiple MPDUs have been added, and zero otherwise
WifiMacHeader header
MAC header of the last MPDU added.
uint32_t amsduSize
the size in bytes of the MSDU or A-MSDU included in the last MPDU added