LrWpan Dataframe transmission with Interframe Space. More...
Public Member Functions | |
LrWpanDataIfsTestCase () | |
virtual | ~LrWpanDataIfsTestCase () |
![]() | |
virtual | ~TestCase () |
Destructor. More... | |
std::string | GetName (void) const |
Private Member Functions | |
virtual void | DoRun (void) |
Implementation to actually run this TestCase. More... | |
Static Private Member Functions | |
static void | DataConfirm (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, McpsDataConfirmParams params) |
static void | DataReceived (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, Ptr< const Packet >) |
static void | MacState (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, LrWpanMacState oldValue, LrWpanMacState newValue) |
Private Attributes | |
Time | m_ackRxTime |
The time of the received acknoledgment. More... | |
Time | m_endIfs |
The time where the Interframe Space ended. More... | |
Time | m_lastTxTime |
The time of the last transmitted packet. More... | |
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, 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 Dataframe transmission with Interframe Space.
Definition at line 46 of file lr-wpan-ifs-test.cc.
LrWpanDataIfsTestCase::LrWpanDataIfsTestCase | ( | ) |
Definition at line 79 of file lr-wpan-ifs-test.cc.
|
virtual |
Definition at line 85 of file lr-wpan-ifs-test.cc.
|
staticprivate |
Definition at line 91 of file lr-wpan-ifs-test.cc.
References ns3::Time::GetSeconds(), m_lastTxTime, and ns3::Now().
Referenced by DoRun().
|
staticprivate |
Definition at line 99 of file lr-wpan-ifs-test.cc.
References ns3::Packet::Copy(), ns3::Time::GetSeconds(), ns3::LrWpanMacHeader::IsAcknowledgment(), m_ackRxTime, ns3::Now(), NS_ASSERT, and ns3::Packet::RemoveHeader().
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 126 of file lr-wpan-ifs-test.cc.
References ns3::Node::AddDevice(), third::channel, DataConfirm(), DataReceived(), m_ackRxTime, ns3::McpsDataRequestParams::m_dstPanId, m_endIfs, m_lastTxTime, MacState(), ns3::MakeBoundCallback(), ns3::MicroSeconds(), NS_TEST_EXPECT_MSG_EQ, ns3::Seconds(), ns3::MobilityModel::SetPosition(), ns3::SHORT_ADDR, and ns3::TX_OPTION_ACK.
|
staticprivate |
Definition at line 112 of file lr-wpan-ifs-test.cc.
References ns3::Time::GetSeconds(), m_endIfs, ns3::MAC_IDLE, and ns3::Now().
Referenced by DoRun().
|
private |
The time of the received acknoledgment.
Definition at line 72 of file lr-wpan-ifs-test.cc.
Referenced by DataReceived(), and DoRun().
|
private |
The time where the Interframe Space ended.
Definition at line 73 of file lr-wpan-ifs-test.cc.
Referenced by DoRun(), and MacState().
|
private |
The time of the last transmitted packet.
Definition at line 71 of file lr-wpan-ifs-test.cc.
Referenced by DataConfirm(), and DoRun().