LrWpan ACK Test. More...
Public Member Functions | |
LrWpanAckTestCase () | |
Public Member Functions inherited from ns3::TestCase | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Static Public Member Functions | |
static void | DataConfirm (LrWpanAckTestCase *testCase, Ptr< LrWpanNetDevice > dev, McpsDataConfirmParams params) |
Function called when DataConfirm is hit. More... | |
static void | DataIndication (LrWpanAckTestCase *testCase, Ptr< LrWpanNetDevice > dev, McpsDataIndicationParams params, Ptr< Packet > p) |
Function called when DataIndication is hit. More... | |
static void | ExtendedAddressingDataConfirm (LrWpanAckTestCase *testCase, Ptr< LrWpanNetDevice > dev, McpsDataConfirmParams params) |
Function called when DataConfirm is hit in extended addressing test. More... | |
static void | ExtendedAddressingDataIndication (LrWpanAckTestCase *testCase, Ptr< LrWpanNetDevice > dev, McpsDataIndicationParams params, Ptr< Packet > p) |
Function called when DataIndication is hit in extended addressing test. More... | |
Private Member Functions | |
virtual void | DoRun (void) |
Implementation to actually run this TestCase. More... | |
Private Attributes | |
Time | m_replyAckTime |
Reply ack time. More... | |
Time | m_replyArrivalTime |
Reply arrival time. More... | |
Time | m_replyTime |
Reply time. More... | |
Time | m_requestAckTime |
Request ack time. More... | |
Time | m_requestTime |
Request time. 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... | |
LrWpan ACK Test.
Definition at line 50 of file lr-wpan-ack-test.cc.
LrWpanAckTestCase::LrWpanAckTestCase | ( | ) |
Definition at line 96 of file lr-wpan-ack-test.cc.
References m_replyAckTime, m_replyArrivalTime, m_replyTime, m_requestAckTime, m_requestTime, and ns3::Seconds().
|
static |
Function called when DataConfirm is hit.
testCase | The TestCase. |
dev | The LrWpanNetDevice. |
params | The MCPS params. |
Definition at line 130 of file lr-wpan-ack-test.cc.
References ns3::LrWpanNetDevice::GetAddress(), m_replyAckTime, m_requestAckTime, and ns3::Now().
Referenced by DoRun().
|
static |
Function called when DataIndication is hit.
testCase | The TestCase. |
dev | The LrWpanNetDevice. |
params | The MCPS params. |
p | the packet. |
Definition at line 107 of file lr-wpan-ack-test.cc.
References ns3::LrWpanNetDevice::GetAddress(), ns3::LrWpanNetDevice::GetMac(), m_replyArrivalTime, m_replyTime, ns3::McpsDataIndicationParams::m_srcAddrMode, ns3::Now(), ns3::SHORT_ADDR, and ns3::TX_OPTION_NONE.
Referenced by DoRun().
|
privatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 179 of file lr-wpan-ack-test.cc.
References ns3::Node::AddDevice(), third::channel, DataConfirm(), DataIndication(), ns3::EXT_ADDR, ExtendedAddressingDataConfirm(), ExtendedAddressingDataIndication(), m_replyAckTime, m_replyArrivalTime, m_replyTime, m_requestAckTime, m_requestTime, ns3::McpsDataRequestParams::m_srcAddrMode, ns3::MakeBoundCallback(), ns3::Now(), NS_TEST_EXPECT_MSG_LT, ns3::Seconds(), ns3::MobilityModel::SetPosition(), ns3::SHORT_ADDR, and ns3::TX_OPTION_ACK.
|
static |
Function called when DataConfirm is hit in extended addressing test.
testCase | The TestCase. |
dev | The LrWpanNetDevice. |
params | The MCPS params. |
Definition at line 166 of file lr-wpan-ack-test.cc.
References ns3::LrWpanNetDevice::GetMac(), m_replyAckTime, m_requestAckTime, and ns3::Now().
Referenced by DoRun().
|
static |
Function called when DataIndication is hit in extended addressing test.
testCase | The TestCase. |
dev | The LrWpanNetDevice. |
params | The MCPS params. |
p | the packet. |
Definition at line 143 of file lr-wpan-ack-test.cc.
References ns3::EXT_ADDR, ns3::LrWpanNetDevice::GetMac(), m_replyArrivalTime, m_replyTime, ns3::McpsDataIndicationParams::m_srcAddrMode, ns3::Now(), and ns3::TX_OPTION_NONE.
Referenced by DoRun().
|
private |
Reply ack time.
Definition at line 92 of file lr-wpan-ack-test.cc.
Referenced by DataConfirm(), DoRun(), ExtendedAddressingDataConfirm(), and LrWpanAckTestCase().
|
private |
Reply arrival time.
Definition at line 93 of file lr-wpan-ack-test.cc.
Referenced by DataIndication(), DoRun(), ExtendedAddressingDataIndication(), and LrWpanAckTestCase().
|
private |
Reply time.
Definition at line 91 of file lr-wpan-ack-test.cc.
Referenced by DataIndication(), DoRun(), ExtendedAddressingDataIndication(), and LrWpanAckTestCase().
|
private |
Request ack time.
Definition at line 90 of file lr-wpan-ack-test.cc.
Referenced by DataConfirm(), DoRun(), ExtendedAddressingDataConfirm(), and LrWpanAckTestCase().
|
private |
Request time.
Definition at line 89 of file lr-wpan-ack-test.cc.
Referenced by DoRun(), and LrWpanAckTestCase().