LrWpan Dataframe transmission with Interframe Space. More...
Inheritance diagram for LrWpanDataIfsTestCase:
Collaboration diagram for LrWpanDataIfsTestCase:Public Member Functions | |
| LrWpanDataIfsTestCase () | |
| virtual | ~LrWpanDataIfsTestCase () |
Public Member Functions inherited from ns3::TestCase | |
| TestCase (const TestCase &)=delete | |
| virtual | ~TestCase () |
| Destructor. More... | |
| std::string | GetName (void) const |
| TestCase & | operator= (const TestCase &)=delete |
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) |
| Function called when DataConfirm is hit. More... | |
| static void | DataReceivedDev0 (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, Ptr< const Packet > p) |
| Function called when DataReceived is hit. More... | |
| static void | DataReceivedDev1 (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, Ptr< const Packet >) |
| Function called when DataConfirm is hit. More... | |
| static void | IfsEnd (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, Time IfsTime) |
| Function called when the IFS ends. More... | |
| static void | PhyDataRxStart (LrWpanDataIfsTestCase *testcase, Ptr< LrWpanNetDevice > dev, Ptr< const Packet > p) |
| Function called when PhyDataRxStart is hit. More... | |
Private Attributes | |
| Time | m_ackRxTime |
| The time of the received acknowledgment. More... | |
| Time | m_endIfs |
| The time where the Interframe Space ended. More... | |
| Time | m_lastTxTime |
| The time of the last transmitted packet. More... | |
| Time | m_phyStartRx |
| The time the phy start receiving a packet. 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 Dataframe transmission with Interframe Space.
Definition at line 47 of file lr-wpan-ifs-test.cc.
| LrWpanDataIfsTestCase::LrWpanDataIfsTestCase | ( | ) |
Definition at line 116 of file lr-wpan-ifs-test.cc.
|
virtual |
Definition at line 120 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 124 of file lr-wpan-ifs-test.cc.
References m_lastTxTime, and ns3::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 131 of file lr-wpan-ifs-test.cc.
References ns3::Packet::Copy(), ns3::Time::GetSeconds(), ns3::LrWpanMacHeader::GetShortDstAddr(), ns3::LrWpanMacHeader::IsAcknowledgment(), ns3::Mac16Address::IsBroadcast(), m_ackRxTime, ns3::Now(), and ns3::Packet::RemoveHeader().
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 158 of file lr-wpan-ifs-test.cc.
References ns3::Packet::Copy(), ns3::LrWpanNetDevice::GetMac(), ns3::Time::GetSeconds(), ns3::LrWpanMacHeader::GetShortDstAddr(), ns3::Mac16Address::IsBroadcast(), ns3::McpsDataRequestParams::m_dstAddr, ns3::McpsDataRequestParams::m_dstAddrMode, ns3::McpsDataRequestParams::m_dstPanId, ns3::McpsDataRequestParams::m_msduHandle, ns3::McpsDataRequestParams::m_srcAddrMode, ns3::Now(), ns3::Packet::RemoveHeader(), and ns3::SHORT_ADDR.
Referenced by DoRun().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 195 of file lr-wpan-ifs-test.cc.
References ns3::Node::AddDevice(), third::channel, DataConfirm(), DataReceivedDev0(), DataReceivedDev1(), ns3::LrWpanNetDevice::GetCsmaCa(), ns3::LrWpanNetDevice::GetMac(), ns3::LrWpanNetDevice::GetPhy(), IfsEnd(), ns3::LOG_LEVEL_DEBUG, ns3::LOG_PREFIX_FUNC, ns3::LOG_PREFIX_TIME, ns3::LogComponentEnable(), ns3::LogComponentEnableAll(), m_ackRxTime, ns3::McpsDataRequestParams::m_dstAddr, ns3::McpsDataRequestParams::m_dstAddrMode, ns3::McpsDataRequestParams::m_dstPanId, m_endIfs, m_lastTxTime, ns3::McpsDataRequestParams::m_msduHandle, m_phyStartRx, ns3::McpsDataRequestParams::m_srcAddrMode, ns3::McpsDataRequestParams::m_txOptions, ns3::MakeBoundCallback(), ns3::MicroSeconds(), NS_TEST_ASSERT_MSG_GT, NS_TEST_EXPECT_MSG_EQ, PhyDataRxStart(), ns3::Seconds(), ns3::LrWpanNetDevice::SetAddress(), ns3::LrWpanNetDevice::SetChannel(), ns3::SHORT_ADDR, and ns3::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 187 of file lr-wpan-ifs-test.cc.
References m_endIfs, and ns3::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 151 of file lr-wpan-ifs-test.cc.
References m_phyStartRx, and ns3::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 108 of file lr-wpan-ifs-test.cc.
Referenced by DataReceivedDev0(), and DoRun().
|
private |
The time where the Interframe Space ended.
Definition at line 109 of file lr-wpan-ifs-test.cc.
|
private |
The time of the last transmitted packet.
Definition at line 107 of file lr-wpan-ifs-test.cc.
Referenced by DataConfirm(), and DoRun().
|
private |
The time the phy start receiving a packet.
Definition at line 110 of file lr-wpan-ifs-test.cc.
Referenced by DoRun(), and PhyDataRxStart().