Dcf Manager Test. More...
Inheritance diagram for DcfManagerTest:
Collaboration diagram for DcfManagerTest:Public Member Functions | |
| DcfManagerTest () | |
| virtual void | DoRun (void) |
| Implementation to actually run this TestCase. More... | |
| void | NotifyAccessGranted (uint32_t i) |
| Notify access granted function. More... | |
| void | NotifyChannelSwitching (uint32_t i) |
| Notify channel switching function. More... | |
| void | NotifyCollision (uint32_t i) |
| Notify collision function. More... | |
| void | NotifyInternalCollision (uint32_t i) |
| Notify internal collision function. More... | |
Public Member Functions inherited from ns3::TestCase | |
| virtual | ~TestCase () |
| Destructor. More... | |
| std::string | GetName (void) const |
Private Types | |
| typedef std::vector< Ptr< DcaTxopTest > > | Dca |
| the DCA TXOP tests typedef More... | |
| typedef std::vector< Ptr< DcfStateTest > > | DcfStates |
| the DCF test states typedef More... | |
Private Member Functions | |
| void | AddAccessRequest (uint64_t at, uint64_t txTime, uint64_t expectedGrantTime, uint32_t from) |
| Add access function. More... | |
| void | AddAccessRequestWithAckTimeout (uint64_t at, uint64_t txTime, uint64_t expectedGrantTime, uint32_t from) |
| Add access request with ack timeout. More... | |
| void | AddAccessRequestWithSuccessfullAck (uint64_t at, uint64_t txTime, uint64_t expectedGrantTime, uint32_t ackDelay, uint32_t from) |
| Add access request with successful ack. More... | |
| void | AddAckTimeoutReset (uint64_t at) |
| Add ack timeout reset function. More... | |
| void | AddCcaBusyEvt (uint64_t at, uint64_t duration) |
| Add CCA busy event function. More... | |
| void | AddDcfState (uint32_t aifsn) |
| Add DCF state function. More... | |
| void | AddNavReset (uint64_t at, uint64_t duration) |
| Add NAV reset function. More... | |
| void | AddNavStart (uint64_t at, uint64_t duration) |
| Add NAV start function. More... | |
| void | AddRxErrorEvt (uint64_t at, uint64_t duration) |
| Add receive error event function. More... | |
| void | AddRxInsideSifsEvt (uint64_t at, uint64_t duration) |
| Add receive inside SIFS event function. More... | |
| void | AddRxOkEvt (uint64_t at, uint64_t duration) |
| Add expect collision function. More... | |
| void | AddRxStartEvt (uint64_t at, uint64_t duration) |
| Add receive start event function. More... | |
| void | AddSwitchingEvt (uint64_t at, uint64_t duration) |
| Add switching event function. More... | |
| void | AddTxEvt (uint64_t at, uint64_t duration) |
| Add transmit event function. More... | |
| void | DoAccessRequest (uint64_t txTime, uint64_t expectedGrantTime, Ptr< DcfStateTest > state) |
| Add access request with successful ack. More... | |
| void | EndTest (void) |
| End test function. More... | |
| void | ExpectCollision (uint64_t time, uint32_t nSlots, uint32_t from) |
| Expect internal collision function. More... | |
| void | ExpectInternalCollision (uint64_t time, uint32_t nSlots, uint32_t from) |
| Expect internal collision function. More... | |
| void | StartTest (uint64_t slotTime, uint64_t sifs, uint64_t eifsNoDifsNoSifs, uint32_t ackTimeoutValue=20) |
| Start test function. More... | |
Private Attributes | |
| uint32_t | m_ackTimeoutValue |
| the ack timeout value More... | |
| Dca | m_dca |
| the DCA More... | |
| Ptr< DcfManager > | m_dcfManager |
| the DCF manager More... | |
| DcfStates | m_dcfStates |
| the DCF states More... | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
| enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
| How long the test takes to execute. More... | |
Protected Member Functions inherited from ns3::TestCase | |
| TestCase (std::string name) | |
| Constructor. More... | |
| void | AddTestCase (TestCase *testCase, TestDuration duration=QUICK) |
| Add an individual child TestCase to this test suite. More... | |
| TestCase * | GetParent () const |
| Get the parent of this TestCsse. More... | |
| bool | IsStatusFailure (void) const |
| Check if any tests failed. More... | |
| bool | IsStatusSuccess (void) const |
| Check if all tests passed. More... | |
| void | SetDataDir (std::string directory) |
| Set the data directory where reference trace files can be found. More... | |
| void | ReportTestFailure (std::string cond, std::string actual, std::string limit, std::string message, std::string file, int32_t line) |
| Log the failure of this TestCase. More... | |
| bool | MustAssertOnFailure (void) const |
| Check if this run should assert on failure. More... | |
| bool | MustContinueOnFailure (void) const |
| Check if this run should continue on failure. More... | |
| std::string | CreateDataDirFilename (std::string filename) |
| Construct the full path to a file in the data directory. More... | |
| std::string | CreateTempDirFilename (std::string filename) |
| Construct the full path to a file in a temporary directory. More... | |
Dcf Manager Test.
Definition at line 112 of file dcf-manager-test.cc.
|
private |
the DCA TXOP tests typedef
Definition at line 266 of file dcf-manager-test.cc.
|
private |
the DCF test states typedef
Definition at line 265 of file dcf-manager-test.cc.
| DcfManagerTest::DcfManagerTest | ( | ) |
Definition at line 332 of file dcf-manager-test.cc.
|
private |
Add access function.
| at | the event time |
| txTime | the transmit time |
| expectedGrantTime | the expected grant time |
| from |
Definition at line 520 of file dcf-manager-test.cc.
References AddAccessRequestWithSuccessfullAck().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add access request with ack timeout.
| at | time to schedule DoAccessRequest event |
| txTime | DoAccessRequest txTime |
| expectedGrantTime | DoAccessRequest expectedGrantTime |
| from | DoAccessRequest DcfStateTest |
Definition at line 527 of file dcf-manager-test.cc.
References DoAccessRequest(), m_dcfStates, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add access request with successful ack.
| at | time to schedule DoAccessRequest event |
| txTime | DoAccessRequest txTime |
| expectedGrantTime | DoAccessRequest expectedGrantTime |
| ackDelay | is delay of the ack after txEnd |
| from | DoAccessRequest DcfStateTest |
Definition at line 536 of file dcf-manager-test.cc.
References AddAckTimeoutReset(), DoAccessRequest(), m_ackTimeoutValue, m_dcfStates, ns3::MicroSeconds(), ns3::Now(), and NS_ASSERT.
Referenced by AddAccessRequest(), and DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add ack timeout reset function.
| at | the event time |
Definition at line 513 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by AddAccessRequestWithSuccessfullAck().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add CCA busy event function.
| at | the event time |
| duration | the duration |
Definition at line 554 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add DCF state function.
| aifsn | the AIFSN |
Definition at line 431 of file dcf-manager-test.cc.
References ns3::DcfManager::Add(), m_dca, m_dcfManager, m_dcfStates, and ns3::DcfState::SetAifsn().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add NAV reset function.
| at | the event time |
| duration | the duration |
Definition at line 497 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add NAV start function.
| at | the event time |
| duration | the duration |
Definition at line 505 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add receive error event function.
| at | the event time |
| duration | the duration |
Definition at line 487 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add receive inside SIFS event function.
| at | the event time |
| duration | the duration |
Definition at line 479 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add expect collision function.
| at | |
| duration | the duration |
Definition at line 469 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add receive start event function.
| at | the event time |
| duration | the duration |
Definition at line 570 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add switching event function.
| at | the event time |
| duration | the duration |
Definition at line 562 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add transmit event function.
| at | the event time |
| duration | the duration |
Definition at line 353 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Add access request with successful ack.
| txTime | DoAccessRequest txTime |
| expectedGrantTime | DoAccessRequest expectedGrantTime |
| state | DcfStateTest |
Definition at line 547 of file dcf-manager-test.cc.
References m_dcfManager, DcfStateTest::QueueTx(), and ns3::DcfManager::RequestAccess().
Referenced by AddAccessRequestWithAckTimeout(), and AddAccessRequestWithSuccessfullAck().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 578 of file dcf-manager-test.cc.
References AddAccessRequest(), AddAccessRequestWithAckTimeout(), AddAccessRequestWithSuccessfullAck(), AddCcaBusyEvt(), AddDcfState(), AddNavReset(), AddNavStart(), AddRxErrorEvt(), AddRxInsideSifsEvt(), AddRxOkEvt(), AddRxStartEvt(), AddSwitchingEvt(), AddTxEvt(), EndTest(), ExpectCollision(), ExpectInternalCollision(), and StartTest().
Here is the call graph for this function:
|
private |
End test function.
Definition at line 442 of file dcf-manager-test.cc.
References ns3::Object::Dispose(), m_dca, m_dcfManager, m_dcfStates, DcfStateTest::m_expectedCollision, DcfStateTest::m_expectedGrants, DcfStateTest::m_expectedInternalCollision, and NS_TEST_EXPECT_MSG_EQ.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Expect internal collision function.
| time | the expectedtime |
| nSlots | the number of slots |
| from | the expected from |
Definition at line 411 of file dcf-manager-test.cc.
References DcfStateTest::ExpectedCollision::at, m_dcfStates, DcfStateTest::m_expectedCollision, and DcfStateTest::ExpectedCollision::nSlots.
Referenced by DoRun().
Here is the caller graph for this function:
|
private |
Expect internal collision function.
| time | the expectedtime |
| nSlots | the number of slots |
| from | the expected from |
Definition at line 401 of file dcf-manager-test.cc.
References DcfStateTest::ExpectedCollision::at, m_dcfStates, DcfStateTest::m_expectedInternalCollision, and DcfStateTest::ExpectedCollision::nSlots.
Referenced by DoRun().
Here is the caller graph for this function:| void DcfManagerTest::NotifyAccessGranted | ( | uint32_t | i | ) |
Notify access granted function.
| i | the DCF state |
Definition at line 338 of file dcf-manager-test.cc.
References m_ackTimeoutValue, m_dcfManager, m_dcfStates, DcfStateTest::m_expectedGrants, ns3::MicroSeconds(), ns3::DcfManager::NotifyAckTimeoutStartNow(), ns3::DcfManager::NotifyTxStartNow(), ns3::Now(), and NS_TEST_EXPECT_MSG_EQ.
Referenced by DcaTxopTest::NotifyAccessGranted().
Here is the call graph for this function:
Here is the caller graph for this function:| void DcfManagerTest::NotifyChannelSwitching | ( | uint32_t | i | ) |
Notify channel switching function.
| i | the DCF state |
Definition at line 389 of file dcf-manager-test.cc.
References m_dcfStates, DcfStateTest::m_expectedGrants, ns3::MicroSeconds(), ns3::Now(), and NS_TEST_EXPECT_MSG_EQ.
Referenced by DcaTxopTest::NotifyChannelSwitching().
Here is the call graph for this function:
Here is the caller graph for this function:| void DcfManagerTest::NotifyCollision | ( | uint32_t | i | ) |
Notify collision function.
| i | the DCF state |
Definition at line 375 of file dcf-manager-test.cc.
References DcfStateTest::ExpectedCollision::at, m_dcfStates, DcfStateTest::m_expectedCollision, ns3::MicroSeconds(), ns3::Now(), NS_TEST_EXPECT_MSG_EQ, DcfStateTest::ExpectedCollision::nSlots, and ns3::DcfState::StartBackoffNow().
Referenced by DcaTxopTest::NotifyCollision().
Here is the call graph for this function:
Here is the caller graph for this function:| void DcfManagerTest::NotifyInternalCollision | ( | uint32_t | i | ) |
Notify internal collision function.
| i | the DCF state |
Definition at line 361 of file dcf-manager-test.cc.
References DcfStateTest::ExpectedCollision::at, m_dcfStates, DcfStateTest::m_expectedInternalCollision, ns3::MicroSeconds(), ns3::Now(), NS_TEST_EXPECT_MSG_EQ, DcfStateTest::ExpectedCollision::nSlots, and ns3::DcfState::StartBackoffNow().
Referenced by DcaTxopTest::NotifyInternalCollision().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Start test function.
| slotTime | the slot time |
| sifs | the SIFS |
| eifsNoDifsNoSifs | the EIFS no DIFS no SIFS |
| ackTimeoutValue | the ack timeout value |
Definition at line 421 of file dcf-manager-test.cc.
References m_ackTimeoutValue, m_dcfManager, ns3::MicroSeconds(), ns3::DcfManager::SetEifsNoDifs(), ns3::DcfManager::SetSifs(), and ns3::DcfManager::SetSlot().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
the ack timeout value
Definition at line 271 of file dcf-manager-test.cc.
Referenced by AddAccessRequestWithSuccessfullAck(), NotifyAccessGranted(), and StartTest().
|
private |
the DCA
Definition at line 270 of file dcf-manager-test.cc.
Referenced by AddDcfState(), and EndTest().
|
private |
the DCF manager
Definition at line 268 of file dcf-manager-test.cc.
Referenced by AddAckTimeoutReset(), AddCcaBusyEvt(), AddDcfState(), AddNavReset(), AddNavStart(), AddRxErrorEvt(), AddRxInsideSifsEvt(), AddRxOkEvt(), AddRxStartEvt(), AddSwitchingEvt(), AddTxEvt(), DoAccessRequest(), EndTest(), NotifyAccessGranted(), and StartTest().
|
private |
the DCF states
Definition at line 269 of file dcf-manager-test.cc.
Referenced by AddAccessRequestWithAckTimeout(), AddAccessRequestWithSuccessfullAck(), AddDcfState(), EndTest(), ExpectCollision(), ExpectInternalCollision(), NotifyAccessGranted(), NotifyChannelSwitching(), NotifyCollision(), and NotifyInternalCollision().