A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::DcfStateTest Class Reference
+ Inheritance diagram for ns3::DcfStateTest:
+ Collaboration diagram for ns3::DcfStateTest:

Classes

struct  ExpectedCollision
 

Public Member Functions

 DcfStateTest (DcfManagerTest *test, uint32_t i)
 
void QueueTx (uint64_t txTime, uint64_t expectedGrantTime)
 
- Public Member Functions inherited from ns3::DcfState
 DcfState ()
 
virtual ~DcfState ()
 
uint32_t GetAifsn (void) const
 Return the number of slots that make up an AIFS. More...
 
uint32_t GetCw (void) const
 
uint32_t GetCwMax (void) const
 Return the maximum congestion window size. More...
 
uint32_t GetCwMin (void) const
 Return the minimum congestion window size. More...
 
bool IsAccessRequested (void) const
 
void 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). More...
 
void SetAifsn (uint32_t aifsn)
 
void SetCwMax (uint32_t maxCw)
 Set the maximum congestion window size. More...
 
void SetCwMin (uint32_t minCw)
 Set the minimum congestion window size. More...
 
void StartBackoffNow (uint32_t nSlots)
 
void UpdateFailedCw (void)
 Update the value of the CW variable to take into account a transmission failure. More...
 

Private Types

typedef std::list< struct
ExpectedCollision
ExpectedCollisions
 
typedef std::pair< uint64_t,
uint64_t > 
ExpectedGrant
 
typedef std::list< ExpectedGrantExpectedGrants
 

Private Member Functions

virtual void DoNotifyAccessGranted (void)
 Called by DcfManager to notify a DcfState subclass that access to the medium is granted and can start immediately. More...
 
virtual void DoNotifyChannelSwitching (void)
 Called by DcfManager to notify a DcfState subclass that a channel switching occured. More...
 
virtual void DoNotifyCollision (void)
 Called by DcfManager to notify a DcfState subclass that a normal collision occured, that is, that the medium was busy when access was requested. More...
 
virtual void DoNotifyInternalCollision (void)
 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. More...
 

Private Attributes

ExpectedCollisions m_expectedCollision
 
ExpectedGrants m_expectedGrants
 
ExpectedCollisions m_expectedInternalCollision
 
uint32_t m_i
 
DcfManagerTestm_test
 

Friends

class DcfManagerTest
 

Detailed Description

Definition at line 29 of file dcf-manager-test.cc.

Member Typedef Documentation

Definition at line 48 of file dcf-manager-test.cc.

typedef std::pair<uint64_t,uint64_t> ns3::DcfStateTest::ExpectedGrant
private

Definition at line 41 of file dcf-manager-test.cc.

Definition at line 42 of file dcf-manager-test.cc.

Constructor & Destructor Documentation

ns3::DcfStateTest::DcfStateTest ( DcfManagerTest test,
uint32_t  i 
)

Definition at line 109 of file dcf-manager-test.cc.

Member Function Documentation

void ns3::DcfStateTest::DoNotifyAccessGranted ( void  )
privatevirtual

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

Implements ns3::DcfState.

Definition at line 120 of file dcf-manager-test.cc.

References m_i, m_test, and ns3::DcfManagerTest::NotifyAccessGranted().

+ Here is the call graph for this function:

void ns3::DcfStateTest::DoNotifyChannelSwitching ( void  )
privatevirtual

Called by DcfManager to notify a DcfState subclass that a channel switching occured.

The subclass is expected to flush the queue of packets.

Implements ns3::DcfState.

Definition at line 135 of file dcf-manager-test.cc.

References m_i, m_test, and ns3::DcfManagerTest::NotifyChannelSwitching().

+ Here is the call graph for this function:

void ns3::DcfStateTest::DoNotifyCollision ( void  )
privatevirtual

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.

Implements ns3::DcfState.

Definition at line 130 of file dcf-manager-test.cc.

References m_i, m_test, and ns3::DcfManagerTest::NotifyCollision().

+ Here is the call graph for this function:

void ns3::DcfStateTest::DoNotifyInternalCollision ( void  )
privatevirtual

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.

Implements ns3::DcfState.

Definition at line 125 of file dcf-manager-test.cc.

References m_i, m_test, and ns3::DcfManagerTest::NotifyInternalCollision().

+ Here is the call graph for this function:

void ns3::DcfStateTest::QueueTx ( uint64_t  txTime,
uint64_t  expectedGrantTime 
)

Definition at line 115 of file dcf-manager-test.cc.

References m_expectedGrants.

Referenced by ns3::DcfManagerTest::DoAccessRequest().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class DcfManagerTest
friend

Definition at line 35 of file dcf-manager-test.cc.

Member Data Documentation

ExpectedCollisions ns3::DcfStateTest::m_expectedCollision
private
ExpectedCollisions ns3::DcfStateTest::m_expectedInternalCollision
private
uint32_t ns3::DcfStateTest::m_i
private
DcfManagerTest* ns3::DcfStateTest::m_test
private

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