Public Member Functions | |
DcfManagerTest () | |
virtual void | DoRun (void) |
Implementation to actually run this TestCase. More... | |
void | NotifyAccessGranted (uint32_t i) |
void | NotifyChannelSwitching (uint32_t i) |
void | NotifyCollision (uint32_t i) |
void | NotifyInternalCollision (uint32_t i) |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Private Types | |
typedef std::vector< DcfStateTest * > | DcfStates |
Private Member Functions | |
void | AddAccessRequest (uint64_t at, uint64_t txTime, uint64_t expectedGrantTime, uint32_t from) |
void | AddAccessRequestWithAckTimeout (uint64_t at, uint64_t txTime, uint64_t expectedGrantTime, uint32_t from) |
void | AddAccessRequestWithSuccessfullAck (uint64_t at, uint64_t txTime, uint64_t expectedGrantTime, uint32_t ackDelay, uint32_t from) |
void | AddAckTimeoutReset (uint64_t at) |
void | AddCcaBusyEvt (uint64_t at, uint64_t duration) |
void | AddDcfState (uint32_t aifsn) |
void | AddNavReset (uint64_t at, uint64_t duration) |
void | AddNavStart (uint64_t at, uint64_t duration) |
void | AddRxErrorEvt (uint64_t at, uint64_t duration) |
void | AddRxInsideSifsEvt (uint64_t at, uint64_t duration) |
void | AddRxOkEvt (uint64_t at, uint64_t duration) |
void | AddRxStartEvt (uint64_t at, uint64_t duration) |
void | AddSwitchingEvt (uint64_t at, uint64_t duration) |
void | AddTxEvt (uint64_t at, uint64_t duration) |
void | DoAccessRequest (uint64_t txTime, uint64_t expectedGrantTime, DcfStateTest *state) |
void | EndTest (void) |
void | ExpectCollision (uint64_t time, uint32_t nSlots, uint32_t from) |
void | ExpectInternalCollision (uint64_t time, uint32_t nSlots, uint32_t from) |
void | StartTest (uint64_t slotTime, uint64_t sifs, uint64_t eifsNoDifsNoSifs, uint32_t ackTimeoutValue=20) |
Private Attributes | |
uint32_t | m_ackTimeoutValue |
DcfManager * | m_dcfManager |
DcfStates | m_dcfStates |
Additional Inherited Members | |
![]() | |
enum | TestDuration { QUICK = 1, EXTENSIVE = 2, TAKES_FOREVER = 3 } |
How long the test takes to execute. More... | |
![]() | |
TestCase (std::string name) | |
Constructor. More... | |
void | AddTestCase (TestCase *testCase, enum TestDuration duration) |
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... | |
Definition at line 63 of file dcf-manager-test.cc.
|
private |
Definition at line 104 of file dcf-manager-test.cc.
DcfManagerTest::DcfManagerTest | ( | ) |
Definition at line 163 of file dcf-manager-test.cc.
|
private |
Definition at line 339 of file dcf-manager-test.cc.
References AddAccessRequestWithSuccessfullAck().
Referenced by DoRun().
|
private |
Definition at line 346 of file dcf-manager-test.cc.
References DoAccessRequest(), m_dcfStates, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
|
private |
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 355 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().
|
private |
Definition at line 332 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by AddAccessRequestWithSuccessfullAck().
|
private |
Definition at line 373 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
|
private |
Definition at line 262 of file dcf-manager-test.cc.
References ns3::DcfManager::Add(), DcfStateTest::DcfStateTest(), m_dcfManager, m_dcfStates, and ns3::DcfState::SetAifsn().
Referenced by DoRun().
|
private |
Definition at line 316 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
|
private |
Definition at line 324 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
|
private |
Definition at line 306 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
|
private |
Definition at line 298 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
|
private |
Definition at line 288 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
|
private |
Definition at line 389 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
|
private |
Definition at line 381 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
|
private |
Definition at line 184 of file dcf-manager-test.cc.
References m_dcfManager, ns3::MicroSeconds(), and ns3::Now().
Referenced by DoRun().
|
private |
Definition at line 366 of file dcf-manager-test.cc.
References m_dcfManager, DcfStateTest::QueueTx(), and ns3::DcfManager::RequestAccess().
Referenced by AddAccessRequestWithAckTimeout(), and AddAccessRequestWithSuccessfullAck().
|
virtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 397 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().
|
private |
Definition at line 271 of file dcf-manager-test.cc.
References m_dcfManager, m_dcfStates, DcfStateTest::m_expectedCollision, DcfStateTest::m_expectedGrants, DcfStateTest::m_expectedInternalCollision, and NS_TEST_EXPECT_MSG_EQ.
Referenced by DoRun().
|
private |
Definition at line 242 of file dcf-manager-test.cc.
References DcfStateTest::ExpectedCollision::at, m_dcfStates, DcfStateTest::m_expectedCollision, and DcfStateTest::ExpectedCollision::nSlots.
Referenced by DoRun().
|
private |
Definition at line 232 of file dcf-manager-test.cc.
References DcfStateTest::ExpectedCollision::at, m_dcfStates, DcfStateTest::m_expectedInternalCollision, and DcfStateTest::ExpectedCollision::nSlots.
Referenced by DoRun().
void DcfManagerTest::NotifyAccessGranted | ( | uint32_t | i | ) |
Definition at line 169 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 DcfStateTest::DoNotifyAccessGranted().
void DcfManagerTest::NotifyChannelSwitching | ( | uint32_t | i | ) |
Definition at line 220 of file dcf-manager-test.cc.
References m_dcfStates, DcfStateTest::m_expectedGrants, ns3::MicroSeconds(), ns3::Now(), and NS_TEST_EXPECT_MSG_EQ.
Referenced by DcfStateTest::DoNotifyChannelSwitching().
void DcfManagerTest::NotifyCollision | ( | uint32_t | i | ) |
Definition at line 206 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 DcfStateTest::DoNotifyCollision().
void DcfManagerTest::NotifyInternalCollision | ( | uint32_t | i | ) |
Definition at line 192 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 DcfStateTest::DoNotifyInternalCollision().
|
private |
Definition at line 252 of file dcf-manager-test.cc.
References ns3::DcfState::DcfManager, m_ackTimeoutValue, m_dcfManager, ns3::MicroSeconds(), ns3::DcfManager::SetEifsNoDifs(), ns3::DcfManager::SetSifs(), and ns3::DcfManager::SetSlot().
Referenced by DoRun().
|
private |
Definition at line 108 of file dcf-manager-test.cc.
Referenced by AddAccessRequestWithSuccessfullAck(), NotifyAccessGranted(), and StartTest().
|
private |
Definition at line 106 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 |
Definition at line 107 of file dcf-manager-test.cc.
Referenced by AddAccessRequestWithAckTimeout(), AddAccessRequestWithSuccessfullAck(), AddDcfState(), EndTest(), ExpectCollision(), ExpectInternalCollision(), NotifyAccessGranted(), NotifyChannelSwitching(), NotifyCollision(), and NotifyInternalCollision().