LrWpan Dataframe transmission with Interframe Space. More...
Inheritance diagram for LrWpanDataIfsTestCase:
Collaboration diagram for LrWpanDataIfsTestCase:Public Member Functions | |
| LrWpanDataIfsTestCase () | |
| ~LrWpanDataIfsTestCase () override | |
Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| virtual | ~TestCase () |
| Destructor. | |
| std::string | GetName () const |
| TestCase & | operator= (const TestCase &)=delete |
Private Member Functions | |
| void | DoRun () override |
| Implementation to actually run this TestCase. | |
Static Private Member Functions | |
| static void | DataConfirm (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, McpsDataConfirmParams params) |
| Function called when DataConfirm is hit. | |
| static void | DataReceivedDev0 (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, Ptr< const Packet > p) |
| Function called when DataReceived is hit. | |
| static void | DataReceivedDev1 (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, Ptr< const Packet >) |
| Function called when DataConfirm is hit. | |
| static void | IfsEnd (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, Time IfsTime) |
| Function called when the IFS ends. | |
| static void | PhyDataRxStart (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, Ptr< const Packet > p) |
| Function called when PhyDataRxStart is hit. | |
Private Attributes | |
| Time | m_ackRxTime |
| The time of the received acknowledgment. | |
| Time | m_endIfs |
| The time where the Interframe Space ended. | |
| Time | m_lastTxTime |
| The time of the last transmitted packet. | |
| Time | m_phyStartRx |
| The time the phy start receiving a packet. | |
Additional Inherited Members | |
Public Types inherited from ns3::TestCase | |
| enum class | Duration { 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. | |
| void | AddTestCase (TestCase *testCase, Duration duration=Duration::QUICK) |
| Add an individual child TestCase to this test suite. | |
| TestCase * | GetParent () const |
| Get the parent of this TestCase. | |
| bool | IsStatusFailure () const |
| Check if any tests failed. | |
| bool | IsStatusSuccess () const |
| Check if all tests passed. | |
| void | SetDataDir (std::string directory) |
| Set the data directory where reference trace files can be found. | |
| 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. | |
| bool | MustAssertOnFailure () const |
| Check if this run should assert on failure. | |
| bool | MustContinueOnFailure () const |
| Check if this run should continue on failure. | |
| std::string | CreateDataDirFilename (std::string filename) |
| Construct the full path to a file in the data directory. | |
| std::string | CreateTempDirFilename (std::string filename) |
| Construct the full path to a file in a temporary directory. | |
LrWpan Dataframe transmission with Interframe Space.
Definition at line 35 of file lr-wpan-ifs-test.cc.
| LrWpanDataIfsTestCase::LrWpanDataIfsTestCase | ( | ) |
Definition at line 97 of file lr-wpan-ifs-test.cc.
References ns3::TestCase::TestCase().
Referenced by DataConfirm(), DataReceivedDev0(), DataReceivedDev1(), IfsEnd(), and PhyDataRxStart().
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
Definition at line 102 of file lr-wpan-ifs-test.cc.
|
staticprivate |
Function called when DataConfirm is hit.
| testcase | pointer to the testcase |
| dev | originating NetDevice |
| params | the MCPS params |
Definition at line 107 of file lr-wpan-ifs-test.cc.
References LrWpanDataIfsTestCase(), m_lastTxTime, and ns3::Simulator::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Function called when DataReceived is hit.
| testcase | pointer to the testcase |
| dev | originating NetDevice |
| p | packet |
Definition at line 116 of file lr-wpan-ifs-test.cc.
References LrWpanDataIfsTestCase(), ns3::Time::GetSeconds(), ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), ns3::lrwpan::LrWpanMacHeader::IsAcknowledgment(), ns3::Mac16Address::IsBroadcast(), m_ackRxTime, and ns3::Simulator::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Function called when DataConfirm is hit.
| testcase | pointer to the testcase |
| dev | originating NetDevice |
| p | packet |
Definition at line 146 of file lr-wpan-ifs-test.cc.
References LrWpanDataIfsTestCase(), ns3::Create(), ns3::Time::GetSeconds(), ns3::lrwpan::LrWpanMacHeader::GetShortDstAddr(), ns3::Mac16Address::IsBroadcast(), ns3::lrwpan::McpsDataRequestParams::m_dstAddr, ns3::lrwpan::McpsDataRequestParams::m_dstAddrMode, ns3::lrwpan::McpsDataRequestParams::m_dstPanId, ns3::lrwpan::McpsDataRequestParams::m_msduHandle, ns3::lrwpan::McpsDataRequestParams::m_srcAddrMode, ns3::lrwpan::LrWpanMac::McpsDataRequest(), ns3::Simulator::Now(), ns3::Simulator::ScheduleNow(), and ns3::lrwpan::SHORT_ADDR.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 183 of file lr-wpan-ifs-test.cc.
References ns3::Create(), ns3::CreateObject(), DataConfirm(), DataReceivedDev0(), DataReceivedDev1(), ns3::Simulator::Destroy(), IfsEnd(), ns3::LOG_LEVEL_DEBUG, ns3::LOG_PREFIX_FUNC, ns3::LOG_PREFIX_TIME, ns3::LogComponentEnable(), ns3::LogComponentEnableAll(), m_ackRxTime, m_endIfs, m_lastTxTime, m_phyStartRx, ns3::MakeBoundCallback(), ns3::lrwpan::LrWpanMac::McpsDataRequest(), ns3::MicroSeconds(), NS_TEST_ASSERT_MSG_GT, NS_TEST_EXPECT_MSG_EQ, PhyDataRxStart(), ns3::Simulator::Run(), ns3::Simulator::ScheduleWithContext(), ns3::Seconds(), ns3::lrwpan::SHORT_ADDR, and ns3::lrwpan::TX_OPTION_ACK.
Here is the call graph for this function:
|
staticprivate |
Function called when the IFS ends.
| testcase | pointer to the testcase |
| dev | originating NetDevice |
| IfsTime | the IFS time |
Definition at line 174 of file lr-wpan-ifs-test.cc.
References LrWpanDataIfsTestCase(), m_endIfs, and ns3::Simulator::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticprivate |
Function called when PhyDataRxStart is hit.
| testcase | pointer to the testcase |
| dev | originating NetDevice |
| p | packet |
Definition at line 137 of file lr-wpan-ifs-test.cc.
References LrWpanDataIfsTestCase(), m_phyStartRx, and ns3::Simulator::Now().
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
The time of the received acknowledgment.
Definition at line 92 of file lr-wpan-ifs-test.cc.
Referenced by DataReceivedDev0(), and DoRun().
|
private |
The time where the Interframe Space ended.
Definition at line 93 of file lr-wpan-ifs-test.cc.
|
private |
The time of the last transmitted packet.
Definition at line 91 of file lr-wpan-ifs-test.cc.
Referenced by DataConfirm(), and DoRun().
|
private |
The time the phy start receiving a packet.
Definition at line 94 of file lr-wpan-ifs-test.cc.
Referenced by DoRun(), and PhyDataRxStart().