A Discrete-Event Network Simulator
API
TxopTest< TxopType > Class Template Reference

TxopTest Txop Test. More...

+ Inheritance diagram for TxopTest< TxopType >:
+ Collaboration diagram for TxopTest< TxopType >:

Classes

struct  ExpectedBackoff
 ExpectedBackoff structure. More...
 

Public Member Functions

 TxopTest (ChannelAccessManagerTest< TxopType > *test, uint32_t i)
 Constructor. More...
 
void QueueTx (uint64_t txTime, uint64_t expectedGrantTime)
 Queue transmit function. More...
 

Private Types

typedef std::list< struct ExpectedBackoffExpectedBackoffs
 expected backoffs typedef More...
 
typedef std::pair< uint64_t, uint64_t > ExpectedGrant
 the expected grant typedef More...
 
typedef std::list< ExpectedGrantExpectedGrants
 the collection of expected grants typedef More...
 

Private Member Functions

void DoDispose (void)
 Inherited. More...
 
void GenerateBackoff (void)
 Generate a new backoff now. More...
 
bool HasFramesToTransmit (void)
 Check if the Txop has frames to transmit. More...
 
bool IsAccessRequested (void) const
 
void NotifyAccessGranted (void)
 Notify the Txop that access has been granted. More...
 
void NotifyAccessRequested (void)
 Notify that access request has been received. More...
 
void NotifyChannelSwitching (void)
 When a channel switching occurs, enqueued packets are removed. More...
 
void NotifyInternalCollision (void)
 Notify the Txop that internal collision has occurred. More...
 
void NotifySleep (void)
 When sleep operation occurs, if there is a pending packet transmission, it will be reinserted to the front of the queue. More...
 
void NotifyWakeUp (void)
 When wake up operation occurs, channel access will be restarted. More...
 

Private Attributes

bool m_accessRequested
 true if access requested More...
 
ExpectedBackoffs m_expectedBackoff
 expected backoff (not due to an internal collision) More...
 
ExpectedGrants m_expectedGrants
 expected grants More...
 
ExpectedBackoffs m_expectedInternalCollision
 expected backoff due to an internal collision More...
 
uint32_t m_i
 the index of the Txop More...
 
ChannelAccessManagerTest< TxopType > * m_test
 the test DCF/EDCA manager More...
 

Friends

class ChannelAccessManagerTest< TxopType >
 allow ChannelAccessManagerTest class access More...
 

Detailed Description

template<typename TxopType>
class TxopTest< TxopType >

TxopTest Txop Test.

Definition at line 39 of file channel-access-manager-test.cc.

Member Typedef Documentation

◆ ExpectedBackoffs

template<typename TxopType >
typedef std::list<struct ExpectedBackoff> TxopTest< TxopType >::ExpectedBackoffs
private

expected backoffs typedef

Definition at line 72 of file channel-access-manager-test.cc.

◆ ExpectedGrant

template<typename TxopType >
typedef std::pair<uint64_t,uint64_t> TxopTest< TxopType >::ExpectedGrant
private

the expected grant typedef

Definition at line 64 of file channel-access-manager-test.cc.

◆ ExpectedGrants

template<typename TxopType >
typedef std::list<ExpectedGrant> TxopTest< TxopType >::ExpectedGrants
private

the collection of expected grants typedef

Definition at line 65 of file channel-access-manager-test.cc.

Constructor & Destructor Documentation

◆ TxopTest()

template<typename TxopType >
TxopTest< TxopType >::TxopTest ( ChannelAccessManagerTest< TxopType > *  test,
uint32_t  i 
)

Constructor.

Parameters
testthe test channel access manager
ithe index of the Txop

Definition at line 403 of file channel-access-manager-test.cc.

Member Function Documentation

◆ DoDispose()

template<typename TxopType >
void TxopTest< TxopType >::DoDispose ( void  )
private

Inherited.

Definition at line 412 of file channel-access-manager-test.cc.

◆ GenerateBackoff()

template<typename TxopType >
void TxopTest< TxopType >::GenerateBackoff ( void  )
private

Generate a new backoff now.

Definition at line 449 of file channel-access-manager-test.cc.

◆ HasFramesToTransmit()

template<typename TxopType >
bool TxopTest< TxopType >::HasFramesToTransmit ( void  )
private

Check if the Txop has frames to transmit.

Returns
true if the Txop has frames to transmit.

Definition at line 456 of file channel-access-manager-test.cc.

◆ IsAccessRequested()

template<typename TxopType >
bool TxopTest< TxopType >::IsAccessRequested ( void  ) const
private
Returns
true if access has been requested for this function and has not been granted already, false otherwise.

Definition at line 420 of file channel-access-manager-test.cc.

◆ NotifyAccessGranted()

template<typename TxopType >
void TxopTest< TxopType >::NotifyAccessGranted ( void  )
private

Notify the Txop that access has been granted.

Definition at line 434 of file channel-access-manager-test.cc.

◆ NotifyAccessRequested()

template<typename TxopType >
void TxopTest< TxopType >::NotifyAccessRequested ( void  )
private

Notify that access request has been received.

Definition at line 427 of file channel-access-manager-test.cc.

◆ NotifyChannelSwitching()

template<typename TxopType >
void TxopTest< TxopType >::NotifyChannelSwitching ( void  )
private

When a channel switching occurs, enqueued packets are removed.

Definition at line 463 of file channel-access-manager-test.cc.

◆ NotifyInternalCollision()

template<typename TxopType >
void TxopTest< TxopType >::NotifyInternalCollision ( void  )
private

Notify the Txop that internal collision has occurred.

Definition at line 442 of file channel-access-manager-test.cc.

◆ NotifySleep()

template<typename TxopType >
void TxopTest< TxopType >::NotifySleep ( void  )
private

When sleep operation occurs, if there is a pending packet transmission, it will be reinserted to the front of the queue.

Definition at line 470 of file channel-access-manager-test.cc.

◆ NotifyWakeUp()

template<typename TxopType >
void TxopTest< TxopType >::NotifyWakeUp ( void  )
private

When wake up operation occurs, channel access will be restarted.

Definition at line 476 of file channel-access-manager-test.cc.

◆ QueueTx()

template<typename TxopType >
void TxopTest< TxopType >::QueueTx ( uint64_t  txTime,
uint64_t  expectedGrantTime 
)

Queue transmit function.

Parameters
txTimethe transmit time
expectedGrantTimethe expected grant time

Definition at line 397 of file channel-access-manager-test.cc.

Friends And Related Function Documentation

◆ ChannelAccessManagerTest< TxopType >

template<typename TxopType >
friend class ChannelAccessManagerTest< TxopType >
friend

allow ChannelAccessManagerTest class access

Definition at line 59 of file channel-access-manager-test.cc.

Member Data Documentation

◆ m_accessRequested

template<typename TxopType >
bool TxopTest< TxopType >::m_accessRequested
private

true if access requested

Definition at line 120 of file channel-access-manager-test.cc.

◆ m_expectedBackoff

template<typename TxopType >
ExpectedBackoffs TxopTest< TxopType >::m_expectedBackoff
private

expected backoff (not due to an internal collision)

Definition at line 75 of file channel-access-manager-test.cc.

Referenced by ChannelAccessManagerTest< TxopType >::ExpectBackoff(), and ChannelAccessManagerTest< TxopType >::GenerateBackoff().

◆ m_expectedGrants

template<typename TxopType >
ExpectedGrants TxopTest< TxopType >::m_expectedGrants
private

expected grants

Definition at line 76 of file channel-access-manager-test.cc.

◆ m_expectedInternalCollision

template<typename TxopType >
ExpectedBackoffs TxopTest< TxopType >::m_expectedInternalCollision
private

◆ m_i

template<typename TxopType >
uint32_t TxopTest< TxopType >::m_i
private

the index of the Txop

Definition at line 119 of file channel-access-manager-test.cc.

◆ m_test

template<typename TxopType >
ChannelAccessManagerTest<TxopType>* TxopTest< TxopType >::m_test
private

the test DCF/EDCA manager

Definition at line 118 of file channel-access-manager-test.cc.


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