A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::MacTxMiddle Class Reference

Handles sequence numbering of IEEE 802.11 data frames. More...

#include "mac-tx-middle.h"

+ Inheritance diagram for ns3::MacTxMiddle:
+ Collaboration diagram for ns3::MacTxMiddle:

Public Member Functions

 MacTxMiddle ()
 
 ~MacTxMiddle ()
 
uint16_t GetNextSeqNumberByTidAndAddress (uint8_t tid, Mac48Address addr) const
 Return the next sequence number for the Traffic ID and destination.
 
uint16_t GetNextSequenceNumberFor (const WifiMacHeader *hdr)
 Return the next sequence number for the given header.
 
uint16_t PeekNextSequenceNumberFor (const WifiMacHeader *hdr)
 Return the next sequence number for the Traffic ID and destination, but do not pick it (i.e.
 
void SetSequenceNumberFor (const WifiMacHeader *hdr)
 Set the sequence number of the given MAC header as the next sequence number for the Traffic ID and destination of the given MAC header.
 
- Public Member Functions inherited from ns3::SimpleRefCount< MacTxMiddle >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 

Private Attributes

std::map< Mac48Address, uint16_t * > m_qosSequences
 QOS sequences.
 
uint16_t m_sequence
 current sequence number
 

Detailed Description

Handles sequence numbering of IEEE 802.11 data frames.

Definition at line 29 of file mac-tx-middle.h.

Constructor & Destructor Documentation

◆ MacTxMiddle()

ns3::MacTxMiddle::MacTxMiddle ( )

Definition at line 23 of file mac-tx-middle.cc.

References NS_LOG_FUNCTION.

◆ ~MacTxMiddle()

ns3::MacTxMiddle::~MacTxMiddle ( )

Definition at line 29 of file mac-tx-middle.cc.

References m_qosSequences, and NS_LOG_FUNCTION.

Member Function Documentation

◆ GetNextSeqNumberByTidAndAddress()

uint16_t ns3::MacTxMiddle::GetNextSeqNumberByTidAndAddress ( uint8_t tid,
Mac48Address addr ) const

Return the next sequence number for the Traffic ID and destination.

Parameters
tidTraffic ID
addrdestination address
Returns
the next sequence number

Definition at line 103 of file mac-tx-middle.cc.

References m_qosSequences, NS_ASSERT, and NS_LOG_FUNCTION.

◆ GetNextSequenceNumberFor()

uint16_t ns3::MacTxMiddle::GetNextSequenceNumberFor ( const WifiMacHeader * hdr)

Return the next sequence number for the given header.

Parameters
hdrWi-Fi header
Returns
the next sequence number

Definition at line 39 of file mac-tx-middle.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::Mac48Address::IsGroup(), ns3::WifiMacHeader::IsQosData(), m_qosSequences, m_sequence, NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ PeekNextSequenceNumberFor()

uint16_t ns3::MacTxMiddle::PeekNextSequenceNumberFor ( const WifiMacHeader * hdr)

Return the next sequence number for the Traffic ID and destination, but do not pick it (i.e.

the current sequence number remains unchanged). This functions is used for A-MPDU aggregation.

Parameters
hdrWi-Fi header
Returns
the next sequence number

Definition at line 77 of file mac-tx-middle.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::Mac48Address::IsGroup(), ns3::WifiMacHeader::IsQosData(), m_qosSequences, m_sequence, NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SetSequenceNumberFor()

void ns3::MacTxMiddle::SetSequenceNumberFor ( const WifiMacHeader * hdr)

Set the sequence number of the given MAC header as the next sequence number for the Traffic ID and destination of the given MAC header.

Parameters
hdrthe given MAC header

Definition at line 117 of file mac-tx-middle.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::Mac48Address::IsGroup(), ns3::WifiMacHeader::IsQosData(), m_qosSequences, m_sequence, NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_qosSequences

std::map<Mac48Address, uint16_t*> ns3::MacTxMiddle::m_qosSequences
private

◆ m_sequence

uint16_t ns3::MacTxMiddle::m_sequence
private

current sequence number

Definition at line 69 of file mac-tx-middle.h.

Referenced by GetNextSequenceNumberFor(), PeekNextSequenceNumberFor(), and SetSequenceNumberFor().


The documentation for this class was generated from the following files: