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

#include <edca-txop-n.h>

+ Inheritance diagram for ns3::EdcaTxopN:

Classes

class  BlockAckEventListener
 
class  Dcf
 
class  TransmissionListener
 

Public Types

typedef Callback< void, const
WifiMacHeader & > 
TxFailed
 
typedef Callback< void, const
WifiMacHeader & > 
TxOk
 

Public Member Functions

int64_t AssignStreams (int64_t stream)
 
void Cancel (void)
 
void CompleteConfig (void)
 
void DoDispose ()
 
void EndTxNoAck (void)
 
virtual uint32_t GetAifsn (void) const
 
uint8_t GetBlockAckThreshold (void) const
 
uint32_t GetFragmentOffset (void)
 
Ptr< PacketGetFragmentPacket (WifiMacHeader *hdr)
 
uint32_t GetFragmentSize (void)
 
virtual uint32_t GetMaxCw (void) const
 
virtual uint32_t GetMinCw (void) const
 
Ptr< MsduAggregatorGetMsduAggregator (void) const
 
uint32_t GetNextFragmentSize (void)
 
Ptr< WifiMacQueueGetQueue () const
 
enum TypeOfStation GetTypeOfStation (void) const
 
void GotAck (double snr, WifiMode txMode)
 
void GotAddBaResponse (const MgtAddBaResponseHeader *respHdr, Mac48Address recipient)
 
void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient)
 
void GotCts (double snr, WifiMode txMode)
 
void GotDelBaFrame (const MgtDelBaHeader *delBaHdr, Mac48Address recipient)
 
bool IsLastFragment (void) const
 
Ptr< MacLowLow (void)
 
void MissedAck (void)
 
void MissedBlockAck (void)
 
void MissedCts (void)
 
bool NeedDataRetransmission (void)
 
bool NeedFragmentation (void) const
 
bool NeedRts (void)
 
bool NeedRtsRetransmission (void)
 
bool NeedsAccess (void) const
 
void NextFragment (void)
 
void NotifyAccessGranted (void)
 
void NotifyChannelSensing (void)
 
void NotifyChannelSwitching (Time duration)
 
void NotifyCollision (void)
 
void NotifyInternalCollision (void)
 
void PushFront (Ptr< const Packet > packet, const WifiMacHeader &hdr)
 
void Queue (Ptr< const Packet > packet, const WifiMacHeader &hdr)
 
void RestartAccessIfNeeded (void)
 
void SendDelbaFrame (Mac48Address addr, uint8_t tid, bool byOriginator)
 
void SetAccessCategory (enum AcIndex ac)
 
virtual void SetAifsn (uint32_t aifsn)
 
void SetBlockAckInactivityTimeout (uint16_t timeout)
 
void SetBlockAckThreshold (uint8_t threshold)
 
void SetLow (Ptr< MacLow > low)
 
void SetManager (DcfManager *manager)
 
virtual void SetMaxCw (uint32_t maxCw)
 
virtual void SetMinCw (uint32_t minCw)
 
void SetMsduAggregator (Ptr< MsduAggregator > aggr)
 
void SetTxFailedCallback (TxFailed callback)
 
void SetTxMiddle (MacTxMiddle *txMiddle)
 
void SetTxOkCallback (TxOk callback)
 
void SetTypeOfStation (enum TypeOfStation type)
 
void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > remoteManager)
 
void StartAccessIfNeeded (void)
 
void StartNext (void)
 
- Public Member Functions inherited from ns3::Object
void AggregateObject (Ptr< Object > other)
 
void Dispose (void)
 
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)
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 
- Public Member Functions inherited from ns3::ObjectBase
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)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Private Member Functions

 EdcaTxopN (const EdcaTxopN &)
 
void CompleteTx (void)
 
void DoInitialize ()
 
Mac48Address MapDestAddressForAggregation (const WifiMacHeader &hdr)
 
Mac48Address MapSrcAddressForAggregation (const WifiMacHeader &hdr)
 
EdcaTxopNoperator= (const EdcaTxopN &)
 
void SendAddBaRequest (Mac48Address recipient, uint8_t tid, uint16_t startSeq, uint16_t timeout, bool immediateBAck)
 
void SendBlockAckRequest (const struct Bar &bar)
 
bool SetupBlockAckIfNeeded ()
 
void VerifyBlockAck (void)
 

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)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

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
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::WifiMacQueue >
    • Flags: read

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 77 of file edca-txop-n.h.

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

References NS_LOG_FUNCTION.

Referenced by ns3::WifiHelper::AssignStreams().

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

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

References ns3::Object::DoInitialize(), ns3::DcfState::GetCw(), NS_LOG_FUNCTION, ns3::DcfState::ResetCw(), and ns3::DcfState::StartBackoffNow().

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

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

References NS_LOG_FUNCTION.

void ns3::EdcaTxopN::NotifyChannelSwitching ( Time  duration)

When a channel switching occurs, enqueued packets are removed.

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

References NS_LOG_FUNCTION.

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


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