ns3::DcfState Class Reference

keep track of the state needed for a single DCF function. More...

#include <dcf-manager.h>

List of all members.

Public Member Functions

void SetAifsn (uint32_t aifsn)
void ResetCw (void)
void UpdateFailedCw (void)
void StartBackoffNow (uint32_t nSlots)
uint32_t GetCw (void) const
bool IsAccessRequested (void) const

Private Member Functions

virtual void DoNotifyAccessGranted (void)=0
virtual void DoNotifyInternalCollision (void)=0
virtual void DoNotifyCollision (void)=0


Detailed Description

keep track of the state needed for a single DCF function.

Multiple instances of a DcfState can be registered in a single DcfManager to implement 802.11e-style relative QoS. DcfState::SetAifsn and DcfState::SetCwBounds allow the user to control the relative QoS differentiation.


Member Function Documentation

virtual void ns3::DcfState::DoNotifyAccessGranted ( void   )  [private, pure virtual]

Called by DcfManager to notify a DcfState subclass that access to the medium is granted and can start immediately.

virtual void ns3::DcfState::DoNotifyCollision ( void   )  [private, pure virtual]

Called by DcfManager to notify a DcfState subclass that a normal collision occured, that is, that the medium was busy when access was requested.

The subclass is expected to start a new backoff by calling DcfState::StartBackoffNow and DcfManager::RequestAccess is access is still needed.

virtual void ns3::DcfState::DoNotifyInternalCollision ( void   )  [private, pure virtual]

Called by DcfManager to notify a DcfState subclass that an 'internal' collision occured, that is, that the backoff timer of a higher priority DcfState expired at the same time and that access was granted to this higher priority DcfState.

The subclass is expected to start a new backoff by calling DcfState::StartBackoffNow and DcfManager::RequestAccess is access is still needed.

uint32_t ns3::DcfState::GetCw ( void   )  const

Returns:
the current value of the CW variable. The initial value is minCW.

bool ns3::DcfState::IsAccessRequested ( void   )  const

Returns:
true if access has been requested for this DcfState and has not been granted already, false otherwise.

void ns3::DcfState::ResetCw ( void   ) 

Update the value of the CW variable to take into account a transmission success or a transmission abort (stop transmission of a packet after the maximum number of retransmissions has been reached). By default, this resets the CW variable to minCW.

void ns3::DcfState::SetAifsn ( uint32_t  aifsn  ) 

Parameters:
aifsn the 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.

void ns3::DcfState::StartBackoffNow ( uint32_t  nSlots  ) 

Parameters:
nSlots the number of slots of the backoff.
Start a backoff by initializing the backoff counter to the number of slots specified.

void ns3::DcfState::UpdateFailedCw ( void   ) 

Update the value of the CW variable to take into account a transmission failure. By default, this triggers a doubling of CW (capped by maxCW).


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

Generated on Fri Apr 9 15:01:09 2010 for NS-3 by  doxygen 1.5.8