Test PHY going to TRX_OFF after CSMA failure (MAC->RxOnWhenIdle(false)) More...
Public Member Functions | |
TestRxOffWhenIdleAfterCsmaFailure () | |
~TestRxOffWhenIdleAfterCsmaFailure () 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 | DataConfirm (McpsDataConfirmParams params) |
Function called when a Data confirm is invoked (After Tx Attempt) | |
void | DataIndication (McpsDataIndicationParams params, Ptr< Packet > p) |
Function called when a Data indication is invoked. | |
void | DoRun () override |
Implementation to actually run this TestCase. | |
void | StateChangeNotificationDev0 (std::string context, Time now, PhyEnumeration oldState, PhyEnumeration newState) |
Function called when a the PHY state changes in Dev0 [00:01]. | |
void | StateChangeNotificationDev2 (std::string context, Time now, PhyEnumeration oldState, PhyEnumeration newState) |
Function called when a the PHY state changes in Dev2 [00:03]. | |
Private Attributes | |
PhyEnumeration | m_dev0State |
Stores the PHY state of device 0 [00:01]. | |
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... | |
Static Public Attributes inherited from ns3::TestCase | |
static constexpr auto | QUICK = Duration::QUICK |
Deprecated test duration simple enums. | |
static constexpr auto | EXTENSIVE = Duration::EXTENSIVE |
static constexpr auto | TAKES_FOREVER = Duration::TAKES_FOREVER |
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. | |
Test PHY going to TRX_OFF after CSMA failure (MAC->RxOnWhenIdle(false))
Definition at line 32 of file lr-wpan-mac-test.cc.
TestRxOffWhenIdleAfterCsmaFailure::TestRxOffWhenIdleAfterCsmaFailure | ( | ) |
Definition at line 78 of file lr-wpan-mac-test.cc.
|
override |
Definition at line 83 of file lr-wpan-mac-test.cc.
|
private |
Function called when a Data confirm is invoked (After Tx Attempt)
params | MCPS data confirm parameters |
Definition at line 94 of file lr-wpan-mac-test.cc.
References NS_LOG_DEBUG.
Referenced by DoRun().
|
private |
Function called when a Data indication is invoked.
params | MCPS data indication parameters |
p | packet |
Definition at line 88 of file lr-wpan-mac-test.cc.
References NS_LOG_DEBUG.
Referenced by DoRun().
|
overrideprivatevirtual |
Implementation to actually run this TestCase.
Subclasses should override this method to conduct their tests.
Implements ns3::TestCase.
Definition at line 133 of file lr-wpan-mac-test.cc.
References ns3::Create(), ns3::CreateObject(), DataConfirm(), DataIndication(), ns3::Simulator::Destroy(), ns3::LOG_LEVEL_DEBUG, ns3::LOG_PREFIX_FUNC, ns3::LOG_PREFIX_TIME, ns3::LogComponentEnable(), ns3::LogComponentEnableAll(), m_dev0State, ns3::MakeCallback(), ns3::lrwpan::LrWpanMac::McpsDataRequest(), NS_LOG_DEBUG, NS_TEST_EXPECT_MSG_EQ, ns3::Simulator::Run(), ns3::Simulator::ScheduleWithContext(), ns3::Seconds(), ns3::lrwpan::SHORT_ADDR, StateChangeNotificationDev0(), and StateChangeNotificationDev2().
|
private |
Function called when a the PHY state changes in Dev0 [00:01].
context | context |
now | time at which the function is called |
oldState | old PHY state |
newState | new PHY state |
Definition at line 107 of file lr-wpan-mac-test.cc.
References ns3::Time::As(), ns3::LrWpanHelper::LrWpanPhyEnumerationPrinter(), m_dev0State, ns3::Simulator::Now(), NS_LOG_DEBUG, and ns3::Time::S.
Referenced by DoRun().
|
private |
Function called when a the PHY state changes in Dev2 [00:03].
context | context |
now | time at which the function is called |
oldState | old PHY state |
newState | new PHY state |
Definition at line 121 of file lr-wpan-mac-test.cc.
References ns3::Time::As(), ns3::LrWpanHelper::LrWpanPhyEnumerationPrinter(), ns3::Simulator::Now(), NS_LOG_DEBUG, and ns3::Time::S.
Referenced by DoRun().
|
private |
Stores the PHY state of device 0 [00:01].
Definition at line 75 of file lr-wpan-mac-test.cc.
Referenced by DoRun(), and StateChangeNotificationDev0().