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

handle packet fragmentation and retransmissions. More...

#include <dca-txop.h>

+ Inheritance diagram for ns3::DcaTxop:
+ Collaboration diagram for ns3::DcaTxop:

Classes

class  Dcf
 
class  TransmissionListener
 Listener for MacLow events. More...
 

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

 DcaTxop ()
 
 ~DcaTxop ()
 
int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
virtual uint32_t GetAifsn (void) const
 Return the number of slots that make up an AIFS. 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< WifiMacQueueGetQueue () const
 Return the packet queue associated with this DcaTxop. More...
 
void Queue (Ptr< const Packet > packet, const WifiMacHeader &hdr)
 
virtual void SetAifsn (uint32_t aifsn)
 
void SetLow (Ptr< MacLow > low)
 Set MacLow associated with this DcaTxop. More...
 
void SetManager (DcfManager *manager)
 Set DcfManager this DcaTxop 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 SetTxFailedCallback (TxFailed callback)
 
void SetTxOkCallback (TxOk callback)
 
void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > remoteManager)
 Set WifiRemoteStationsManager this DcaTxop is associated to. 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

 DcaTxop (const DcaTxop &o)
 
void Cancel (void)
 Cancel the transmission. More...
 
virtual void DoDispose (void)
 This method is called by Object::Dispose or by the object's destructor, whichever comes first. More...
 
void DoInitialize ()
 This method is called only once by Object::Initialize. More...
 
void EndTxNoAck (void)
 Event handler when a transmission that does not require an ACK has completed. 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...
 
uint32_t GetNextFragmentSize (void)
 Calculate the size of the next fragment. More...
 
void GotAck (double snr, WifiMode txMode)
 Event handler when an ACK is received. More...
 
void GotCts (double snr, WifiMode txMode)
 Event handler when a CTS is received. More...
 
bool IsLastFragment (void)
 Check if the curren fragment is the last fragment. More...
 
Ptr< MacLowLow (void)
 Return the MacLow associated with this DcaTxop. More...
 
void MissedAck (void)
 Event handler when an ACK is received. 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)
 Check if the current packet should be fragmented. More...
 
bool NeedRts (Ptr< const Packet > packet, const WifiMacHeader *header)
 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 DCF requires access. More...
 
void NextFragment (void)
 Continue to the next fragment. More...
 
void NotifyAccessGranted (void)
 Notify the DCF that access has been granted. More...
 
void NotifyChannelSwitching (void)
 When a channel switching occurs, enqueued packets are removed. More...
 
void NotifyCollision (void)
 Notify the DCF that collision has occurred. More...
 
void NotifyInternalCollision (void)
 Notify the DCF that internal collision has occurred. More...
 
DcaTxopoperator= (const DcaTxop &)
 
void RestartAccessIfNeeded (void)
 Restart access request if needed. More...
 
void StartAccessIfNeeded (void)
 Request access from DCF manager if needed. More...
 
void StartNext (void)
 Start transmission for the next fragment. More...
 

Private Attributes

bool m_accessOngoing
 
WifiMacHeader m_currentHdr
 
Ptr< const Packetm_currentPacket
 
Dcfm_dcf
 
uint8_t m_fragmentNumber
 
Ptr< MacLowm_low
 
DcfManagerm_manager
 
Ptr< WifiMacQueuem_queue
 
RandomStreamm_rng
 
Ptr< WifiRemoteStationManagerm_stationManager
 
TransmissionListenerm_transmissionListener
 
TxFailed m_txFailedCallback
 
MacTxMiddlem_txMiddle
 
TxOk m_txOkCallback
 

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

handle packet fragmentation and retransmissions.

This class implements the packet fragmentation and retransmission policy. It uses the ns3::MacLow and ns3::DcfManager helper classes to respectively send packets and decide when to send them. Packets are stored in a ns3::WifiMacQueue until they can be sent.

The policy currently implemented uses a simple fragmentation threshold: any packet bigger than this threshold is fragmented in fragments whose size is smaller than the threshold.

The retransmission policy is also very simple: every packet is retransmitted until it is either successfully transmitted or it has been retransmitted up until the ssrc or slrc thresholds.

The rts/cts policy is similar to the fragmentation policy: when a packet is bigger than a threshold, the rts/cts protocol is used.

Config Paths

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

  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/DcaTxop

Attributes

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 67 of file dca-txop.h.

Member Typedef Documentation

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

Definition at line 81 of file dca-txop.h.

typedef Callback<void, const WifiMacHeader&> ns3::DcaTxop::TxOk

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

Definition at line 76 of file dca-txop.h.

Constructor & Destructor Documentation

ns3::DcaTxop::DcaTxop ( )
ns3::DcaTxop::~DcaTxop ( )

Definition at line 152 of file dca-txop.cc.

References NS_LOG_FUNCTION.

ns3::DcaTxop::DcaTxop ( const DcaTxop o)
private

Member Function Documentation

int64_t ns3::DcaTxop::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 264 of file dca-txop.cc.

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::DcaTxop::Cancel ( void  )
private

Cancel the transmission.

This happens in only one case: in an AP, you have two DcaTxop:

  • one is used exclusively for beacons and has a high priority.
  • the other is used for everything else and has a normal priority.

If the normal queue tries to send a unicast data frame, but if the tx fails (ack timeout), it starts a backoff. If the beacon queue gets a tx oportunity during this backoff, it will trigger a call to this Cancel function.

Since we are already doing a backoff, we will get access to the medium when we can, we have nothing to do here. We just ignore the cancel event and wait until we are given again a tx oportunity.

Note that this is really non-trivial because each of these frames is assigned a sequence number from the same sequence counter (because this is a non-802.11e device) so, the scheme described here fails to ensure in-order delivery of frames at the receiving side. This, however, does not matter in this case because we assume that the receiving side does not update its <seq,ad> tupple for packets whose destination address is a broadcast address.

Definition at line 621 of file dca-txop.cc.

References NS_LOG_DEBUG, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

void ns3::DcaTxop::DoDispose ( void  )
privatevirtual

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 158 of file dca-txop.cc.

References m_dcf, m_low, m_queue, m_rng, m_stationManager, m_transmissionListener, m_txMiddle, and NS_LOG_FUNCTION.

void ns3::DcaTxop::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 312 of file dca-txop.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::DcaTxop::EndTxNoAck ( void  )
private

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

Definition at line 653 of file dca-txop.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::DcaTxop::TransmissionListener::EndTxNoAck().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::DcaTxop::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 245 of file dca-txop.cc.

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

+ Here is the call graph for this function:

uint32_t ns3::DcaTxop::GetFragmentOffset ( void  )
private

Calculate the offset for the current fragment.

Returns
the offset for the current fragment

Definition at line 373 of file dca-txop.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::DcaTxop::GetFragmentPacket ( WifiMacHeader hdr)
private

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 381 of file dca-txop.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::DcaTxop::GetFragmentSize ( void  )
private

Calculate the size of the current fragment.

Returns
the size of the current fragment

Definition at line 350 of file dca-txop.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::DcaTxop::GetMaxCw ( void  ) const
virtual

Return the maximum congestion window size.

Returns
the maximum congestion window size

Implements ns3::Dcf.

Definition at line 239 of file dca-txop.cc.

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

+ Here is the call graph for this function:

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

Return the minimum congestion window size.

Returns
the minimum congestion window size

Implements ns3::Dcf.

Definition at line 233 of file dca-txop.cc.

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

+ Here is the call graph for this function:

uint32_t ns3::DcaTxop::GetNextFragmentSize ( void  )
private

Calculate the size of the next fragment.

Returns
the size of the next fragment

Definition at line 365 of file dca-txop.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::DcaTxop::GetQueue ( void  ) const

Return the packet queue associated with this DcaTxop.

Returns
WifiMacQueue

Definition at line 208 of file dca-txop.cc.

References m_queue, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

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

Definition at line 127 of file dca-txop.cc.

References ns3::TypeId::AddConstructor(), GetQueue(), ns3::Dcf::GetTypeId(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

void ns3::DcaTxop::GotAck ( double  snr,
WifiMode  txMode 
)
private
void ns3::DcaTxop::GotCts ( double  snr,
WifiMode  txMode 
)
private

Event handler when a CTS is received.

Parameters
snr
txMode

Definition at line 515 of file dca-txop.cc.

References NS_LOG_DEBUG, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

bool ns3::DcaTxop::IsLastFragment ( void  )
private

Check if the curren fragment is the last fragment.

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

Definition at line 357 of file dca-txop.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::DcaTxop::Low ( void  )
private

Return the MacLow associated with this DcaTxop.

Returns
MacLow

Definition at line 297 of file dca-txop.cc.

References m_low, and NS_LOG_FUNCTION.

Referenced by NotifyAccessGranted(), and StartNext().

+ Here is the caller graph for this function:

bool ns3::DcaTxop::NeedDataRetransmission ( void  )
private

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

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

Definition at line 328 of file dca-txop.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::DcaTxop::NeedFragmentation ( void  )
private

Check if the current packet should be fragmented.

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

Definition at line 335 of file dca-txop.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::DcaTxop::NeedRts ( Ptr< const Packet packet,
const WifiMacHeader header 
)
private

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

Parameters
packet
header
Returns
true if RTS protection should be used, false otherwise

Definition at line 304 of file dca-txop.cc.

References ns3::WifiMacHeader::GetAddr1(), 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::DcaTxop::NeedRtsRetransmission ( void  )
private

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

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

Definition at line 320 of file dca-txop.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::DcaTxop::NeedsAccess ( void  ) const
private

Check if the DCF requires access.

Returns
true if the DCF requires access, false otherwise

Definition at line 402 of file dca-txop.cc.

References m_currentPacket, m_queue, and NS_LOG_FUNCTION.

void ns3::DcaTxop::NextFragment ( void  )
private

Continue to the next fragment.

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

Definition at line 343 of file dca-txop.cc.

References m_fragmentNumber, and NS_LOG_FUNCTION.

Referenced by StartNext().

+ Here is the caller graph for this function:

void ns3::DcaTxop::NotifyChannelSwitching ( void  )
private

When a channel switching occurs, enqueued packets are removed.

Definition at line 507 of file dca-txop.cc.

References m_currentPacket, m_queue, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

void ns3::DcaTxop::NotifyCollision ( void  )
private

Notify the DCF that collision has occurred.

Definition at line 498 of file dca-txop.cc.

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

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::DcaTxop::NotifyInternalCollision ( void  )
private

Notify the DCF that internal collision has occurred.

Definition at line 492 of file dca-txop.cc.

References NotifyCollision(), and NS_LOG_FUNCTION.

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DcaTxop& ns3::DcaTxop::operator= ( const DcaTxop )
private
void ns3::DcaTxop::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 252 of file dca-txop.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::DcaTxop::RestartAccessIfNeeded ( void  )
private

Restart access request if needed.

Definition at line 272 of file dca-txop.cc.

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

Referenced by GotAck(), MissedAck(), MissedCts(), and NotifyCollision().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::DcaTxop::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 227 of file dca-txop.cc.

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

+ Here is the call graph for this function:

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

Set MacLow associated with this DcaTxop.

Parameters
lowMacLow

Definition at line 183 of file dca-txop.cc.

References m_low, and NS_LOG_FUNCTION.

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

Set DcfManager this DcaTxop is associated to.

Parameters
managerDcfManager

Definition at line 175 of file dca-txop.cc.

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

+ Here is the call graph for this function:

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

Set the maximum congestion window size.

Parameters
maxCwthe maximum congestion window size

Implements ns3::Dcf.

Definition at line 221 of file dca-txop.cc.

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

+ Here is the call graph for this function:

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

Set the minimum congestion window size.

Parameters
minCwthe minimum congestion window size

Implements ns3::Dcf.

Definition at line 215 of file dca-txop.cc.

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

+ Here is the call graph for this function:

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

Definition at line 201 of file dca-txop.cc.

References m_txFailedCallback, and NS_LOG_FUNCTION.

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

Definition at line 195 of file dca-txop.cc.

References m_txOkCallback, and NS_LOG_FUNCTION.

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

Set WifiRemoteStationsManager this DcaTxop is associated to.

Parameters
remoteManagerWifiRemoteStationManager

Definition at line 189 of file dca-txop.cc.

References m_stationManager, and NS_LOG_FUNCTION.

void ns3::DcaTxop::StartAccessIfNeeded ( void  )
private

Request access from DCF manager if needed.

Definition at line 284 of file dca-txop.cc.

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

Referenced by EndTxNoAck(), and Queue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::DcaTxop::StartNext ( void  )
private

Friends And Related Function Documentation

friend class Dcf
friend

Definition at line 152 of file dca-txop.h.

Referenced by DcaTxop().

friend class TransmissionListener
friend

Definition at line 154 of file dca-txop.h.

Referenced by DcaTxop().

Member Data Documentation

bool ns3::DcaTxop::m_accessOngoing
private

Definition at line 317 of file dca-txop.h.

uint8_t ns3::DcaTxop::m_fragmentNumber
private
Ptr<MacLow> ns3::DcaTxop::m_low
private

Definition at line 312 of file dca-txop.h.

Referenced by DoDispose(), Low(), and SetLow().

DcfManager* ns3::DcaTxop::m_manager
private

Definition at line 307 of file dca-txop.h.

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

RandomStream* ns3::DcaTxop::m_rng
private
TransmissionListener* ns3::DcaTxop::m_transmissionListener
private

Definition at line 314 of file dca-txop.h.

Referenced by DcaTxop(), DoDispose(), NotifyAccessGranted(), and StartNext().

TxFailed ns3::DcaTxop::m_txFailedCallback
private

Definition at line 309 of file dca-txop.h.

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

MacTxMiddle* ns3::DcaTxop::m_txMiddle
private

Definition at line 311 of file dca-txop.h.

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

TxOk ns3::DcaTxop::m_txOkCallback
private

Definition at line 308 of file dca-txop.h.

Referenced by GotAck(), and SetTxOkCallback().


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