A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::EdcaTxopN Class Reference

This queue contains packets for a particular access class. More...

#include <edca-txop-n.h>

+ Inheritance diagram for ns3::EdcaTxopN:
+ Collaboration diagram for ns3::EdcaTxopN:

Classes

class  BlockAckEventListener
 
class  Dcf
 
class  TransmissionListener
 

Public Types

typedef Callback< void, const
WifiMacHeader & > 
TxFailed
 typedef for a callback to invoke when a packet transmission was failed. More...
 
typedef Callback< void, const
WifiMacHeader & > 
TxOk
 typedef for a callback to invoke when a packet transmission was completed successfully. More...
 

Public Member Functions

 EdcaTxopN ()
 
virtual ~EdcaTxopN ()
 
int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
void Cancel (void)
 Cancel the transmission. More...
 
void CompleteConfig (void)
 Complete block ACK configuration. More...
 
void DoDispose ()
 This method is called by Object::Dispose or by the object's destructor, whichever comes first. More...
 
void EndTxNoAck (void)
 Event handler when a transmission that does not require an ACK has completed. More...
 
virtual uint32_t GetAifsn (void) const
 Return the number of slots that make up an AIFS. More...
 
uint8_t GetBlockAckThreshold (void) const
 Return the current threshold for block ACK mechanism. More...
 
uint32_t GetFragmentOffset (void)
 Calculate the offset for the current fragment. More...
 
Ptr< PacketGetFragmentPacket (WifiMacHeader *hdr)
 Get the next fragment from the packet with appropriate Wifi header for the fragment. More...
 
uint32_t GetFragmentSize (void)
 Calculate the size of the current fragment. More...
 
virtual uint32_t GetMaxCw (void) const
 Return the maximum congestion window size. More...
 
virtual uint32_t GetMinCw (void) const
 Return the minimum congestion window size. More...
 
Ptr< MsduAggregatorGetMsduAggregator (void) const
 
uint32_t GetNextFragmentSize (void)
 Calculate the size of the next fragment. More...
 
Ptr< WifiMacQueueGetQueue () const
 Return the packet queue associated with this EdcaTxopN. More...
 
enum TypeOfStation GetTypeOfStation (void) const
 Return type of station. More...
 
void GotAck (double snr, WifiMode txMode)
 Event handler when an ACK is received. More...
 
void GotAddBaResponse (const MgtAddBaResponseHeader *respHdr, Mac48Address recipient)
 
void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient)
 Event handler when a Block ACK is received. More...
 
void GotCts (double snr, WifiMode txMode)
 Event handler when a CTS is received. More...
 
void GotDelBaFrame (const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
 
bool IsLastFragment (void) const
 Check if the curren fragment is the last fragment. More...
 
Ptr< MacLowLow (void)
 Return the MacLow associated with this EdcaTxopN. More...
 
void MissedAck (void)
 Event handler when an ACK is received. More...
 
void MissedBlockAck (void)
 Event handler when a Block ACK timeout has occurred. More...
 
void MissedCts (void)
 Event handler when a CTS timeout has occurred. More...
 
bool NeedDataRetransmission (void)
 Check if DATA should be re-transmitted if ACK was missed. More...
 
bool NeedFragmentation (void) const
 Check if the current packet should be fragmented. More...
 
bool NeedRts (void)
 Check if the current packet should be sent with a RTS protection. More...
 
bool NeedRtsRetransmission (void)
 Check if RTS should be re-transmitted if CTS was missed. More...
 
bool NeedsAccess (void) const
 Check if the EDCAF requires access. More...
 
void NextFragment (void)
 Continue to the next fragment. More...
 
void NotifyAccessGranted (void)
 Notify the EDCAF that access has been granted. More...
 
void NotifyChannelSwitching (void)
 When a channel switching occurs, enqueued packets are removed. More...
 
void NotifyCollision (void)
 Notify the EDCAF that collision has occurred. More...
 
void NotifyInternalCollision (void)
 Notify the EDCAF that internal collision has occurred. More...
 
void PushFront (Ptr< const Packet > packet, const WifiMacHeader &hdr)
 
void Queue (Ptr< const Packet > packet, const WifiMacHeader &hdr)
 
void RestartAccessIfNeeded (void)
 Restart access request if needed. More...
 
void SendDelbaFrame (Mac48Address addr, uint8_t tid, bool byOriginator)
 
void SetAccessCategory (enum AcIndex ac)
 Set the access category of this EDCAF. More...
 
virtual void SetAifsn (uint32_t aifsn)
 
void SetBlockAckInactivityTimeout (uint16_t timeout)
 
void SetBlockAckThreshold (uint8_t threshold)
 Set threshold for block ACK mechanism. More...
 
void SetLow (Ptr< MacLow > low)
 Set MacLow associated with this EdcaTxopN. More...
 
void SetManager (DcfManager *manager)
 Set DcfManager this EdcaTxopN is associated to. More...
 
virtual void SetMaxCw (uint32_t maxCw)
 Set the maximum congestion window size. More...
 
virtual void SetMinCw (uint32_t minCw)
 Set the minimum congestion window size. More...
 
void SetMsduAggregator (Ptr< MsduAggregator > aggr)
 
void SetTxFailedCallback (TxFailed callback)
 
void SetTxMiddle (MacTxMiddle *txMiddle)
 
void SetTxOkCallback (TxOk callback)
 
void SetTypeOfStation (enum TypeOfStation type)
 Set type of station with the given type. More...
 
void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > remoteManager)
 Set WifiRemoteStationsManager this EdcaTxopN is associated to. More...
 
void StartAccessIfNeeded (void)
 Request access from DCF manager if needed. More...
 
void StartNext (void)
 Start transmission for the next fragment. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 
virtual ~Object ()
 
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 Run the DoDispose methods of this object and all the objects aggregated to it. More...
 
AggregateIterator GetAggregateIterator (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
template<typename T >
Ptr< T > GetObject (void) const
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 
void Initialize (void)
 This method calls the virtual DoInitialize method on all the objects aggregated to this object. 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
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Static Public Member Functions

static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Dcf
static TypeId GetTypeId (void)
 
- 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 Member Functions

 EdcaTxopN (const EdcaTxopN &)
 
void CompleteTx (void)
 For now is typically invoked to complete transmission of a packets sent with ack policy Block Ack: the packet is buffered and dcf is reset. More...
 
void DoInitialize ()
 This method is called only once by Object::Initialize. More...
 
Mac48Address MapDestAddressForAggregation (const WifiMacHeader &hdr)
 
Mac48Address MapSrcAddressForAggregation (const WifiMacHeader &hdr)
 This functions are used only to correctly set addresses in a-msdu subframe. More...
 
EdcaTxopNoperator= (const EdcaTxopN &)
 
void SendAddBaRequest (Mac48Address recipient, uint8_t tid, uint16_t startSeq, uint16_t timeout, bool immediateBAck)
 Sends an ADDBARequest to establish a block ack agreement with sta addressed by recipient for tid tid. More...
 
void SendBlockAckRequest (const struct Bar &bar)
 After that all packets, for which a block ack agreement was established, have been transmitted, we have to send a block ack request. More...
 
bool SetupBlockAckIfNeeded ()
 If number of packets in the queue reaches m_blockAckThreshold value, an ADDBARequest frame is sent to destination in order to setup a block ack. More...
 
void VerifyBlockAck (void)
 Verifies if dequeued packet has to be transmitted with ack policy Block Ack. More...
 

Private Attributes

AcIndex m_ac
 
Ptr< MsduAggregatorm_aggregator
 
BlockAckManagerm_baManager
 
uint16_t m_blockAckInactivityTimeout
 
BlockAckEventListenerm_blockAckListener
 
uint8_t m_blockAckThreshold
 
enum BlockAckType m_blockAckType
 
struct Bar m_currentBar
 
WifiMacHeader m_currentHdr
 
Ptr< const Packetm_currentPacket
 
Time m_currentPacketTimestamp
 
Dcfm_dcf
 
uint8_t m_fragmentNumber
 
Ptr< MacLowm_low
 
DcfManagerm_manager
 
QosBlockedDestinationsm_qosBlockedDestinations
 
Ptr< WifiMacQueuem_queue
 
RandomStreamm_rng
 
Ptr< WifiRemoteStationManagerm_stationManager
 
TransmissionListenerm_transmissionListener
 
TxFailed m_txFailedCallback
 
MacTxMiddlem_txMiddle
 
TxOk m_txOkCallback
 
TypeOfStation m_typeOfStation
 

Friends

class Dcf
 
class TransmissionListener
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void NotifyNewAggregate (void)
 This method is invoked whenever two sets of objects are aggregated together. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 This method is invoked once all member attributes have been initialized. More...
 

Detailed Description

This queue contains packets for a particular access class.

possibles access classes are:

-AC_VO : voice, tid = 6,7 ^ -AC_VI : video, tid = 4,5 | -AC_BE : best-effort, tid = 0,3 | priority -AC_BK : background, tid = 1,2 |

For more details see section 9.1.3.1 in 802.11 standard.

Config Paths

ns3::EdcaTxopN is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/BE_EdcaTxopN
  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/BK_EdcaTxopN
  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/VI_EdcaTxopN
  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/VO_EdcaTxopN

Attributes

  • BlockAckThreshold: If number of packets in this queue reaches this value, block ack mechanism is used. If this value is 0, block ack is never used.
  • BlockAckInactivityTimeout: Represents max time (blocks of 1024 micro seconds) allowed for block ack inactivity. If this value isn't equal to 0 a timer start after that a block ack setup is completed and will be reset every time that a block ack frame is received. If this value is 0, block ack inactivity timeout won't be used.
  • Queue: The WifiMacQueue object

Attributes defined in parent class ns3::Dcf

  • MinCw: The minimum value of the contention window.
  • MaxCw: The maximum value of the contention window.
  • Aifsn: The AIFSN: the default value conforms to simple DCA.

No TraceSources are defined for this type.

Definition at line 84 of file edca-txop-n.h.

Member Typedef Documentation

typedef for a callback to invoke when a packet transmission was failed.

Definition at line 96 of file edca-txop-n.h.

typedef for a callback to invoke when a packet transmission was completed successfully.

Definition at line 91 of file edca-txop-n.h.

Constructor & Destructor Documentation

ns3::EdcaTxopN::~EdcaTxopN ( )
virtual

Definition at line 191 of file edca-txop-n.cc.

References NS_LOG_FUNCTION.

ns3::EdcaTxopN::EdcaTxopN ( const EdcaTxopN )
private

Member Function Documentation

int64_t ns3::EdcaTxopN::AssignStreams ( int64_t  stream)

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 1148 of file edca-txop-n.cc.

References ns3::RandomStream::AssignStreams(), m_rng, and NS_LOG_FUNCTION.

Referenced by ns3::WifiHelper::AssignStreams(), and AssignWifiRandomStreams().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::Cancel ( void  )

Cancel the transmission.

Definition at line 743 of file edca-txop-n.cc.

References NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ns3::EdcaTxopN::TransmissionListener::Cancel().

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::CompleteConfig ( void  )

Complete block ACK configuration.

Definition at line 1019 of file edca-txop-n.cc.

References m_ac, m_baManager, m_blockAckListener, m_low, m_txMiddle, ns3::MakeCallback(), NS_LOG_FUNCTION, SendDelbaFrame(), ns3::BlockAckManager::SetBlockAckInactivityCallback(), and ns3::BlockAckManager::SetTxMiddle().

+ Here is the call graph for this function:

void ns3::EdcaTxopN::CompleteTx ( void  )
private

For now is typically invoked to complete transmission of a packets sent with ack policy Block Ack: the packet is buffered and dcf is reset.

Definition at line 940 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::MacTxMiddle::GetNextSeqNumberByTidAndAddress(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::IsQosBlockAck(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRetry(), m_baManager, m_currentHdr, m_currentPacket, m_currentPacketTimestamp, m_txMiddle, ns3::BlockAckManager::NotifyMpduTransmission(), NS_LOG_FUNCTION, and ns3::BlockAckManager::StorePacket().

Referenced by NotifyAccessGranted().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::DoDispose ( void  )
virtual

This method is called by Object::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 197 of file edca-txop-n.cc.

References m_aggregator, m_baManager, m_blockAckListener, m_dcf, m_low, m_qosBlockedDestinations, m_queue, m_rng, m_stationManager, m_transmissionListener, m_txMiddle, and NS_LOG_FUNCTION.

void ns3::EdcaTxopN::DoInitialize ( void  )
privatevirtual

This method is called only once by Object::Initialize.

If the user calls Object::Initialize multiple times, DoInitialize is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject and AggregateObject from within this method.

Reimplemented from ns3::Object.

Definition at line 1156 of file edca-txop-n.cc.

References ns3::Object::DoInitialize(), ns3::DcfState::GetCw(), ns3::RandomStream::GetNext(), m_dcf, m_rng, NS_LOG_FUNCTION, ns3::DcfState::ResetCw(), and ns3::DcfState::StartBackoffNow().

+ Here is the call graph for this function:

void ns3::EdcaTxopN::EndTxNoAck ( void  )

Event handler when a transmission that does not require an ACK has completed.

Definition at line 750 of file edca-txop-n.cc.

References ns3::DcfState::GetCw(), ns3::RandomStream::GetNext(), m_currentPacket, m_dcf, m_rng, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::DcfState::ResetCw(), StartAccessIfNeeded(), and ns3::DcfState::StartBackoffNow().

Referenced by ns3::EdcaTxopN::TransmissionListener::EndTxNoAck().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::EdcaTxopN::GetAifsn ( void  ) const
virtual

Return the number of slots that make up an AIFS.

Returns
the number of slots that make up an AIFS

Implements ns3::Dcf.

Definition at line 304 of file edca-txop-n.cc.

References ns3::DcfState::GetAifsn(), m_dcf, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

uint8_t ns3::EdcaTxopN::GetBlockAckThreshold ( void  ) const

Return the current threshold for block ACK mechanism.

Returns
the current threshold for block ACK mechanism

Definition at line 1043 of file edca-txop-n.cc.

References m_blockAckThreshold, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

uint32_t ns3::EdcaTxopN::GetFragmentOffset ( void  )

Calculate the offset for the current fragment.

Returns
the offset for the current fragment

Definition at line 785 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), m_currentHdr, m_currentPacket, m_fragmentNumber, m_stationManager, and NS_LOG_FUNCTION.

Referenced by GetFragmentPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< Packet > ns3::EdcaTxopN::GetFragmentPacket ( WifiMacHeader hdr)

Get the next fragment from the packet with appropriate Wifi header for the fragment.

Parameters
hdr
Returns
the fragment with the current fragment number

Definition at line 802 of file edca-txop-n.cc.

References ns3::Packet::CreateFragment(), GetFragmentOffset(), GetFragmentSize(), IsLastFragment(), m_currentHdr, m_currentPacket, m_fragmentNumber, NS_LOG_FUNCTION, ns3::WifiMacHeader::SetFragmentNumber(), ns3::WifiMacHeader::SetMoreFragments(), and ns3::WifiMacHeader::SetNoMoreFragments().

Referenced by NotifyAccessGranted(), and StartNext().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::EdcaTxopN::GetFragmentSize ( void  )

Calculate the size of the current fragment.

Returns
the size of the current fragment

Definition at line 769 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), m_currentHdr, m_currentPacket, m_fragmentNumber, m_stationManager, and NS_LOG_FUNCTION.

Referenced by GetFragmentPacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::EdcaTxopN::GetMaxCw ( void  ) const
virtual

Return the maximum congestion window size.

Returns
the maximum congestion window size

Implements ns3::Dcf.

Definition at line 297 of file edca-txop-n.cc.

References ns3::DcfState::GetCwMax(), m_dcf, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

uint32_t ns3::EdcaTxopN::GetMinCw ( void  ) const
virtual

Return the minimum congestion window size.

Returns
the minimum congestion window size

Implements ns3::Dcf.

Definition at line 290 of file edca-txop-n.cc.

References ns3::DcfState::GetCwMin(), m_dcf, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Ptr< MsduAggregator > ns3::EdcaTxopN::GetMsduAggregator ( void  ) const

Definition at line 658 of file edca-txop-n.cc.

References m_aggregator.

uint32_t ns3::EdcaTxopN::GetNextFragmentSize ( void  )

Calculate the size of the next fragment.

Returns
the size of the next fragment

Definition at line 777 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), m_currentHdr, m_currentPacket, m_fragmentNumber, m_stationManager, and NS_LOG_FUNCTION.

Referenced by NotifyAccessGranted(), and StartNext().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< WifiMacQueue > ns3::EdcaTxopN::GetQueue ( void  ) const

Return the packet queue associated with this EdcaTxopN.

Returns
WifiMacQueue

Definition at line 262 of file edca-txop-n.cc.

References m_queue, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

TypeId ns3::EdcaTxopN::GetTypeId ( void  )
static
enum TypeOfStation ns3::EdcaTxopN::GetTypeOfStation ( void  ) const

Return type of station.

Returns
type of station

Definition at line 255 of file edca-txop-n.cc.

References m_typeOfStation, and NS_LOG_FUNCTION.

void ns3::EdcaTxopN::GotBlockAck ( const CtrlBAckResponseHeader blockAck,
Mac48Address  recipient 
)

Event handler when a Block ACK is received.

Parameters
blockAck
recipient

Definition at line 911 of file edca-txop-n.cc.

References ns3::DcfState::GetCw(), ns3::RandomStream::GetNext(), m_baManager, m_currentPacket, m_dcf, m_rng, ns3::BlockAckManager::NotifyGotBlockAck(), NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::DcfState::ResetCw(), RestartAccessIfNeeded(), and ns3::DcfState::StartBackoffNow().

Referenced by ns3::EdcaTxopN::TransmissionListener::GotBlockAck().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::GotCts ( double  snr,
WifiMode  txMode 
)

Event handler when a CTS is received.

Parameters
snr
txMode

Definition at line 519 of file edca-txop-n.cc.

References NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by ns3::EdcaTxopN::TransmissionListener::GotCts().

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::GotDelBaFrame ( const MgtDelBaHeader delBaHdr,
Mac48Address  recipient 
)

Definition at line 903 of file edca-txop-n.cc.

References ns3::MgtDelBaHeader::GetTid(), m_baManager, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::BlockAckManager::TearDownBlockAck().

+ Here is the call graph for this function:

bool ns3::EdcaTxopN::IsLastFragment ( void  ) const

Check if the curren fragment is the last fragment.

Returns
true if the curren fragment is the last fragment, false otherwise

Definition at line 794 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), m_currentHdr, m_currentPacket, m_fragmentNumber, m_stationManager, and NS_LOG_FUNCTION.

Referenced by GetFragmentPacket(), GotAck(), NotifyAccessGranted(), and StartNext().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< MacLow > ns3::EdcaTxopN::Low ( void  )

Return the MacLow associated with this EdcaTxopN.

Returns
MacLow

Definition at line 318 of file edca-txop-n.cc.

References m_low, and NS_LOG_FUNCTION.

Referenced by StartNext().

+ Here is the caller graph for this function:

Mac48Address ns3::EdcaTxopN::MapDestAddressForAggregation ( const WifiMacHeader hdr)
private

Definition at line 846 of file edca-txop-n.cc.

References ns3::ADHOC_STA, ns3::AP, ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr3(), m_typeOfStation, and NS_LOG_FUNCTION.

Referenced by NotifyAccessGranted().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Mac48Address ns3::EdcaTxopN::MapSrcAddressForAggregation ( const WifiMacHeader hdr)
private

This functions are used only to correctly set addresses in a-msdu subframe.

If aggregating sta is a STA (in an infrastructured network): SA = Address2 DA = Address3 If aggregating sta is an AP SA = Address3 DA = Address1

Parameters
hdr
Returns
Mac48Address

Definition at line 830 of file edca-txop-n.cc.

References ns3::ADHOC_STA, ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::GetAddr3(), m_typeOfStation, NS_LOG_FUNCTION, and ns3::STA.

Referenced by NotifyAccessGranted().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::MissedBlockAck ( void  )

Event handler when a Block ACK timeout has occurred.

Definition at line 644 of file edca-txop-n.cc.

References ns3::DcfState::GetCw(), ns3::RandomStream::GetNext(), m_currentHdr, m_dcf, m_rng, NS_LOG_DEBUG, NS_LOG_FUNCTION, RestartAccessIfNeeded(), ns3::WifiMacHeader::SetRetry(), ns3::DcfState::StartBackoffNow(), and ns3::DcfState::UpdateFailedCw().

Referenced by ns3::EdcaTxopN::TransmissionListener::MissedBlockAck().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::EdcaTxopN::NeedDataRetransmission ( void  )

Check if DATA should be re-transmitted if ACK was missed.

Returns
true if DATA should be re-transmitted, false otherwise

Definition at line 704 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), m_currentHdr, m_currentPacket, m_stationManager, and NS_LOG_FUNCTION.

Referenced by MissedAck().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::EdcaTxopN::NeedFragmentation ( void  ) const

Check if the current packet should be fragmented.

Returns
true if the current packet should be fragmented, false otherwise

Definition at line 761 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), m_currentHdr, m_currentPacket, m_stationManager, and NS_LOG_FUNCTION.

Referenced by GotAck(), and NotifyAccessGranted().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::EdcaTxopN::NeedRts ( void  )

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 688 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), m_currentHdr, m_currentPacket, m_stationManager, and NS_LOG_FUNCTION.

Referenced by NotifyAccessGranted().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::EdcaTxopN::NeedRtsRetransmission ( void  )

Check if RTS should be re-transmitted if CTS was missed.

Returns
true if RTS should be re-transmitted, false otherwise

Definition at line 696 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), m_currentHdr, m_currentPacket, m_stationManager, and NS_LOG_FUNCTION.

Referenced by MissedCts().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::EdcaTxopN::NeedsAccess ( void  ) const

Check if the EDCAF requires access.

Returns
true if the EDCAF requires access, false otherwise

Definition at line 332 of file edca-txop-n.cc.

References ns3::BlockAckManager::HasPackets(), m_baManager, m_currentPacket, m_queue, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::EdcaTxopN::NextFragment ( void  )

Continue to the next fragment.

This method simply increments the internal variable that keep track of the current fragment number.

Definition at line 712 of file edca-txop-n.cc.

References m_fragmentNumber, and NS_LOG_FUNCTION.

Referenced by StartNext().

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::NotifyAccessGranted ( void  )

Notify the EDCAF that access has been granted.

Definition at line 339 of file edca-txop-n.cc.

References ns3::WifiMacHeader::ADDR1, ns3::BASIC_BLOCK_ACK, CompleteTx(), ns3::MacLowTransmissionParameters::DisableAck(), ns3::MacLowTransmissionParameters::DisableNextData(), ns3::MacLowTransmissionParameters::DisableOverrideDurationId(), ns3::MacLowTransmissionParameters::DisableRts(), ns3::MacLowTransmissionParameters::EnableAck(), ns3::MacLowTransmissionParameters::EnableNextData(), ns3::MacLowTransmissionParameters::EnableRts(), ns3::BlockAckManager::ExistsAgreement(), ns3::WifiMacHeader::GetAddr1(), GetFragmentPacket(), GetNextFragmentSize(), ns3::BlockAckManager::GetNextPacket(), ns3::MacTxMiddle::GetNextSequenceNumberfor(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceControl(), ns3::Packet::GetSize(), ns3::WifiMacHeader::GetType(), ns3::BlockAckManager::HasBar(), ns3::BlockAckManager::HasPackets(), ns3::Mac48Address::IsBroadcast(), ns3::WifiMacHeader::IsData(), ns3::Mac48Address::IsGroup(), IsLastFragment(), ns3::WifiMacHeader::IsQosAmsdu(), ns3::WifiMacHeader::IsQosBlockAck(), ns3::WifiMacHeader::IsQosData(), ns3::WifiMacHeader::IsRetry(), m_aggregator, m_baManager, m_blockAckThreshold, m_blockAckType, m_currentBar, m_currentHdr, m_currentPacket, m_currentPacketTimestamp, m_fragmentNumber, m_low, m_qosBlockedDestinations, m_queue, m_transmissionListener, m_txMiddle, MapDestAddressForAggregation(), MapSrcAddressForAggregation(), NeedFragmentation(), NeedRts(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, SendBlockAckRequest(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetFragmentNumber(), ns3::WifiMacHeader::SetNoMoreFragments(), ns3::WifiMacHeader::SetNoRetry(), ns3::WifiMacHeader::SetQosAmsdu(), ns3::WifiMacHeader::SetSequenceNumber(), SetupBlockAckIfNeeded(), VerifyBlockAck(), and ns3::WIFI_MAC_CTL_BACKREQ.

Referenced by ns3::EdcaTxopN::Dcf::DoNotifyAccessGranted().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::NotifyChannelSwitching ( void  )

When a channel switching occurs, enqueued packets are removed.

Definition at line 551 of file edca-txop-n.cc.

References m_currentPacket, m_queue, and NS_LOG_FUNCTION.

Referenced by ns3::EdcaTxopN::Dcf::DoNotifyChannelSwitching().

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::NotifyCollision ( void  )

Notify the EDCAF that collision has occurred.

Definition at line 511 of file edca-txop-n.cc.

References ns3::DcfState::GetCw(), ns3::RandomStream::GetNext(), m_dcf, m_rng, NS_LOG_FUNCTION, RestartAccessIfNeeded(), and ns3::DcfState::StartBackoffNow().

Referenced by ns3::EdcaTxopN::Dcf::DoNotifyCollision(), and NotifyInternalCollision().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::NotifyInternalCollision ( void  )

Notify the EDCAF that internal collision has occurred.

Definition at line 504 of file edca-txop-n.cc.

References NotifyCollision(), and NS_LOG_FUNCTION.

Referenced by ns3::EdcaTxopN::Dcf::DoNotifyInternalCollision().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

EdcaTxopN& ns3::EdcaTxopN::operator= ( const EdcaTxopN )
private
void ns3::EdcaTxopN::PushFront ( Ptr< const Packet packet,
const WifiMacHeader hdr 
)
Parameters
packetpacket to send
hdrheader of packet to send.

Store the packet in the front of the internal queue until it can be sent safely.

Definition at line 869 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacTrailer::GetSerializedSize(), ns3::WifiMacHeader::GetSerializedSize(), ns3::Packet::GetSize(), m_queue, m_stationManager, NS_LOG_FUNCTION, and StartAccessIfNeeded().

Referenced by SendDelbaFrame().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::Queue ( Ptr< const Packet packet,
const WifiMacHeader hdr 
)
Parameters
packetpacket to send
hdrheader of packet to send.

Store the packet in the internal queue until it can be sent safely.

Definition at line 559 of file edca-txop-n.cc.

References ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacTrailer::GetSerializedSize(), ns3::WifiMacHeader::GetSerializedSize(), ns3::Packet::GetSize(), m_queue, m_stationManager, NS_LOG_FUNCTION, and StartAccessIfNeeded().

+ Here is the call graph for this function:

void ns3::EdcaTxopN::RestartAccessIfNeeded ( void  )

Restart access request if needed.

Definition at line 664 of file edca-txop-n.cc.

References ns3::BlockAckManager::HasPackets(), ns3::DcfState::IsAccessRequested(), m_baManager, m_currentPacket, m_dcf, m_manager, m_queue, NS_LOG_FUNCTION, and ns3::DcfManager::RequestAccess().

Referenced by GotAck(), GotAddBaResponse(), GotBlockAck(), MissedAck(), MissedBlockAck(), MissedCts(), and NotifyCollision().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::SendAddBaRequest ( Mac48Address  recipient,
uint8_t  tid,
uint16_t  startSeq,
uint16_t  timeout,
bool  immediateBAck 
)
private
void ns3::EdcaTxopN::SetAccessCategory ( enum AcIndex  ac)

Set the access category of this EDCAF.

Parameters
ac

Definition at line 823 of file edca-txop-n.cc.

References m_ac, and NS_LOG_FUNCTION.

void ns3::EdcaTxopN::SetAifsn ( uint32_t  aifsn)
virtual
Parameters
aifsnthe number of slots which make up an AIFS for a specific DCF. a DIFS corresponds to an AIFSN = 2.

Calling this method after DcfManager::Add has been called is not recommended.

Implements ns3::Dcf.

Definition at line 283 of file edca-txop-n.cc.

References m_dcf, NS_LOG_FUNCTION, and ns3::DcfState::SetAifsn().

+ Here is the call graph for this function:

void ns3::EdcaTxopN::SetBlockAckInactivityTimeout ( uint16_t  timeout)

Definition at line 1036 of file edca-txop-n.cc.

References m_blockAckInactivityTimeout, NS_LOG_FUNCTION, and timeout.

Referenced by GetTypeId(), and ns3::QosWifiMacHelper::Setup().

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::SetBlockAckThreshold ( uint8_t  threshold)

Set threshold for block ACK mechanism.

If number of packets in the queue reaches the threshold, block ACK mechanism is used.

Parameters
threshold

Definition at line 1028 of file edca-txop-n.cc.

References m_baManager, m_blockAckThreshold, NS_LOG_FUNCTION, and ns3::BlockAckManager::SetBlockAckThreshold().

Referenced by GetTypeId(), and ns3::QosWifiMacHelper::Setup().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::SetLow ( Ptr< MacLow low)

Set MacLow associated with this EdcaTxopN.

Parameters
lowMacLow

Definition at line 325 of file edca-txop-n.cc.

References m_low, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::SetManager ( DcfManager manager)

Set DcfManager this EdcaTxopN is associated to.

Parameters
managerDcfManager

Definition at line 220 of file edca-txop-n.cc.

References ns3::DcfManager::Add(), m_dcf, m_manager, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::EdcaTxopN::SetMaxCw ( uint32_t  maxCw)
virtual

Set the maximum congestion window size.

Parameters
maxCwthe maximum congestion window size

Implements ns3::Dcf.

Definition at line 276 of file edca-txop-n.cc.

References m_dcf, NS_LOG_FUNCTION, and ns3::DcfState::SetCwMax().

+ Here is the call graph for this function:

void ns3::EdcaTxopN::SetMinCw ( uint32_t  minCw)
virtual

Set the minimum congestion window size.

Parameters
minCwthe minimum congestion window size

Implements ns3::Dcf.

Definition at line 269 of file edca-txop-n.cc.

References m_dcf, NS_LOG_FUNCTION, and ns3::DcfState::SetCwMin().

+ Here is the call graph for this function:

void ns3::EdcaTxopN::SetMsduAggregator ( Ptr< MsduAggregator aggr)

Definition at line 862 of file edca-txop-n.cc.

References m_aggregator, and NS_LOG_FUNCTION.

Referenced by ns3::QosWifiMacHelper::Setup().

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::SetTxFailedCallback ( TxFailed  callback)
Parameters
callbackthe callback to invoke when a packet transmission was completed unsuccessfully.

Definition at line 235 of file edca-txop-n.cc.

References m_txFailedCallback, and NS_LOG_FUNCTION.

void ns3::EdcaTxopN::SetTxMiddle ( MacTxMiddle txMiddle)

Definition at line 311 of file edca-txop-n.cc.

References m_txMiddle, and NS_LOG_FUNCTION.

void ns3::EdcaTxopN::SetTxOkCallback ( TxOk  callback)
Parameters
callbackthe callback to invoke when a packet transmission was completed successfully.

Definition at line 228 of file edca-txop-n.cc.

References m_txOkCallback, and NS_LOG_FUNCTION.

void ns3::EdcaTxopN::SetTypeOfStation ( enum TypeOfStation  type)

Set type of station with the given type.

Parameters
type

Definition at line 248 of file edca-txop-n.cc.

References m_typeOfStation, and NS_LOG_FUNCTION.

bool ns3::EdcaTxopN::SetupBlockAckIfNeeded ( )
private

If number of packets in the queue reaches m_blockAckThreshold value, an ADDBARequest frame is sent to destination in order to setup a block ack.

Returns
true if we tried to set up block ACK, false otherwise

Definition at line 956 of file edca-txop-n.cc.

References ns3::WifiMacHeader::ADDR1, ns3::WifiMacHeader::GetAddr1(), ns3::MacTxMiddle::GetNextSeqNumberByTidAndAddress(), ns3::WifiMacHeader::GetQosTid(), m_blockAckInactivityTimeout, m_blockAckThreshold, m_currentHdr, m_queue, m_txMiddle, NS_LOG_FUNCTION, and SendAddBaRequest().

Referenced by NotifyAccessGranted().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::SetWifiRemoteStationManager ( Ptr< WifiRemoteStationManager remoteManager)

Set WifiRemoteStationsManager this EdcaTxopN is associated to.

Parameters
remoteManagerWifiRemoteStationManager

Definition at line 242 of file edca-txop-n.cc.

References m_stationManager, and NS_LOG_FUNCTION.

void ns3::EdcaTxopN::StartAccessIfNeeded ( void  )

Request access from DCF manager if needed.

Definition at line 676 of file edca-txop-n.cc.

References ns3::BlockAckManager::HasPackets(), ns3::DcfState::IsAccessRequested(), m_baManager, m_currentPacket, m_dcf, m_manager, m_queue, NS_LOG_FUNCTION, and ns3::DcfManager::RequestAccess().

Referenced by EndTxNoAck(), PushFront(), and Queue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::EdcaTxopN::VerifyBlockAck ( void  )
private

Verifies if dequeued packet has to be transmitted with ack policy Block Ack.

This happens if an established block ack agreement exists with the receiver.

Definition at line 923 of file edca-txop-n.cc.

References ns3::WifiMacHeader::BLOCK_ACK, ns3::OriginatorBlockAckAgreement::ESTABLISHED, ns3::BlockAckManager::ExistsAgreementInState(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::GetSequenceNumber(), ns3::OriginatorBlockAckAgreement::INACTIVE, m_baManager, m_currentHdr, NS_LOG_FUNCTION, ns3::WifiMacHeader::SetQosAckPolicy(), and ns3::BlockAckManager::SwitchToBlockAckIfNeeded().

Referenced by NotifyAccessGranted().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class Dcf
friend

Definition at line 427 of file edca-txop-n.h.

Referenced by EdcaTxopN().

friend class TransmissionListener
friend

Definition at line 429 of file edca-txop-n.h.

Referenced by EdcaTxopN().

Member Data Documentation

AcIndex ns3::EdcaTxopN::m_ac
private

Definition at line 424 of file edca-txop-n.h.

Referenced by CompleteConfig(), and SetAccessCategory().

Ptr<MsduAggregator> ns3::EdcaTxopN::m_aggregator
private
uint16_t ns3::EdcaTxopN::m_blockAckInactivityTimeout
private

Definition at line 459 of file edca-txop-n.h.

Referenced by SetBlockAckInactivityTimeout(), and SetupBlockAckIfNeeded().

BlockAckEventListener* ns3::EdcaTxopN::m_blockAckListener
private

Definition at line 438 of file edca-txop-n.h.

Referenced by CompleteConfig(), DoDispose(), and EdcaTxopN().

uint8_t ns3::EdcaTxopN::m_blockAckThreshold
private
enum BlockAckType ns3::EdcaTxopN::m_blockAckType
private

Definition at line 457 of file edca-txop-n.h.

Referenced by EdcaTxopN(), NotifyAccessGranted(), and SendBlockAckRequest().

struct Bar ns3::EdcaTxopN::m_currentBar
private

Definition at line 460 of file edca-txop-n.h.

Referenced by NotifyAccessGranted().

Time ns3::EdcaTxopN::m_currentPacketTimestamp
private

Definition at line 458 of file edca-txop-n.h.

Referenced by CompleteTx(), and NotifyAccessGranted().

uint8_t ns3::EdcaTxopN::m_fragmentNumber
private
Ptr<MacLow> ns3::EdcaTxopN::m_low
private
DcfManager* ns3::EdcaTxopN::m_manager
private

Definition at line 431 of file edca-txop-n.h.

Referenced by RestartAccessIfNeeded(), SetManager(), and StartAccessIfNeeded().

QosBlockedDestinations* ns3::EdcaTxopN::m_qosBlockedDestinations
private

Definition at line 451 of file edca-txop-n.h.

Referenced by DoDispose(), EdcaTxopN(), and NotifyAccessGranted().

TransmissionListener* ns3::EdcaTxopN::m_transmissionListener
private
TxFailed ns3::EdcaTxopN::m_txFailedCallback
private

Definition at line 434 of file edca-txop-n.h.

Referenced by MissedAck(), MissedCts(), and SetTxFailedCallback().

MacTxMiddle* ns3::EdcaTxopN::m_txMiddle
private
TxOk ns3::EdcaTxopN::m_txOkCallback
private

Definition at line 433 of file edca-txop-n.h.

Referenced by GotAck(), and SetTxOkCallback().

TypeOfStation ns3::EdcaTxopN::m_typeOfStation
private

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