A Discrete-Event Network Simulator
API
ns3::MacLow Class Reference

handle RTS/CTS/DATA/ACK transactions. More...

#include "mac-low.h"

+ Inheritance diagram for ns3::MacLow:
+ Collaboration diagram for ns3::MacLow:

Classes

struct  Item
 A struct for packet, Wifi header, and timestamp. More...
 

Public Types

typedef Callback< void, Ptr< Packet >, const WifiMacHeader * > MacLowRxCallback
 typedef for a callback for MacLowRx More...
 

Public Member Functions

 MacLow ()
 
virtual ~MacLow ()
 
Ptr< PacketAggregateToAmpdu (Ptr< const Packet > packet, const WifiMacHeader hdr)
 
Time CalculateOverallTxTime (Ptr< const Packet > packet, const WifiMacHeader *hdr, const MacLowTransmissionParameters &params) const
 
Time CalculateTransmissionTime (Ptr< const Packet > packet, const WifiMacHeader *hdr, const MacLowTransmissionParameters &parameters) const
 
void CreateBlockAckAgreement (const MgtAddBaResponseHeader *respHdr, Mac48Address originator, uint16_t startingSeq)
 
void DeaggregateAmpduAndReceive (Ptr< Packet > aggregatedPacket, double rxSnr, WifiTxVector txVector, WifiPreamble preamble)
 
void DestroyBlockAckAgreement (Mac48Address originator, uint8_t tid)
 
void FlushAggregateQueue (void)
 This function is called to flush the aggregate queue, which is used for A-MPDU. More...
 
Time GetAckTimeout (void) const
 Return ACK timeout of this MacLow. More...
 
Mac48Address GetAddress (void) const
 Return the MAC address of this MacLow. More...
 
Time GetBasicBlockAckTimeout () const
 Return Basic Block ACK timeout of this MacLow. More...
 
Mac48Address GetBssid (void) const
 Return the Basic Service Set Identification. More...
 
Time GetCompressedBlockAckTimeout () const
 Return Compressed Block ACK timeout of this MacLow. More...
 
Time GetCtsTimeout (void) const
 Return CTS timeout of this MacLow. More...
 
bool GetCtsToSelfSupported () const
 Return whether CTS-to-self capability is supported. More...
 
virtual WifiTxVector GetDataTxVector (Ptr< const Packet > packet, const WifiMacHeader *hdr) const
 Return a TXVECTOR for the DATA frame given the destination. More...
 
Ptr< WifiPhyGetPhy (void) const
 
Time GetPifs (void) const
 Return PCF Interframe Space (PIFS) of this MacLow. More...
 
Time GetRifs (void) const
 Return Reduced Interframe Space (RIFS) of this MacLow. More...
 
Time GetSifs (void) const
 Return Short Interframe Space (SIFS) of this MacLow. More...
 
Time GetSlotTime (void) const
 Return slot duration of this MacLow. More...
 
bool IsPromisc (void) const
 Check if MacLow is operating in promiscuous mode. More...
 
void NotifySleepNow (void)
 This method is typically invoked by the PhyMacLowListener to notify the MAC layer that the device has been put into sleep mode. More...
 
void NotifySwitchingStartNow (Time duration)
 
void ReceiveError (Ptr< Packet > packet, double rxSnr)
 
void ReceiveOk (Ptr< Packet > packet, double rxSnr, WifiTxVector txVector, WifiPreamble preamble, bool ampduSubframe)
 
void RegisterBlockAckListenerForAc (enum AcIndex ac, MacLowAggregationCapableTransmissionListener *listener)
 
void RegisterDcfListener (MacLowDcfListener *listener)
 
void ResetPhy (void)
 Remove WifiPhy associated with this MacLow. More...
 
void SetAckTimeout (Time ackTimeout)
 Set ACK timeout of this MacLow. More...
 
void SetAddress (Mac48Address ad)
 Set MAC address of this MacLow. More...
 
void SetBasicBlockAckTimeout (Time blockAckTimeout)
 Set Basic Block ACK timeout of this MacLow. More...
 
void SetBssid (Mac48Address ad)
 Set the Basic Service Set Identification. More...
 
void SetCompressedBlockAckTimeout (Time blockAckTimeout)
 Set Compressed Block ACK timeout of this MacLow. More...
 
void SetCtsTimeout (Time ctsTimeout)
 Set CTS timeout of this MacLow. More...
 
void SetCtsToSelfSupported (bool enable)
 Enable or disable CTS-to-self capability. More...
 
void SetPhy (Ptr< WifiPhy > phy)
 Set up WifiPhy associated with this MacLow. More...
 
void SetPifs (Time pifs)
 Set PCF Interframe Space (PIFS) of this MacLow. More...
 
void SetPromisc (void)
 Enable promiscuous mode. More...
 
void SetRifs (Time rifs)
 Set Reduced Interframe Space (RIFS) of this MacLow. More...
 
void SetRxCallback (Callback< void, Ptr< Packet >, const WifiMacHeader * > callback)
 
void SetSifs (Time sifs)
 Set Short Interframe Space (SIFS) of this MacLow. More...
 
void SetSlotTime (Time slotTime)
 Set slot duration of this MacLow. More...
 
void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > manager)
 Set up WifiRemoteStationManager associated with this MacLow. More...
 
virtual void StartTransmission (Ptr< const Packet > packet, const WifiMacHeader *hdr, MacLowTransmissionParameters parameters, MacLowTransmissionListener *listener)
 
bool StopMpduAggregation (Ptr< const Packet > peekedPacket, WifiMacHeader peekedHdr, Ptr< Packet > aggregatedPacket, uint16_t size) const
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Implement the GetInstanceTypeId method defined in ObjectBase. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 Noop. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Types

typedef std::pair< Mac48Address, uint8_t > AgreementKey
 
typedef std::map< AgreementKey, AgreementValueAgreements
 
typedef std::map< AgreementKey, AgreementValue >::iterator AgreementsI
 
typedef std::pair< BlockAckAgreement, std::list< BufferedPacket > > AgreementValue
 
typedef std::map< AgreementKey, BlockAckCacheBlockAckCaches
 
typedef std::map< AgreementKey, BlockAckCache >::iterator BlockAckCachesI
 
typedef std::pair< Ptr< Packet >, WifiMacHeaderBufferedPacket
 
typedef std::list< BufferedPacket >::iterator BufferedPacketI
 
typedef std::vector< MacLowDcfListener * > DcfListeners
 typedef for a list of MacLowDcfListener. More...
 
typedef std::vector< MacLowDcfListener * >::const_iterator DcfListenersCI
 typedef for an iterator for a list of MacLowDcfListener. More...
 
typedef std::map< AcIndex, MacLowAggregationCapableTransmissionListener * > QueueListeners
 

Private Member Functions

void BlockAckTimeout (void)
 Event handler when block ACK timeout occurs. More...
 
void CancelAllEvents (void)
 Cancel all scheduled events. More...
 
void CtsTimeout (void)
 Event handler when CTS timeout occurs. More...
 
virtual void DoDispose (void)
 Destructor implementation. More...
 
void DoNavResetNow (Time duration)
 Reset NAV with the given duration. More...
 
bool DoNavStartNow (Time duration)
 Start NAV with the given duration. More...
 
void EndTxNoAck (void)
 A transmission that does not require an ACK has completed. More...
 
void FastAckFailedTimeout (void)
 Event handler when fast ACK timeout occurs (busy). More...
 
void FastAckTimeout (void)
 Event handler when fast ACK timeout occurs (idle). More...
 
void ForwardDown (Ptr< const Packet > packet, const WifiMacHeader *hdr, WifiTxVector txVector, WifiPreamble preamble)
 Forward the packet down to WifiPhy for transmission. More...
 
Time GetAckDuration (WifiTxVector ackTxVector) const
 Return the time required to transmit the ACK (including preamble and FCS). More...
 
Time GetAckDuration (Mac48Address to, WifiTxVector dataTxVector) const
 Return the time required to transmit the ACK to the specified address given the TXVECTOR of the DATA (including preamble and FCS). More...
 
uint32_t GetAckSize (void) const
 Return the total ACK size (including FCS trailer). More...
 
WifiTxVector GetAckTxVector (Mac48Address to, WifiMode dataTxMode) const
 Return a TXVECTOR for the ACK frame given the destination and the mode of the DATA used by the sender. More...
 
WifiTxVector GetAckTxVectorForData (Mac48Address to, WifiMode dataTxMode) const
 Return a TXVECTOR for the Block ACK frame given the destination and the mode of the DATA used by the sender. More...
 
Time GetBlockAckDuration (Mac48Address to, WifiTxVector blockAckReqTxVector, enum BlockAckType type) const
 Return the time required to transmit the Block ACK to the specified address given the TXVECTOR of the BAR (including preamble and FCS). More...
 
uint32_t GetBlockAckSize (enum BlockAckType type) const
 Return the total Block ACK size (including FCS trailer). More...
 
WifiTxVector GetBlockAckTxVector (Mac48Address to, WifiMode dataTxMode) const
 Return a TXVECTOR for the Block ACK frame given the destination and the mode of the DATA used by the sender. More...
 
Time GetCtsDuration (WifiTxVector ctsTxVector) const
 Return the time required to transmit the CTS (including preamble and FCS). More...
 
Time GetCtsDuration (Mac48Address to, WifiTxVector rtsTxVector) const
 Return the time required to transmit the CTS to the specified address given the TXVECTOR of the RTS (including preamble and FCS). More...
 
uint32_t GetCtsSize (void) const
 Return the total CTS size (including FCS trailer). More...
 
WifiTxVector GetCtsToSelfTxVector (Ptr< const Packet > packet, const WifiMacHeader *hdr) const
 Return a TXVECTOR for the CTS-to-self frame. More...
 
WifiTxVector GetCtsTxVector (Mac48Address to, WifiMode rtsTxMode) const
 Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS used by the sender. More...
 
WifiTxVector GetCtsTxVectorForRts (Mac48Address to, WifiMode rtsTxMode) const
 Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS used by the sender. More...
 
uint32_t GetRtsSize (void) const
 Return the total RTS size (including FCS trailer). More...
 
WifiTxVector GetRtsTxVector (Ptr< const Packet > packet, const WifiMacHeader *hdr) const
 Return a TXVECTOR for the RTS frame given the destination. More...
 
uint32_t GetSize (Ptr< const Packet > packet, const WifiMacHeader *hdr) const
 Return the total size of the packet after WifiMacHeader and FCS trailer have been added. More...
 
uint8_t GetTid (Ptr< const Packet > packet, const WifiMacHeader hdr) const
 
void InsertInTxQueue (Ptr< const Packet > packet, const WifiMacHeader &hdr, Time tStamp)
 Insert in a temporary queue. More...
 
bool IsAmpdu (Ptr< const Packet > packet, const WifiMacHeader hdr)
 Checks if the given packet will be aggregated to an A-MPDU or not. More...
 
bool IsInWindow (uint16_t seq, uint16_t winstart, uint16_t winsize)
 
bool IsNavZero (void) const
 Check if NAV is zero. More...
 
void NavCounterResetCtsMissed (Time rtsEndRxTime)
 Reset NAV after CTS was missed when the NAV was setted with RTS. More...
 
bool NeedCtsToSelf (void)
 Check if CTS-to-self mechanism should be used for the current packet. More...
 
bool NeedRts (void)
 Check if the current packet should be sent with a RTS protection. More...
 
void NormalAckTimeout (void)
 Event handler when normal ACK timeout occurs. More...
 
void NotifyAckTimeoutResetNow ()
 Notify DcfManager (via DcfListener) that ACK timer should be resetted. More...
 
void NotifyAckTimeoutStartNow (Time duration)
 Notify DcfManager (via DcfListener) that ACK timer should be started for the given duration. More...
 
void NotifyCtsTimeoutResetNow ()
 Notify DcfManager (via DcfListener) that CTS timer should be resetted. More...
 
void NotifyCtsTimeoutStartNow (Time duration)
 Notify DcfManager (via DcfListener) that CTS timer should be started for the given duration. More...
 
void NotifyNav (Ptr< const Packet > packet, const WifiMacHeader &hdr, WifiPreamble preamble)
 
Ptr< PacketPerformMsduAggregation (Ptr< const Packet > packet, WifiMacHeader *hdr, Time *tstamp, Ptr< Packet > currentAmpduPacket, uint16_t blockAckSize)
 Perform MSDU aggregation for a given MPDU in an A-MPDU. More...
 
bool ReceiveMpdu (Ptr< Packet > packet, WifiMacHeader hdr)
 This method updates the reorder buffer and the scoreboard when an MPDU is received in an HT station and sotres the MPDU if needed when an MPDU is received in an non-HT Station (implements HT immediate block Ack) More...
 
void RemovePhyMacLowListener (Ptr< WifiPhy > phy)
 Remove current WifiPhy listener for this MacLow. More...
 
void ResetBlockAckInactivityTimerIfNeeded (BlockAckAgreement &agreement)
 Every time that a block ack request or a packet with ack policy equals to block ack are received, if a relative block ack agreement exists and the value of inactivity timeout is not 0, the timer is reset. More...
 
void RxCompleteBufferedPacketsUntilFirstLost (Mac48Address originator, uint8_t tid)
 
void RxCompleteBufferedPacketsWithSmallerSequence (uint16_t seq, Mac48Address originator, uint8_t tid)
 
void SendAckAfterData (Mac48Address source, Time duration, WifiMode dataTxMode, double dataSnr)
 Send ACK after receiving DATA. More...
 
void SendBlockAckAfterAmpdu (uint8_t tid, Mac48Address originator, Time duration, WifiTxVector blockAckReqTxVector, double rxSnr)
 Invoked after an A-MPDU has been received. More...
 
void SendBlockAckAfterBlockAckRequest (const CtrlBAckRequestHeader reqHdr, Mac48Address originator, Time duration, WifiMode blockAckReqTxMode, double rxSnr)
 Invoked after that a block ack request has been received. More...
 
void SendBlockAckResponse (const CtrlBAckResponseHeader *blockAck, Mac48Address originator, bool immediate, Time duration, WifiMode blockAckReqTxMode, double rxSnr)
 This method creates block ack frame with header equals to blockAck and start its transmission. More...
 
void SendCtsAfterRts (Mac48Address source, Time duration, WifiTxVector rtsTxVector, double rtsSnr)
 Send CTS after receiving RTS. More...
 
void SendCtsToSelf (void)
 Send CTS for a CTS-to-self mechanism. More...
 
void SendDataAfterCts (Mac48Address source, Time duration)
 Send DATA after receiving CTS. More...
 
void SendDataPacket (void)
 Send DATA packet, which can be DATA-ACK or RTS-CTS-DATA-ACK transaction. More...
 
void SendMpdu (Ptr< const Packet > packet, WifiTxVector txVector, WifiPreamble preamble, enum mpduType mpdutype)
 Forward the MPDU down to WifiPhy for transmission. More...
 
void SendRtsForPacket (void)
 Send RTS to begin RTS-CTS-DATA-ACK transaction. More...
 
void SetupPhyMacLowListener (Ptr< WifiPhy > phy)
 Set up WifiPhy listener for this MacLow. More...
 
void StartDataTxTimers (WifiTxVector dataTxVector)
 Start a DATA timer by scheduling appropriate ACK timeout. More...
 
bool StoreMpduIfNeeded (Ptr< Packet > packet, WifiMacHeader hdr)
 This method checks if exists a valid established block ack agreement. More...
 
void SuperFastAckTimeout (void)
 Event handler when super fast ACK timeout occurs. More...
 
void WaitSifsAfterEndTx (void)
 
void WaitSifsAfterEndTxFragment (void)
 Event handler that is usually scheduled to fired at the appropriate time after completing transmissions. More...
 

Private Attributes

Time m_ackTimeout
 ACK timeout duration. More...
 
Ptr< WifiMacQueuem_aggregateQueue
 Queue used for MPDU aggregation. More...
 
bool m_ampdu
 Flag if the current transmission involves an A-MPDU. More...
 
Agreements m_bAckAgreements
 
BlockAckCaches m_bAckCaches
 
Time m_basicBlockAckTimeout
 Basic block ACK timeout duration. More...
 
EventId m_blockAckTimeoutEvent
 Block ACK timeout event. More...
 
Mac48Address m_bssid
 BSSID address (Mac48Address) More...
 
Time m_compressedBlockAckTimeout
 Compressed block ACK timeout duration. More...
 
Time m_ctsTimeout
 CTS timeout duration. More...
 
EventId m_ctsTimeoutEvent
 CTS timeout event. More...
 
bool m_ctsToSelfSupported
 Flag whether CTS-to-self is supported. More...
 
WifiMacHeader m_currentHdr
 Header of the current transmitted packet. More...
 
Ptr< Packetm_currentPacket
 Current packet transmitted/to be transmitted. More...
 
WifiTxVector m_currentTxVector
 TXVECTOR used for the current packet transmission. More...
 
DcfListeners m_dcfListeners
 List of MacLowDcfListener (pass events to Dcf) More...
 
QueueListeners m_edcaListeners
 
EventId m_endTxNoAckEvent
 Event for finishing transmission that does not require ACK. More...
 
EventId m_fastAckFailedTimeoutEvent
 Fast ACK failed timeout event. More...
 
EventId m_fastAckTimeoutEvent
 Fast ACK timeout event. More...
 
Time m_lastNavDuration
 The duration of the latest NAV. More...
 
Time m_lastNavStart
 The time when the latest NAV started. More...
 
WifiMacHeader m_lastReceivedHdr
 Header of the last received packet. More...
 
MacLowTransmissionListenerm_listener
 Transmission listener for the current packet. More...
 
EventId m_navCounterResetCtsMissed
 Event to reset NAV when CTS is not received. More...
 
EventId m_normalAckTimeoutEvent
 Normal ACK timeout event. More...
 
uint32_t m_nTxMpdus
 Holds the number of transmitted MPDUs in the last A-MPDU transmission. More...
 
Ptr< WifiPhym_phy
 Pointer to WifiPhy (actually send/receives frames) More...
 
class PhyMacLowListenerm_phyMacLowListener
 Listener needed to monitor when a channel switching occurs. More...
 
Time m_pifs
 PCF Interframe Space (PIFS) duration. More...
 
bool m_promisc
 Flag if the device is operating in promiscuous mode. More...
 
Time m_rifs
 Reduced Interframe Space (RIFS) duration. More...
 
MacLowRxCallback m_rxCallback
 Callback to pass packet up. More...
 
Mac48Address m_self
 Address of this MacLow (Mac48Address) More...
 
EventId m_sendAckEvent
 Event to send ACK. More...
 
EventId m_sendCtsEvent
 Event to send CTS. More...
 
EventId m_sendDataEvent
 Event to send DATA. More...
 
uint8_t m_sentMpdus
 Number of transmitted MPDUs in an A-MPDU that have not been acknowledged yet. More...
 
Time m_sifs
 Short Interframe Space (SIFS) duration. More...
 
Time m_slotTime
 Slot duration. More...
 
Ptr< WifiRemoteStationManagerm_stationManager
 Pointer to WifiRemoteStationManager (rate control) More...
 
EventId m_superFastAckTimeoutEvent
 Super fast ACK timeout event. More...
 
std::vector< Itemm_txPackets
 Contain temporary items to be sent with the next A-MPDU transmission, once RTS/CTS exchange has succeeded. More...
 
MacLowTransmissionParameters m_txParams
 Transmission parameters of the current packet. More...
 
EventId m_waitRifsEvent
 Wait for RIFS event. More...
 
EventId m_waitSifsEvent
 Wait for SIFS event. More...
 

Friends

class ::AmpduAggregationTest
 
class ::TwoLevelAggregationTest
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

handle RTS/CTS/DATA/ACK transactions.

Introspection did not find any typical Config paths.


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 18446744073709551615 bytes (on a 64-bit architecture).

Definition at line 500 of file mac-low.h.

Member Typedef Documentation

typedef std::pair<Mac48Address, uint8_t> ns3::MacLow::AgreementKey
private

Definition at line 1373 of file mac-low.h.

Definition at line 1376 of file mac-low.h.

typedef std::map<AgreementKey, AgreementValue>::iterator ns3::MacLow::AgreementsI
private

Definition at line 1377 of file mac-low.h.

Definition at line 1374 of file mac-low.h.

Definition at line 1379 of file mac-low.h.

typedef std::map<AgreementKey, BlockAckCache>::iterator ns3::MacLow::BlockAckCachesI
private

Definition at line 1380 of file mac-low.h.

typedef std::pair<Ptr<Packet>, WifiMacHeader> ns3::MacLow::BufferedPacket
private

Definition at line 1370 of file mac-low.h.

Definition at line 1371 of file mac-low.h.

typedef std::vector<MacLowDcfListener *> ns3::MacLow::DcfListeners
private

typedef for a list of MacLowDcfListener.

Definition at line 1326 of file mac-low.h.

typedef std::vector<MacLowDcfListener *>::const_iterator ns3::MacLow::DcfListenersCI
private

typedef for an iterator for a list of MacLowDcfListener.

Definition at line 1322 of file mac-low.h.

typedef for a callback for MacLowRx

Definition at line 509 of file mac-low.h.

Definition at line 1385 of file mac-low.h.

Constructor & Destructor Documentation

ns3::MacLow::MacLow ( )

Definition at line 356 of file mac-low.cc.

References m_aggregateQueue, m_ampdu, m_lastNavDuration, m_lastNavStart, m_promisc, m_sentMpdus, NS_LOG_FUNCTION, and ns3::Seconds().

+ Here is the call graph for this function:

ns3::MacLow::~MacLow ( )
virtual

Definition at line 383 of file mac-low.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

Ptr< Packet > ns3::MacLow::AggregateToAmpdu ( Ptr< const Packet packet,
const WifiMacHeader  hdr 
)
Parameters
packetthe packet to be aggregated. If the aggregation is succesfull, it corresponds either to the first data packet that will be aggregated or to the BAR that will be piggybacked at the end of the A-MPDU.
hdrthe WifiMacHeader for the packet.
Returns
the A-MPDU packet if aggregation is successfull, the input packet otherwise

This function adds the packets that will be added to an A-MPDU to an aggregate queue

Todo:
We should also handle Ack and BlockAck

Definition at line 2962 of file mac-low.cc.

References ns3::Packet::AddHeader(), ns3::Packet::AddPacketTag(), ns3::WifiMacHeader::ADDR1, ns3::Packet::AddTrailer(), ns3::WifiMacHeader::BLOCK_ACK, ns3::Packet::Copy(), FlushAggregateQueue(), ns3::WifiMacHeader::GetAddr1(), GetDataTxVector(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::Packet::GetSize(), ns3::WifiMacHeader::GetSize(), ns3::CtrlBAckRequestHeader::GetStartingSequence(), GetTid(), InsertInTxQueue(), ns3::WifiMacHeader::IsBlockAck(), ns3::WifiMacHeader::IsBlockAckReq(), ns3::Mac48Address::IsBroadcast(), IsInWindow(), ns3::WifiMacHeader::IsQosData(), m_aggregateQueue, m_currentHdr, m_currentPacket, m_edcaListeners, m_sentMpdus, m_txParams, ns3::MacLowTransmissionParameters::MustSendRts(), ns3::WifiMacHeader::NORMAL_ACK, NS_ASSERT, NS_LOG_DEBUG, ns3::Packet::PeekHeader(), PerformMsduAggregation(), ns3::QosUtilsMapTidToAc(), ns3::AmpduTag::SetAmpdu(), ns3::WifiMacHeader::SetQosAckPolicy(), ns3::AmpduTag::SetRemainingNbOfMpdus(), StopMpduAggregation(), ns3::WIFI_MAC_FCS_LENGTH, and ns3::WIFI_MOD_CLASS_VHT.

Referenced by IsAmpdu().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::BlockAckTimeout ( void  )
private

Event handler when block ACK timeout occurs.

Definition at line 1797 of file mac-low.cc.

References FlushAggregateQueue(), m_ampdu, m_listener, m_nTxMpdus, m_sentMpdus, ns3::MacLowTransmissionListener::MissedBlockAck(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by StartDataTxTimers().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::MacLow::CalculateTransmissionTime ( Ptr< const Packet packet,
const WifiMacHeader hdr,
const MacLowTransmissionParameters parameters 
) const
Parameters
packetto send (does not include the 802.11 MAC header and checksum)
hdrheader associated to the packet to send.
parameterstransmission parameters of packet.
Returns
the transmission time that includes the time for the next packet transmission

This transmission time includes the time required for the next packet transmission if one was selected.

Definition at line 1477 of file mac-low.cc.

References CalculateOverallTxTime(), ns3::WifiPhy::CalculateTxDuration(), ns3::WifiMacHeader::GetAddr1(), GetDataTxVector(), ns3::WifiPhy::GetFrequency(), ns3::WifiPhy::GetGreenfield(), ns3::WifiRemoteStationManager::GetGreenfieldSupported(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::MacLowTransmissionParameters::GetNextPacketSize(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), GetSifs(), ns3::MacLowTransmissionParameters::HasNextPacket(), m_currentHdr, m_phy, m_stationManager, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_PREAMBLE_HT_GF, ns3::WIFI_PREAMBLE_HT_MF, ns3::WIFI_PREAMBLE_LONG, ns3::WIFI_PREAMBLE_SHORT, and ns3::WIFI_PREAMBLE_VHT.

Referenced by ns3::WaveMacLow::StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::CancelAllEvents ( void  )
private

Cancel all scheduled events.

Called before beginning a transmission or switching channel.

Definition at line 447 of file mac-low.cc.

References ns3::EventId::Cancel(), ns3::MacLowTransmissionListener::Cancel(), ns3::EventId::IsRunning(), m_blockAckTimeoutEvent, m_ctsTimeoutEvent, m_endTxNoAckEvent, m_fastAckFailedTimeoutEvent, m_fastAckTimeoutEvent, m_listener, m_normalAckTimeoutEvent, m_sendAckEvent, m_sendCtsEvent, m_sendDataEvent, m_superFastAckTimeoutEvent, m_waitRifsEvent, m_waitSifsEvent, and NS_LOG_FUNCTION.

Referenced by NotifySleepNow(), NotifySwitchingStartNow(), and StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::CreateBlockAckAgreement ( const MgtAddBaResponseHeader respHdr,
Mac48Address  originator,
uint16_t  startingSeq 
)
Parameters
respHdrAdd block ack response from originator (action frame).
originatorAddress of peer station involved in block ack mechanism.
startingSeqSequence number of the first MPDU of all packets for which block ack was negotiated.

This function is typically invoked only by ns3::RegularWifiMac when the STA (which may be non-AP in ESS, or in an IBSS) has received an ADDBA Request frame and is transmitting an ADDBA Response frame. At this point MacLow must allocate buffers to collect all correctly received packets belonging to the category for which Block Ack was negotiated.

Definition at line 2484 of file mac-low.cc.

References ns3::MacLowAggregationCapableTransmissionListener::BlockAckInactivityTimeout(), ns3::MgtAddBaResponseHeader::GetBufferSize(), ns3::BlockAckAgreement::GetTid(), ns3::MgtAddBaResponseHeader::GetTid(), ns3::BlockAckAgreement::GetTimeout(), ns3::MgtAddBaResponseHeader::GetTimeout(), ns3::BlockAckCache::Init(), ns3::MgtAddBaResponseHeader::IsAmsduSupported(), ns3::MgtAddBaResponseHeader::IsImmediateBlockAck(), m_bAckAgreements, m_bAckCaches, m_edcaListeners, ns3::MicroSeconds(), ns3::QosUtilsMapTidToAc(), ns3::Simulator::Schedule(), ns3::BlockAckAgreement::SetAmsduSupport(), ns3::BlockAckAgreement::SetBufferSize(), ns3::BlockAckAgreement::SetDelayedBlockAck(), ns3::BlockAckAgreement::SetImmediateBlockAck(), ns3::BlockAckAgreement::SetStartingSequence(), ns3::BlockAckAgreement::SetTimeout(), and timeout.

Referenced by ns3::RegularWifiMac::SendAddBaResponse().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::CtsTimeout ( void  )
private

Event handler when CTS timeout occurs.

Todo:
should check that there was no rx start before now. we should restart a new cts timeout now until the expected end of rx if there was a rx start before now.

Definition at line 1742 of file mac-low.cc.

References ns3::WifiMacHeader::GetAddr1(), m_ampdu, m_currentHdr, m_currentPacket, m_listener, m_sentMpdus, m_stationManager, ns3::MacLowTransmissionListener::MissedCts(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WifiRemoteStationManager::ReportRtsFailed().

Referenced by SendRtsForPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::DeaggregateAmpduAndReceive ( Ptr< Packet aggregatedPacket,
double  rxSnr,
WifiTxVector  txVector,
WifiPreamble  preamble 
)
void ns3::MacLow::DestroyBlockAckAgreement ( Mac48Address  originator,
uint8_t  tid 
)
Parameters
originatorAddress of peer participating in Block Ack mechanism.
tidTID for which Block Ack was created.

Checks if exists an established block ack agreement with originator for tid tid. If the agreement exists, tears down it. This function is typically invoked when a DELBA frame is received from originator.

Definition at line 2526 of file mac-low.cc.

References m_bAckAgreements, m_bAckCaches, NS_ASSERT, RxCompleteBufferedPacketsUntilFirstLost(), and RxCompleteBufferedPacketsWithSmallerSequence().

Referenced by ns3::EdcaTxopN::GotAck(), and ns3::RegularWifiMac::Receive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::DoDispose ( void  )
privatevirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 419 of file mac-low.cc.

References ns3::EventId::Cancel(), m_aggregateQueue, m_ampdu, m_blockAckTimeoutEvent, m_ctsTimeoutEvent, m_endTxNoAckEvent, m_fastAckFailedTimeoutEvent, m_fastAckTimeoutEvent, m_normalAckTimeoutEvent, m_phy, m_phyMacLowListener, m_sendAckEvent, m_sendCtsEvent, m_sendDataEvent, m_sentMpdus, m_stationManager, m_superFastAckTimeoutEvent, m_waitRifsEvent, m_waitSifsEvent, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::MacLow::DoNavResetNow ( Time  duration)
private

Reset NAV with the given duration.

Parameters
duration

Definition at line 1564 of file mac-low.cc.

References m_dcfListeners, m_lastNavDuration, m_lastNavStart, and ns3::Simulator::Now().

Referenced by NavCounterResetCtsMissed(), and NotifyNav().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::MacLow::DoNavStartNow ( Time  duration)
private

Start NAV with the given duration.

Parameters
duration
Returns
true if NAV is resetted

Definition at line 1575 of file mac-low.cc.

References m_dcfListeners, m_lastNavDuration, m_lastNavStart, and ns3::Simulator::Now().

Referenced by NotifyNav().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::EndTxNoAck ( void  )
private

A transmission that does not require an ACK has completed.

Definition at line 2343 of file mac-low.cc.

References ns3::MacLowTransmissionListener::EndTxNoAck(), and m_listener.

Referenced by StartDataTxTimers().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::FastAckFailedTimeout ( void  )
private

Event handler when fast ACK timeout occurs (busy).

Definition at line 2351 of file mac-low.cc.

References m_listener, ns3::MacLowTransmissionListener::MissedAck(), NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ReceiveError().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::FastAckTimeout ( void  )
private

Event handler when fast ACK timeout occurs (idle).

Definition at line 1779 of file mac-low.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiPhy::IsStateIdle(), m_currentHdr, m_listener, m_phy, m_stationManager, ns3::MacLowTransmissionListener::MissedAck(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WifiRemoteStationManager::ReportDataFailed().

Referenced by StartDataTxTimers().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::FlushAggregateQueue ( void  )

This function is called to flush the aggregate queue, which is used for A-MPDU.

Definition at line 3261 of file mac-low.cc.

References m_aggregateQueue, m_txPackets, and NS_LOG_DEBUG.

Referenced by AggregateToAmpdu(), BlockAckTimeout(), ns3::EdcaTxopN::MissedCts(), NormalAckTimeout(), and ReceiveOk().

+ Here is the caller graph for this function:

void ns3::MacLow::ForwardDown ( Ptr< const Packet packet,
const WifiMacHeader hdr,
WifiTxVector  txVector,
WifiPreamble  preamble 
)
private
Time ns3::MacLow::GetAckDuration ( WifiTxVector  ackTxVector) const
private

Return the time required to transmit the ACK (including preamble and FCS).

Parameters
ackTxVector
Returns
the time required to transmit the ACK (including preamble and FCS)

Definition at line 1282 of file mac-low.cc.

References ns3::WifiPhy::CalculateTxDuration(), GetAckSize(), ns3::WifiPhy::GetFrequency(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), m_phy, m_stationManager, NS_ASSERT, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_PREAMBLE_LONG, and ns3::WIFI_PREAMBLE_SHORT.

Referenced by CalculateOverallTxTime(), GetAckDuration(), SendAckAfterData(), SendBlockAckResponse(), SendCtsToSelf(), SendDataAfterCts(), SendDataPacket(), and SendRtsForPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::MacLow::GetAckDuration ( Mac48Address  to,
WifiTxVector  dataTxVector 
) const
private

Return the time required to transmit the ACK to the specified address given the TXVECTOR of the DATA (including preamble and FCS).

Parameters
to
dataTxVector
Returns
the time required to transmit the ACK (including preamble and FCS)

Definition at line 1275 of file mac-low.cc.

References GetAckDuration(), GetAckTxVectorForData(), and ns3::WifiTxVector::GetMode().

+ Here is the call graph for this function:

uint32_t ns3::MacLow::GetAckSize ( void  ) const
private

Return the total ACK size (including FCS trailer).

Returns
the total ACK size

Definition at line 1237 of file mac-low.cc.

References ns3::WifiMacHeader::GetSize(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_ACK.

Referenced by GetAckDuration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::MacLow::GetAckTimeout ( void  ) const

Return ACK timeout of this MacLow.

Returns
ACK timeout

Definition at line 633 of file mac-low.cc.

References m_ackTimeout.

Referenced by ns3::RegularWifiMac::GetAckTimeout(), and StartDataTxTimers().

+ Here is the caller graph for this function:

WifiTxVector ns3::MacLow::GetAckTxVector ( Mac48Address  to,
WifiMode  dataTxMode 
) const
private

Return a TXVECTOR for the ACK frame given the destination and the mode of the DATA used by the sender.

The function consults WifiRemoteStationManager, which controls the rate to different destinations.

Parameters
tothe MAC address of the ACK receiver
dataTxModethe mode of the DATA used by the sender
Returns
TXVECTOR for the ACK

Definition at line 1394 of file mac-low.cc.

References ns3::WifiRemoteStationManager::GetAckTxVector(), and m_stationManager.

Referenced by GetAckTxVectorForData(), and SendAckAfterData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiTxVector ns3::MacLow::GetAckTxVectorForData ( Mac48Address  to,
WifiMode  dataTxMode 
) const
private

Return a TXVECTOR for the Block ACK frame given the destination and the mode of the DATA used by the sender.

The function consults WifiRemoteStationManager, which controls the rate to different destinations.

Parameters
tothe MAC address of the Block ACK receiver
dataTxModethe mode of the DATA used by the sender
Returns
TXVECTOR for the Block ACK

Definition at line 1412 of file mac-low.cc.

References GetAckTxVector().

Referenced by GetAckDuration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::MacLow::GetBasicBlockAckTimeout ( ) const

Return Basic Block ACK timeout of this MacLow.

Returns
Basic Block ACK timeout

Definition at line 639 of file mac-low.cc.

References m_basicBlockAckTimeout.

Referenced by ns3::RegularWifiMac::GetBasicBlockAckTimeout(), and StartDataTxTimers().

+ Here is the caller graph for this function:

Time ns3::MacLow::GetBlockAckDuration ( Mac48Address  to,
WifiTxVector  blockAckReqTxVector,
enum BlockAckType  type 
) const
private

Return the time required to transmit the Block ACK to the specified address given the TXVECTOR of the BAR (including preamble and FCS).

Parameters
to
dataTxVector
typethe Block ACK type
Returns
the time required to transmit the Block ACK (including preamble and FCS)

Definition at line 1298 of file mac-low.cc.

References ns3::BASIC_BLOCK_ACK, ns3::WifiPhy::CalculateTxDuration(), GetBlockAckSize(), ns3::WifiPhy::GetFrequency(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), m_phy, m_stationManager, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_PREAMBLE_HT_MF, ns3::WIFI_PREAMBLE_LONG, and ns3::WIFI_PREAMBLE_SHORT.

Referenced by SendBlockAckResponse(), SendCtsToSelf(), SendDataAfterCts(), SendDataPacket(), and SendRtsForPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::MacLow::GetBlockAckSize ( enum BlockAckType  type) const
private

Return the total Block ACK size (including FCS trailer).

Parameters
typethe Block ACK type
Returns
the total Block ACK size

Definition at line 1245 of file mac-low.cc.

References ns3::BASIC_BLOCK_ACK, ns3::COMPRESSED_BLOCK_ACK, ns3::CtrlBAckResponseHeader::GetSerializedSize(), ns3::WifiMacHeader::GetSize(), ns3::MULTI_TID_BLOCK_ACK, NS_ASSERT, ns3::WifiMacHeader::SetType(), ns3::CtrlBAckResponseHeader::SetType(), and ns3::WIFI_MAC_CTL_BACKRESP.

Referenced by GetBlockAckDuration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiTxVector ns3::MacLow::GetBlockAckTxVector ( Mac48Address  to,
WifiMode  dataTxMode 
) const
private

Return a TXVECTOR for the Block ACK frame given the destination and the mode of the DATA used by the sender.

The function consults WifiRemoteStationManager, which controls the rate to different destinations.

Parameters
tothe MAC address of the Block ACK receiver
dataTxModethe mode of the DATA used by the sender
Returns
TXVECTOR for the Block ACK

Definition at line 1400 of file mac-low.cc.

References ns3::WifiRemoteStationManager::GetBlockAckTxVector(), and m_stationManager.

Referenced by SendBlockAckResponse(), SendCtsToSelf(), SendDataAfterCts(), SendDataPacket(), and SendRtsForPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Mac48Address ns3::MacLow::GetBssid ( void  ) const

Return the Basic Service Set Identification.

Returns
BSSID

Definition at line 681 of file mac-low.cc.

References m_bssid.

Referenced by ns3::RegularWifiMac::GetBssid(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::EdcaTxopN::NotifyAccessGranted(), PerformMsduAggregation(), and ns3::EdcaTxopN::SendBlockAckRequest().

+ Here is the caller graph for this function:

Time ns3::MacLow::GetCompressedBlockAckTimeout ( ) const

Return Compressed Block ACK timeout of this MacLow.

Returns
Compressed Block ACK timeout

Definition at line 645 of file mac-low.cc.

References m_compressedBlockAckTimeout.

Referenced by ns3::RegularWifiMac::GetCompressedBlockAckTimeout(), and StartDataTxTimers().

+ Here is the caller graph for this function:

Time ns3::MacLow::GetCtsDuration ( WifiTxVector  ctsTxVector) const
private

Return the time required to transmit the CTS (including preamble and FCS).

Parameters
ctsTxVector
Returns
the time required to transmit the CTS (including preamble and FCS)

Definition at line 1328 of file mac-low.cc.

References ns3::WifiPhy::CalculateTxDuration(), GetCtsSize(), ns3::WifiPhy::GetFrequency(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), m_phy, m_stationManager, NS_ASSERT, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_PREAMBLE_LONG, and ns3::WIFI_PREAMBLE_SHORT.

Referenced by CalculateOverallTxTime(), GetCtsDuration(), SendCtsAfterRts(), and SendRtsForPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::MacLow::GetCtsDuration ( Mac48Address  to,
WifiTxVector  rtsTxVector 
) const
private

Return the time required to transmit the CTS to the specified address given the TXVECTOR of the RTS (including preamble and FCS).

Parameters
to
rtsTxVector
Returns
the time required to transmit the CTS (including preamble and FCS)

Definition at line 1321 of file mac-low.cc.

References GetCtsDuration(), GetCtsTxVectorForRts(), and ns3::WifiTxVector::GetMode().

+ Here is the call graph for this function:

uint32_t ns3::MacLow::GetCtsSize ( void  ) const
private

Return the total CTS size (including FCS trailer).

Returns
the total CTS size

Definition at line 1344 of file mac-low.cc.

References ns3::WifiMacHeader::GetSize(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_CTS.

Referenced by GetCtsDuration(), and SendCtsToSelf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::MacLow::GetCtsTimeout ( void  ) const

Return CTS timeout of this MacLow.

Returns
CTS timeout

Definition at line 651 of file mac-low.cc.

References m_ctsTimeout.

Referenced by ns3::RegularWifiMac::GetCtsTimeout(), and SendRtsForPacket().

+ Here is the caller graph for this function:

bool ns3::MacLow::GetCtsToSelfSupported ( ) const

Return whether CTS-to-self capability is supported.

Returns
true if CTS-to-self is supported, false otherwise

Definition at line 579 of file mac-low.cc.

References m_ctsToSelfSupported.

Referenced by ns3::RegularWifiMac::GetCtsToSelfSupported().

+ Here is the caller graph for this function:

WifiTxVector ns3::MacLow::GetCtsToSelfTxVector ( Ptr< const Packet packet,
const WifiMacHeader hdr 
) const
private

Return a TXVECTOR for the CTS-to-self frame.

The function consults WifiRemoteStationManager, which controls the rate to different destinations.

Parameters
packetthe packet that requires CTS-to-self
hdrthe Wifi header of the packet
Returns
TXVECTOR for the CTS-to-self operation

Definition at line 1368 of file mac-low.cc.

References ns3::WifiRemoteStationManager::GetCtsToSelfTxVector(), and m_stationManager.

+ Here is the call graph for this function:

WifiTxVector ns3::MacLow::GetCtsTxVector ( Mac48Address  to,
WifiMode  rtsTxMode 
) const
private

Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS used by the sender.

The function consults WifiRemoteStationManager, which controls the rate to different destinations.

Parameters
tothe MAC address of the CTS receiver
rtsTxModethe mode of the RTS used by the sender
Returns
TXVECTOR for the CTS

Definition at line 1388 of file mac-low.cc.

References ns3::WifiRemoteStationManager::GetCtsTxVector(), and m_stationManager.

Referenced by GetCtsTxVectorForRts(), and SendCtsAfterRts().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiTxVector ns3::MacLow::GetCtsTxVectorForRts ( Mac48Address  to,
WifiMode  rtsTxMode 
) const
private

Return a TXVECTOR for the CTS frame given the destination and the mode of the RTS used by the sender.

The function consults WifiRemoteStationManager, which controls the rate to different destinations.

Parameters
tothe MAC address of the CTS receiver
rtsTxModethe mode of the RTS used by the sender
Returns
TXVECTOR for the CTS

Definition at line 1406 of file mac-low.cc.

References GetCtsTxVector().

Referenced by GetCtsDuration().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiTxVector ns3::MacLow::GetDataTxVector ( Ptr< const Packet packet,
const WifiMacHeader hdr 
) const
virtual

Return a TXVECTOR for the DATA frame given the destination.

The function consults WifiRemoteStationManager, which controls the rate to different destinations.

Parameters
packetthe packet being asked for TXVECTOR
hdrthe WifiMacHeader
Returns
TXVECTOR for the given packet

Reimplemented in ns3::WaveMacLow.

Definition at line 1381 of file mac-low.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiRemoteStationManager::GetDataTxVector(), and m_stationManager.

Referenced by AggregateToAmpdu(), CalculateOverallTxTime(), CalculateTransmissionTime(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), ns3::WaveMacLow::GetDataTxVector(), NeedCtsToSelf(), NeedRts(), ns3::EdcaTxopN::RestartAccessIfNeeded(), ns3::EdcaTxopN::StartAccessIfNeeded(), and StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< WifiPhy > ns3::MacLow::GetPhy ( void  ) const

Definition at line 528 of file mac-low.cc.

References m_phy.

Referenced by ns3::WaveMacLow::StartTransmission().

+ Here is the caller graph for this function:

Time ns3::MacLow::GetPifs ( void  ) const

Return PCF Interframe Space (PIFS) of this MacLow.

Returns
PIFS

Definition at line 675 of file mac-low.cc.

References m_pifs.

Referenced by ns3::RegularWifiMac::GetPifs(), and StartDataTxTimers().

+ Here is the caller graph for this function:

Time ns3::MacLow::GetRifs ( void  ) const

Return Reduced Interframe Space (RIFS) of this MacLow.

Returns
RIFS

Definition at line 663 of file mac-low.cc.

References m_rifs.

Referenced by ns3::RegularWifiMac::GetRifs(), and StartDataTxTimers().

+ Here is the caller graph for this function:

uint32_t ns3::MacLow::GetRtsSize ( void  ) const
private

Return the total RTS size (including FCS trailer).

Returns
the total RTS size

Definition at line 1267 of file mac-low.cc.

References ns3::WifiMacHeader::GetSize(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_RTS.

Referenced by CalculateOverallTxTime(), and SendRtsForPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiTxVector ns3::MacLow::GetRtsTxVector ( Ptr< const Packet packet,
const WifiMacHeader hdr 
) const
private

Return a TXVECTOR for the RTS frame given the destination.

The function consults WifiRemoteStationManager, which controls the rate to different destinations.

Parameters
packetthe packet being asked for RTS TXVECTOR
hdrthe WifiMacHeader
Returns
TXVECTOR for the RTS of the given packet

Definition at line 1374 of file mac-low.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiRemoteStationManager::GetRtsTxVector(), and m_stationManager.

Referenced by CalculateOverallTxTime(), NotifyNav(), SendCtsToSelf(), and SendRtsForPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::MacLow::GetSifs ( void  ) const
uint32_t ns3::MacLow::GetSize ( Ptr< const Packet packet,
const WifiMacHeader hdr 
) const
private

Return the total size of the packet after WifiMacHeader and FCS trailer have been added.

Parameters
packetthe packet to be encapsulated with WifiMacHeader and FCS trailer
hdrthe WifiMacHeader
Returns
the total packet size

Definition at line 1352 of file mac-low.cc.

References ns3::WifiMacTrailer::GetSerializedSize(), ns3::Packet::GetSize(), ns3::WifiMacHeader::GetSize(), and m_ampdu.

Referenced by CalculateOverallTxTime(), SendCtsToSelf(), SendDataAfterCts(), SendRtsForPacket(), StartDataTxTimers(), and StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::MacLow::GetSlotTime ( void  ) const

Return slot duration of this MacLow.

Returns
slot duration

Definition at line 669 of file mac-low.cc.

References m_slotTime.

Referenced by ns3::RegularWifiMac::GetSlot(), and NotifyNav().

+ Here is the caller graph for this function:

uint8_t ns3::MacLow::GetTid ( Ptr< const Packet packet,
const WifiMacHeader  hdr 
) const
private
Parameters
packetpacket to check
hdr802.11 header for packet to check

Returns Tid of different packet types

Definition at line 1214 of file mac-low.cc.

References ns3::WifiMacHeader::GetQosTid(), ns3::CtrlBAckRequestHeader::GetTidInfo(), ns3::CtrlBAckResponseHeader::GetTidInfo(), ns3::WifiMacHeader::IsBlockAck(), ns3::WifiMacHeader::IsBlockAckReq(), ns3::WifiMacHeader::IsQosData(), and ns3::Packet::PeekHeader().

Referenced by AggregateToAmpdu(), ForwardDown(), PerformMsduAggregation(), SendDataAfterCts(), and StopMpduAggregation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TypeId ns3::MacLow::GetTypeId ( void  )
static

Register this type.

Returns
The TypeId.

Definition at line 390 of file mac-low.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

void ns3::MacLow::InsertInTxQueue ( Ptr< const Packet packet,
const WifiMacHeader hdr,
Time  tStamp 
)
private

Insert in a temporary queue.

It is only used with a RTS/CTS exchange for an A-MPDU transmission.

Definition at line 3272 of file mac-low.cc.

References ns3::MacLow::Item::hdr, m_txPackets, ns3::MacLow::Item::packet, and ns3::MacLow::Item::timestamp.

Referenced by AggregateToAmpdu().

+ Here is the caller graph for this function:

bool ns3::MacLow::IsAmpdu ( Ptr< const Packet packet,
const WifiMacHeader  hdr 
)
private

Checks if the given packet will be aggregated to an A-MPDU or not.

Parameters
packetpacket to check whether it can be aggregated in an A-MPDU
hdr802.11 header for packet to check whether it can be aggregated in an A-MPDU

Definition at line 705 of file mac-low.cc.

References AggregateToAmpdu(), ns3::WifiMacTrailer::GetSerializedSize(), ns3::Packet::GetSize(), ns3::WifiMacHeader::GetSize(), and m_currentPacket.

Referenced by AmpduAggregationTest::DoRun(), and StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::MacLow::IsInWindow ( uint16_t  seq,
uint16_t  winstart,
uint16_t  winsize 
)
private
Parameters
seqMPDU sequence number
winstartsequence number window start
winsizethe size of the sequence number window (currently default is 64) This method checks if the MPDU's sequence number is inside the scoreboard boundaries or not

Definition at line 2404 of file mac-low.cc.

Referenced by AggregateToAmpdu(), and ReceiveMpdu().

+ Here is the caller graph for this function:

bool ns3::MacLow::IsNavZero ( void  ) const
private

Check if NAV is zero.

Returns
true if NAV is zero, false otherwise

Definition at line 2080 of file mac-low.cc.

References m_lastNavDuration, m_lastNavStart, and ns3::Simulator::Now().

Referenced by ReceiveOk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::MacLow::IsPromisc ( void  ) const

Check if MacLow is operating in promiscuous mode.

Returns
true if MacLow is operating in promiscuous mode, false otherwise

Definition at line 687 of file mac-low.cc.

References m_promisc.

void ns3::MacLow::NavCounterResetCtsMissed ( Time  rtsEndRxTime)
private

Reset NAV after CTS was missed when the NAV was setted with RTS.

Parameters
rtsEndRxTime

Definition at line 1555 of file mac-low.cc.

References DoNavResetNow(), ns3::WifiPhy::GetLastRxStartTime(), m_phy, and ns3::Seconds().

Referenced by NotifyNav().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::MacLow::NeedCtsToSelf ( void  )
private

Check if CTS-to-self mechanism should be used for the current packet.

Returns
true if CTS-to-self mechanism should be used for the current packet, false otherwise

Definition at line 838 of file mac-low.cc.

References GetDataTxVector(), m_currentHdr, m_currentPacket, m_stationManager, and ns3::WifiRemoteStationManager::NeedCtsToSelf().

Referenced by StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::MacLow::NeedRts ( void  )
private

Check if the current packet should be sent with a RTS protection.

Returns
true if RTS protection should be used, false otherwise

Definition at line 830 of file mac-low.cc.

References ns3::WifiMacHeader::GetAddr1(), GetDataTxVector(), m_currentHdr, m_currentPacket, m_stationManager, and ns3::WifiRemoteStationManager::NeedRts().

Referenced by StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::NormalAckTimeout ( void  )
private

Event handler when normal ACK timeout occurs.

Todo:
should check that there was no rx start before now. we should restart a new ack timeout now until the expected end of rx if there was a rx start before now.

Definition at line 1762 of file mac-low.cc.

References FlushAggregateQueue(), ns3::WifiMacHeader::GetAddr1(), m_ampdu, m_currentHdr, m_listener, m_sentMpdus, m_stationManager, ns3::MacLowTransmissionListener::MissedAck(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WifiRemoteStationManager::ReportDataFailed().

Referenced by StartDataTxTimers().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::NotifyAckTimeoutResetNow ( )
private

Notify DcfManager (via DcfListener) that ACK timer should be resetted.

Definition at line 1602 of file mac-low.cc.

References m_dcfListeners.

Referenced by ReceiveOk().

+ Here is the caller graph for this function:

void ns3::MacLow::NotifyAckTimeoutStartNow ( Time  duration)
private

Notify DcfManager (via DcfListener) that ACK timer should be started for the given duration.

Parameters
duration

Definition at line 1593 of file mac-low.cc.

References m_dcfListeners.

Referenced by StartDataTxTimers().

+ Here is the caller graph for this function:

void ns3::MacLow::NotifyCtsTimeoutResetNow ( )
private

Notify DcfManager (via DcfListener) that CTS timer should be resetted.

Definition at line 1620 of file mac-low.cc.

References m_dcfListeners.

Referenced by ReceiveOk().

+ Here is the caller graph for this function:

void ns3::MacLow::NotifyCtsTimeoutStartNow ( Time  duration)
private

Notify DcfManager (via DcfListener) that CTS timer should be started for the given duration.

Parameters
duration

Definition at line 1611 of file mac-low.cc.

References m_dcfListeners.

Referenced by SendRtsForPacket().

+ Here is the caller graph for this function:

void ns3::MacLow::NotifyNav ( Ptr< const Packet packet,
const WifiMacHeader hdr,
WifiPreamble  preamble 
)
private
Todo:
We should also handle CF_END specially here but we don't for now because we do not generate them.

A STA that used information from an RTS frame as the most recent basis to update its NAV setting is permitted to reset its NAV if no PHY-RXSTART.indication is detected from the PHY during a period with a duration of (2 * aSIFSTime) + (CTS_Time) + (2 * aSlotTime) starting at the PHY-RXEND.indication corresponding to the detection of the RTS frame. The “CTS_Time” shall be calculated using the length of the CTS frame and the data rate at which the RTS frame used for the most recent NAV update was received.

Definition at line 1513 of file mac-low.cc.

References ns3::WifiPhy::CalculateTxDuration(), DoNavResetNow(), DoNavStartNow(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::GetDuration(), ns3::WifiPhy::GetFrequency(), GetRtsTxVector(), ns3::WifiMacHeader::GetSerializedSize(), GetSifs(), GetSlotTime(), ns3::WifiMacHeader::IsCfpoll(), ns3::WifiMacHeader::IsRts(), m_bssid, m_lastNavStart, m_navCounterResetCtsMissed, m_phy, m_self, NavCounterResetCtsMissed(), ns3::Simulator::Now(), NS_ASSERT, ns3::Simulator::Schedule(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_CTL_CTS.

Referenced by DeaggregateAmpduAndReceive(), and ReceiveOk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::NotifySleepNow ( void  )

This method is typically invoked by the PhyMacLowListener to notify the MAC layer that the device has been put into sleep mode.

When the device is put into sleep mode, pending MAC transmissions (RTS, CTS, DATA and ACK) are cancelled.

Definition at line 875 of file mac-low.cc.

References ns3::EventId::Cancel(), CancelAllEvents(), ns3::EventId::IsRunning(), m_currentPacket, m_lastNavDuration, m_lastNavStart, m_listener, m_navCounterResetCtsMissed, ns3::Simulator::Now(), NS_LOG_DEBUG, and ns3::Seconds().

Referenced by ns3::PhyMacLowListener::NotifySleep(), and ns3::OcbWifiMac::Suspend().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::NotifySwitchingStartNow ( Time  duration)
Parameters
durationswitching delay duration.

This method is typically invoked by the PhyMacLowListener to notify the MAC layer that a channel switching occured. When a channel switching occurs, pending MAC transmissions (RTS, CTS, DATA and ACK) are cancelled.

Definition at line 859 of file mac-low.cc.

References ns3::EventId::Cancel(), CancelAllEvents(), ns3::EventId::IsRunning(), m_currentPacket, m_lastNavDuration, m_lastNavStart, m_listener, m_navCounterResetCtsMissed, m_stationManager, ns3::Simulator::Now(), NS_LOG_DEBUG, ns3::WifiRemoteStationManager::Reset(), and ns3::Seconds().

Referenced by ns3::PhyMacLowListener::NotifySwitchingStart(), and ns3::OcbWifiMac::Reset().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< Packet > ns3::MacLow::PerformMsduAggregation ( Ptr< const Packet packet,
WifiMacHeader hdr,
Time tstamp,
Ptr< Packet currentAmpduPacket,
uint16_t  blockAckSize 
)
private

Perform MSDU aggregation for a given MPDU in an A-MPDU.

Parameters
packetpacket picked for aggregation
hdr802.11 header for packet picked for aggregation
tstamptimestamp
currentAmpduPacketcurrent A-MPDU packet
blockAckSizesize of the piggybacked block ack request
Returns
the aggregate if MSDU aggregation succeeded, 0 otherwise

Definition at line 3284 of file mac-low.cc.

References ns3::WifiMacHeader::ADDR1, ns3::WifiMacHeader::GetAddr1(), GetBssid(), ns3::WifiMacHeader::GetQosTid(), ns3::Packet::GetSize(), GetTid(), m_edcaListeners, NS_ASSERT, NS_LOG_DEBUG, ns3::QosUtilsMapTidToAc(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetQosAmsdu(), and StopMpduAggregation().

Referenced by AggregateToAmpdu(), and TwoLevelAggregationTest::DoRun().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::ReceiveError ( Ptr< Packet packet,
double  rxSnr 
)
Parameters
packetpacket received.
rxSnrsnr of packet received.
isEndOfFramePHY-RXEND indication.

This method is typically invoked by the lower PHY layer to notify the MAC layer that a packet was unsuccessfully received.

Definition at line 845 of file mac-low.cc.

References FastAckFailedTimeout(), GetSifs(), ns3::EventId::IsExpired(), m_fastAckFailedTimeoutEvent, m_txParams, ns3::MacLowTransmissionParameters::MustWaitFastAck(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Simulator::Schedule().

Referenced by SetPhy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::MacLow::ReceiveMpdu ( Ptr< Packet packet,
WifiMacHeader  hdr 
)
private

This method updates the reorder buffer and the scoreboard when an MPDU is received in an HT station and sotres the MPDU if needed when an MPDU is received in an non-HT Station (implements HT immediate block Ack)

Definition at line 2410 of file mac-low.cc.

References ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::WifiRemoteStationManager::HasHtSupported(), ns3::WifiRemoteStationManager::HasVhtSupported(), IsInWindow(), ns3::WifiMacHeader::IsQosData(), m_bAckAgreements, m_stationManager, ns3::QosUtilsIsOldPacket(), RxCompleteBufferedPacketsUntilFirstLost(), RxCompleteBufferedPacketsWithSmallerSequence(), and StoreMpduIfNeeded().

Referenced by ReceiveOk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::ReceiveOk ( Ptr< Packet packet,
double  rxSnr,
WifiTxVector  txVector,
WifiPreamble  preamble,
bool  ampduSubframe 
)
Parameters
packetpacket received
rxSnrsnr of packet received
txVectorTXVECTOR of packet received
preambletype of preamble used for the packet received
ampduSubframetrue if this MPDU is part of an A-MPDU

This method is typically invoked by the lower PHY layer to notify the MAC layer that a packet was successfully received.

Definition at line 890 of file mac-low.cc.

References ns3::Packet::AddPacketTag(), ns3::EventId::Cancel(), FlushAggregateQueue(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiTxVector::GetMode(), GetSifs(), ns3::CtrlBAckRequestHeader::GetStartingSequence(), ns3::CtrlBAckRequestHeader::GetTidInfo(), ns3::MacLowTransmissionListener::GotAck(), ns3::MacLowTransmissionListener::GotBlockAck(), ns3::MacLowTransmissionListener::GotCts(), ns3::MacLowTransmissionParameters::HasNextPacket(), ns3::EventId::IsExpired(), ns3::CtrlBAckRequestHeader::IsMultiTid(), IsNavZero(), ns3::WifiMacHeader::IsQosData(), ns3::EventId::IsRunning(), m_ampdu, m_bAckAgreements, m_bAckCaches, m_blockAckTimeoutEvent, m_ctsTimeoutEvent, m_currentHdr, m_currentPacket, m_edcaListeners, m_fastAckTimeoutEvent, m_lastReceivedHdr, m_listener, m_normalAckTimeoutEvent, m_promisc, m_rxCallback, m_self, m_sendAckEvent, m_sendCtsEvent, m_sendDataEvent, m_sentMpdus, m_stationManager, m_superFastAckTimeoutEvent, m_txParams, m_waitSifsEvent, ns3::MacLowTransmissionParameters::MustWaitAck(), ns3::MacLowTransmissionParameters::MustWaitBasicBlockAck(), ns3::MacLowTransmissionParameters::MustWaitCompressedBlockAck(), ns3::MacLowTransmissionParameters::MustWaitFastAck(), ns3::MacLowTransmissionParameters::MustWaitNormalAck(), NotifyAckTimeoutResetNow(), NotifyCtsTimeoutResetNow(), NotifyNav(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::QosUtilsMapTidToAc(), ReceiveMpdu(), ns3::Packet::RemoveHeader(), ns3::Packet::RemovePacketTag(), ns3::Packet::RemoveTrailer(), ns3::WifiRemoteStationManager::ReportDataOk(), ns3::WifiRemoteStationManager::ReportRtsOk(), ns3::WifiRemoteStationManager::ReportRxOk(), ResetBlockAckInactivityTimerIfNeeded(), RxCompleteBufferedPacketsUntilFirstLost(), RxCompleteBufferedPacketsWithSmallerSequence(), ns3::Simulator::Schedule(), SendAckAfterData(), SendBlockAckAfterBlockAckRequest(), SendCtsAfterRts(), SendDataAfterCts(), ns3::SnrTag::Set(), WaitSifsAfterEndTx(), and WaitSifsAfterEndTxFragment().

Referenced by DeaggregateAmpduAndReceive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::RegisterBlockAckListenerForAc ( enum AcIndex  ac,
MacLowAggregationCapableTransmissionListener listener 
)
Parameters
acAccess class managed by the queue.
listenerThe listener for the queue.

The lifetime of the registered listener is typically equal to the lifetime of the queue associated to this AC.

Definition at line 2813 of file mac-low.cc.

References m_edcaListeners.

Referenced by ns3::EdcaTxopN::CompleteConfig().

+ Here is the caller graph for this function:

void ns3::MacLow::RegisterDcfListener ( MacLowDcfListener listener)
Parameters
listenerlisten to NAV events for every incoming and outgoing packet.

Definition at line 699 of file mac-low.cc.

References m_dcfListeners.

Referenced by ns3::DcfManager::SetupLowListener().

+ Here is the caller graph for this function:

void ns3::MacLow::RemovePhyMacLowListener ( Ptr< WifiPhy phy)
private

Remove current WifiPhy listener for this MacLow.

Parameters
phythe WifiPhy this MacLow is connected to

Definition at line 408 of file mac-low.cc.

References m_phyMacLowListener, and ns3::WifiPhy::UnregisterListener().

Referenced by ResetPhy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::ResetBlockAckInactivityTimerIfNeeded ( BlockAckAgreement agreement)
private

Every time that a block ack request or a packet with ack policy equals to block ack are received, if a relative block ack agreement exists and the value of inactivity timeout is not 0, the timer is reset.

see section 11.5.3 in IEEE 802.11e for more details.

Parameters
agreement

Definition at line 2796 of file mac-low.cc.

References ns3::MacLowAggregationCapableTransmissionListener::BlockAckInactivityTimeout(), ns3::EventId::Cancel(), ns3::BlockAckAgreement::GetPeer(), ns3::BlockAckAgreement::GetTid(), ns3::BlockAckAgreement::GetTimeout(), ns3::EventId::IsRunning(), m_edcaListeners, ns3::BlockAckAgreement::m_inactivityEvent, ns3::MicroSeconds(), NS_ASSERT, ns3::QosUtilsMapTidToAc(), ns3::Simulator::Schedule(), and timeout.

Referenced by DeaggregateAmpduAndReceive(), and ReceiveOk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::ResetPhy ( void  )

Remove WifiPhy associated with this MacLow.

Parameters
phyWifiPhy associated with this MacLow

Definition at line 534 of file mac-low.cc.

References m_phy, ns3::MakeNullCallback(), RemovePhyMacLowListener(), ns3::WifiPhy::SetReceiveErrorCallback(), and ns3::WifiPhy::SetReceiveOkCallback().

Referenced by ns3::RegularWifiMac::ResetWifiPhy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::RxCompleteBufferedPacketsUntilFirstLost ( Mac48Address  originator,
uint8_t  tid 
)
private
Parameters
originatorAddress of peer participating in Block Ack mechanism.
tidTID for which Block Ack was created.

This method is typically invoked when a MPDU with ack policy subfield set to Normal Ack is received and a block ack agreement for that packet exists. This happens when the originator of block ack has only few MPDUs to send. All completed MSDUs starting with starting sequence number of block ack agreement are forward up to WifiMac until there is an incomplete or missing MSDU. See section 9.10.4 in IEEE 802.11 standard for more details.

Definition at line 2605 of file mac-low.cc.

References m_bAckAgreements, and m_rxCallback.

Referenced by DestroyBlockAckAgreement(), ReceiveMpdu(), ReceiveOk(), and SendBlockAckAfterBlockAckRequest().

+ Here is the caller graph for this function:

void ns3::MacLow::RxCompleteBufferedPacketsWithSmallerSequence ( uint16_t  seq,
Mac48Address  originator,
uint8_t  tid 
)
private
Parameters
originatorAddress of peer participating in Block Ack mechanism.
tidTID for which Block Ack was created.
seqStarting sequence control

This function forward up all completed "old" packets with sequence number smaller than seq. All comparison are performed circularly mod 4096.

Definition at line 2542 of file mac-low.cc.

References m_bAckAgreements, m_rxCallback, and ns3::QosUtilsMapSeqControlToUniqueInteger().

Referenced by DestroyBlockAckAgreement(), ReceiveMpdu(), ReceiveOk(), and SendBlockAckAfterBlockAckRequest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SendBlockAckAfterAmpdu ( uint8_t  tid,
Mac48Address  originator,
Time  duration,
WifiTxVector  blockAckReqTxVector,
double  rxSnr 
)
private

Invoked after an A-MPDU has been received.

Looks for corresponding block ack agreement and creates block ack bitmap on a received packets basis.

Definition at line 2711 of file mac-low.cc.

References ns3::Time::As(), ns3::COMPRESSED_BLOCK_ACK, ns3::WifiTxVector::GetMode(), m_bAckAgreements, m_bAckCaches, NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Time::S, and SendBlockAckResponse().

Referenced by DeaggregateAmpduAndReceive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SendBlockAckAfterBlockAckRequest ( const CtrlBAckRequestHeader  reqHdr,
Mac48Address  originator,
Time  duration,
WifiMode  blockAckReqTxMode,
double  rxSnr 
)
private
void ns3::MacLow::SendBlockAckResponse ( const CtrlBAckResponseHeader blockAck,
Mac48Address  originator,
bool  immediate,
Time  duration,
WifiMode  blockAckReqTxMode,
double  rxSnr 
)
private

This method creates block ack frame with header equals to blockAck and start its transmission.

Parameters
blockAck
originator
immediate
duration
blockAckReqTxMode
rxSnr

Definition at line 2634 of file mac-low.cc.

References ns3::Packet::AddHeader(), ns3::Packet::AddPacketTag(), ns3::Packet::AddTrailer(), ns3::BASIC_BLOCK_ACK, ns3::COMPRESSED_BLOCK_ACK, ns3::MacLowTransmissionParameters::DisableAck(), ns3::MacLowTransmissionParameters::DisableNextData(), ns3::MacLowTransmissionParameters::EnableAck(), ForwardDown(), GetAckDuration(), GetAddress(), GetBlockAckDuration(), GetBlockAckTxVector(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), GetSifs(), ns3::CtrlBAckResponseHeader::IsBasic(), ns3::CtrlBAckResponseHeader::IsCompressed(), ns3::CtrlBAckResponseHeader::IsMultiTid(), m_currentHdr, m_currentPacket, m_stationManager, m_txParams, ns3::NanoSeconds(), NS_ASSERT, NS_FATAL_ERROR, ns3::SnrTag::Set(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), StartDataTxTimers(), ns3::WIFI_MAC_CTL_BACKRESP, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_PREAMBLE_HT_MF, ns3::WIFI_PREAMBLE_LONG, and ns3::WIFI_PREAMBLE_SHORT.

Referenced by SendBlockAckAfterAmpdu(), and SendBlockAckAfterBlockAckRequest().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SendCtsAfterRts ( Mac48Address  source,
Time  duration,
WifiTxVector  rtsTxVector,
double  rtsSnr 
)
private
void ns3::MacLow::SendCtsToSelf ( void  )
private

Send CTS for a CTS-to-self mechanism.

Definition at line 2093 of file mac-low.cc.

References ns3::Packet::AddHeader(), ns3::Packet::AddTrailer(), ns3::BASIC_BLOCK_ACK, ns3::WifiPhy::CalculateTxDuration(), ns3::COMPRESSED_BLOCK_ACK, ForwardDown(), GetAckDuration(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), GetBlockAckDuration(), GetBlockAckTxVector(), GetCtsSize(), ns3::MacLowTransmissionParameters::GetDurationId(), ns3::WifiPhy::GetFrequency(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::MacLowTransmissionParameters::GetNextPacketSize(), GetRtsTxVector(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), GetSifs(), GetSize(), ns3::MacLowTransmissionParameters::HasDurationId(), ns3::MacLowTransmissionParameters::HasNextPacket(), ns3::EventId::IsExpired(), m_currentHdr, m_currentPacket, m_currentTxVector, m_phy, m_self, m_sendDataEvent, m_stationManager, m_txParams, ns3::MacLowTransmissionParameters::MustWaitAck(), ns3::MacLowTransmissionParameters::MustWaitBasicBlockAck(), ns3::MacLowTransmissionParameters::MustWaitCompressedBlockAck(), NS_ASSERT, ns3::Simulator::Schedule(), ns3::Seconds(), SendDataAfterCts(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_CTL_CTS, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_PREAMBLE_HT_MF, ns3::WIFI_PREAMBLE_LONG, and ns3::WIFI_PREAMBLE_SHORT.

Referenced by StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SendDataAfterCts ( Mac48Address  source,
Time  duration 
)
private

Send DATA after receiving CTS.

Parameters
source
duration

Definition at line 2231 of file mac-low.cc.

References ns3::Packet::AddHeader(), ns3::Packet::AddTrailer(), ns3::BASIC_BLOCK_ACK, ns3::WifiPhy::CalculateTxDuration(), ns3::COMPRESSED_BLOCK_ACK, ForwardDown(), GetAckDuration(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), GetBlockAckDuration(), GetBlockAckTxVector(), ns3::WifiPhy::GetFrequency(), ns3::WifiPhy::GetGreenfield(), ns3::WifiRemoteStationManager::GetGreenfieldSupported(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::MacLowTransmissionParameters::GetNextPacketSize(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), GetSifs(), GetSize(), GetTid(), ns3::MacLowTransmissionParameters::HasNextPacket(), m_aggregateQueue, m_ampdu, m_currentHdr, m_currentPacket, m_currentTxVector, m_edcaListeners, m_phy, m_stationManager, m_txPackets, m_txParams, max, ns3::MicroSeconds(), ns3::MacLowTransmissionParameters::MustWaitAck(), ns3::MacLowTransmissionParameters::MustWaitBasicBlockAck(), ns3::MacLowTransmissionParameters::MustWaitCompressedBlockAck(), NS_ASSERT, NS_LOG_FUNCTION, ns3::QosUtilsMapTidToAc(), ns3::Seconds(), ns3::WifiMacHeader::SetDuration(), StartDataTxTimers(), ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_VHT, ns3::WIFI_PREAMBLE_HT_GF, ns3::WIFI_PREAMBLE_HT_MF, ns3::WIFI_PREAMBLE_LONG, ns3::WIFI_PREAMBLE_SHORT, and ns3::WIFI_PREAMBLE_VHT.

Referenced by ReceiveOk(), and SendCtsToSelf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SendDataPacket ( void  )
private

Send DATA packet, which can be DATA-ACK or RTS-CTS-DATA-ACK transaction.

Definition at line 2001 of file mac-low.cc.

References ns3::Packet::AddHeader(), ns3::Packet::AddTrailer(), ns3::BASIC_BLOCK_ACK, ns3::WifiPhy::CalculateTxDuration(), ns3::COMPRESSED_BLOCK_ACK, ForwardDown(), GetAckDuration(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), GetBlockAckDuration(), GetBlockAckTxVector(), ns3::MacLowTransmissionParameters::GetDurationId(), ns3::WifiPhy::GetFrequency(), ns3::WifiPhy::GetGreenfield(), ns3::WifiRemoteStationManager::GetGreenfieldSupported(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::MacLowTransmissionParameters::GetNextPacketSize(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), GetSifs(), ns3::MacLowTransmissionParameters::HasDurationId(), ns3::MacLowTransmissionParameters::HasNextPacket(), m_ampdu, m_currentHdr, m_currentPacket, m_currentTxVector, m_phy, m_stationManager, m_txParams, ns3::MacLowTransmissionParameters::MustWaitAck(), ns3::MacLowTransmissionParameters::MustWaitBasicBlockAck(), ns3::MacLowTransmissionParameters::MustWaitCompressedBlockAck(), NS_LOG_FUNCTION, ns3::Seconds(), ns3::WifiMacHeader::SetDuration(), StartDataTxTimers(), ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_VHT, ns3::WIFI_PREAMBLE_HT_GF, ns3::WIFI_PREAMBLE_HT_MF, ns3::WIFI_PREAMBLE_LONG, ns3::WIFI_PREAMBLE_SHORT, and ns3::WIFI_PREAMBLE_VHT.

Referenced by StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SendMpdu ( Ptr< const Packet packet,
WifiTxVector  txVector,
WifiPreamble  preamble,
enum mpduType  mpdutype 
)
private

Forward the MPDU down to WifiPhy for transmission.

This is called for each MPDU when MPDU aggregation is used.

Parameters
packet
hdr
txVector
preamble
mpdutype

Definition at line 1735 of file mac-low.cc.

References m_phy, NS_LOG_DEBUG, and ns3::WifiPhy::SendPacket().

Referenced by ForwardDown().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SendRtsForPacket ( void  )
private

Send RTS to begin RTS-CTS-DATA-ACK transaction.

Definition at line 1829 of file mac-low.cc.

References ns3::Packet::AddHeader(), ns3::Packet::AddTrailer(), ns3::BASIC_BLOCK_ACK, ns3::WifiPhy::CalculateTxDuration(), ns3::COMPRESSED_BLOCK_ACK, CtsTimeout(), ForwardDown(), GetAckDuration(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), GetBlockAckDuration(), GetBlockAckTxVector(), GetCtsDuration(), GetCtsTimeout(), ns3::MacLowTransmissionParameters::GetDurationId(), ns3::WifiPhy::GetFrequency(), ns3::WifiPhy::GetGreenfield(), ns3::WifiRemoteStationManager::GetGreenfieldSupported(), ns3::WifiTxVector::GetMode(), ns3::MacLowTransmissionParameters::GetNextPacketSize(), GetRtsSize(), GetRtsTxVector(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), GetSifs(), GetSize(), ns3::MacLowTransmissionParameters::HasDurationId(), ns3::MacLowTransmissionParameters::HasNextPacket(), ns3::EventId::IsExpired(), m_ctsTimeoutEvent, m_currentHdr, m_currentPacket, m_currentTxVector, m_phy, m_self, m_stationManager, m_txParams, ns3::MacLowTransmissionParameters::MustWaitAck(), ns3::MacLowTransmissionParameters::MustWaitBasicBlockAck(), ns3::MacLowTransmissionParameters::MustWaitCompressedBlockAck(), NotifyCtsTimeoutStartNow(), NS_ASSERT, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), ns3::Seconds(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetDuration(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_CTL_RTS, ns3::WIFI_PREAMBLE_HT_GF, ns3::WIFI_PREAMBLE_LONG, and ns3::WIFI_PREAMBLE_SHORT.

Referenced by StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SetAckTimeout ( Time  ackTimeout)

Set ACK timeout of this MacLow.

Parameters
ackTimeoutACK timeout of this MacLow

Definition at line 555 of file mac-low.cc.

References m_ackTimeout.

Referenced by ns3::RegularWifiMac::SetAckTimeout().

+ Here is the caller graph for this function:

void ns3::MacLow::SetAddress ( Mac48Address  ad)

Set MAC address of this MacLow.

Parameters
adMac48Address of this MacLow

Definition at line 549 of file mac-low.cc.

References m_self.

Referenced by AmpduAggregationTest::DoRun(), and ns3::RegularWifiMac::SetAddress().

+ Here is the caller graph for this function:

void ns3::MacLow::SetBasicBlockAckTimeout ( Time  blockAckTimeout)

Set Basic Block ACK timeout of this MacLow.

Parameters
blockAckTimeoutBasic Block ACK timeout of this MacLow

Definition at line 561 of file mac-low.cc.

References m_basicBlockAckTimeout.

Referenced by ns3::RegularWifiMac::SetBasicBlockAckTimeout().

+ Here is the caller graph for this function:

void ns3::MacLow::SetBssid ( Mac48Address  ad)

Set the Basic Service Set Identification.

Parameters
adthe BSSID

Definition at line 615 of file mac-low.cc.

References m_bssid.

Referenced by ns3::RegularWifiMac::SetBssid().

+ Here is the caller graph for this function:

void ns3::MacLow::SetCompressedBlockAckTimeout ( Time  blockAckTimeout)

Set Compressed Block ACK timeout of this MacLow.

Parameters
blockAckTimeoutCompressed Block ACK timeout of this MacLow

Definition at line 567 of file mac-low.cc.

References m_compressedBlockAckTimeout.

Referenced by ns3::RegularWifiMac::SetCompressedBlockAckTimeout().

+ Here is the caller graph for this function:

void ns3::MacLow::SetCtsTimeout ( Time  ctsTimeout)

Set CTS timeout of this MacLow.

Parameters
ctsTimeoutCTS timeout of this MacLow

Definition at line 585 of file mac-low.cc.

References m_ctsTimeout.

Referenced by ns3::RegularWifiMac::SetCtsTimeout().

+ Here is the caller graph for this function:

void ns3::MacLow::SetCtsToSelfSupported ( bool  enable)

Enable or disable CTS-to-self capability.

Parameters
enableEnable or disable CTS-to-self capability

Definition at line 573 of file mac-low.cc.

References m_ctsToSelfSupported.

Referenced by ns3::RegularWifiMac::SetCtsToSelfSupported().

+ Here is the caller graph for this function:

void ns3::MacLow::SetPhy ( Ptr< WifiPhy phy)

Set up WifiPhy associated with this MacLow.

Parameters
phyWifiPhy associated with this MacLow

Definition at line 519 of file mac-low.cc.

References DeaggregateAmpduAndReceive(), m_phy, ns3::MakeCallback(), third::phy, ReceiveError(), ns3::WifiPhy::SetReceiveErrorCallback(), ns3::WifiPhy::SetReceiveOkCallback(), and SetupPhyMacLowListener().

Referenced by AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), and ns3::RegularWifiMac::SetWifiPhy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SetPifs ( Time  pifs)

Set PCF Interframe Space (PIFS) of this MacLow.

Parameters
pifsPIFS of this MacLow

Definition at line 603 of file mac-low.cc.

References m_pifs.

Referenced by ns3::RegularWifiMac::SetPifs().

+ Here is the caller graph for this function:

void ns3::MacLow::SetPromisc ( void  )

Enable promiscuous mode.

Definition at line 621 of file mac-low.cc.

References m_promisc.

Referenced by ns3::RegularWifiMac::SetPromisc().

+ Here is the caller graph for this function:

void ns3::MacLow::SetRifs ( Time  rifs)

Set Reduced Interframe Space (RIFS) of this MacLow.

Parameters
rifsRIFS of this MacLow

Definition at line 609 of file mac-low.cc.

References m_rifs.

Referenced by ns3::RegularWifiMac::SetRifs().

+ Here is the caller graph for this function:

void ns3::MacLow::SetRxCallback ( Callback< void, Ptr< Packet >, const WifiMacHeader * >  callback)
Parameters
callbackthe callback which receives every incoming packet.

This callback typically forwards incoming packets to an instance of ns3::MacRxMiddle.

Definition at line 693 of file mac-low.cc.

References m_rxCallback.

Referenced by ns3::OcbWifiMac::EnableForWave(), and ns3::RegularWifiMac::RegularWifiMac().

+ Here is the caller graph for this function:

void ns3::MacLow::SetSifs ( Time  sifs)

Set Short Interframe Space (SIFS) of this MacLow.

Parameters
sifsSIFS of this MacLow

Definition at line 591 of file mac-low.cc.

References m_sifs.

Referenced by ns3::RegularWifiMac::SetSifs().

+ Here is the caller graph for this function:

void ns3::MacLow::SetSlotTime ( Time  slotTime)

Set slot duration of this MacLow.

Parameters
slotTimeslot duration of this MacLow

Definition at line 597 of file mac-low.cc.

References m_slotTime.

Referenced by ns3::RegularWifiMac::SetSlot().

+ Here is the caller graph for this function:

void ns3::MacLow::SetupPhyMacLowListener ( Ptr< WifiPhy phy)
private

Set up WifiPhy listener for this MacLow.

Parameters
phythe WifiPhy this MacLow is connected to

Definition at line 401 of file mac-low.cc.

References m_phyMacLowListener, and ns3::WifiPhy::RegisterListener().

Referenced by SetPhy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SetWifiRemoteStationManager ( Ptr< WifiRemoteStationManager manager)

Set up WifiRemoteStationManager associated with this MacLow.

Parameters
managerWifiRemoteStationManager associated with this MacLow

Definition at line 543 of file mac-low.cc.

References m_stationManager.

Referenced by AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), and ns3::RegularWifiMac::SetWifiRemoteStationManager().

+ Here is the caller graph for this function:

void ns3::MacLow::StartDataTxTimers ( WifiTxVector  dataTxVector)
private

Start a DATA timer by scheduling appropriate ACK timeout.

Parameters
dataTxVector

Definition at line 1915 of file mac-low.cc.

References BlockAckTimeout(), ns3::WifiPhy::CalculateTxDuration(), EndTxNoAck(), FastAckTimeout(), GetAckTimeout(), ns3::WifiMacHeader::GetAddr1(), GetBasicBlockAckTimeout(), GetCompressedBlockAckTimeout(), ns3::WifiPhy::GetFrequency(), ns3::WifiPhy::GetGreenfield(), ns3::WifiRemoteStationManager::GetGreenfieldSupported(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), GetPifs(), GetRifs(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), GetSifs(), GetSize(), ns3::WifiRemoteStationManager::HasHtSupported(), ns3::MacLowTransmissionParameters::HasNextPacket(), ns3::EventId::IsExpired(), m_blockAckTimeoutEvent, m_currentHdr, m_currentPacket, m_fastAckTimeoutEvent, m_normalAckTimeoutEvent, m_phy, m_stationManager, m_superFastAckTimeoutEvent, m_txParams, m_waitRifsEvent, m_waitSifsEvent, ns3::MacLowTransmissionParameters::MustWaitBasicBlockAck(), ns3::MacLowTransmissionParameters::MustWaitCompressedBlockAck(), ns3::MacLowTransmissionParameters::MustWaitFastAck(), ns3::MacLowTransmissionParameters::MustWaitNormalAck(), ns3::MacLowTransmissionParameters::MustWaitSuperFastAck(), NormalAckTimeout(), NotifyAckTimeoutStartNow(), NS_ASSERT, ns3::Simulator::Schedule(), SuperFastAckTimeout(), WaitSifsAfterEndTxFragment(), ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_VHT, ns3::WIFI_PREAMBLE_HT_GF, ns3::WIFI_PREAMBLE_HT_MF, ns3::WIFI_PREAMBLE_LONG, ns3::WIFI_PREAMBLE_SHORT, and ns3::WIFI_PREAMBLE_VHT.

Referenced by SendBlockAckResponse(), SendDataAfterCts(), and SendDataPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::StartTransmission ( Ptr< const Packet packet,
const WifiMacHeader hdr,
MacLowTransmissionParameters  parameters,
MacLowTransmissionListener listener 
)
virtual
Parameters
packetpacket to send
hdr802.11 header for packet to send
parametersthe transmission parameters to use for this packet.
listenerlisten to transmission events.

Start the transmission of the input packet and notify the listener of transmission events.

Reimplemented in ns3::WaveMacLow.

Definition at line 724 of file mac-low.cc.

References CancelAllEvents(), ns3::Packet::Copy(), ns3::MacLowTransmissionParameters::DisableRts(), ns3::MacLowTransmissionParameters::EnableAck(), ns3::MacLowTransmissionParameters::EnableCompressedBlockAck(), ns3::MacLowTransmissionParameters::EnableRts(), ns3::WifiMacHeader::GetAddr1(), GetDataTxVector(), ns3::AmpduTag::GetRemainingNbOfMpdus(), GetSize(), ns3::WifiRemoteStationManager::GetUseNonErpProtection(), IsAmpdu(), ns3::WifiMacHeader::IsBlockAck(), ns3::WifiMacHeader::IsBlockAckReq(), ns3::WifiMacHeader::IsQosData(), ns3::WifiPhy::IsStateTx(), m_aggregateQueue, m_ampdu, m_ctsToSelfSupported, m_currentHdr, m_currentPacket, m_currentTxVector, m_listener, m_phy, m_sentMpdus, m_stationManager, m_txParams, ns3::MacLowTransmissionParameters::MustSendRts(), NeedCtsToSelf(), NeedRts(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Packet::PeekPacketTag(), ns3::Packet::RemovePacketTag(), SendCtsToSelf(), SendDataPacket(), and SendRtsForPacket().

Referenced by ns3::DcaTxop::NotifyAccessGranted(), ns3::EdcaTxopN::NotifyAccessGranted(), ns3::EdcaTxopN::SendAddBaRequest(), ns3::EdcaTxopN::SendBlockAckRequest(), ns3::EdcaTxopN::StartNext(), ns3::DcaTxop::StartNextFragment(), ns3::EdcaTxopN::StartNextFragment(), and ns3::WaveMacLow::StartTransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::MacLow::StopMpduAggregation ( Ptr< const Packet peekedPacket,
WifiMacHeader  peekedHdr,
Ptr< Packet aggregatedPacket,
uint16_t  size 
) const
Parameters
peekedPacketthe packet to be aggregated
peekedHdrthe WifiMacHeader for the packet.
aggregatedPacketthe current A-MPDU
sizethe size of a piggybacked block ack request
Returns
false if the given packet can be added to an A-MPDU, true otherwise

This function decides if a given packet can be added to an A-MPDU or not

Definition at line 2908 of file mac-low.cc.

References ns3::WifiPhy::CalculateTxDuration(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiPhy::GetFrequency(), ns3::WifiPhy::GetGreenfield(), ns3::WifiRemoteStationManager::GetGreenfieldSupported(), ns3::WifiTxVector::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::WifiRemoteStationManager::GetShortPreambleEnabled(), ns3::Packet::GetSize(), ns3::WifiMacHeader::GetSize(), GetTid(), m_currentHdr, m_currentTxVector, m_edcaListeners, m_phy, m_stationManager, ns3::MicroSeconds(), ns3::MilliSeconds(), NS_LOG_DEBUG, ns3::QosUtilsMapTidToAc(), ns3::WIFI_MAC_FCS_LENGTH, ns3::WIFI_MOD_CLASS_HT, ns3::WIFI_MOD_CLASS_VHT, ns3::WIFI_PREAMBLE_HT_GF, ns3::WIFI_PREAMBLE_HT_MF, ns3::WIFI_PREAMBLE_LONG, ns3::WIFI_PREAMBLE_SHORT, and ns3::WIFI_PREAMBLE_VHT.

Referenced by AggregateToAmpdu(), and PerformMsduAggregation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::MacLow::StoreMpduIfNeeded ( Ptr< Packet packet,
WifiMacHeader  hdr 
)
private

This method checks if exists a valid established block ack agreement.

If there is, store the packet without pass it up to WifiMac. The packet is buffered in order of increasing sequence control field. All comparison are performed circularly modulo 2^12.

Definition at line 2455 of file mac-low.cc.

References ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceControl(), m_bAckAgreements, m_bAckCaches, NS_ASSERT, ns3::QosUtilsMapSeqControlToUniqueInteger(), and ns3::Packet::RemoveTrailer().

Referenced by ReceiveMpdu().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::SuperFastAckTimeout ( void  )
private

Event handler when super fast ACK timeout occurs.

Definition at line 1810 of file mac-low.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::MacLowTransmissionListener::GotAck(), ns3::WifiPhy::IsStateIdle(), m_currentHdr, m_listener, m_phy, m_stationManager, ns3::MacLowTransmissionListener::MissedAck(), NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::WifiRemoteStationManager::ReportDataFailed().

Referenced by StartDataTxTimers().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::WaitSifsAfterEndTx ( void  )
private

Definition at line 2337 of file mac-low.cc.

References m_listener, and ns3::MacLowTransmissionListener::StartNext().

Referenced by ReceiveOk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::MacLow::WaitSifsAfterEndTxFragment ( void  )
private

Event handler that is usually scheduled to fired at the appropriate time after completing transmissions.

Definition at line 2331 of file mac-low.cc.

References m_listener, and ns3::MacLowTransmissionListener::StartNextFragment().

Referenced by ReceiveOk(), and StartDataTxTimers().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class ::AmpduAggregationTest
friend

Definition at line 505 of file mac-low.h.

friend class ::TwoLevelAggregationTest
friend

Definition at line 504 of file mac-low.h.

Member Data Documentation

Time ns3::MacLow::m_ackTimeout
private

ACK timeout duration.

Definition at line 1350 of file mac-low.h.

Referenced by GetAckTimeout(), and SetAckTimeout().

Ptr<WifiMacQueue> ns3::MacLow::m_aggregateQueue
private
bool ns3::MacLow::m_ampdu
private

Flag if the current transmission involves an A-MPDU.

Definition at line 1363 of file mac-low.h.

Referenced by BlockAckTimeout(), CtsTimeout(), DoDispose(), ForwardDown(), GetSize(), MacLow(), NormalAckTimeout(), ReceiveOk(), SendDataAfterCts(), SendDataPacket(), and StartTransmission().

Time ns3::MacLow::m_basicBlockAckTimeout
private

Basic block ACK timeout duration.

Definition at line 1351 of file mac-low.h.

Referenced by GetBasicBlockAckTimeout(), and SetBasicBlockAckTimeout().

EventId ns3::MacLow::m_blockAckTimeoutEvent
private

Block ACK timeout event.

Definition at line 1333 of file mac-low.h.

Referenced by CancelAllEvents(), DoDispose(), ReceiveOk(), and StartDataTxTimers().

Mac48Address ns3::MacLow::m_bssid
private

BSSID address (Mac48Address)

Definition at line 1349 of file mac-low.h.

Referenced by GetBssid(), NotifyNav(), and SetBssid().

Time ns3::MacLow::m_compressedBlockAckTimeout
private

Compressed block ACK timeout duration.

Definition at line 1352 of file mac-low.h.

Referenced by GetCompressedBlockAckTimeout(), and SetCompressedBlockAckTimeout().

Time ns3::MacLow::m_ctsTimeout
private

CTS timeout duration.

Definition at line 1353 of file mac-low.h.

Referenced by GetCtsTimeout(), and SetCtsTimeout().

EventId ns3::MacLow::m_ctsTimeoutEvent
private

CTS timeout event.

Definition at line 1334 of file mac-low.h.

Referenced by CancelAllEvents(), DoDispose(), ReceiveOk(), and SendRtsForPacket().

bool ns3::MacLow::m_ctsToSelfSupported
private

Flag whether CTS-to-self is supported.

Definition at line 1387 of file mac-low.h.

Referenced by GetCtsToSelfSupported(), SetCtsToSelfSupported(), and StartTransmission().

WifiTxVector ns3::MacLow::m_currentTxVector
private
EventId ns3::MacLow::m_endTxNoAckEvent
private

Event for finishing transmission that does not require ACK.

Definition at line 1339 of file mac-low.h.

Referenced by CancelAllEvents(), and DoDispose().

EventId ns3::MacLow::m_fastAckFailedTimeoutEvent
private

Fast ACK failed timeout event.

Definition at line 1332 of file mac-low.h.

Referenced by CancelAllEvents(), DoDispose(), and ReceiveError().

EventId ns3::MacLow::m_fastAckTimeoutEvent
private

Fast ACK timeout event.

Definition at line 1330 of file mac-low.h.

Referenced by CancelAllEvents(), DoDispose(), ReceiveOk(), and StartDataTxTimers().

Time ns3::MacLow::m_lastNavDuration
private

The duration of the latest NAV.

Definition at line 1360 of file mac-low.h.

Referenced by DoNavResetNow(), DoNavStartNow(), IsNavZero(), MacLow(), NotifySleepNow(), and NotifySwitchingStartNow().

Time ns3::MacLow::m_lastNavStart
private

The time when the latest NAV started.

Definition at line 1359 of file mac-low.h.

Referenced by DoNavResetNow(), DoNavStartNow(), IsNavZero(), MacLow(), NotifyNav(), NotifySleepNow(), and NotifySwitchingStartNow().

WifiMacHeader ns3::MacLow::m_lastReceivedHdr
private

Header of the last received packet.

Definition at line 1345 of file mac-low.h.

Referenced by ReceiveOk().

EventId ns3::MacLow::m_navCounterResetCtsMissed
private

Event to reset NAV when CTS is not received.

Definition at line 1340 of file mac-low.h.

Referenced by NotifyNav(), NotifySleepNow(), and NotifySwitchingStartNow().

EventId ns3::MacLow::m_normalAckTimeoutEvent
private

Normal ACK timeout event.

Definition at line 1329 of file mac-low.h.

Referenced by CancelAllEvents(), DoDispose(), ReceiveOk(), and StartDataTxTimers().

uint32_t ns3::MacLow::m_nTxMpdus
private

Holds the number of transmitted MPDUs in the last A-MPDU transmission.

Definition at line 1392 of file mac-low.h.

Referenced by BlockAckTimeout(), and ForwardDown().

class PhyMacLowListener* ns3::MacLow::m_phyMacLowListener
private

Listener needed to monitor when a channel switching occurs.

Definition at line 1365 of file mac-low.h.

Referenced by DoDispose(), RemovePhyMacLowListener(), and SetupPhyMacLowListener().

Time ns3::MacLow::m_pifs
private

PCF Interframe Space (PIFS) duration.

Definition at line 1356 of file mac-low.h.

Referenced by GetPifs(), and SetPifs().

bool ns3::MacLow::m_promisc
private

Flag if the device is operating in promiscuous mode.

Definition at line 1362 of file mac-low.h.

Referenced by IsPromisc(), MacLow(), ReceiveOk(), and SetPromisc().

Time ns3::MacLow::m_rifs
private

Reduced Interframe Space (RIFS) duration.

Definition at line 1357 of file mac-low.h.

Referenced by GetRifs(), and SetRifs().

MacLowRxCallback ns3::MacLow::m_rxCallback
private
Mac48Address ns3::MacLow::m_self
private
EventId ns3::MacLow::m_sendAckEvent
private

Event to send ACK.

Definition at line 1336 of file mac-low.h.

Referenced by CancelAllEvents(), DeaggregateAmpduAndReceive(), DoDispose(), and ReceiveOk().

EventId ns3::MacLow::m_sendCtsEvent
private

Event to send CTS.

Definition at line 1335 of file mac-low.h.

Referenced by CancelAllEvents(), DoDispose(), and ReceiveOk().

EventId ns3::MacLow::m_sendDataEvent
private

Event to send DATA.

Definition at line 1337 of file mac-low.h.

Referenced by CancelAllEvents(), DoDispose(), ReceiveOk(), and SendCtsToSelf().

uint8_t ns3::MacLow::m_sentMpdus
private

Number of transmitted MPDUs in an A-MPDU that have not been acknowledged yet.

Definition at line 1388 of file mac-low.h.

Referenced by AggregateToAmpdu(), BlockAckTimeout(), CtsTimeout(), DoDispose(), MacLow(), NormalAckTimeout(), ReceiveOk(), and StartTransmission().

Time ns3::MacLow::m_sifs
private

Short Interframe Space (SIFS) duration.

Definition at line 1354 of file mac-low.h.

Referenced by GetSifs(), and SetSifs().

Time ns3::MacLow::m_slotTime
private

Slot duration.

Definition at line 1355 of file mac-low.h.

Referenced by GetSlotTime(), and SetSlotTime().

EventId ns3::MacLow::m_superFastAckTimeoutEvent
private

Super fast ACK timeout event.

Definition at line 1331 of file mac-low.h.

Referenced by CancelAllEvents(), DoDispose(), ReceiveOk(), and StartDataTxTimers().

std::vector<Item> ns3::MacLow::m_txPackets
private

Contain temporary items to be sent with the next A-MPDU transmission, once RTS/CTS exchange has succeeded.

It is not used in other cases.

Definition at line 1391 of file mac-low.h.

Referenced by FlushAggregateQueue(), InsertInTxQueue(), and SendDataAfterCts().

MacLowTransmissionParameters ns3::MacLow::m_txParams
private
EventId ns3::MacLow::m_waitRifsEvent
private

Wait for RIFS event.

Definition at line 1341 of file mac-low.h.

Referenced by CancelAllEvents(), DoDispose(), and StartDataTxTimers().

EventId ns3::MacLow::m_waitSifsEvent
private

Wait for SIFS event.

Definition at line 1338 of file mac-low.h.

Referenced by CancelAllEvents(), DoDispose(), ReceiveOk(), and StartDataTxTimers().


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