A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
void QueueTx (uint64_t txTime, uint64_t expectedGrantTime)
 Queue transmit function.
 

Private Types

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

Private Member Functions

void DoDispose () override
 Destructor implementation.
 
void GenerateBackoff (uint8_t linkId) override
 Generate a new backoff for the given link now.
 
bool HasFramesToTransmit (uint8_t linkId) override
 Check if the Txop has frames to transmit over the given link.
 
void NotifyChannelAccessed (uint8_t linkId, Time txopDuration=Seconds(0)) override
 Called by the FrameExchangeManager to notify that channel access has been granted on the given link for the given amount of time.
 
void NotifySleep (uint8_t linkId) override
 Notify that the given link switched to sleep mode.
 
void NotifyWakeUp (uint8_t linkId) override
 When wake up operation occurs on a link, channel access on that link will be restarted.
 

Private Attributes

ExpectedBackoffs m_expectedBackoff
 expected backoff (not due to an internal collision)
 
ExpectedGrants m_expectedGrants
 expected grants
 
ExpectedBackoffs m_expectedInternalCollision
 expected backoff due to an internal collision
 
uint32_t m_i
 the index of the Txop
 
ChannelAccessManagerTest< TxopType > * m_test
 Check if the Txop has frames to transmit.
 

Friends

class ChannelAccessManagerTest< TxopType >
 allow ChannelAccessManagerTest class access
 

Detailed Description

template<typename TxopType>
class TxopTest< TxopType >

TxopTest Txop Test.

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

Member Typedef Documentation

◆ ExpectedBackoffs

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

expected backoffs typedef

Definition at line 90 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 80 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 81 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 428 of file channel-access-manager-test.cc.

Member Function Documentation

◆ DoDispose()

template<typename TxopType >
void TxopTest< TxopType >::DoDispose
overrideprivate

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden 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.

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

◆ GenerateBackoff()

template<typename TxopType >
void TxopTest< TxopType >::GenerateBackoff ( uint8_t  linkId)
overrideprivate

Generate a new backoff for the given link now.

Parameters
linkIdthe ID of the given link

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

◆ HasFramesToTransmit()

template<typename TxopType >
bool TxopTest< TxopType >::HasFramesToTransmit ( uint8_t  linkId)
overrideprivate

Check if the Txop has frames to transmit over the given link.

Parameters
linkIdthe ID of the given link.
Returns
true if the Txop has frames to transmit.

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

◆ NotifyChannelAccessed()

template<typename TxopType >
void TxopTest< TxopType >::NotifyChannelAccessed ( uint8_t  linkId,
Time  txopDuration = Seconds(0) 
)
overrideprivate

Called by the FrameExchangeManager to notify that channel access has been granted on the given link for the given amount of time.

Parameters
linkIdthe ID of the given link
txopDurationthe duration of the TXOP gained (zero for DCF)

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

References ns3::Txop::LinkEntity::access, ns3::Txop::GetLink(), and ns3::Txop::NOT_REQUESTED.

+ Here is the call graph for this function:

◆ NotifySleep()

template<typename TxopType >
void TxopTest< TxopType >::NotifySleep ( uint8_t  linkId)
overrideprivate

Notify that the given link switched to sleep mode.

Parameters
linkIdthe ID of the given link

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

◆ NotifyWakeUp()

template<typename TxopType >
void TxopTest< TxopType >::NotifyWakeUp ( uint8_t  linkId)
overrideprivate

When wake up operation occurs on a link, channel access on that link will be restarted.

Parameters
linkIdthe ID of the link

Definition at line 472 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 422 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 61 of file channel-access-manager-test.cc.

Member Data Documentation

◆ m_expectedBackoff

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

expected backoff (not due to an internal collision)

Definition at line 93 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 94 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 102 of file channel-access-manager-test.cc.

◆ m_test

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

Check if the Txop has frames to transmit.

Returns
true if the Txop has frames to transmit. the test DCF/EDCA manager

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


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